Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
| | |
| | | WORD GainGoldPrize; //赠送仙玉数
|
| | | WORD FirstGoldPrize; //首次充值该档位赠送仙玉
|
| | | list GainItemList; //获得物品列表[[物品ID,个数,是否绑定], ...]
|
| | | char NotifyMark; //广播提示
|
| | | };
|
| | |
|
| | | //等级奖励表
|
| | |
| | | RunQuestEvent(curPlayer, "magicweaponlv", '%s_%s'%(mwID, lv), Def_RunQuestType_RunAll)
|
| | | return
|
| | |
|
| | | def EventRespons_MagicWeaponFBPassLV(curPlayer, mwID, lv):
|
| | | # 魔族法宝关卡进度
|
| | | RunQuestEvent(curPlayer, "mwfbpasslv", '%s_%s'%(mwID, lv), Def_RunQuestType_Normal)
|
| | | return
|
| | |
|
| | | def EventRespons_SuccessFinish(curPlayer, succID):
|
| | | # 领取完成就
|
| | | RunQuestEvent(curPlayer, "successfinish", succID, Def_RunQuestType_RunAll)
|
| | |
| | | ("WORD", "GainGoldPrize", 0),
|
| | | ("WORD", "FirstGoldPrize", 0),
|
| | | ("list", "GainItemList", 0),
|
| | | ("char", "NotifyMark", 0),
|
| | | ),
|
| | |
|
| | | "LVAward":(
|
| | |
| | | self.GainGold = 0
|
| | | self.GainGoldPrize = 0
|
| | | self.FirstGoldPrize = 0
|
| | | self.GainItemList = [] |
| | | self.GainItemList = []
|
| | | self.NotifyMark = "" |
| | | return |
| | | |
| | | def GetRecordID(self): return self.RecordID # 记录ID
|
| | |
| | | def GetGainGold(self): return self.GainGold # 获得仙玉数
|
| | | def GetGainGoldPrize(self): return self.GainGoldPrize # 赠送仙玉数
|
| | | def GetFirstGoldPrize(self): return self.FirstGoldPrize # 首次充值该档位赠送仙玉
|
| | | def GetGainItemList(self): return self.GainItemList # 获得物品列表[[物品ID,个数,是否绑定], ...] |
| | | def GetGainItemList(self): return self.GainItemList # 获得物品列表[[物品ID,个数,是否绑定], ...]
|
| | | def GetNotifyMark(self): return self.NotifyMark # 广播提示 |
| | | |
| | | # 等级奖励表 |
| | | class IPY_LVAward(): |
| | |
| | | DataRecordPack.DR_CTGError(curPlayer, "The orderCoin is not equal to the ipyData's RMB(%s)!" % payRMBNum, addDRDict)
|
| | | return
|
| | |
|
| | | addGold, prizeGold, giveItemList = 0, 0, []
|
| | | addGold, prizeGold, giveItemList, notifyMark = 0, 0, [], ''
|
| | |
|
| | | if ipyData.GetCTGID():
|
| | | ctgResultInfo = __GetCTGInfoByID(curPlayer, chargeInfo, ipyData.GetCTGID(), eventName, addDRDict, isAddBourseMoney)
|
| | | if not ctgResultInfo:
|
| | | return
|
| | | addGold, prizeGold, giveItemList = ctgResultInfo
|
| | | addGold, prizeGold, giveItemList, notifyMark = ctgResultInfo
|
| | |
|
| | | elif ipyData.GetGiftbagID():
|
| | | if not PlayerFlashGiftbag.OnPlayerOrderGiftbag(curPlayer, [ipyData.GetGiftbagID()], addDRDict):
|
| | |
| | | DataRecordPack.DR_CTGError(curPlayer, "The orderInfo is useless!", addDRDict)
|
| | | return
|
| | |
|
| | | DoCTGLogic(curPlayer, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict)
|
| | | DoCTGLogic(curPlayer, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, notifyMark)
|
| | |
|
| | | #充值成功主动查询一次,无充值数量就不会继续查询
|
| | | if orderID:
|
| | |
| | | addGold = ipyData.GetGainGold() # 获得仙玉数
|
| | | gainGoldPrize = ipyData.GetGainGoldPrize() # 赠送仙玉数,首次充值赠送仙玉时,此仙玉不给
|
| | | firstGoldPrize = ipyData.GetFirstGoldPrize() # 首次充值赠送的仙玉
|
| | | notifyMark = ipyData.GetNotifyMark()
|
| | | totalBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGGoodsBuyCount % recordID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGGoodsBuyCount % recordID, totalBuyCount + 1)
|
| | | prizeGold = firstGoldPrize if (not totalBuyCount and firstGoldPrize) else gainGoldPrize
|
| | |
| | | addDRDict.update({"totalBuyCount":(totalBuyCount + 1)})
|
| | |
|
| | | Sync_CoinToGoldCountInfo(curPlayer, [recordID])
|
| | | return addGold, prizeGold, giveItemList
|
| | | return addGold, prizeGold, giveItemList, notifyMark
|
| | |
|
| | | def DoCTGLogic(curPlayer, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict):
|
| | | def DoCTGLogic(curPlayer, orderCoin, addGold, prizeGold, giveItemList, isAddBourseMoney, eventName, addDRDict, notifyMark=''):
|
| | | goldBefore = curPlayer.GetGold()
|
| | | bourseMoneyBefore = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney)
|
| | |
|
| | |
| | | for itemID, itemCount, isBind in giveItemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, [IPY_GameWorld.rptItem],
|
| | | event=[ChConfig.ItemGive_CTG, True, addDRDict])
|
| | | if notifyMark:
|
| | | mainItemID = giveItemList[0][0]
|
| | | PlayerControl.WorldNotify(0, notifyMark, [curPlayer.GetName(), mainItemID, ''])
|
| | |
|
| | | addVIPExp = int(orderCoin / 100 * GetCoinRate())
|
| | | PlayerVip.AddVIPExp(curPlayer, addVIPExp)
|
| | |
| | | CalcMagicWeaponAttr(curPlayer)
|
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | Sycn_MagicWeaponLV(curPlayer, mwID)
|
| | | |
| | | EventShell.EventRespons_MagicWeaponFBPassLV(curPlayer, mwID, passLV)
|
| | | return |