| | |
| | | WORD _Lv; //境界等级
|
| | | BYTE LvLarge; //大境界
|
| | | DWORD NeedLV; //需要等级
|
| | | DWORD NeedItemID; //需要道具ID
|
| | | WORD NeedItemCnt; //消耗的道具数量
|
| | | list NeedEquip; //需要8部位装备条件阶级|品质|是否套装
|
| | | list LVAwardItem; //等级奖励物品|个数
|
| | | list NeedPassMap; //所需过关地图|关卡线路
|
| | | list PassMapAwardItem; //过关地图奖励物品|个数
|
| | | DWORD NeedTreeLV; //需要仙树等级
|
| | | list TreeLVAwardItem; //仙树等级奖励物品|个数
|
| | | DWORD NeedCutTreeCnt; //所需砍树次数
|
| | | list CutTreeAwardItem; //砍树次数奖励物品|个数
|
| | | list AddAttrType; //境界加成属性类型
|
| | | list AddAttrNum; //境界加成属性值
|
| | | DWORD BossID; //渡劫bossid
|
| | |
| | | ("SubCmd", c_ubyte),
|
| | | ("IsPass", c_ubyte), #是否通关副本
|
| | | ("XXZLAwardState", c_int), #修仙之路领奖状态;按二进制位存储每个任务ID是否已领取
|
| | | ("RealmLVUpAwardState", c_int), #渡劫条件领奖状态;按二进制位存储是否已领取,0-等级;1-副本关卡;2-仙树等级;3-砍树次数
|
| | | ("RealmLVUpCutTreeCnt", c_int), #渡劫条件已砍树次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.SubCmd = 0x11
|
| | | self.IsPass = 0
|
| | | self.XXZLAwardState = 0
|
| | | self.RealmLVUpAwardState = 0
|
| | | self.RealmLVUpCutTreeCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsPass:%d,
|
| | | XXZLAwardState:%d
|
| | | XXZLAwardState:%d,
|
| | | RealmLVUpAwardState:%d,
|
| | | RealmLVUpCutTreeCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsPass,
|
| | | self.XXZLAwardState
|
| | | self.XXZLAwardState,
|
| | | self.RealmLVUpAwardState,
|
| | | self.RealmLVUpCutTreeCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | Def_PDict_FeastRedPacketCanGrabCnt = "FeastRedPacketCanGrabCnt" # 节日红包可抢次数
|
| | |
|
| | | #境界
|
| | | Def_PDict_RealmLVUpAwardState = "RealmLVUpAwardState" #境界渡劫条件领奖状态,按二进制位存储是否已领取
|
| | | Def_PDict_RealmLVUpCutTreeCnt = "RealmLVUpCutTreeCnt" #境界渡劫条件砍树次数
|
| | | Def_PDict_RealmXXZLAward = "RealmXXZLAward" #境界修仙之路领奖状态;按二进制位存储每个任务ID是否已领取
|
| | | Def_PDict_RealmFBIsOpen = "RealmFBIsOpen" #渡劫副本是否开启 0未开启 1已开启 2可升级境界
|
| | | Def_PDict_RealmFBAttrAdd = "RealmFBAttrAdd_%s" #渡劫副本属性加成 参数属性ID
|
| | |
| | | Def_RewardType_DailyPackBuyGift, #打包直购礼包奖励 64
|
| | | Def_RewardType_Zhanling, #战令奖励 65
|
| | | Def_RewardType_Task, #任务奖励 66
|
| | | )= range(67)
|
| | | Def_RewardType_LikeGame, #游戏点赞 67
|
| | | Def_RewardType_RealmLVUpTask, #境界渡劫任务条件奖励 68
|
| | | )= range(69)
|
| | |
|
| | |
|
| | | #boss复活相关活动定义
|
| | |
| | | ("SubCmd", c_ubyte),
|
| | | ("IsPass", c_ubyte), #是否通关副本
|
| | | ("XXZLAwardState", c_int), #修仙之路领奖状态;按二进制位存储每个任务ID是否已领取
|
| | | ("RealmLVUpAwardState", c_int), #渡劫条件领奖状态;按二进制位存储是否已领取,0-等级;1-副本关卡;2-仙树等级;3-砍树次数
|
| | | ("RealmLVUpCutTreeCnt", c_int), #渡劫条件已砍树次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.SubCmd = 0x11
|
| | | self.IsPass = 0
|
| | | self.XXZLAwardState = 0
|
| | | self.RealmLVUpAwardState = 0
|
| | | self.RealmLVUpCutTreeCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsPass:%d,
|
| | | XXZLAwardState:%d
|
| | | XXZLAwardState:%d,
|
| | | RealmLVUpAwardState:%d,
|
| | | RealmLVUpCutTreeCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsPass,
|
| | | self.XXZLAwardState
|
| | | self.XXZLAwardState,
|
| | | self.RealmLVUpAwardState,
|
| | | self.RealmLVUpCutTreeCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #-------------------------------------------------------------------------------
|
| | | #
|
| | | ##@package GM.Commands.AddCutTreeCnt
|
| | | #
|
| | | # @todo:增加砍树次数
|
| | | # @author hxp
|
| | | # @date 2024-02-20
|
| | | # @version 1.0
|
| | | #
|
| | | # 详细描述: 增加砍树次数
|
| | | #
|
| | | #-------------------------------------------------------------------------------
|
| | | #"""Version = 2024-02-20 10:30"""
|
| | | #-------------------------------------------------------------------------------
|
| | |
|
| | | import GameWorld
|
| | | import PlayerCutTree
|
| | |
|
| | | #逻辑实现
|
| | | ## GM命令执行入口
|
| | | # @param curPlayer 当前玩家
|
| | | # @param msgList 参数列表
|
| | | # @return None
|
| | | # @remarks 函数详细说明.
|
| | | def OnExec(curPlayer, msgList):
|
| | | if not msgList:
|
| | | GameWorld.DebugAnswer(curPlayer, "增加砍树次数: AddCutTreeCnt 次数")
|
| | | GameWorld.DebugAnswer(curPlayer, "注: 仅执行除装备产出外逻辑")
|
| | | return
|
| | | addCount = msgList[0]
|
| | | PlayerCutTree.OnAddCutTreeCnt(curPlayer, addCount)
|
| | | return
|
| | |
| | | ("WORD", "Lv", 1),
|
| | | ("BYTE", "LvLarge", 0),
|
| | | ("DWORD", "NeedLV", 0),
|
| | | ("DWORD", "NeedItemID", 0),
|
| | | ("WORD", "NeedItemCnt", 0),
|
| | | ("list", "NeedEquip", 0),
|
| | | ("list", "LVAwardItem", 0),
|
| | | ("list", "NeedPassMap", 0),
|
| | | ("list", "PassMapAwardItem", 0),
|
| | | ("DWORD", "NeedTreeLV", 0),
|
| | | ("list", "TreeLVAwardItem", 0),
|
| | | ("DWORD", "NeedCutTreeCnt", 0),
|
| | | ("list", "CutTreeAwardItem", 0),
|
| | | ("list", "AddAttrType", 0),
|
| | | ("list", "AddAttrNum", 0),
|
| | | ("DWORD", "BossID", 0),
|
| | |
| | | self.Lv = 0
|
| | | self.LvLarge = 0
|
| | | self.NeedLV = 0
|
| | | self.NeedItemID = 0
|
| | | self.NeedItemCnt = 0
|
| | | self.NeedEquip = []
|
| | | self.LVAwardItem = []
|
| | | self.NeedPassMap = []
|
| | | self.PassMapAwardItem = []
|
| | | self.NeedTreeLV = 0
|
| | | self.TreeLVAwardItem = []
|
| | | self.NeedCutTreeCnt = 0
|
| | | self.CutTreeAwardItem = []
|
| | | self.AddAttrType = []
|
| | | self.AddAttrNum = []
|
| | | self.BossID = 0
|
| | |
| | | def GetLv(self): return self.Lv # 境界等级
|
| | | def GetLvLarge(self): return self.LvLarge # 大境界
|
| | | def GetNeedLV(self): return self.NeedLV # 需要等级
|
| | | def GetNeedItemID(self): return self.NeedItemID # 需要道具ID
|
| | | def GetNeedItemCnt(self): return self.NeedItemCnt # 消耗的道具数量
|
| | | def GetNeedEquip(self): return self.NeedEquip # 需要8部位装备条件阶级|品质|是否套装
|
| | | def GetLVAwardItem(self): return self.LVAwardItem # 等级奖励物品|个数
|
| | | def GetNeedPassMap(self): return self.NeedPassMap # 所需过关地图|关卡线路
|
| | | def GetPassMapAwardItem(self): return self.PassMapAwardItem # 过关地图奖励物品|个数
|
| | | def GetNeedTreeLV(self): return self.NeedTreeLV # 需要仙树等级
|
| | | def GetTreeLVAwardItem(self): return self.TreeLVAwardItem # 仙树等级奖励物品|个数
|
| | | def GetNeedCutTreeCnt(self): return self.NeedCutTreeCnt # 所需砍树次数
|
| | | def GetCutTreeAwardItem(self): return self.CutTreeAwardItem # 砍树次数奖励物品|个数
|
| | | def GetAddAttrType(self): return self.AddAttrType # 境界加成属性类型
|
| | | def GetAddAttrNum(self): return self.AddAttrNum # 境界加成属性值
|
| | | def GetBossID(self): return self.BossID # 渡劫bossid
|
| | |
| | | #境界修仙之路奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_RealmXXZL:
|
| | | PlayerPrestigeSys.GetXXZLAward(curPlayer, dataEx)
|
| | | #境界渡劫任务条件奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_RealmLVUpTask:
|
| | | PlayerPrestigeSys.GetRealmLVUpTaskAward(curPlayer, dataEx)
|
| | | #仙盟boss伤害奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_FamilyBossHurt:
|
| | | GameLogic_FamilyBoss.GetFamilyBossHurtAward(curPlayer, dataEx, dataExStr)
|
| | |
| | | #curTotalExp = GetPlayerTotalExp(curPlayer)
|
| | | curTotalExp = curPlayer.GetExpPoint() * ChConfig.Def_PerPointValue + curPlayer.GetTotalExp()
|
| | |
|
| | | maxLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV", 1)
|
| | | maxLV = GetPlayerMaxLV(curPlayer)
|
| | | maxLVExpStore = IpyGameDataPY.GetFuncCfg("MaxLVExpStore", 1)
|
| | |
|
| | | curLV = curPlayer.GetLV()
|
| | |
| | | needSyncTalentPoint = False
|
| | | playerNeedDoLVUp = False
|
| | | curLV = curPlayer.GetLV()
|
| | | maxLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV", 1)
|
| | | maxLV = GetPlayerMaxLV(curPlayer)
|
| | |
|
| | | curPlayer.BeginRefreshState()
|
| | | #befXP = curPlayer.GetXP()
|
| | |
| | | return 0
|
| | | return lvIpyData.GetExpPoint() * ChConfig.Def_PerPointValue + lvIpyData.GetExp()
|
| | |
|
| | | def GetPlayerMaxLV(curPlayer):
|
| | | ## 获取玩家实际可升的最大等级
|
| | | maxLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV", 1)
|
| | | curRealmLV = curPlayer.GetOfficialRank()
|
| | | realmIpyData = PlayerPrestigeSys.GetRealmIpyData(curRealmLV)
|
| | | if not realmIpyData:
|
| | | return 0
|
| | | playerMaxLV = min(maxLV, realmIpyData.GetNeedLV())
|
| | | return playerMaxLV
|
| | |
|
| | | ## 获得玩家实际等级
|
| | | # @param curPlayer 玩家
|
| | | # @return 玩家实际等级
|
| | |
| | | import NetPackCommon
|
| | | import IpyGameDataPY
|
| | | import ChPyNetSendPack
|
| | | import PlayerPrestigeSys
|
| | | import PlayerControl
|
| | | import IPY_GameWorld
|
| | | import ItemControler
|
| | |
| | |
|
| | | PlayerControl.PayMoney(curPlayer, ShareDefine.TYPE_Price_Xiantao, giveEquipCount)
|
| | |
|
| | | cutExp = IpyGameDataPY.GetFuncCfg("CutTree", 1)
|
| | | addExp = giveEquipCount * cutExp
|
| | | if addExp > 0:
|
| | | PlayerControl.PlayerControl(curPlayer).AddExp(addExp)
|
| | | |
| | | ItemControler.GivePlayerItemOrMail(curPlayer, giveItemListEx)
|
| | |
|
| | | GameWorld.DebugLog(" 实际产出: giveEquipIDList=%s,giveItemListEx=%s,addExp=%s" % (giveEquipIDList, giveItemListEx, addExp), playerID)
|
| | | GameWorld.DebugLog(" 实际产出: giveEquipIDList=%s,giveItemListEx=%s" % (giveEquipIDList, giveItemListEx), playerID)
|
| | | SyncCutTreeResult(curPlayer, giveEquipCount, giveItemListEx)
|
| | |
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_CutTree, giveEquipCount)
|
| | | OnAddCutTreeCnt(curPlayer, giveEquipCount)
|
| | | return
|
| | |
|
| | | def OnAddCutTreeCnt(curPlayer, addCount):
|
| | | ## 增加砍树次数附加逻辑 - 除装备产出外的其他逻辑
|
| | | cutExp = IpyGameDataPY.GetFuncCfg("CutTree", 1)
|
| | | addExp = addCount * cutExp
|
| | | if addExp > 0:
|
| | | PlayerControl.PlayerControl(curPlayer).AddExp(addExp) |
| | | |
| | | #GameWorld.DebugLog("OnAddCutTreeCnt: addCount=%s,addExp=%s" % (addCount, addExp), curPlayer.GetPlayerID())
|
| | | PlayerPrestigeSys.AddRealmLVUpCutTreeCnt(curPlayer, addCount)
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_CutTree, addCount)
|
| | | return
|
| | |
|
| | |
|
| | | #// B2 22 砍树装备操作 #tagCMCutTreeEquipOP
|
| | | #
|
| | | #struct tagCMCutTreeEquipOP
|
| | |
| | | import time
|
| | | #------------------------------------------------------------------------------
|
| | |
|
| | | # 渡劫条件记录位定义
|
| | | (
|
| | | RealmLVUpAward_LV, # 等级
|
| | | RealmLVUpAward_PassMap, # 过关关卡
|
| | | RealmLVUpAward_TreeLV, # 仙树等级
|
| | | RealmLVUpAward_CutTreeCnt, # 砍树次数
|
| | | ) = range(4)
|
| | |
|
| | | def DoOfficialOpen(curPlayer):
|
| | | #功能开启
|
| | |
| | | sendPack = ChPyNetSendPack.tagMCSyncRealmInfo()
|
| | | sendPack.IsPass = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBIsOpen)
|
| | | sendPack.XXZLAwardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmXXZLAward)
|
| | | sendPack.RealmLVUpAwardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmLVUpAwardState)
|
| | | sendPack.RealmLVUpCutTreeCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmLVUpCutTreeCnt)
|
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | | return
|
| | |
|
| | |
| | | PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | return
|
| | |
|
| | | def AddRealmLVUpCutTreeCnt(curPlayer, addCnt):
|
| | | curRealmLV = curPlayer.GetOfficialRank()
|
| | | realmIpyData = GetRealmIpyData(curRealmLV)
|
| | | if not realmIpyData:
|
| | | return
|
| | | NeedCutTreeCnt = realmIpyData.GetNeedCutTreeCnt()
|
| | | if not NeedCutTreeCnt:
|
| | | return
|
| | | curTreeCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmLVUpCutTreeCnt)
|
| | | if curTreeCnt >= NeedCutTreeCnt:
|
| | | return
|
| | | updCutTreeCnt = min(curTreeCnt + addCnt, NeedCutTreeCnt)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmLVUpCutTreeCnt, updCutTreeCnt)
|
| | | SyncRealmFBState(curPlayer)
|
| | | return
|
| | |
|
| | | def GetRealmLVUpTaskAward(curPlayer, awardIndex):
|
| | | ## 领取境界渡劫任务条件奖励
|
| | | awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmLVUpAwardState)
|
| | | if awardState&pow(2, awardIndex):
|
| | | GameWorld.DebugLog("境界渡劫条件领奖,已领取过! awardIndex=%s" % awardIndex, curPlayer.GetPlayerID())
|
| | | return
|
| | | |
| | | curRealmLV = curPlayer.GetOfficialRank()
|
| | | realmIpyData = GetRealmIpyData(curRealmLV)
|
| | | if not realmIpyData:
|
| | | return
|
| | | |
| | | awardItemInfo = None
|
| | | if awardIndex == RealmLVUpAward_LV:
|
| | | playerLV = curPlayer.GetLV()
|
| | | NeedLV = realmIpyData.GetNeedLV()
|
| | | if playerLV < NeedLV:
|
| | | GameWorld.DebugLog('境界渡劫条件领奖,等级不足! curRealmLV=%s,playerLV=%s < %s' % (curRealmLV, playerLV, NeedLV))
|
| | | return
|
| | | awardItemInfo = realmIpyData.GetLVAwardItem()
|
| | | |
| | | elif awardIndex == RealmLVUpAward_PassMap:
|
| | | NeedPassMap = realmIpyData.GetNeedPassMap()
|
| | | if not NeedPassMap or len(NeedPassMap) != 2:
|
| | | return
|
| | | mapID, lineID = NeedPassMap
|
| | | grade = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID])
|
| | | if not grade:
|
| | | GameWorld.DebugLog('境界渡劫条件领奖,副本未过关! curRealmLV=%s,mapID=%s,lineID=%s' % (curRealmLV, mapID, lineID))
|
| | | return
|
| | | awardItemInfo = realmIpyData.GetPassMapAwardItem()
|
| | | |
| | | elif awardIndex == RealmLVUpAward_TreeLV:
|
| | | NeedTreeLV = realmIpyData.GetNeedTreeLV()
|
| | | if not NeedTreeLV:
|
| | | return
|
| | | treeLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreeLV)
|
| | | if treeLV < NeedTreeLV:
|
| | | GameWorld.DebugLog('境界渡劫条件领奖,仙树等级不足! curRealmLV=%s,treeLV=%s < %s' % (curRealmLV, treeLV, NeedTreeLV))
|
| | | return
|
| | | awardItemInfo = realmIpyData.GetTreeLVAwardItem()
|
| | | |
| | | elif awardIndex == RealmLVUpAward_CutTreeCnt:
|
| | | NeedCutTreeCnt = realmIpyData.GetNeedCutTreeCnt()
|
| | | if not NeedCutTreeCnt:
|
| | | return
|
| | | cutTreeCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmLVUpCutTreeCnt)
|
| | | if cutTreeCnt < NeedCutTreeCnt:
|
| | | GameWorld.DebugLog('境界渡劫条件领奖,砍树次数不足! curRealmLV=%s,cutTreeCnt=%s < %s' % (curRealmLV, cutTreeCnt, NeedCutTreeCnt))
|
| | | return
|
| | | awardItemInfo = realmIpyData.GetCutTreeAwardItem()
|
| | | |
| | | else:
|
| | | return
|
| | | |
| | | if not awardItemInfo or len(awardItemInfo) != 2:
|
| | | return
|
| | | itemID, itemCount = awardItemInfo
|
| | | if not ItemCommon.GiveAwardItem(curPlayer, [[itemID, itemCount, 0]]):
|
| | | return
|
| | | |
| | | updAwardState = awardState|pow(2, awardIndex)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmLVUpAwardState, updAwardState)
|
| | | GameWorld.DebugLog("境界渡劫条件领奖OK! curRealmLV=%s,awardIndex=%s,updAwardState=%s" % (curRealmLV, awardIndex, updAwardState), curPlayer.GetPlayerID())
|
| | | SyncRealmFBState(curPlayer)
|
| | | return
|
| | |
|
| | | #// A5 23 提升境界等级 # tagCMRealmLVUp
|
| | | #
|
| | |
| | | if not canLvUp:
|
| | | GameWorld.DebugLog(' 副本未过关,不能升级境界')
|
| | | return
|
| | | #等级判断
|
| | | if curPlayer.GetLV() < realmIpyData.GetNeedLV():
|
| | | |
| | | awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmLVUpAwardState)
|
| | | #等级判断 - 必要条件
|
| | | playerLV = curPlayer.GetLV()
|
| | | if not awardState&pow(2, RealmLVUpAward_LV):
|
| | | GameWorld.DebugLog('等级条件奖励未领取,不能升级境界! curRealmLV=%s' % (curRealmLV))
|
| | | return
|
| | | #装备判断
|
| | | needEquip = realmIpyData.GetNeedEquip()
|
| | | if needEquip and len(needEquip) == 4:
|
| | | classLV, star, isSuite, color = needEquip
|
| | | equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | for place in ChConfig.EquipPlace_Base:
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, place)
|
| | | if not ipyData:
|
| | | return
|
| | | gridIndex = ipyData.GetGridIndex()
|
| | | curEquip = equipPack.GetAt(gridIndex)
|
| | | if not ItemCommon.CheckItemCanUse(curEquip):
|
| | | return
|
| | | curPartStar = ChEquip.GetEquipPartStar(curPlayer, gridIndex)
|
| | | if curPartStar < star:
|
| | | return
|
| | | if isSuite and not curEquip.GetSuiteID():
|
| | | return
|
| | | if curEquip.GetItemColor() < color:
|
| | | return
|
| | | totalExpNeed = PlayerControl.GetTotalExpByPlayerLv(playerLV)
|
| | | totalExp = PlayerControl.GetPlayerTotalExp(curPlayer)
|
| | | if totalExp < totalExpNeed:
|
| | | GameWorld.DebugLog('等级条件经验未满,不能升级境界! curRealmLV=%s,playerLV=%s,totalExp=%s < %s' % (curRealmLV, playerLV, totalExp, totalExpNeed))
|
| | | return
|
| | |
|
| | | needItemID = realmIpyData.GetNeedItemID()
|
| | | needItemCount = realmIpyData.GetNeedItemCnt()
|
| | | # 支持不消耗物品升级
|
| | | if needItemID > 0 and needItemCount > 0:
|
| | | curPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
|
| | | hasEnough, itemIndexList = ItemCommon.GetItem_FromPack_ByID(needItemID, curPack, needItemCount)
|
| | | if not hasEnough:
|
| | | GameWorld.DebugLog("渡劫开启, 材料不足! Lv=%s, needItemID=%s,needItemCount=%s" |
| | | % (curRealmLV, needItemID, needItemCount))
|
| | | #副本过关判断
|
| | | NeedPassMap = realmIpyData.GetNeedPassMap()
|
| | | if NeedPassMap:
|
| | | if not awardState&pow(2, RealmLVUpAward_PassMap):
|
| | | GameWorld.DebugLog('过关条件奖励未领取,不能升级境界! curRealmLV=%s' % (curRealmLV))
|
| | | return
|
| | | #扣除物品
|
| | | ItemCommon.ReduceItem(curPlayer, curPack, itemIndexList, needItemCount, True, "Realm")
|
| | | |
| | | |
| | | #仙树等级判断
|
| | | NeedTreeLV = realmIpyData.GetNeedTreeLV()
|
| | | if NeedTreeLV:
|
| | | if not awardState&pow(2, RealmLVUpAward_TreeLV):
|
| | | GameWorld.DebugLog('仙树等级条件奖励未领取,不能升级境界! curRealmLV=%s' % (curRealmLV))
|
| | | return
|
| | | |
| | | #砍树次数判断
|
| | | NeedCutTreeCnt = realmIpyData.GetNeedCutTreeCnt()
|
| | | if NeedCutTreeCnt:
|
| | | if not awardState&pow(2, RealmLVUpAward_CutTreeCnt):
|
| | | GameWorld.DebugLog('砍树次数条件奖励未领取,不能升级境界! curRealmLV=%s' % (curRealmLV))
|
| | | return
|
| | | |
| | | DoRealmLVUpLogic(curPlayer)
|
| | | return
|
| | |
|
| | |
| | | __DoRealmLVUpAddPoint(curPlayer)
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmFBIsOpen, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmLVUpAwardState, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmLVUpCutTreeCnt, 0)
|
| | | |
| | | PlayerControl.PlayerControl(curPlayer).PlayerLvUp()
|
| | | |
| | | if needSys:
|
| | | addBuffID = nextRealmIpyData.GetBuffID()
|
| | | if addBuffID:
|