| | |
| | | #初始化玩家背包
|
| | | InitPlayerPack(curPlayer)
|
| | |
|
| | | #上线检查一次装备属性
|
| | | ItemControler.PlayerItemControler(curPlayer).CheckRolePackEquipAttr()
|
| | | #上线检查加点属性点
|
| | | PlayerControl.FixOldAddPoint(curPlayer)
|
| | | #通知玩家物品信息
|
| | | __Sync_PackDetel(curPlayer)
|
| | |
|
| | | #更新主服ID信息
|
| | | #UpdatePlayerServerGroupID(curPlayer)
|
| | | #更新服务器组ID
|
| | | PlayerControl.UpdPlayerServerGroupID(curPlayer)
|
| | |
|
| | | #上线学习技能
|
| | | SkillCommon.PlayerLoginCheckLearnSkill(curPlayer)
|
| | |
| | | #===============================================================================
|
| | | return
|
| | |
|
| | | def UpdatePlayerServerGroupID(curPlayer):
|
| | | # 更新自己的服务器组ID, 跨服服务器不处理
|
| | | if GameWorld.IsCrossServer():
|
| | | return
|
| | | serverGroupID = GameWorld.GetServerGroupID()
|
| | | if not serverGroupID:
|
| | | return
|
| | | playerServerGroupID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ServerGroupID)
|
| | | if playerServerGroupID != serverGroupID:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ServerGroupID, serverGroupID)
|
| | | GameWorld.DebugLog("更新玩家所属服务器组ID: serverGroupID=%s" % serverGroupID)
|
| | | |
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | ##玩家在地图服务器中登录ok,初始化自己
|
| | | #@param curPlayer 玩家实例
|
| | |
| | | #如果玩家上线后死亡,回程复活
|
| | | isLogin = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_LoadMapIsLogin)
|
| | | rebornType = ChConfig.rebornType_City if isLogin else ChConfig.rebornType_System
|
| | | if GameWorld.IsCrossServer():
|
| | | rebornType = ChConfig.rebornType_System
|
| | | PlayerRebornByType(curPlayer, rebornType, tick)
|
| | |
|
| | | elif curMap.CanMove(posX, posY) != True:
|
| | |
| | |
|
| | | #设置阵营
|
| | | if curPlayer.GetFaction() != ChConfig.CampType_Neutral \
|
| | | and GameWorld.GetMap().GetMapID() not in ChConfig.Def_MapID_NeedCamp \
|
| | | and GameWorld.GetMap().GetMapID() not in ReadChConfig.GetEvalChConfig("MapID_NeedCamp"):
|
| | | and FBCommon.GetRecordMapID(GameWorld.GetMap().GetMapID()) not in ChConfig.Def_MapID_NeedCamp:
|
| | | #重置阵营
|
| | | curPlayer.SetFaction(ChConfig.CampType_Neutral)
|
| | | BuffSkill.DelBuffBySkillID(curPlayer, ChConfig.Def_SkillID_Justice, tick)
|
| | |
| | | #@param mapBornPlace 复活位置,默认0为原地
|
| | | #@return 返回值无意义
|
| | | #@remarks 自定义函数, 玩家复活
|
| | | def PlayerRebornByType(curPlayer, playerRebornType, tick, mapBornPlace=0):
|
| | | def PlayerRebornByType(curPlayer, playerRebornType, tick, mapBornPlace=0, isAddSuperBuff=True):
|
| | | curPlayerID = curPlayer.GetID()
|
| | | curVipLv = curPlayer.GetVIPLv()
|
| | |
|
| | |
| | | FBLogic.OnResetFBRebornPlacePos(curPlayer, mapBornPlace, tick)
|
| | |
|
| | | #复活加无敌Buff
|
| | | SkillCommon.AddBuffBySkillType_NoRefurbish(curPlayer , ChConfig.Def_SkillID_LimitSuperBuff, tick)
|
| | | if isAddSuperBuff:
|
| | | SkillCommon.AddBuffBySkillType_NoRefurbish(curPlayer , ChConfig.Def_SkillID_LimitSuperBuff, tick)
|
| | | #复活疲劳BUff
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_IsAddReviveTired):
|
| | | findBuff = SkillCommon.FindBuffByID(curPlayer, ChConfig.Def_SkillID_ReviveTired)[0]
|