|  |  |  | 
|---|
|  |  |  | 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) | 
|---|