Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
| | |
| | | CallPlayerID = 0 #(DWORD CallPlayerID)// 助战的玩家ID,有值时代表真实助战,没有值时为自己打的
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | CallPlayerName = "" #(String CallPlayerName)// 助战的玩家名,size = NameLen
|
| | | Reason = 0 #(BYTE Reason)//仙缘币为0时的原因:1-助战次数上限;2-每日获得上限
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.CallPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CallPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | self.Reason,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.CallPlayerID = 0
|
| | | self.NameLen = 0
|
| | | self.CallPlayerName = ""
|
| | | self.Reason = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.CallPlayerName)
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteDWORD(data, self.CallPlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.CallPlayerName)
|
| | | data = CommFunc.WriteBYTE(data, self.Reason)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | XianyuanCoinAdd:%d,
|
| | | CallPlayerID:%d,
|
| | | NameLen:%d,
|
| | | CallPlayerName:%s
|
| | | CallPlayerName:%s,
|
| | | Reason:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.XianyuanCoinAdd,
|
| | | self.CallPlayerID,
|
| | | self.NameLen,
|
| | | self.CallPlayerName
|
| | | self.CallPlayerName,
|
| | | self.Reason
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | if not gmList or len(gmList) < 2:
|
| | | GameWorld.DebugAnswer(curPlayer, "-------------------------------")
|
| | | GameWorld.DebugAnswer(curPlayer, "查看登记信息: HelpCheckInInfo")
|
| | | GameWorld.DebugAnswer(curPlayer, "设置已登记次数: HelpCheckInInfo 1 x")
|
| | | GameWorld.DebugAnswer(curPlayer, "设置今日仙缘币: HelpCheckInInfo 2 x")
|
| | | GameWorld.DebugAnswer(curPlayer, "设置今日助战数: HelpCheckInInfo 地图 线路 次数")
|
| | |
|
| | | __PrintCheckInInfo(curPlayer, helpBattlePlayer)
|
| | | return
|
| | |
|
| | | setType = gmList[0]
|
| | | if setType == 1:
|
| | | helpBattlePlayer.checkInCount = gmList[1]
|
| | | GameWorld.DebugAnswer(curPlayer, "设置登记次数: %s" % helpBattlePlayer.checkInCount)
|
| | | elif setType == 2:
|
| | | helpBattlePlayer.todayXianyuanCoin = gmList[1]
|
| | | GameWorld.DebugAnswer(curPlayer, "设置今日仙缘币: %s" % helpBattlePlayer.todayXianyuanCoin)
|
| | | elif len(gmList) == 3:
|
| | | if len(gmList) == 3:
|
| | | mapID, lineID, helpCount = gmList
|
| | | helpBattlePlayer.todayHelpCountDict[(mapID, lineID)] = helpCount
|
| | | GameWorld.DebugAnswer(curPlayer, "设置今日助战数: %s" % helpBattlePlayer.todayHelpCountDict)
|
| | |
| | | CallPlayerID = 0 #(DWORD CallPlayerID)// 助战的玩家ID,有值时代表真实助战,没有值时为自己打的
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | CallPlayerName = "" #(String CallPlayerName)// 助战的玩家名,size = NameLen
|
| | | Reason = 0 #(BYTE Reason)//仙缘币为0时的原因:1-助战次数上限;2-每日获得上限
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.CallPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CallPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | self.Reason,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.CallPlayerID = 0
|
| | | self.NameLen = 0
|
| | | self.CallPlayerName = ""
|
| | | self.Reason = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.CallPlayerName)
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteDWORD(data, self.CallPlayerID)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.CallPlayerName)
|
| | | data = CommFunc.WriteBYTE(data, self.Reason)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | XianyuanCoinAdd:%d,
|
| | | CallPlayerID:%d,
|
| | | NameLen:%d,
|
| | | CallPlayerName:%s
|
| | | CallPlayerName:%s,
|
| | | Reason:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.XianyuanCoinAdd,
|
| | | self.CallPlayerID,
|
| | | self.NameLen,
|
| | | self.CallPlayerName
|
| | | self.CallPlayerName,
|
| | | self.Reason
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | PlayerControl.AddTodayXianyuanCoin(curPlayer, coinAddReal)
|
| | |
|
| | | # 通知自己获得仙缘币
|
| | | Sync_AddXianyuanCoinMsg(curPlayer, mapID, lineID, coinAddReal, relationPlayerID, relationPlayerName)
|
| | | msgPack = ChPyNetSendPack.tagMCAddXianyuanCoinMsg()
|
| | | msgPack.MapID = mapID
|
| | | msgPack.FuncLineID = lineID
|
| | | msgPack.XianyuanCoinAdd = coinAddReal
|
| | | msgPack.CallPlayerID = relationPlayerID
|
| | | msgPack.CallPlayerName = relationPlayerName
|
| | | msgPack.NameLen = len(msgPack.CallPlayerName)
|
| | | msgPack.Reason = reason
|
| | | NetPackCommon.SendFakePack(curPlayer, msgPack)
|
| | | return coinAddReal, reason
|
| | |
|
| | | def __GetTeamFBMemRelationInfo(curPlayer, relationCoinAddDict, isHelp):
|
| | |
| | | relationAdd += relationAddList[0] if len(relationAddList) == 2 else 0
|
| | |
|
| | | return relationAdd, relationPlayerID, relationPlayerName
|
| | |
|
| | | def Sync_AddXianyuanCoinMsg(curPlayer, mapID, funcLineID, addXianyuanCoin, callPlayerID=0, callPlayerName=""):
|
| | | '''同步自己主动战斗获得仙缘币信息
|
| | | 1. 主动发起通关镜像助战副本,此时 callPlayerID 及 name 为空
|
| | | 2. 参与通关真实助战的副本,次数如果自己是助战的,则 callPlayer 及 name 有值
|
| | | @param addXianyuanCoin: 增加的仙缘币,可能为0,代表已达本日上限,但是前端扔需要展示记录
|
| | | @param callPlayerID: 助战别人时,对方玩家的playerID
|
| | | @param callPlayerName: 助战别人时,对方玩家的名字 |
| | | '''
|
| | | msgPack = ChPyNetSendPack.tagMCAddXianyuanCoinMsg()
|
| | | msgPack.MapID = mapID
|
| | | msgPack.FuncLineID = funcLineID
|
| | | msgPack.XianyuanCoinAdd = addXianyuanCoin
|
| | | msgPack.CallPlayerID = callPlayerID
|
| | | msgPack.CallPlayerName = callPlayerName
|
| | | msgPack.NameLen = len(msgPack.CallPlayerName)
|
| | | NetPackCommon.SendFakePack(curPlayer, msgPack)
|
| | | return
|
| | |
|