| | |
| | | for itemID, itemCount, isBind in giftItemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, [IPY_GameWorld.rptItem],
|
| | | event=[ChConfig.ItemGive_CTG, True, addDRDict])
|
| | | |
| | | |
| | | # 取玩家APPID,混服使用
|
| | | appID = GameWorld.GetPlayerPlatform(curPlayer.GetAccID())
|
| | | notifyKey = giftbagIpyData.GetNotifyKey()
|
| | | if notifyKey:
|
| | | orderIpyData = GetFlashGiftbagIDOrderInfoIpyData(giftbagID)
|
| | | orderIpyData = GetFlashGiftbagIDOrderInfoIpyData(giftbagID, appID)
|
| | | rmb = 0 if not orderIpyData else int(orderIpyData.GetPayRMBNum())
|
| | | PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), rmb, giftbagIpyData.GetMainItemID()])
|
| | |
|
| | |
| | | GameWorld.ErrLog("限时礼包开关时间时分配置错误!cfgID=%s" % cfgID)
|
| | | return
|
| | |
|
| | | # 取玩家APPID,混服使用
|
| | | appID = GameWorld.GetPlayerPlatform(curPlayer.GetAccID())
|
| | | |
| | | packInfo = ChPyNetSendPack.tagMCFlashGiftbagInfo()
|
| | | packInfo.StartDate = flashGiftbagIpyData.GetStartDate()
|
| | | packInfo.EndtDate = flashGiftbagIpyData.GetEndDate()
|
| | |
| | |
|
| | | for giftIpyData in giftbagIpyDataList:
|
| | | giftbagID = giftIpyData.GetGiftbagID()
|
| | | orderIpyData = GetFlashGiftbagIDOrderInfoIpyData(giftbagID)
|
| | | orderIpyData = GetFlashGiftbagIDOrderInfoIpyData(giftbagID, appID)
|
| | | giftBag = ChPyNetSendPack.tagMCFlashGiftbag()
|
| | | giftBag.GiftID = giftbagID
|
| | | giftBag.OrderInfo = "" if not orderIpyData else orderIpyData.GetOrderInfo()
|
| | |
| | | NetPackCommon.SendFakePack(curPlayer, packInfo)
|
| | | return
|
| | |
|
| | | def GetFlashGiftbagIDOrderInfoIpyData(giftbagID):
|
| | | def GetFlashGiftbagIDOrderInfoIpyData(giftbagID, appID):
|
| | | ## 获取礼包ID对应实际售价
|
| | | key = "FlashGiftbagIDRMB"
|
| | | FlashGiftbagIDRMBDict = IpyGameDataPY.GetConfigEx(key)
|
| | | if not FlashGiftbagIDRMBDict:
|
| | | FlashGiftbagIDRMBDict = {}
|
| | | appID = GameWorld.GetPlatform()
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for i in xrange(ipyDataMgr.GetOrderInfoCount()):
|
| | | ipyData = ipyDataMgr.GetOrderInfoByIndex(i)
|
| | |
| | | continue
|
| | | if not ipyData.GetGiftbagID():
|
| | | continue
|
| | | FlashGiftbagIDRMBDict[ipyData.GetGiftbagID()] = ipyData
|
| | | FlashGiftbagIDRMBDict[(ipyData.GetGiftbagID(), appID)] = ipyData
|
| | | IpyGameDataPY.SetConfigEx(key, FlashGiftbagIDRMBDict)
|
| | | return FlashGiftbagIDRMBDict.get(giftbagID)
|
| | | return FlashGiftbagIDRMBDict.get((giftbagID, appID))
|
| | |
|