| | |
| | |
|
| | | def OnPlayerLogin(curPlayer):
|
| | |
|
| | | TransferPlayerActDBKeyValue(curPlayer)
|
| | | |
| | | for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FlashGiftbag, {}).values():
|
| | | actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
|
| | | isReset = __CheckPlayerFlashGiftbagAction(curPlayer, actNum)
|
| | | if not isReset:
|
| | | pass
|
| | | |
| | | return
|
| | |
|
| | | def TransferPlayerActDBKeyValue(curPlayer):
|
| | | ## 玩家登录时调用,旧版本玩家活动数据转移到新版本字典,线上版本维护之后的版本可删除此代码,线上版本分支 gt_1.100.4
|
| | | |
| | | ##限时礼包活动
|
| | | Def_PDict_FlashGiftbagID = "FlashGiftbagID" # 玩家身上的限时礼包活动ID,唯一标识,取活动开始日期time
|
| | | Def_PDict_FlashGiftbagBuyCount = "FlashGiftbagBuyCount_%s" # 限时礼包已购买次数,参数(礼包ID)
|
| | | Def_PDict_FlashGiftbagMailState = "FlashGiftbagMailState" # 玩家身上的活动更新提醒邮件状态
|
| | | |
| | | playerActID = curPlayer.NomalDictGetProperty(Def_PDict_FlashGiftbagID)
|
| | | if not playerActID:
|
| | | return
|
| | | |
| | | tagActNum = 10
|
| | | |
| | | playerMailState = curPlayer.NomalDictGetProperty(Def_PDict_FlashGiftbagMailState) # 玩家身上的活动提醒邮件状态
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashGiftbagID % tagActNum, playerActID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashGiftbagMailState % tagActNum, playerMailState)
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, Def_PDict_FlashGiftbagID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, Def_PDict_FlashGiftbagMailState, 0)
|
| | | |
| | | GameWorld.Log("限时礼包转移玩家活动字典记录: playerActID=%s,tagActNum=%s" % (playerActID, tagActNum), curPlayer.GetPlayerID())
|
| | | |
| | | ipyMgr = IpyGameDataPY.IPY_Data()
|
| | | for index in xrange(ipyMgr.GetFlashGiftbagCount()):
|
| | | ipyData = ipyMgr.GetFlashGiftbagByIndex(index)
|
| | | giftbagID = ipyData.GetGiftbagID()
|
| | | |
| | | buyCount = curPlayer.NomalDictGetProperty(Def_PDict_FlashGiftbagBuyCount % giftbagID)
|
| | | if buyCount <= 0:
|
| | | continue
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashGiftbagBuyCount % (tagActNum, giftbagID), buyCount)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, Def_PDict_FlashGiftbagBuyCount % giftbagID, 0)
|
| | | GameWorld.Log(" 转移购买次数: giftbagID=%s,buyCount=%s" % (giftbagID, buyCount), curPlayer.GetPlayerID())
|
| | |
|
| | | return
|
| | |
|