| | |
| | | import TurnAttack
|
| | | import ShareDefine
|
| | | import IpyGameDataPY
|
| | | import PlayerSuccess
|
| | | import PlayerControl
|
| | | import PlayerActivity
|
| | | import ChPyNetSendPack
|
| | |
| | | import NPCCommon
|
| | | import BattleObj
|
| | | import ChEquip
|
| | | import ObjPool
|
| | |
|
| | | import random
|
| | |
|
| | |
| | | curMoney = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_ArenaTicket)
|
| | | storeMax = PlayerArena.GetArenaTicketStoreMax(curPlayer)
|
| | | if curMoney >= storeMax:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntBooty % itemID, 0)
|
| | | GameWorld.DebugLog("挑战券已达存储上限! itemID=%s,curMoney=%s >= %s" % (itemID, curMoney, storeMax), playerID)
|
| | | continue
|
| | |
|
| | |
| | | ChEquip.RefreshRoleEquipAttr(curPlayer)
|
| | |
|
| | | PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_EquipColor)
|
| | | PlayerSuccess.UpdateEquipSuccess(curPlayer)
|
| | | return
|
| | |
|
| | | def __doDecomposeMainEquip(curPlayer, itemIndexList):
|
| | |
| | | moneyTotal = int(round(moneyTotal)) # 四舍五入取整
|
| | | GameWorld.DebugLog("moneyTotal=%s,mjExTotal=%s" % (moneyTotal, mjExTotal), playerID)
|
| | |
|
| | | PlayerControl.GiveMoney(curPlayer, moneyType, moneyTotal, "DecomposeMainEquip", isSysHint=False)
|
| | | PlayerControl.GiveMoney(curPlayer, moneyType, moneyTotal, isSysHint=False)
|
| | | PlayerLLMJ.AddExpDecompose(curPlayer, mjExTotal)
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_EquipDecompose, decomposeCnt)
|
| | | PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_EquipDecompose, decomposeCnt)
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_OSAEquipDecompose, decomposeCnt)
|
| | | return
|
| | |
|
| | | def __doPickupMainItem(curPlayer, itemIndexList):
|
| | |
| | | syncItemIDList = GetBootyItemIDList()
|
| | | else:
|
| | | syncItemIDList = [itemID]
|
| | | poolMgr = ObjPool.GetPoolMgr()
|
| | | clientPack = poolMgr.acquire(ChPyNetSendPack.tagSCDropBootyInfo)
|
| | | clientPack = ChPyNetSendPack.tagSCDropBootyInfo()
|
| | | clientPack.DropBootyList = []
|
| | | for itemID in syncItemIDList:
|
| | | dropBooty = poolMgr.acquire(ChPyNetSendPack.tagSCDropBooty)
|
| | | dropBooty = ChPyNetSendPack.tagSCDropBooty()
|
| | | dropBooty.ItemID = itemID
|
| | | dropBooty.TodayDropCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BootyDropToday % itemID)
|
| | | clientPack.DropBootyList.append(dropBooty)
|
| | |
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | return
|
| | |
|
| | | def OnTurnFightOver(curPlayer, turnFight, mapID, funcLineID, overMsg):
|
| | | def OnTurnFightOver(turnFight, mapID, funcLineID, overMsg):
|
| | | ## 回合战斗结束
|
| | |
|
| | | curPlayer = turnFight.curPlayer
|
| | | if not curPlayer:
|
| | | return
|
| | |
|