129 【战斗】战斗系统-服务端(机器人增加名字配置)
| | |
| | | struct Robot
|
| | | {
|
| | | DWORD _ID; //机器人ID,同玩家ID
|
| | | char RobotName;
|
| | | char ViewCache; //机器人缓存
|
| | | };
|
| | |
| | |
|
| | | "Robot":(
|
| | | ("DWORD", "ID", 1),
|
| | | ("char", "RobotName", 0),
|
| | | ("char", "ViewCache", 0),
|
| | | ),
|
| | | }
|
| | |
| | | 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):
|
| | |
| | | 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:
|
| | |
| | |
|
| | | #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))
|