| | |
| | | BYTE _AwardID; //奖励ID 1~n
|
| | | list AwardItemList; //物品奖励[[物品ID,个数,是否拍品], ...]
|
| | | };
|
| | |
|
| | | //战令表
|
| | |
|
| | | struct tagZhanling
|
| | | {
|
| | | BYTE _ZhanlingType; //战令类型
|
| | | DWORD _NeedValue; //所需值
|
| | | BYTE RewardIndex; //奖励记录索引,0~n,同个战令类型不可重复
|
| | | list FreeRewardItemList; //免费奖励物品列表 [[物品ID,个数,是否拍品],...]
|
| | | list ZLRewardItemList; //战令奖励物品列表 [[物品ID,个数,是否拍品],...]
|
| | | };
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 20 战令信息 #tagMCZhanlingInfo
|
| | |
|
| | | class tagMCZhanling(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("NeedValue", c_int), # 奖励所需值
|
| | | ("FreeRewardState", c_ubyte), # 免费奖励是否已领取
|
| | | ("ZLRewardState", c_ubyte), # 战令奖励是否已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.NeedValue = 0
|
| | | self.FreeRewardState = 0
|
| | | self.ZLRewardState = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCZhanling)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 20 战令信息 //tagMCZhanlingInfo:
|
| | | NeedValue:%d,
|
| | | FreeRewardState:%d,
|
| | | ZLRewardState:%d
|
| | | '''\
|
| | | %(
|
| | | self.NeedValue,
|
| | | self.FreeRewardState,
|
| | | self.ZLRewardState
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCZhanlingInfo(Structure):
|
| | | Head = tagHead()
|
| | | ZhanlingType = 0 #(BYTE ZhanlingType)// 战令类型
|
| | | IsActivite = 0 #(BYTE IsActivite)// 是否已激活
|
| | | RewardCount = 0 #(WORD RewardCount)
|
| | | RewardList = list() #(vector<tagMCZhanling> RewardList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x20
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ZhanlingType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsActivite,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RewardCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.RewardCount):
|
| | | temRewardList = tagMCZhanling()
|
| | | _pos = temRewardList.ReadData(_lpData, _pos)
|
| | | self.RewardList.append(temRewardList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x20
|
| | | self.ZhanlingType = 0
|
| | | self.IsActivite = 0
|
| | | self.RewardCount = 0
|
| | | self.RewardList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | for i in range(self.RewardCount):
|
| | | length += self.RewardList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ZhanlingType)
|
| | | data = CommFunc.WriteBYTE(data, self.IsActivite)
|
| | | data = CommFunc.WriteWORD(data, self.RewardCount)
|
| | | for i in range(self.RewardCount):
|
| | | data = CommFunc.WriteString(data, self.RewardList[i].GetLength(), self.RewardList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ZhanlingType:%d,
|
| | | IsActivite:%d,
|
| | | RewardCount:%d,
|
| | | RewardList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ZhanlingType,
|
| | | self.IsActivite,
|
| | | self.RewardCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCZhanlingInfo=tagMCZhanlingInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhanlingInfo.Head.Cmd,m_NAtagMCZhanlingInfo.Head.SubCmd))] = m_NAtagMCZhanlingInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 08 获得仙缘币信息 #tagMCAddXianyuanCoinMsg
|
| | |
|
| | | class tagMCAddXianyuanCoinMsg(Structure):
|
| | |
| | | Def_PDict_DailyPackBuyGiftPackTime = "DailyPackBuyGiftPackTime" # 每日打包直购礼包 - 打包购买时间戳
|
| | | Def_PDict_DailyPackBuyGiftOnDayTime = "DailyPackBuyGiftOnDayTime" # 每日打包直购礼包 - 上次处理过天时间戳
|
| | |
|
| | | #战令
|
| | | Def_PDict_ZhanlingState = "ZhanlingState" # 战令已激活状态,按类型二进制位运算记录是否已激活
|
| | | Def_PDict_ZhanlingReward = "ZhanlingReward_%s_%s" # 战令奖励领取记录,按类型二进制位运算记录是否已领取,参数(类型,key编号)
|
| | | Def_PDict_ZhanlingRewardFree = "ZhanlingRewardFree_%s_%s" # 战令免费奖励领取记录,按类型二进制位运算记录是否已领取,参数(类型,key编号)
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | #开服活动,Def_PDictType_OpenServerCampaign
|
| | |
| | | Def_RewardType_RealmXXZL, #境界修仙之路奖励 62
|
| | | Def_RewardType_FamilyBossHurt, #仙盟boss伤害奖励 63
|
| | | Def_RewardType_DailyPackBuyGift, #打包直购礼包奖励 64
|
| | | )= range(65)
|
| | | Def_RewardType_Zhanling, #战令奖励 65
|
| | | )= range(66)
|
| | |
|
| | |
|
| | | #boss复活相关活动定义
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B1 20 战令信息 #tagMCZhanlingInfo
|
| | |
|
| | | class tagMCZhanling(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("NeedValue", c_int), # 奖励所需值
|
| | | ("FreeRewardState", c_ubyte), # 免费奖励是否已领取
|
| | | ("ZLRewardState", c_ubyte), # 战令奖励是否已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.NeedValue = 0
|
| | | self.FreeRewardState = 0
|
| | | self.ZLRewardState = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCZhanling)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B1 20 战令信息 //tagMCZhanlingInfo:
|
| | | NeedValue:%d,
|
| | | FreeRewardState:%d,
|
| | | ZLRewardState:%d
|
| | | '''\
|
| | | %(
|
| | | self.NeedValue,
|
| | | self.FreeRewardState,
|
| | | self.ZLRewardState
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCZhanlingInfo(Structure):
|
| | | Head = tagHead()
|
| | | ZhanlingType = 0 #(BYTE ZhanlingType)// 战令类型
|
| | | IsActivite = 0 #(BYTE IsActivite)// 是否已激活
|
| | | RewardCount = 0 #(WORD RewardCount)
|
| | | RewardList = list() #(vector<tagMCZhanling> RewardList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x20
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ZhanlingType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsActivite,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.RewardCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.RewardCount):
|
| | | temRewardList = tagMCZhanling()
|
| | | _pos = temRewardList.ReadData(_lpData, _pos)
|
| | | self.RewardList.append(temRewardList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB1
|
| | | self.Head.SubCmd = 0x20
|
| | | self.ZhanlingType = 0
|
| | | self.IsActivite = 0
|
| | | self.RewardCount = 0
|
| | | self.RewardList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | for i in range(self.RewardCount):
|
| | | length += self.RewardList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ZhanlingType)
|
| | | data = CommFunc.WriteBYTE(data, self.IsActivite)
|
| | | data = CommFunc.WriteWORD(data, self.RewardCount)
|
| | | for i in range(self.RewardCount):
|
| | | data = CommFunc.WriteString(data, self.RewardList[i].GetLength(), self.RewardList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ZhanlingType:%d,
|
| | | IsActivite:%d,
|
| | | RewardCount:%d,
|
| | | RewardList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ZhanlingType,
|
| | | self.IsActivite,
|
| | | self.RewardCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCZhanlingInfo=tagMCZhanlingInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhanlingInfo.Head.Cmd,m_NAtagMCZhanlingInfo.Head.SubCmd))] = m_NAtagMCZhanlingInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 08 获得仙缘币信息 #tagMCAddXianyuanCoinMsg
|
| | |
|
| | | class tagMCAddXianyuanCoinMsg(Structure):
|
| | |
| | | ("BYTE", "AwardID", 1),
|
| | | ("list", "AwardItemList", 0),
|
| | | ),
|
| | |
|
| | | "Zhanling":(
|
| | | ("BYTE", "ZhanlingType", 1),
|
| | | ("DWORD", "NeedValue", 1),
|
| | | ("BYTE", "RewardIndex", 0),
|
| | | ("list", "FreeRewardItemList", 0),
|
| | | ("list", "ZLRewardItemList", 0),
|
| | | ),
|
| | | }
|
| | |
|
| | | |
| | |
| | | |
| | | def GetAwardID(self): return self.AwardID # 奖励ID 1~n
|
| | | def GetAwardItemList(self): return self.AwardItemList # 物品奖励[[物品ID,个数,是否拍品], ...] |
| | | |
| | | # 战令表 |
| | | class IPY_Zhanling(): |
| | | |
| | | def __init__(self): |
| | | self.ZhanlingType = 0
|
| | | self.NeedValue = 0
|
| | | self.RewardIndex = 0
|
| | | self.FreeRewardItemList = []
|
| | | self.ZLRewardItemList = [] |
| | | return |
| | | |
| | | def GetZhanlingType(self): return self.ZhanlingType # 战令类型
|
| | | def GetNeedValue(self): return self.NeedValue # 所需值
|
| | | def GetRewardIndex(self): return self.RewardIndex # 奖励记录索引,0~n,同个战令类型不可重复
|
| | | def GetFreeRewardItemList(self): return self.FreeRewardItemList # 免费奖励物品列表 [[物品ID,个数,是否拍品],...]
|
| | | def GetZLRewardItemList(self): return self.ZLRewardItemList # 战令奖励物品列表 [[物品ID,个数,是否拍品],...] |
| | |
|
| | |
|
| | | def Log(msg, playerID=0, par=0):
|
| | |
| | | self.ipyHistoryRechargeAwardLen = len(self.ipyHistoryRechargeAwardCache)
|
| | | self.ipyCustomAwardCache = self.__LoadFileData("CustomAward", IPY_CustomAward)
|
| | | self.ipyCustomAwardLen = len(self.ipyCustomAwardCache)
|
| | | self.ipyZhanlingCache = self.__LoadFileData("Zhanling", IPY_Zhanling)
|
| | | self.ipyZhanlingLen = len(self.ipyZhanlingCache)
|
| | | Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
|
| | | Log("IPY_DataMgr InitOK!")
|
| | | return
|
| | |
| | | def GetHistoryRechargeAwardByIndex(self, index): return self.ipyHistoryRechargeAwardCache[index]
|
| | | def GetCustomAwardCount(self): return self.ipyCustomAwardLen
|
| | | def GetCustomAwardByIndex(self, index): return self.ipyCustomAwardCache[index]
|
| | | def GetZhanlingCount(self): return self.ipyZhanlingLen
|
| | | def GetZhanlingByIndex(self, index): return self.ipyZhanlingCache[index]
|
| | |
|
| | | IPYData = IPY_DataMgr()
|
| | | def IPY_Data(): return IPYData
|
| | |
| | | import PlayerGubao
|
| | | import PlayerShentong
|
| | | import PlayerCustomAward
|
| | | import PlayerZhanling
|
| | | import PlayerLianTi
|
| | | import PlayerYinji
|
| | | import PlayerLove
|
| | |
| | |
|
| | | PlayerGubao.OnPlayerLogin(curPlayer)
|
| | | PlayerShentong.OnPlayerLogin(curPlayer)
|
| | | PlayerZhanling.OnPlayerLogin(curPlayer)
|
| | | # 上线查询一次充值订单
|
| | | curPlayer.SendDBQueryRecharge()
|
| | |
|
| | |
| | | #打包直购礼包奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_DailyPackBuyGift:
|
| | | PlayerGoldGift.GetDailyPackBuyGift(curPlayer, dataEx)
|
| | | #战令奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_Zhanling:
|
| | | PlayerZhanling.GetZhanlingReward(curPlayer, dataEx, dataExStr)
|
| | | #玩法前瞻奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_GameNotice:
|
| | | OnGiveAwardByClient(curPlayer, rewardType, ChConfig.Def_PDict_GameNoticeAwardState, IpyGameDataPY.GetFuncEvalCfg("GameNoticeReward", 1))
|
| | |
| | | import PlayerWeekParty
|
| | | import PlayerGoldInvest
|
| | | import PlayerActTurntable
|
| | | import PlayerZhanling
|
| | | import ItemCommon
|
| | | import PyGameData
|
| | | import CommFunc
|
| | |
| | | ctgID = ctgIpyData.GetRecordID()
|
| | | PlayerGoldInvest.InvestByCTG(curPlayer, ctgID)
|
| | | PlayerGoldGift.OnGiftByCTGID(curPlayer, ctgID)
|
| | | PlayerZhanling.OnActiviteByCTGID(curPlayer, ctgID)
|
| | |
|
| | | serverDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
|
| | | addDRDict.update({"gold":[goldBefore, goldAfter], "changeCoinPoint":[changeCoinPointBefore, changeCoinPointAfter], "todayCTGCoinTotal":todayCTGCoinTotal,
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #-------------------------------------------------------------------------------
|
| | | #
|
| | | ##@package Player.PlayerZhanling
|
| | | #
|
| | | # @todo:战令
|
| | | # @author hxp
|
| | | # @date 2023-12-05
|
| | | # @version 1.0
|
| | | #
|
| | | # 详细描述: 战令
|
| | | #
|
| | | #-------------------------------------------------------------------------------
|
| | | #"""Version = 2023-12-05 15:30"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import GameWorld
|
| | | import NetPackCommon
|
| | | import IpyGameDataPY
|
| | | import PlayerControl
|
| | | import ChPyNetSendPack
|
| | | import ItemControler
|
| | | import IPY_GameWorld
|
| | | import ChConfig
|
| | |
|
| | | # 战令类型
|
| | | ZhanlingTypeList = (
|
| | | ZhanlingType_LV,
|
| | | ZhanlingType_Realm,
|
| | | ZhanlingType_SkyTower,
|
| | | ) = range(1, 1 + 3)
|
| | |
|
| | | def OnPlayerLogin(curPlayer):
|
| | | for zhanlingType in ZhanlingTypeList:
|
| | | SyncZhanlingInfo(curPlayer, zhanlingType)
|
| | | return
|
| | |
|
| | | def OnActiviteByCTGID(curPlayer, ctgID):
|
| | | zhanlingCTGIDDict = IpyGameDataPY.GetFuncEvalCfg("Zhanling", 1)
|
| | | for zhanlingTypeStr, ctgIDList in zhanlingCTGIDDict.items():
|
| | | if ctgID not in ctgIDList:
|
| | | continue
|
| | | zhanlingType = int(zhanlingTypeStr)
|
| | | state = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingState)
|
| | | if state&pow(2, zhanlingType):
|
| | | break
|
| | | |
| | | updState = state|pow(2, zhanlingType)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ZhanlingState, updState)
|
| | | SyncZhanlingInfo(curPlayer, zhanlingType)
|
| | | GameWorld.Log("激活战令: zhanlingType=%s,updState=%s" % (zhanlingType, updState), curPlayer.GetPlayerID())
|
| | | break
|
| | | |
| | | return
|
| | |
|
| | | def GetZhanlingReward(curPlayer, zhanlingType, rewardID):
|
| | | ## 领取战令奖励
|
| | | rewardID = GameWorld.ToIntDef(rewardID)
|
| | | needValue, isFree = rewardID/10, rewardID%10
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | |
| | | ipyData = IpyGameDataPY.GetIpyGameData("Zhanling", zhanlingType, needValue)
|
| | | if not ipyData:
|
| | | return
|
| | | |
| | | curValue = 0
|
| | | if zhanlingType == ZhanlingType_LV:
|
| | | curValue = curPlayer.GetLV()
|
| | | elif zhanlingType == ZhanlingType_Realm:
|
| | | curValue = curPlayer.GetOfficialRank()
|
| | | elif zhanlingType == ZhanlingType_SkyTower:
|
| | | curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor)
|
| | | else:
|
| | | return
|
| | | |
| | | if curValue < needValue:
|
| | | GameWorld.DebugLog("战令所需值不足,无法领奖: zhanlingType=%s,curValue=%s < %s" % (zhanlingType, curValue, needValue), playerID)
|
| | | return
|
| | | |
| | | rewardIndex = ipyData.GetRewardIndex()
|
| | | itemList = ipyData.GetFreeRewardItemList()
|
| | | rewardKey = ChConfig.Def_PDict_ZhanlingRewardFree
|
| | | if not isFree:
|
| | | itemList = ipyData.GetZLRewardItemList()
|
| | | rewardKey = ChConfig.Def_PDict_ZhanlingReward
|
| | | state = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingState)
|
| | | if not state&pow(2, zhanlingType):
|
| | | GameWorld.DebugLog("战令未激活,无法领取战令奖励: zhanlingType=%s,state=%s,isFree=%s" % (zhanlingType, state, isFree), playerID)
|
| | | return
|
| | | |
| | | if GameWorld.GetDictValueByBit(curPlayer, rewardKey, rewardIndex, True, [zhanlingType]):
|
| | | GameWorld.DebugLog("已经领取过该战令奖励! zhanlingType=%s,needValue=%s,isFree=%s" % (zhanlingType, needValue, isFree), playerID)
|
| | | return
|
| | | |
| | | # 检查背包
|
| | | if not ItemControler.CheckPackSpaceEnough(curPlayer, itemList):
|
| | | return
|
| | | |
| | | # 更新已领取成功标记
|
| | | GameWorld.SetDictValueByBit(curPlayer, rewardKey, rewardIndex, 1, True, [zhanlingType])
|
| | | SyncZhanlingInfo(curPlayer, zhanlingType, ipyData)
|
| | | GameWorld.DebugLog("领取战令奖励: zhanlingType=%s,needValue=%s,isFree=%s" % (zhanlingType, needValue, isFree), playerID)
|
| | | |
| | | # 给物品
|
| | | for itemID, itemCount, isAuctionItem in itemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem])
|
| | | |
| | | return
|
| | |
|
| | | def SyncZhanlingInfo(curPlayer, zhanlingType, ipyData=None):
|
| | | |
| | | ipyDataList = []
|
| | | if ipyData == None:
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition("Zhanling", {"ZhanlingType":zhanlingType}, True)
|
| | | else:
|
| | | ipyDataList = [ipyData]
|
| | | |
| | | if not ipyDataList:
|
| | | return
|
| | | |
| | | rewardList = []
|
| | | for ipyData in ipyDataList:
|
| | | rewardIndex = ipyData.GetRewardIndex()
|
| | | reward = ChPyNetSendPack.tagMCZhanling()
|
| | | reward.Clear()
|
| | | reward.NeedValue = ipyData.GetNeedValue()
|
| | | reward.FreeRewardState = 1 if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ZhanlingRewardFree, rewardIndex, True, [zhanlingType]) else 0
|
| | | reward.ZLRewardState = 1 if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_ZhanlingReward, rewardIndex, True, [zhanlingType]) else 0
|
| | | rewardList.append(reward)
|
| | | |
| | | clientPack = ChPyNetSendPack.tagMCZhanlingInfo()
|
| | | clientPack.Clear()
|
| | | clientPack.ZhanlingType = zhanlingType
|
| | | clientPack.IsActivite = 1 if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ZhanlingState)&pow(2, zhanlingType) else 0
|
| | | clientPack.RewardList = rewardList
|
| | | clientPack.RewardCount = len(clientPack.RewardList)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | return
|
| | |
|