| | |
| | | struct tagRealm
|
| | | {
|
| | | WORD _Lv; //境界等级
|
| | | BYTE IsBigRealm; //是否大境界
|
| | | DWORD NeedPoint; //开启渡劫需要修炼点
|
| | | DWORD NeedItemID; //开启渡劫需要道具ID
|
| | | WORD NeedItemCnt; //开启渡劫消耗的道具数量
|
| | | dict NeedActiveTreasure; //开启渡劫需要激活法宝条件
|
| | | DWORD NeedLV; //需要等级
|
| | | DWORD NeedItemID; //需要道具ID
|
| | | WORD NeedItemCnt; //消耗的道具数量
|
| | | list AddAttrType; //境界加成属性类型
|
| | | list AddAttrNum; //境界加成属性值
|
| | | DWORD BossID; //渡劫bossid
|
| | | dict SitTime; //打坐时间
|
| | | dict TeamAward; //组队帮打的人的奖励
|
| | | };
|
| | |
|
| | | //神兵表 #tagGodWeapon
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 11 通知玩家境界渡劫是否开启 #tagMCSyncRealmFBIsOpen
|
| | | # A3 11 通知玩家境界信息 #tagMCSyncRealmInfo
|
| | |
|
| | | class tagMCSyncRealmFBIsOpen(Structure):
|
| | | class tagMCSyncRealmInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsOpen", c_ubyte), #是否开启
|
| | | ("SitAllTime", c_ushort), #打坐总时间秒
|
| | | ("SitRemainTime", c_int), #开始打坐前剩余时间秒
|
| | | ("SitStartTime", c_int), #开始打坐时间
|
| | | ("LastEnterTime", c_int), #上次进入渡劫副本时间
|
| | | ("IsPass", c_ubyte), #是否通关副本
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | def Clear(self):
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x11
|
| | | self.IsOpen = 0
|
| | | self.SitAllTime = 0
|
| | | self.SitRemainTime = 0
|
| | | self.SitStartTime = 0
|
| | | self.LastEnterTime = 0
|
| | | self.IsPass = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCSyncRealmFBIsOpen)
|
| | | return sizeof(tagMCSyncRealmInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 11 通知玩家境界渡劫是否开启 //tagMCSyncRealmFBIsOpen:
|
| | | DumpString = '''// A3 11 通知玩家境界信息 //tagMCSyncRealmInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsOpen:%d,
|
| | | SitAllTime:%d,
|
| | | SitRemainTime:%d,
|
| | | SitStartTime:%d,
|
| | | LastEnterTime:%d
|
| | | IsPass:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsOpen,
|
| | | self.SitAllTime,
|
| | | self.SitRemainTime,
|
| | | self.SitStartTime,
|
| | | self.LastEnterTime
|
| | | self.IsPass
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCSyncRealmFBIsOpen=tagMCSyncRealmFBIsOpen()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSyncRealmFBIsOpen.Cmd,m_NAtagMCSyncRealmFBIsOpen.SubCmd))] = m_NAtagMCSyncRealmFBIsOpen
|
| | | m_NAtagMCSyncRealmInfo=tagMCSyncRealmInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSyncRealmInfo.Cmd,m_NAtagMCSyncRealmInfo.SubCmd))] = m_NAtagMCSyncRealmInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 11 通知玩家境界渡劫是否开启 #tagMCSyncRealmFBIsOpen
|
| | | # A3 11 通知玩家境界信息 #tagMCSyncRealmInfo
|
| | |
|
| | | class tagMCSyncRealmFBIsOpen(Structure):
|
| | | class tagMCSyncRealmInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsOpen", c_ubyte), #是否开启
|
| | | ("SitAllTime", c_ushort), #打坐总时间秒
|
| | | ("SitRemainTime", c_int), #开始打坐前剩余时间秒
|
| | | ("SitStartTime", c_int), #开始打坐时间
|
| | | ("LastEnterTime", c_int), #上次进入渡劫副本时间
|
| | | ("IsPass", c_ubyte), #是否通关副本
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | def Clear(self):
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x11
|
| | | self.IsOpen = 0
|
| | | self.SitAllTime = 0
|
| | | self.SitRemainTime = 0
|
| | | self.SitStartTime = 0
|
| | | self.LastEnterTime = 0
|
| | | self.IsPass = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCSyncRealmFBIsOpen)
|
| | | return sizeof(tagMCSyncRealmInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 11 通知玩家境界渡劫是否开启 //tagMCSyncRealmFBIsOpen:
|
| | | DumpString = '''// A3 11 通知玩家境界信息 //tagMCSyncRealmInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsOpen:%d,
|
| | | SitAllTime:%d,
|
| | | SitRemainTime:%d,
|
| | | SitStartTime:%d,
|
| | | LastEnterTime:%d
|
| | | IsPass:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsOpen,
|
| | | self.SitAllTime,
|
| | | self.SitRemainTime,
|
| | | self.SitStartTime,
|
| | | self.LastEnterTime
|
| | | self.IsPass
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCSyncRealmFBIsOpen=tagMCSyncRealmFBIsOpen()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSyncRealmFBIsOpen.Cmd,m_NAtagMCSyncRealmFBIsOpen.SubCmd))] = m_NAtagMCSyncRealmFBIsOpen
|
| | | m_NAtagMCSyncRealmInfo=tagMCSyncRealmInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSyncRealmInfo.Cmd,m_NAtagMCSyncRealmInfo.SubCmd))] = m_NAtagMCSyncRealmInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | ## 玩家境界升级
|
| | | # @return
|
| | | def DR_RealmLVUp(curPlayer, realmlv, realmPoint, needRealmPoint):
|
| | | def DR_RealmLVUp(curPlayer, realmlv):
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(),
|
| | | 'AccID':curPlayer.GetAccID(), 'realmlv':realmlv, 'curRealmPoint':realmPoint, 'costRealmPoint':needRealmPoint,
|
| | | 'AccID':curPlayer.GetAccID(), 'realmlv':realmlv,
|
| | | 'playerlv':curPlayer.GetLV(), 'power':curPlayer.GetFightPower()}
|
| | |
|
| | | #发送封包
|
| | |
| | | if isPass:
|
| | | worldLV = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
|
| | | familyAuctionItemDict = {} #{仙盟ID:[[享受收益的成员ID, ...], [[拍品ID,总个数,拍品组数], ...]], ...}
|
| | | batchPlayerIDList, batchAddItemList, batchParamList, batchDetailList = [], [], [], []
|
| | | event=["AllFamilyBoss", False, {}]
|
| | | needMemberCnt = IpyGameDataPY.GetFuncCfg('LeagueBOSSNumber1')
|
| | | for rank, hurtInfo in enumerate(playerHurtList, 1):
|
| | |
| | | FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(menberItemList),
|
| | | 'AuctionItem':FBCommon.GetJsonItemList(familyAuctionItemList),
|
| | | 'memberCnt':len(memberIDList)}
|
| | | mailPlayerIDList = []
|
| | | for memberID in memberIDList:
|
| | | member = playerManager.FindPlayerByID(memberID)
|
| | | if member:
|
| | |
| | | member.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTick, True)
|
| | | FBCommon.NotifyFBOver(member, ChConfig.Def_FBMapID_AllFamilyBoss, lineID, isPass, overDict)
|
| | | else:
|
| | | PlayerControl.SendMailByKey('LeagueBOSS2', [memberID], menberItemList)
|
| | | mailPlayerIDList.append(memberID)
|
| | | if mailPlayerIDList:
|
| | | batchPlayerIDList.append(mailPlayerIDList)
|
| | | batchAddItemList.append(menberItemList)
|
| | | batchParamList.append([])
|
| | | batchDetailList.append({'rank':rank})
|
| | | |
| | | if batchPlayerIDList:
|
| | | PlayerControl.SendMailBatch("LeagueBOSS2", batchPlayerIDList, batchAddItemList, batchParamList, batchDetail=batchDetailList)
|
| | | if familyAuctionItemDict:
|
| | | GameWorld.Log('familyAuctionItemDict=%s'%familyAuctionItemDict)
|
| | | PlayerAuctionHouse.DoAddFamilyAuctionItem(familyAuctionItemDict)
|
| | |
| | | if not realmIpyData:
|
| | | GameWorld.ErrLog("没有该境界等级数据! Lv=%s" % curRealmLV)
|
| | | return False
|
| | | needRealmPoint = realmIpyData.GetNeedPoint()
|
| | | if not needRealmPoint:
|
| | | needLV = realmIpyData.GetNeedLV()
|
| | | if not needLV:
|
| | | GameWorld.DebugLog("境界已是最大等级,不能升级! Lv=%s" % curRealmLV, curPlayer.GetPlayerID())
|
| | | return False
|
| | | if not PlayerControl.HaveMoney(curPlayer, ShareDefine.TYPE_Price_RealmPoint, needRealmPoint, False):
|
| | | GameWorld.DebugLog("境界修炼点不足,无法开启渡劫!needRealmPoint=%s" % (needRealmPoint), curPlayer.GetPlayerID())
|
| | | if curPlayer.GetLV() < needLV:
|
| | | GameWorld.DebugLog("等级不足,无法开启渡劫!needRealmPoint=%s" % (needLV), curPlayer.GetPlayerID())
|
| | | return False
|
| | | # if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBIsOpen) != 1:
|
| | | # return False
|
| | | |
| | | |
| | | if not GetDuJieBossID():
|
| | | return False
|
| | |
|
| | | return True
|
| | |
|
| | |
|
| | |
| | | GameWorld.GetGameFB().SetGameFBDict(ChConfig.Map_FBDict_PropertyMark, propertyMark + 1)
|
| | | PlayerControl.SetFBFuncLineID(curPlayer, lineID)
|
| | | #FBCommon.SetFBPropertyMark(lineID)
|
| | | if lineID == 0:
|
| | | FBCommon.SetFBStep(FB_Step_MapPrepare, tick)
|
| | | #if lineID == 0:
|
| | | FBCommon.SetFBStep(FB_Step_MapPrepare, tick)
|
| | |
|
| | |
|
| | |
|
| | |
| | | # __OnDuJieFBStart(tick)
|
| | | fbStep = gameFB.GetFBStep()
|
| | |
|
| | | if lineID !=0 and fbStep == FB_Step_CallHelp:
|
| | | FBHelpBattle.SendGameServer_RefreshHelpBattlePlayer(curPlayer, ChConfig.Def_FBMapID_DuJie)
|
| | | return
|
| | | # if lineID !=0 and fbStep == FB_Step_CallHelp:
|
| | | # FBHelpBattle.SendGameServer_RefreshHelpBattlePlayer(curPlayer, ChConfig.Def_FBMapID_DuJie)
|
| | | # return
|
| | |
|
| | | if fbStep == FB_Step_MapPrepare:
|
| | | #初始化并通知等待倒计时
|
| | |
| | |
|
| | | curStar = gameFB.GetGameFBDictByKey(DuJieFB_Star)
|
| | | realmLV = gameFB.GetGameFBDictByKey(DuJieFB_RealmLV)
|
| | | realmIpyData = PlayerPrestigeSys.GetRealmIpyData(realmLV)
|
| | |
|
| | | FBPropertyMark = FBCommon.GetFBPropertyMark()
|
| | | lineID = 1 if FBPropertyMark else 0
|
| | | leaveTick = invadeCfg[Def_Time_Leave] * 1000
|
| | |
| | | addXianyuanCoin, reason = FBHelpBattle.DoFBAddXianyuanCoin(curPlayer, ChConfig.Def_FBMapID_DuJie, FBPropertyMark)
|
| | | overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
|
| | |
|
| | | if realmIpyData and realmIpyData.GetIsBigRealm():
|
| | | #成就
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_DujieFBHelpPass, 1)
|
| | | if playerCnt > 1: #多人组队渡劫
|
| | | EventShell.EventRespons_FBEvent(curPlayer, 'teamdujie')
|
| | | |
| | | FBCommon.NotifyFBOver(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID, isPass, overDict)
|
| | |
|
| | | return
|
| | |
| | | # if curPlayer.GetFamilyID() <= 0:
|
| | | # GameWorld.DebugLog("没有战盟,不能请求守护!")
|
| | | # return
|
| | | |
| | | return
|
| | | realmLV = GameWorld.GetGameFB().GetGameFBDictByKey(DuJieFB_RealmLV)
|
| | | realmIpyData = PlayerPrestigeSys.GetRealmIpyData(realmLV)
|
| | | if not realmIpyData:
|
| | | return
|
| | | if realmIpyData.GetIsBigRealm():
|
| | | GameWorld.DebugLog("大境界渡劫,不能请求守护!")
|
| | | return
|
| | | |
| | | GameWorld.DebugLog("向盟友寻求渡劫守护!")
|
| | | atkAdd = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBAttrAdd % ShareDefine.Def_Effect_BaseAtkAddPer)
|
| | | msgStr = str([atkAdd, isInspire])
|
| | |
| | |
|
| | | "Realm":(
|
| | | ("WORD", "Lv", 1),
|
| | | ("BYTE", "IsBigRealm", 0),
|
| | | ("DWORD", "NeedPoint", 0),
|
| | | ("DWORD", "NeedLV", 0),
|
| | | ("DWORD", "NeedItemID", 0),
|
| | | ("WORD", "NeedItemCnt", 0),
|
| | | ("dict", "NeedActiveTreasure", 0),
|
| | | ("list", "AddAttrType", 0),
|
| | | ("list", "AddAttrNum", 0),
|
| | | ("DWORD", "BossID", 0),
|
| | | ("dict", "SitTime", 0),
|
| | | ("dict", "TeamAward", 0),
|
| | | ),
|
| | |
|
| | | "GodWeapon":(
|
| | |
| | | |
| | | def __init__(self): |
| | | self.Lv = 0
|
| | | self.IsBigRealm = 0
|
| | | self.NeedPoint = 0
|
| | | self.NeedLV = 0
|
| | | self.NeedItemID = 0
|
| | | self.NeedItemCnt = 0
|
| | | self.NeedActiveTreasure = {}
|
| | | self.AddAttrType = []
|
| | | self.AddAttrNum = []
|
| | | self.BossID = 0
|
| | | self.SitTime = {}
|
| | | self.TeamAward = {} |
| | | self.BossID = 0 |
| | | return |
| | | |
| | | def GetLv(self): return self.Lv # 境界等级
|
| | | def GetIsBigRealm(self): return self.IsBigRealm # 是否大境界
|
| | | def GetNeedPoint(self): return self.NeedPoint # 开启渡劫需要修炼点
|
| | | def GetNeedItemID(self): return self.NeedItemID # 开启渡劫需要道具ID
|
| | | def GetNeedItemCnt(self): return self.NeedItemCnt # 开启渡劫消耗的道具数量
|
| | | def GetNeedActiveTreasure(self): return self.NeedActiveTreasure # 开启渡劫需要激活法宝条件
|
| | | def GetNeedLV(self): return self.NeedLV # 需要等级
|
| | | def GetNeedItemID(self): return self.NeedItemID # 需要道具ID
|
| | | def GetNeedItemCnt(self): return self.NeedItemCnt # 消耗的道具数量
|
| | | def GetAddAttrType(self): return self.AddAttrType # 境界加成属性类型
|
| | | def GetAddAttrNum(self): return self.AddAttrNum # 境界加成属性值
|
| | | def GetBossID(self): return self.BossID # 渡劫bossid
|
| | | def GetSitTime(self): return self.SitTime # 打坐时间
|
| | | def GetTeamAward(self): return self.TeamAward # 组队帮打的人的奖励 |
| | | def GetBossID(self): return self.BossID # 渡劫bossid |
| | | |
| | | # 神兵表 |
| | | class IPY_GodWeapon(): |
| | |
| | | import ShareDefine
|
| | | import GameWorld
|
| | | import ChConfig
|
| | | import PlayerMagicWeapon
|
| | | import PlayerSuccess
|
| | | import OpenServerCampaign
|
| | | import PlayerBillboard
|
| | |
| | | #};
|
| | | def OpenRealmFB(index, clientData, tick):
|
| | | return
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Official):
|
| | | GameWorld.DebugLog("爵位境界功能未开启, 无法开启渡劫!curLV=%s" % curPlayer.GetLV())
|
| | | return
|
| | |
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBIsOpen):
|
| | | GameWorld.DebugLog("渡劫已开启,无法再次开启!")
|
| | | return
|
| | | |
| | | curRealmLV = curPlayer.GetOfficialRank()
|
| | | realmIpyData = GetRealmIpyData(curRealmLV)
|
| | | if not realmIpyData:
|
| | | GameWorld.ErrLog("没有该境界等级数据! Lv=%s" % curRealmLV)
|
| | | return
|
| | | needRealmPoint = realmIpyData.GetNeedPoint()
|
| | | if not needRealmPoint:
|
| | | GameWorld.DebugLog("境界已是最大等级,不能升级! Lv=%s" % curRealmLV, curPlayer.GetPlayerID())
|
| | | return
|
| | | if not PlayerControl.HaveMoney(curPlayer, ShareDefine.TYPE_Price_RealmPoint, needRealmPoint, False):
|
| | | GameWorld.DebugLog("境界修炼点不足,无法开启渡劫!needRealmPoint=%s" % (needRealmPoint), curPlayer.GetPlayerID())
|
| | | return
|
| | | needActiveTreasureDict = realmIpyData.GetNeedActiveTreasure()
|
| | | for mwType, needActiveCnt in needActiveTreasureDict.items():
|
| | | activeCnt = PlayerMagicWeapon.GetMWActiveCntByType(curPlayer, mwType)
|
| | | if activeCnt < needActiveCnt:
|
| | | GameWorld.DebugLog("开启渡劫 需要法宝的激活条件不满足! needActiveTreasureDict=%s,法宝类型=%s, 已激活数量=%s" % (needActiveTreasureDict, mwType, activeCnt))
|
| | | 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))
|
| | | return
|
| | | #扣除物品
|
| | | ItemCommon.ReduceItem(curPlayer, curPack, itemIndexList, needItemCount, True, "Realm")
|
| | | PlayerControl.PayMoney(curPlayer, ShareDefine.TYPE_Price_RealmPoint, needRealmPoint)
|
| | | |
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmFBIsOpen, 1)
|
| | | SyncRealmFBState(curPlayer)
|
| | | GameWorld.Log("开启渡劫副本成功: curRealmLV=%s" % curRealmLV, curPlayer.GetPlayerID())
|
| | | return
|
| | |
|
| | | def SyncRealmFBState(curPlayer):
|
| | | #通知客户端渡劫副本是否开启
|
| | | return
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Official):
|
| | | return
|
| | | sendPack = ChPyNetSendPack.tagMCSyncRealmFBIsOpen()
|
| | | sendPack.IsOpen = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBIsOpen)
|
| | | sendPack.SitAllTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmSitAllTime)
|
| | | sendPack.SitRemainTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmSitRemainTime)
|
| | | sendPack.SitStartTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmSitStartTime)
|
| | | #sendPack.LastEnterTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBLastEnterTime)
|
| | | sendPack = ChPyNetSendPack.tagMCSyncRealmInfo()
|
| | | sendPack.IsPass = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBIsOpen)
|
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | | return
|
| | |
|
| | |
| | | def DoRealmLVUp(index, clientData, tick):
|
| | | #升级境界
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | canLvUp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBIsOpen) == 2
|
| | | if not canLvUp:
|
| | | GameWorld.DebugLog(' 不能升级境界')
|
| | | curRealmLV = curPlayer.GetOfficialRank()
|
| | | realmIpyData = GetRealmIpyData(curRealmLV)
|
| | | if not realmIpyData:
|
| | | GameWorld.ErrLog("没有该境界等级数据! Lv=%s" % curRealmLV)
|
| | | return
|
| | | if realmIpyData.GetBossID():
|
| | | canLvUp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBIsOpen) == 1
|
| | | if not canLvUp:
|
| | | GameWorld.DebugLog(' 副本未过关,不能升级境界')
|
| | | 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))
|
| | | return
|
| | | #扣除物品
|
| | | ItemCommon.ReduceItem(curPlayer, curPack, itemIndexList, needItemCount, True, "Realm")
|
| | | |
| | |
|
| | | DoRealmLVUpLogic(curPlayer)
|
| | | return
|
| | |
| | | OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_RealmLV, nextRealmLv)
|
| | | EventShell.EventRespons_RealmUp(curPlayer, nextRealmLv)
|
| | | #流向
|
| | | realmPoint = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_RealmPoint)
|
| | | realmIpyData = GetRealmIpyData(curRealmLV)
|
| | | needRealmPoint = realmIpyData.GetNeedPoint() if realmIpyData else 0
|
| | | DataRecordPack.DR_RealmLVUp(curPlayer, nextRealmLv, realmPoint, needRealmPoint)
|
| | | DataRecordPack.DR_RealmLVUp(curPlayer, nextRealmLv)
|
| | | return True
|
| | |
|
| | | def DologicDujieFBPass(curPlayer, realmLV, star):
|
| | |
| | | realmIpyData = GetRealmIpyData(realmLV)
|
| | | if not realmIpyData:
|
| | | return
|
| | | needRealmPoint = realmIpyData.GetNeedPoint()
|
| | | PlayerControl.PayMoney(curPlayer, ShareDefine.TYPE_Price_RealmPoint, needRealmPoint)
|
| | | DoRealmLVUpLogic(curPlayer)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmFBIsOpen, 0)
|
| | | |
| | | # sitTimeDict = realmIpyData.GetSitTime()
|
| | | # sitSecond = sitTimeDict.get(str(star), 0)
|
| | | # if sitSecond == 0:
|
| | | # #没有打坐时间,直接升境界
|
| | | # PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmFBIsOpen, 2)
|
| | | # else:
|
| | | # PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmSitAllTime, sitSecond)
|
| | | # PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmSitRemainTime, sitSecond)
|
| | | # SyncRealmFBState(curPlayer)
|
| | | |
| | | #DoRealmLVUpLogic(curPlayer)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmFBIsOpen, 1)
|
| | | SyncRealmFBState(curPlayer)
|
| | |
|
| | |
|
| | | return
|
| | |
|