10289 【越南】【英语】【砍树】【BT】运势-服务端(寻宝设定表增加配置不同的寻宝广播key)
| | |
| | | BYTE LuckyGridNum; //幸运格子编号
|
| | | dict GridNumMaxLimitInfo; //格子最大产出次数限制,{"格子":最大可产出次数, ...}
|
| | | list NotifyGridNumList; //需要额外广播的格子
|
| | | char NotifyKey; //广播key
|
| | | BYTE AwardMoneyType; //额外奖励货币类型
|
| | | WORD AwardMoneyValue; //单次奖励货币数
|
| | | };
|
| | |
| | | ("BYTE", "LuckyGridNum", 0),
|
| | | ("dict", "GridNumMaxLimitInfo", 0),
|
| | | ("list", "NotifyGridNumList", 0),
|
| | | ("char", "NotifyKey", 0),
|
| | | ("BYTE", "AwardMoneyType", 0),
|
| | | ("WORD", "AwardMoneyValue", 0),
|
| | | ),
|
| | |
| | | def GetLuckyGridNum(self): return self.attrTuple[15] # 幸运格子编号 BYTE
|
| | | def GetGridNumMaxLimitInfo(self): return self.attrTuple[16] # 格子最大产出次数限制,{"格子":最大可产出次数, ...} dict
|
| | | def GetNotifyGridNumList(self): return self.attrTuple[17] # 需要额外广播的格子 list
|
| | | def GetAwardMoneyType(self): return self.attrTuple[18] # 额外奖励货币类型 BYTE
|
| | | def GetAwardMoneyValue(self): return self.attrTuple[19] # 单次奖励货币数 WORD |
| | | def GetNotifyKey(self): return self.attrTuple[18] # 广播key char
|
| | | def GetAwardMoneyType(self): return self.attrTuple[19] # 额外奖励货币类型 BYTE
|
| | | def GetAwardMoneyValue(self): return self.attrTuple[20] # 单次奖励货币数 WORD |
| | | |
| | | # 寻宝产出库表 |
| | | class IPY_TreasureHouse(): |
| | |
| | | GameWorld.DebugLog("beSureCountDict=%s" % beSureCountDict, playerID)
|
| | | GameWorld.DebugLog("ensureCount=%s, %s" % (ensureCount, ensureRateList), playerID)
|
| | | notifyGridNumList = setIpyData.GetNotifyGridNumList() # 额外需要广播的格子,幸运必出、次数必出可不配置
|
| | | notifyKey = setIpyData.GetNotifyKey()
|
| | | gridNumMaxLimitInfo = setIpyData.GetGridNumMaxLimitInfo() # {"格子":最大可产出次数, ...}
|
| | | gridNumCountInfo = {} # 有限制产出次数的格子已经产出数
|
| | | for gridNumStr in gridNumMaxLimitInfo.keys():
|
| | |
| | | itemObj = ItemControler.GetOutPutItemObj(itemID, itemCount, False, curPlayer=curPlayer)
|
| | | mailItemDict = ItemCommon.GetMailItemDict(itemObj)
|
| | |
|
| | | if int(gridNum) in notifyGridNumList:
|
| | | PlayerControl.WorldNotify(0, "HappyXB", [curPlayer.GetPlayerName(), itemID, itemObj.GetUserData(), itemCount])
|
| | | if int(gridNum) in notifyGridNumList and notifyKey:
|
| | | PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), itemID, itemObj.GetUserData(), itemCount])
|
| | |
|
| | | if mailItemList or not itemControl.PutInItem(packType, itemObj, event=[ChConfig.ItemGive_Treasure, False, {}]):
|
| | | mailItemList.append(mailItemDict)
|