| | |
| | | import GameWorld
|
| | | import ChConfig
|
| | | import PlayerSuccess
|
| | | import OpenServerCampaign
|
| | | import ChEquip
|
| | | import PlayerBillboard
|
| | | import PassiveBuffEffMng
|
| | | import EventShell
|
| | | import DataRecordPack
|
| | | import SkillCommon
|
| | |
|
| | | import time
|
| | | #------------------------------------------------------------------------------
|
| | |
| | | if not canLvUp:
|
| | | GameWorld.DebugLog(' 副本未过关,不能升级境界')
|
| | | return
|
| | | #等级判断
|
| | | if curPlayer.GetLV() < realmIpyData.GetNeedLV():
|
| | | 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
|
| | |
|
| | | needItemID = realmIpyData.GetNeedItemID()
|
| | | needItemCount = realmIpyData.GetNeedItemCnt()
|
| | |
| | | else:
|
| | | PlayerControl.WorldNotify(0, 'RealmUpSuccess', [curPlayer.GetName(), curPlayer.GetID(), nextRealmLv])
|
| | |
|
| | | if SkillCommon.GivePlayerSkillByJobSkill(curPlayer, nextRealmIpyData.GetLearnSkillIDInfo()):
|
| | | PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEffSet(curPlayer)
|
| | | |
| | | addFreePoint = nextRealmIpyData.GetAddFreePoint()
|
| | | if addFreePoint:
|
| | | updFreePoint = curPlayer.GetFreePoint() + addFreePoint
|
| | | curPlayer.SetFreePoint(updFreePoint)
|
| | | GameWorld.DebugLog(" addFreePoint=%s,updFreePoint=%s" % (addFreePoint, updFreePoint))
|
| | | |
| | | RefreshOfficialAttr(curPlayer)
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer)
|
| | | SyncRealmFBState(curPlayer)
|
| | |
| | | #更新排行榜
|
| | | PlayerBillboard.UpdateRealmBillboard(curPlayer)
|
| | | # 记录开服活动
|
| | | OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_RealmLV, nextRealmLv)
|
| | | #OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_RealmLV, nextRealmLv)
|
| | | EventShell.EventRespons_RealmUp(curPlayer, nextRealmLv)
|
| | | #流向
|
| | | DataRecordPack.DR_RealmLVUp(curPlayer, nextRealmLv)
|