| | |
| | | import PlayerControl |
| | | import IpyGameDataPY |
| | | import ChPyNetSendPack |
| | | import FunctionNPCCommon |
| | | import DataRecordPack |
| | | import NetPackCommon |
| | | import ItemControler |
| | |
| | | import PlayerCoin |
| | | import GameWorld |
| | | import ChConfig |
| | | |
| | | def OnDay(curPlayer): |
| | | for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_BuyCountGift, {}).values(): |
| | | if not actInfo.get(ShareDefine.ActKey_State): |
| | | continue |
| | | actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0) |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0) |
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActBuyCountGift", cfgID) |
| | | if not ipyData: |
| | | continue |
| | | CTGCountDayResetList = ipyData.GetCTGCountDayResetList() |
| | | if not CTGCountDayResetList: |
| | | continue |
| | | |
| | | awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BuyCountGiftAward % actNum) |
| | | for buyCount in CTGCountDayResetList: |
| | | awardRecord = GameWorld.SetBitValue(awardRecord, buyCount, 0) |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BuyCountGiftAward % actNum, awardRecord) |
| | | Sync_BuyCountGiftPlayerInfo(curPlayer, actNum) |
| | | |
| | | return |
| | | |
| | | def OnPlayerLogin(curPlayer): |
| | | |
| | |
| | | return |
| | | resetCTGIDList = ipyData.GetCTGIDList() |
| | | PlayerCoin.DoResetCTGCountByIDList(curPlayer, "ActBuyCountGift", resetCTGIDList) |
| | | |
| | | shopType = ipyData.GetActShopType() |
| | | if shopType: |
| | | FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, [shopType]) |
| | | return |
| | | |
| | | def OnGetBuyCountGiftAward(curPlayer, buyCount, actNum): |
| | |
| | | actInfo.LimitLV = ipyData.GetLVLimit() |
| | | actInfo.IsDayReset = ipyData.GetIsDayReset() |
| | | actInfo.ResetType = ipyData.GetResetType() |
| | | actInfo.ShopType = ipyData.GetActShopType() |
| | | actInfo.CTGIDList = ipyData.GetCTGIDList() |
| | | actInfo.CTGIDCount = len(actInfo.CTGIDList) |
| | | |