| | |
| | | OnlineType = 0 #(BYTE OnlineType)//在线状态, 0 不在线 1在线
|
| | | IsInTeam = 0 #(BYTE IsInTeam)//是否有队伍
|
| | | ServerGroupID = 0 #(DWORD ServerGroupID)//服务器组ID
|
| | | Face = 0 #(DWORD Face)//基本脸型
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsInTeam,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ServerGroupID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.OnlineType = 0
|
| | | self.IsInTeam = 0
|
| | | self.ServerGroupID = 0
|
| | | self.Face = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.OnlineType)
|
| | | data = CommFunc.WriteBYTE(data, self.IsInTeam)
|
| | | data = CommFunc.WriteDWORD(data, self.ServerGroupID)
|
| | | data = CommFunc.WriteDWORD(data, self.Face)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | RealmLV:%d,
|
| | | OnlineType:%d,
|
| | | IsInTeam:%d,
|
| | | ServerGroupID:%d
|
| | | ServerGroupID:%d,
|
| | | Face:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.RealmLV,
|
| | | self.OnlineType,
|
| | | self.IsInTeam,
|
| | | self.ServerGroupID
|
| | | self.ServerGroupID,
|
| | | self.Face
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | LV = 0 #(WORD LV)//等级
|
| | | RealmLV = 0 #(WORD RealmLV)//境界
|
| | | OnlineType = 0 #(BYTE OnlineType)//0不在线 1在线 2脱机在线
|
| | | Face = 0 #(DWORD Face)//基本脸型
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.LV = 0
|
| | | self.RealmLV = 0
|
| | | self.OnlineType = 0
|
| | | self.Face = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 2
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteWORD(data, self.LV)
|
| | | data = CommFunc.WriteWORD(data, self.RealmLV)
|
| | | data = CommFunc.WriteBYTE(data, self.OnlineType)
|
| | | data = CommFunc.WriteDWORD(data, self.Face)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | Job:%d,
|
| | | LV:%d,
|
| | | RealmLV:%d,
|
| | | OnlineType:%d
|
| | | OnlineType:%d,
|
| | | Face:%d
|
| | | '''\
|
| | | %(
|
| | | self.PlayerID,
|
| | |
| | | self.Job,
|
| | | self.LV,
|
| | | self.RealmLV,
|
| | | self.OnlineType
|
| | | self.OnlineType,
|
| | | self.Face
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | | elif packType == IPY_GameServer.CDBPlayerRefresh_LV:
|
| | | curPlayer.SetLV(packValue)
|
| | | PlayerSocial.UpdateSocialInfo(curPlayer.GetID(), packType, packValue)
|
| | | #玩家等级记录
|
| | | playerID = curPlayer.GetID()
|
| | | if playerID in PyGameData.g_todayPlayerLVDict:
|
| | |
| | |
|
| | | elif packType == IPY_GameServer.CDBPlayerRefresh_OfficialRank:
|
| | | curPlayer.SetOfficialRank(packValue)
|
| | | PlayerSocial.UpdateSocialInfo(curPlayer.GetID(), packType, packValue)
|
| | | #更新排行榜的境界
|
| | | PlayerBillboard.UpdateBillboardRealm(curPlayer)
|
| | | elif packType == IPY_GameServer.CDBPlayerRefresh_Face:
|
| | | curPlayer.SetFace(packValue)
|
| | | PlayerBillboard.UpdateBillboardFace(curPlayer)
|
| | |
|
| | | #社交信息
|
| | | PlayerSocial.UpdateSocialInfo(curPlayer.GetID(), packType, packValue)
|
| | | #组队成员刷新
|
| | | PlayerTeam.PlayerTeamMemberRefresh(curPlayer, packType, packValue, tick)
|
| | | #家族刷新
|
| | |
| | |
|
| | | def GetBillboardOperateInfo(curPlayer):
|
| | | # 排行榜中所保存的运营商相关信息
|
| | | platform = curPlayer.GetAccID()
|
| | | if platform in ["tencent"]:
|
| | | return curPlayer.GetOperateInfo()
|
| | | return platform
|
| | | return curPlayer.GetFace()
|
| | | # platform = curPlayer.GetAccID()
|
| | | # if platform in ["tencent"]:
|
| | | # return curPlayer.GetOperateInfo()
|
| | | # return platform
|
| | |
|
| | | def UpdateFamilyBillboard(bType, familyBillInfo, cmpValue, cmpValue2=0):
|
| | | ## 更新仙盟排行榜
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def UpdateBillboardFace(curPlayer):
|
| | | ## 更新排行榜中的玩家头像
|
| | | |
| | | curPlayerID = curPlayer.GetID()
|
| | | curFace = curPlayer.GetFace()
|
| | | |
| | | billboardMgr = GameWorld.GetBillboard()
|
| | | for billboardIndex in ShareDefine.BillboardTypeList:
|
| | | billBoard = billboardMgr.FindBillboard(billboardIndex)
|
| | | if not billBoard:
|
| | | #找不到这类型排行榜
|
| | | continue
|
| | | |
| | | playerBillBoardData = billBoard.FindByID(curPlayerID)
|
| | | if not playerBillBoardData:
|
| | | #该玩家没有在排行榜上
|
| | | continue
|
| | | |
| | | playerBillBoardData.SetName2(str(curFace))
|
| | | |
| | | return
|
| | |
| | | curMember.SetLV(curPlayer.GetLV())
|
| | | curMember.SetReincarnationLv(curPlayer.GetReincarnationLv())
|
| | | curMember.SetJob(curPlayer.GetJob())
|
| | | curMember.SetOperateInfo(curPlayer.GetOperateInfo())
|
| | | curMember.SetOperateInfo(curPlayer.GetFace()) #curPlayer.GetOperateInfo()
|
| | | curMember.SetOfficialRank(curPlayer.GetOfficialRank())
|
| | | return
|
| | | #---------------------------------------------------------------------
|
| | |
| | | self.playerInfo.LV = curPlayer.GetLV()
|
| | | self.playerInfo.RealmLV = curPlayer.GetOfficialRank()
|
| | | self.playerInfo.OnlineType = 1 # 0 不在线 1 在线 2 脱机在线
|
| | | self.playerInfo.Face = curPlayer.GetFace()
|
| | | if not self.playerInfo.RefCount:
|
| | | self.playerInfo.RefCount = 1
|
| | | return
|
| | |
| | | packStruct.LV = self.playerInfo.LV
|
| | | packStruct.RealmLV = self.playerInfo.RealmLV
|
| | | packStruct.OnlineType = self.playerInfo.OnlineType
|
| | | packStruct.Face = self.playerInfo.Face
|
| | | return packStruct
|
| | |
|
| | | # 更新玩家数据引用, 根据需求是否更新玩家数据
|
| | |
| | | playerSocial.LV = 1
|
| | | playerSocial.RealmLV = 1
|
| | | playerSocial.OnlineType = ChConfig.Def_Offline
|
| | | playerSocial.Face = 0
|
| | | else:
|
| | | cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
|
| | |
|
| | |
| | | playerSocial.LV = cacheDict["LV"]
|
| | | playerSocial.RealmLV = cacheDict["RealmLV"]
|
| | | playerSocial.OnlineType = ChConfig.Def_Offline
|
| | | playerSocial.Face = cacheDict.get("Face", 0)
|
| | |
|
| | | self.SocialInfo[playerID] = SocialPlayerData(playerSocial)
|
| | | socialPlayer = self.SocialInfo[playerID]
|
| | |
| | | socialPlayer.playerInfo.RealmLV = value
|
| | | elif notifyType == IPY_PlayerDefine.CDBPlayerRefresh_PlayerName:
|
| | | socialPlayer.playerInfo.PlayerName = value
|
| | | |
| | | elif notifyType == IPY_PlayerDefine.CDBPlayerRefresh_Face:
|
| | | socialPlayer.playerInfo.Face = value
|
| | | else:
|
| | | return
|
| | | |
| | | Notify_All(playerID, notifyType, value)
|
| | | return
|
| | |
|
| | |
| | | coupleName = couple.GetCoupleName(playerID)
|
| | | coupleJob = couple.GetCoupleJob(playerID)
|
| | | bridePriceMaxID = couple.BridePriceMaxID
|
| | | extraValueStr = "%s|%s|%s|%s" % (extraValueStr, coupleName, coupleJob, bridePriceMaxID)
|
| | | face = player.GetFace()
|
| | | extraValueStr = "%s|%s|%s|%s|%s" % (extraValueStr, coupleName, coupleJob, bridePriceMaxID, face)
|
| | | return extraValueStr
|
| | |
|
| | |
|
| | |
| | | answerPack.RealmLV = 1
|
| | | answerPack.OnlineType = ChConfig.Def_Offline
|
| | | answerPack.ServerGroupID = 0
|
| | | answerPack.Face = 0
|
| | | else:
|
| | | cacheDict = GetCachePropDataDict(curCache)
|
| | | answerPack.PlayerID = clientPack.PlayerID
|
| | |
| | | answerPack.LV = cacheDict["LV"]
|
| | | answerPack.RealmLV = cacheDict["RealmLV"]
|
| | | answerPack.OnlineType = ChConfig.Def_Offline
|
| | | answerPack.Face = cacheDict.get("Face", 0)
|
| | |
|
| | | if GameWorld.IsCrossServer():
|
| | | answerPack.ServerGroupID = cacheDict.get("ServerGroupID", 0)
|
| | |
| | | answerPack.OnlineType = ChConfig.Def_Online
|
| | | answerPack.IsInTeam = tagPlayer.GetTeamID() > 0
|
| | | answerPack.ServerGroupID = PlayerControl.GetPlayerServerGroupID(tagPlayer)
|
| | | answerPack.Face = tagPlayer.GetFace()
|
| | |
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | NetPackCommon.SendFakePack(curPlayer, answerPack)
|
| | |
| | | OnlineType = 0 #(BYTE OnlineType)//在线状态, 0 不在线 1在线
|
| | | IsInTeam = 0 #(BYTE IsInTeam)//是否有队伍
|
| | | ServerGroupID = 0 #(DWORD ServerGroupID)//服务器组ID
|
| | | Face = 0 #(DWORD Face)//基本脸型
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsInTeam,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ServerGroupID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.OnlineType = 0
|
| | | self.IsInTeam = 0
|
| | | self.ServerGroupID = 0
|
| | | self.Face = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.OnlineType)
|
| | | data = CommFunc.WriteBYTE(data, self.IsInTeam)
|
| | | data = CommFunc.WriteDWORD(data, self.ServerGroupID)
|
| | | data = CommFunc.WriteDWORD(data, self.Face)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | RealmLV:%d,
|
| | | OnlineType:%d,
|
| | | IsInTeam:%d,
|
| | | ServerGroupID:%d
|
| | | ServerGroupID:%d,
|
| | | Face:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.RealmLV,
|
| | | self.OnlineType,
|
| | | self.IsInTeam,
|
| | | self.ServerGroupID
|
| | | self.ServerGroupID,
|
| | | self.Face
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | LV = 0 #(WORD LV)//等级
|
| | | RealmLV = 0 #(WORD RealmLV)//境界
|
| | | OnlineType = 0 #(BYTE OnlineType)//0不在线 1在线 2脱机在线
|
| | | Face = 0 #(DWORD Face)//基本脸型
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.LV = 0
|
| | | self.RealmLV = 0
|
| | | self.OnlineType = 0
|
| | | self.Face = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 2
|
| | | length += 2
|
| | | length += 1
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteWORD(data, self.LV)
|
| | | data = CommFunc.WriteWORD(data, self.RealmLV)
|
| | | data = CommFunc.WriteBYTE(data, self.OnlineType)
|
| | | data = CommFunc.WriteDWORD(data, self.Face)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | Job:%d,
|
| | | LV:%d,
|
| | | RealmLV:%d,
|
| | | OnlineType:%d
|
| | | OnlineType:%d,
|
| | | Face:%d
|
| | | '''\
|
| | | %(
|
| | | self.PlayerID,
|
| | |
| | | self.Job,
|
| | | self.LV,
|
| | | self.RealmLV,
|
| | | self.OnlineType
|
| | | self.OnlineType,
|
| | | self.Face
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | | def GetBillboardOperateInfo(curPlayer):
|
| | | # 排行榜中所保存的运营商相关信息
|
| | | platform = curPlayer.GetAccID()
|
| | | if platform in ["tencent"]:
|
| | | return curPlayer.GetOperateInfo()
|
| | | return platform
|
| | | return curPlayer.GetFace()
|
| | | # platform = curPlayer.GetAccID()
|
| | | # if platform in ["tencent"]:
|
| | | # return curPlayer.GetOperateInfo()
|
| | | # return platform
|
| | |
|
| | | def GetBillboardJob(curPlayer): return curPlayer.GetJob()
|
| | |
|
| | |
| | | coupleName = PlayerControl.GetCoupleName(objTalk)
|
| | | coupleJob = PlayerControl.GetCoupleJob(objTalk)
|
| | | bridePriceMaxID = PlayerControl.GetBridePriceMaxID(objTalk)
|
| | | extraValueStr = "%s|%s|%s|%s" % (extraValueStr, coupleName, coupleJob, bridePriceMaxID)
|
| | | face = objTalk.GetFace()
|
| | | extraValueStr = "%s|%s|%s|%s|%s" % (extraValueStr, coupleName, coupleJob, bridePriceMaxID, face)
|
| | | return extraValueStr
|
| | |
|
| | |
|