10367 【越南】【英语】【BT】【砍树】仙盟攻城战-服务端(优化仙盟充值协助支持配置关联的充值ID列表即商城类型;充值协助支持记录领取的成员明细;攻城战结束支持回收相关道具;)
# Conflicts:
# ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
| | |
| | | BYTE ActNum; //活动分组编号, 活动类型 * 10 + 不同界面编号
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | dict NotifyInfoStart; //全服提示信息 - 相对开始时间
|
| | | dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
|
| | | list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | };
|
| | |
|
| | |
| | | char EndDate; //结束日期
|
| | | WORD LVLimit; //限制等级
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | list TemplateIDList; //模板ID列表
|
| | | DWORD TemplateID; //协助奖励模板ID
|
| | | list CTGIDList; //有效的充值ID列表 [ctgID, ...]
|
| | | DWORD ActShopType; //商城类型
|
| | | };
|
| | |
|
| | | //仙盟充值协助活动模板表
|
| | |
| | | struct tagCrossActFamilyGCZSQ
|
| | | {
|
| | | DWORD _LayerNum; //层
|
| | | DWORD CostItemID; //消耗抽奖道具ID
|
| | | BYTE CostItemCnt; //消耗抽奖道具个数
|
| | | BYTE GridCnt; //格子数
|
| | | WORD PassRate; //过关万分率
|
| | |
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | AwardCount = 0 #(BYTE AwardCount)
|
| | | AwardInfoList = list() #(vector<tagMCActFamilyCTGAssistAward> AwardInfoList)// 互助奖励列表
|
| | | CTGIDCount = 0 #(BYTE CTGIDCount)
|
| | | CTGIDList = list() #(vector<WORD> CTGIDList)// CTGID列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加
|
| | | ShopType = 0 #(WORD ShopType)// 开放商店类型
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | temAwardInfoList = tagMCActFamilyCTGAssistAward()
|
| | | _pos = temAwardInfoList.ReadData(_lpData, _pos)
|
| | | self.AwardInfoList.append(temAwardInfoList)
|
| | | self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.CTGIDCount):
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.CTGIDList.append(value)
|
| | | self.ShopType,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.LimitLV = 0
|
| | | self.AwardCount = 0
|
| | | self.AwardInfoList = list()
|
| | | self.CTGIDCount = 0
|
| | | self.CTGIDList = list()
|
| | | self.ShopType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | for i in range(self.AwardCount):
|
| | | length += self.AwardInfoList[i].GetLength()
|
| | | length += 1
|
| | | length += 2 * self.CTGIDCount
|
| | | length += 2
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.AwardCount)
|
| | | for i in range(self.AwardCount):
|
| | | data = CommFunc.WriteString(data, self.AwardInfoList[i].GetLength(), self.AwardInfoList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.CTGIDCount)
|
| | | for i in range(self.CTGIDCount):
|
| | | data = CommFunc.WriteWORD(data, self.CTGIDList[i])
|
| | | data = CommFunc.WriteWORD(data, self.ShopType)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | IsDayReset:%d,
|
| | | LimitLV:%d,
|
| | | AwardCount:%d,
|
| | | AwardInfoList:%s
|
| | | AwardInfoList:%s,
|
| | | CTGIDCount:%d,
|
| | | CTGIDList:%s,
|
| | | ShopType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.IsDayReset,
|
| | | self.LimitLV,
|
| | | self.AwardCount,
|
| | | "..."
|
| | | "...",
|
| | | self.CTGIDCount,
|
| | | "...",
|
| | | self.ShopType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | if not cmdList:
|
| | | GameWorld.DebugAnswer(curPlayer, "重置充值互助: FamilyCTGAssiat 0 actNum")
|
| | | GameWorld.DebugAnswer(curPlayer, "增加充值互助: FamilyCTGAssiat 1 actNum 人数")
|
| | | GameWorld.DebugAnswer(curPlayer, "设置领奖人数: FamilyCTGAssiat 2 actNum 档位 人数")
|
| | | #GameWorld.DebugAnswer(curPlayer, "设置领奖人数: FamilyCTGAssiat 2 actNum 档位 人数")
|
| | | return
|
| | |
|
| | | familyID = curPlayer.GetFamilyID()
|
| | |
| | |
|
| | | if value1 == 1:
|
| | | addCTGPlayers = cmdList[2] if len(cmdList) > 2 else 0
|
| | | ctgPlayerIDList, getAwardPlayerCountDict = PlayerActFamilyCTGAssist.GetFAActPlayerIDInfo(actionData)
|
| | | ctgPlayerIDList, getAwardPlayerCountDict, getAwardPlayerIDDict = PlayerActFamilyCTGAssist.GetFAActPlayerIDInfo(actionData)
|
| | |
|
| | | maxRotID = 0
|
| | | for pID in ctgPlayerIDList:
|
| | |
| | | maxRotID += 1
|
| | | ctgPlayerIDList.append(maxRotID)
|
| | |
|
| | | PlayerActFamilyCTGAssist.SetFAActPlayerIDInfo(actionData, ctgPlayerIDList, getAwardPlayerCountDict)
|
| | | PlayerActFamilyCTGAssist.SetFAActPlayerIDInfo(actionData, ctgPlayerIDList, getAwardPlayerCountDict, getAwardPlayerIDDict)
|
| | | PlayerFamilyAction.SendFamilyActionInfo(None, familyID, ActionType)
|
| | | GameWorld.DebugAnswer(curPlayer, "增加互助人数!actNum=%s,增加:%s,总人数:%s" % (actNum, addCTGPlayers, len(ctgPlayerIDList)))
|
| | | return
|
| | |
|
| | | if value1 == 2:
|
| | | needCTGPlayers = cmdList[2] if len(cmdList) > 2 else 0
|
| | | setGetCount = cmdList[3] if len(cmdList) > 3 else 0
|
| | | ctgPlayerIDList, getAwardPlayerCountDict = PlayerActFamilyCTGAssist.GetFAActPlayerIDInfo(actionData)
|
| | | getAwardPlayerCountDict[str(needCTGPlayers)] = setGetCount
|
| | | PlayerActFamilyCTGAssist.SetFAActPlayerIDInfo(actionData, ctgPlayerIDList, getAwardPlayerCountDict)
|
| | | |
| | | PlayerFamilyAction.SendFamilyActionInfo(None, familyID, ActionType)
|
| | | GameWorld.DebugAnswer(curPlayer, "设置领奖人数!actNum=%s,档位:%s,总人数:%s" % (actNum, needCTGPlayers, setGetCount))
|
| | | #if value1 == 2:
|
| | | # needCTGPlayers = cmdList[2] if len(cmdList) > 2 else 0
|
| | | # setGetCount = cmdList[3] if len(cmdList) > 3 else 0
|
| | | # ctgPlayerIDList, getAwardPlayerCountDict, getAwardPlayerIDDict = PlayerActFamilyCTGAssist.GetFAActPlayerIDInfo(actionData)
|
| | | # getAwardPlayerCountDict[str(needCTGPlayers)] = setGetCount
|
| | | # PlayerActFamilyCTGAssist.SetFAActPlayerIDInfo(actionData, ctgPlayerIDList, getAwardPlayerCountDict, getAwardPlayerIDDict)
|
| | | # |
| | | # PlayerFamilyAction.SendFamilyActionInfo(None, familyID, ActionType)
|
| | | # GameWorld.DebugAnswer(curPlayer, "设置领奖人数!actNum=%s,档位:%s,总人数:%s" % (actNum, needCTGPlayers, setGetCount))
|
| | |
|
| | | return
|
| | |
|
| | |
| | | ("BYTE", "ActNum", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("list", "NotifyInfoLoop", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ),
|
| | |
|
| | |
| | | def GetActNum(self): return self.attrTuple[3] # 活动分组编号, 活动类型 * 10 + 不同界面编号 BYTE
|
| | | def GetStartDate(self): return self.attrTuple[4] # 开启日期 char
|
| | | def GetEndDate(self): return self.attrTuple[5] # 结束日期 char
|
| | | def GetNotifyInfoStart(self): return self.attrTuple[6] # 全服提示信息 - 相对开始时间 dict
|
| | | def GetNotifyInfoEnd(self): return self.attrTuple[7] # 全服提示信息 - 相对结束时间 dict
|
| | | def GetNotifyInfoLoop(self): return self.attrTuple[8] # 全服提示信息 - 循环广播[间隔分钟, 广播key] list
|
| | | def GetIsDayReset(self): return self.attrTuple[9] # 是否每天重置 BYTE |
| | | def GetIsDayReset(self): return self.attrTuple[6] # 是否每天重置 BYTE |
| | | |
| | | # 集字活动时间表 |
| | | class IPY_ActCollectWords(): |
| | |
| | | def SetFAActNum(actionData, actNum): return actionData.SetValue1(actNum) |
| | | |
| | | def GetFAActPlayerIDInfo(actionData): |
| | | playerIDInfo = [[], {}] |
| | | playerIDInfo = [[], {}, {}] |
| | | useData = actionData.GetUseData() |
| | | if useData: |
| | | try: |
| | | playerIDInfo = eval(useData) |
| | | # 后面加了第3个值,兼容线上数据 |
| | | if len(playerIDInfo) == 2: |
| | | playerIDInfo.append({}) |
| | | except: |
| | | playerIDInfo = [[], {}] |
| | | playerIDInfo = [[], {}, {}] |
| | | return playerIDInfo |
| | | def SetFAActPlayerIDInfo(actionData, ctgPlayerIDList, getAwardPlayerCountDict): |
| | | useData = str([ctgPlayerIDList, getAwardPlayerCountDict]).replace(" ", "") |
| | | def SetFAActPlayerIDInfo(actionData, ctgPlayerIDList, getAwardPlayerCountDict, getAwardPlayerIDDict={}): |
| | | useData = str([ctgPlayerIDList, getAwardPlayerCountDict, getAwardPlayerIDDict]).replace(" ", "") |
| | | actionData.SetUseData(useData, len(useData)) |
| | | return |
| | | def ClearFAActPlayerIDInfo(actionData): |
| | | SetFAActPlayerIDInfo(actionData, [], {}) |
| | | SetFAActPlayerIDInfo(actionData, [], {}, {}) |
| | | return |
| | | |
| | | def GetFamilyCTGAssistActionData(familyID, actNum): |
| | |
| | | for actNum in actNumList: |
| | | actionData = GetFamilyCTGAssistActionData(familyID, actNum) |
| | | |
| | | ctgPlayerIDList, getAwardPlayerCountDict = GetFAActPlayerIDInfo(actionData) |
| | | ctgPlayerIDList, getAwardPlayerCountDict, getAwardPlayerIDDict = GetFAActPlayerIDInfo(actionData) |
| | | if playerID in ctgPlayerIDList: |
| | | continue |
| | | |
| | | isChange = True |
| | | ctgPlayerIDList.append(playerID) |
| | | SetFAActPlayerIDInfo(actionData, ctgPlayerIDList, getAwardPlayerCountDict) |
| | | SetFAActPlayerIDInfo(actionData, ctgPlayerIDList, getAwardPlayerCountDict, getAwardPlayerIDDict) |
| | | GameWorld.Log("仙盟充值互助人数变更: actNum=%s,familyID=%s,新互助玩家=%s,更新互助人数=%s, %s" |
| | | % (actNum, familyID, playerID, len(ctgPlayerIDList), ctgPlayerIDList)) |
| | | |
| | |
| | | |
| | | actionData = GetFamilyCTGAssistActionData(familyID, actNum) |
| | | |
| | | ctgPlayerIDList, getAwardPlayerCountDict = GetFAActPlayerIDInfo(actionData) |
| | | ctgPlayerIDList, getAwardPlayerCountDict, getAwardPlayerIDDict = GetFAActPlayerIDInfo(actionData) |
| | | |
| | | if len(ctgPlayerIDList) < ctgPlayers: |
| | | GameWorld.DebugLog("仙盟充值互助所需充值人数不足: actNum=%s,familyID=%s,已互助人数=%s < %s, %s" |
| | |
| | | maxMemberCnt = PlayerFamily.GetFamilySetting(curFamily, ChConfig.Def_FamilySetting_MaxMemberCnt) |
| | | |
| | | getAwardPlayerCount = getAwardPlayerCountDict.get(str(ctgPlayers), 0) |
| | | getAwardPlayerIDList = getAwardPlayerIDDict.get(str(ctgPlayers), []) |
| | | if getAwardPlayerCount >= maxMemberCnt: |
| | | GameWorld.DebugLog("仙盟充值互助领奖人数已达上限: actNum=%s,familyID=%s,ctgPlayers=%s,getAwardPlayerCount=%s >= %s" |
| | | % (actNum, familyID, ctgPlayers, getAwardPlayerCount, maxMemberCnt), playerID) |
| | | return |
| | | if playerID in getAwardPlayerIDList: |
| | | return |
| | | getAwardPlayerIDList.append(playerID) |
| | | getAwardPlayerIDDict[str(ctgPlayers)] = getAwardPlayerIDList |
| | | |
| | | getAwardPlayerCount += 1 |
| | | getAwardPlayerCountDict[str(ctgPlayers)] = getAwardPlayerCount |
| | | |
| | | SetFAActPlayerIDInfo(actionData, ctgPlayerIDList, getAwardPlayerCountDict) |
| | | GameWorld.Log("仙盟充值互助领奖人数更新: actNum=%s,familyID=%s,ctgPlayers=%s,getAwardPlayerCount=%s, %s" |
| | | % (actNum, familyID, ctgPlayers, getAwardPlayerCount, getAwardPlayerCountDict), playerID) |
| | | SetFAActPlayerIDInfo(actionData, ctgPlayerIDList, getAwardPlayerCountDict, getAwardPlayerIDDict) |
| | | GameWorld.Log("仙盟充值互助领奖人数更新: actNum=%s,familyID=%s,ctgPlayers=%s,getAwardPlayerCount=%s,getAwardPlayerIDList=%s, %s" |
| | | % (actNum, familyID, ctgPlayers, getAwardPlayerCount, getAwardPlayerIDList, getAwardPlayerIDDict), playerID) |
| | | |
| | | PlayerFamilyAction.SendFamilyActionInfo(None, familyID, ActionType) |
| | | return True |
| | |
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | AwardCount = 0 #(BYTE AwardCount)
|
| | | AwardInfoList = list() #(vector<tagMCActFamilyCTGAssistAward> AwardInfoList)// 互助奖励列表
|
| | | CTGIDCount = 0 #(BYTE CTGIDCount)
|
| | | CTGIDList = list() #(vector<WORD> CTGIDList)// CTGID列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加
|
| | | ShopType = 0 #(WORD ShopType)// 开放商店类型
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | temAwardInfoList = tagMCActFamilyCTGAssistAward()
|
| | | _pos = temAwardInfoList.ReadData(_lpData, _pos)
|
| | | self.AwardInfoList.append(temAwardInfoList)
|
| | | self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.CTGIDCount):
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.CTGIDList.append(value)
|
| | | self.ShopType,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.LimitLV = 0
|
| | | self.AwardCount = 0
|
| | | self.AwardInfoList = list()
|
| | | self.CTGIDCount = 0
|
| | | self.CTGIDList = list()
|
| | | self.ShopType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | for i in range(self.AwardCount):
|
| | | length += self.AwardInfoList[i].GetLength()
|
| | | length += 1
|
| | | length += 2 * self.CTGIDCount
|
| | | length += 2
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.AwardCount)
|
| | | for i in range(self.AwardCount):
|
| | | data = CommFunc.WriteString(data, self.AwardInfoList[i].GetLength(), self.AwardInfoList[i].GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.CTGIDCount)
|
| | | for i in range(self.CTGIDCount):
|
| | | data = CommFunc.WriteWORD(data, self.CTGIDList[i])
|
| | | data = CommFunc.WriteWORD(data, self.ShopType)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | IsDayReset:%d,
|
| | | LimitLV:%d,
|
| | | AwardCount:%d,
|
| | | AwardInfoList:%s
|
| | | AwardInfoList:%s,
|
| | | CTGIDCount:%d,
|
| | | CTGIDList:%s,
|
| | | ShopType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.IsDayReset,
|
| | | self.LimitLV,
|
| | | self.AwardCount,
|
| | | "..."
|
| | | "...",
|
| | | self.CTGIDCount,
|
| | | "...",
|
| | | self.ShopType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ("char", "EndDate", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("list", "TemplateIDList", 0),
|
| | | ("DWORD", "TemplateID", 0),
|
| | | ("list", "CTGIDList", 0),
|
| | | ("DWORD", "ActShopType", 0),
|
| | | ),
|
| | |
|
| | | "ActFamilyCTGAssistTemp":(
|
| | |
| | |
|
| | | "CrossActFamilyGCZSQ":(
|
| | | ("DWORD", "LayerNum", 1),
|
| | | ("DWORD", "CostItemID", 0),
|
| | | ("BYTE", "CostItemCnt", 0),
|
| | | ("BYTE", "GridCnt", 0),
|
| | | ("WORD", "PassRate", 0),
|
| | |
| | | def GetEndDate(self): return self.attrTuple[2] # 结束日期 char
|
| | | def GetLVLimit(self): return self.attrTuple[3] # 限制等级 WORD
|
| | | def GetIsDayReset(self): return self.attrTuple[4] # 是否每天重置 BYTE
|
| | | def GetTemplateIDList(self): return self.attrTuple[5] # 模板ID列表 list |
| | | def GetTemplateID(self): return self.attrTuple[5] # 协助奖励模板ID DWORD
|
| | | def GetCTGIDList(self): return self.attrTuple[6] # 有效的充值ID列表 [ctgID, ...] list
|
| | | def GetActShopType(self): return self.attrTuple[7] # 商城类型 DWORD |
| | | |
| | | # 仙盟充值协助活动模板表 |
| | | class IPY_ActFamilyCTGAssistTemp(): |
| | |
| | | return |
| | | |
| | | def GetLayerNum(self): return self.attrTuple[0] # 层 DWORD
|
| | | def GetCostItemID(self): return self.attrTuple[1] # 消耗抽奖道具ID DWORD
|
| | | def GetCostItemCnt(self): return self.attrTuple[2] # 消耗抽奖道具个数 BYTE
|
| | | def GetGridCnt(self): return self.attrTuple[3] # 格子数 BYTE
|
| | | def GetPassRate(self): return self.attrTuple[4] # 过关万分率 WORD
|
| | | def GetGridWeightItemList(self): return self.attrTuple[5] # 格子物品权重随机库 [[权重,物品ID,个数], ...] list
|
| | | def GetLayerAwardItemList(self): return self.attrTuple[6] # 通关该层固定奖励 [[物品ID,个数,是否拍品], ...] list
|
| | | def GetLayerWeightItemList(self): return self.attrTuple[7] # 通关该层额外随机奖励 [[权重,物品ID,个数], ...] list |
| | | def GetCostItemCnt(self): return self.attrTuple[1] # 消耗抽奖道具个数 BYTE
|
| | | def GetGridCnt(self): return self.attrTuple[2] # 格子数 BYTE
|
| | | def GetPassRate(self): return self.attrTuple[3] # 过关万分率 WORD
|
| | | def GetGridWeightItemList(self): return self.attrTuple[4] # 格子物品权重随机库 [[权重,物品ID,个数], ...] list
|
| | | def GetLayerAwardItemList(self): return self.attrTuple[5] # 通关该层固定奖励 [[物品ID,个数,是否拍品], ...] list
|
| | | def GetLayerWeightItemList(self): return self.attrTuple[6] # 通关该层额外随机奖励 [[权重,物品ID,个数], ...] list |
| | | |
| | | # 仙匣秘境活动时间表 |
| | | class IPY_ActXianXiaMJ(): |
| | |
| | | import IPY_GameWorld |
| | | import GameWorld |
| | | import ChConfig |
| | | import PlayerCoin |
| | | import FunctionNPCCommon |
| | | |
| | | def OnPlayerLogin(curPlayer): |
| | | |
| | |
| | | actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_FamilyCTGAssist, actNum) |
| | | actID = actInfo.get(ShareDefine.ActKey_ID, 0) |
| | | state = actInfo.get(ShareDefine.ActKey_State, 0) |
| | | #cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0) |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0) |
| | | #dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0) |
| | | |
| | | playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FamilyCTGAssistID % actNum) # 玩家身上的活动ID |
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FamilyCTGAssistAward % actNum, 0) |
| | | |
| | | if state: |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActFamilyCTGAssist", cfgID) |
| | | if ipyData: |
| | | resetCTGIDList = ipyData.GetCTGIDList() |
| | | PlayerCoin.DoResetCTGCountByIDList(curPlayer, "ActFamilyCTGAssist", resetCTGIDList) |
| | | shopType = ipyData.GetActShopType() |
| | | if shopType: |
| | | FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, [shopType]) |
| | | |
| | | Sync_FamilyCTGAssistActionInfo(curPlayer, actNum) |
| | | Sync_FamilyCTGAssistPlayerInfo(curPlayer, actNum) |
| | | |
| | | return True |
| | | |
| | | def OnPlayerCTG(curPlayer): |
| | | def OnPlayerCTG(curPlayer, ctgID): |
| | | if not curPlayer.GetFamilyID(): |
| | | return |
| | | |
| | | actNumList = [] |
| | | for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FamilyCTGAssist, {}).values(): |
| | | actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0) |
| | | if actInfo.get(ShareDefine.ActKey_State): |
| | | actNumList.append(actNum) |
| | | |
| | | if not actInfo.get(ShareDefine.ActKey_State): |
| | | continue |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0) |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActFamilyCTGAssist", cfgID) |
| | | if not ipyData: |
| | | continue |
| | | ctgIDList = ipyData.GetCTGIDList() |
| | | if ctgIDList and ctgID not in ctgIDList: |
| | | GameWorld.DebugLog("仙盟充值协助该充值ID不触发协助! cfgID=%s,actNum=%s,ctgID=%s not in %s" % (cfgID, actNum, ctgID, ctgIDList), curPlayer.GetPlayerID()) |
| | | continue |
| | | actNumList.append(actNum) |
| | | |
| | | if not actNumList: |
| | | return |
| | | |
| | |
| | | return |
| | | |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID) |
| | | dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0) |
| | | #dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0) |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActFamilyCTGAssist", cfgID) |
| | | if not ipyData: |
| | | return |
| | | templateID = GameWorld.GetTemplateID(ipyData, cfgID, dayIndex) |
| | | templateID = ipyData.GetTemplateID() |
| | | if not templateID: |
| | | return |
| | | |
| | |
| | | return |
| | | |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID) |
| | | dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0) |
| | | #dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0) |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActFamilyCTGAssist", cfgID) |
| | | if not ipyData: |
| | | return |
| | | templateID = GameWorld.GetTemplateID(ipyData, cfgID, dayIndex) |
| | | templateID = ipyData.GetTemplateID() |
| | | if not templateID: |
| | | return |
| | | tempIpyDataList = IpyGameDataPY.GetIpyGameDataList("ActFamilyCTGAssistTemp", templateID) |
| | |
| | | actInfo.AwardInfoList.append(award) |
| | | |
| | | actInfo.AwardCount = len(actInfo.AwardInfoList) |
| | | |
| | | actInfo.CTGIDList = ipyData.GetCTGIDList() |
| | | actInfo.CTGIDCount = len(actInfo.CTGIDList) |
| | | actInfo.ShopType = ipyData.GetActShopType() |
| | | |
| | | NetPackCommon.SendFakePack(curPlayer, actInfo) |
| | | return |
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FamilyGCZSQGridItemID % gridNum, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FamilyGCZSQGridItemCnt % gridNum, 0)
|
| | |
|
| | | # # 回收道具
|
| | | # for itemID in IpyGameDataPY.GetFuncEvalCfg("LianqiUseItem", 5):
|
| | | # ItemControler.RecycleItem(curPlayer, itemID, "ActLianqiRecycleItem")
|
| | |
|
| | | # 回收道具
|
| | | for itemID in IpyGameDataPY.GetFuncEvalCfg("FamilyGCZItem", 2):
|
| | | ItemControler.RecycleItem(curPlayer, itemID, "FamilyGCZRecycleItem")
|
| | | |
| | | if state:
|
| | | maxEnergy = IpyGameDataPY.GetFuncCfg("FamilyGCZEnergy", 1)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FamilyGCZEnergy, maxEnergy)
|
| | |
| | | Sync_FamilyGCZSQInfo(curPlayer, gridNum)
|
| | | return
|
| | |
|
| | | costItemID = ipyData.GetCostItemID()
|
| | | costItemID = IpyGameDataPY.GetFuncCfg("FamilyGCZItem", 1)
|
| | | costItemCount = ipyData.GetCostItemCnt()
|
| | | if not costItemID or not costItemCount:
|
| | | return
|
| | |
| | | PlayerActTurntable.OnPlayerRecharge(curPlayer, orderCoin, coinType) # 转盘
|
| | | PlayerFairyCeremony.AddFCCTGRMB(curPlayer, orderCoin)
|
| | | PlayerNewFairyCeremony.AddFCCostGold(curPlayer, orderCoin)
|
| | | PlayerActFamilyCTGAssist.OnPlayerCTG(curPlayer)
|
| | | #开服活动
|
| | | #OpenServerCampaign.AddOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_Recharge, orderCoin)
|
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Recharge, addVIPExp)
|
| | |
| | | #投资
|
| | | if ctgIpyData:
|
| | | ctgID = ctgIpyData.GetRecordID()
|
| | | PlayerActFamilyCTGAssist.OnPlayerCTG(curPlayer, ctgID)
|
| | | PlayerSuperDiscount.ActSuperDiscountByCTG(curPlayer, ctgID)
|
| | | PlayerGoldInvest.InvestByCTG(curPlayer, ctgID)
|
| | | PlayerGoldGift.OnGiftByCTGID(curPlayer, ctgID)
|