hxp
2025-11-28 eb63e35d04e6d7bd55ada7f6dfce2567a8577edb
129 【战斗】战斗系统-服务端(机器人增加名字配置)
3个文件已修改
8 ■■■■■ 已修改文件
PySysDB/PySysDBPY.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -2832,5 +2832,6 @@
struct    Robot
{
    DWORD        _ID;    //机器人ID,同玩家ID
    char        RobotName;
    char        ViewCache;    //机器人缓存
};
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -2213,6 +2213,7 @@
                "Robot":(
                        ("DWORD", "ID", 1),
                        ("char", "RobotName", 0),
                        ("char", "ViewCache", 0),
                        ),
                }
@@ -5517,7 +5518,8 @@
        return
        
    def GetID(self): return self.attrTuple[0] # 机器人ID,同玩家ID DWORD
    def GetViewCache(self): return self.attrTuple[1] # 机器人缓存 char
    def GetRobotName(self): return self.attrTuple[1] # char
    def GetViewCache(self): return self.attrTuple[2] # 机器人缓存 char
def Log(msg, playerID=0, par=0):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCache.py
@@ -160,7 +160,6 @@
        GameWorld.DebugLog("加载机器人缓存: %s" % playerID)
        curCache = viewCacheMgr.AddPlayerViewCache(playerID)
        curCache = UpdRobotViewCache(curCache, playerID)
        curCache.SetPlayerName("%s%s" % (GameWorld.GbkToCode("主公"), playerID))
        
    # 假玩家,默认添加
    elif ShareDefine.FackPlayerIDStart <= playerID <= ShareDefine.FackPlayerIDMax:
@@ -365,7 +364,7 @@
    
    #curCache.SetAccID(dbPlayer.AccID)
    
    curCache.SetPlayerName(robotInfo.get("PlayerName", "p%s" % robotID))
    curCache.SetPlayerName(GameWorld.GbkToCode(robotIpyData.GetRobotName()))
    curCache.SetLV(robotInfo.get("LV", 1))
    curCache.SetJob(robotInfo.get("Job", 1))
    curCache.SetRealmLV(robotInfo.get("RealmLV", 0))