| | |
| | | import PlayerEquipDecompose
|
| | | import PlayerCoat
|
| | | import PlayerGreatMaster
|
| | | import PlayerCostVIP
|
| | | import PlayerGatherSoul
|
| | | import PlayerMergeKing
|
| | | import PlayerMergePK
|
| | | import GameFuncComm
|
| | |
| | | import PlayerActTotalRecharge
|
| | | import PlayerSpringSale
|
| | | import PlayerFairyCeremony
|
| | | import CrossRealmPlayer
|
| | | import ChNetSendPack
|
| | | import FamilyRobBoss
|
| | | import FBHelpBattle
|
| | | import PyGameData
|
| | | import PlayerCoin
|
| | | import PlayerGeTui
|
| | |
| | | #同步GameServer自己的地图ID
|
| | | curPlayer.Sync_GameServer_MapID()
|
| | |
|
| | | # 屏蔽跨服下关闭和子服重复的数据的发送 pushsend接口, notifyall正常发送
|
| | | # !!!必要发送的数据要注意位置
|
| | | if GameWorld.IsCrossServer():
|
| | | curPlayer.SetForbiddenSyncClientState(True)
|
| | | |
| | | SyncGuideState(curPlayer)
|
| | |
|
| | | #初始化玩家背包
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FuncChangeLineID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_HighChangeLineID, 0)
|
| | | #GameWorld.DebugLog("离线超过10秒重置切线临时保存的相关记录值!leaveServerSecond=%s" % leaveServerSecond, curPlayer.GetPlayerID())
|
| | | |
| | | # 离线过久恢复为非跨服状态
|
| | | if PlayerControl.GetCrossRealmState(curPlayer):
|
| | | PlayerControl.SetCrossRealmState(curPlayer, 0)
|
| | | |
| | | # 合服首登处理
|
| | | __DoMixServerFirstLogin(curPlayer)
|
| | | PlayerBillboard.BillboardOnLogin(curPlayer)
|
| | |
| | | SyncLittleHelper(curPlayer)
|
| | | # 聊天气泡框
|
| | | SyncChatBubbleBoxState(curPlayer)
|
| | | |
| | | # 副本助战
|
| | | FBHelpBattle.DoPlayerLogin(curPlayer)
|
| | | # 聚魂
|
| | | PlayerGatherSoul.PlayerLogin(curPlayer)
|
| | | curPlayer.SetState(0) # 脱机挂恢复为正常上线
|
| | | curPlayer.SetFacePic(0) # 通知数据库是否保存还是下线,做一次恢复,1为保存 0为正常下线
|
| | | tjgTime = PlayerTJG.GetTJGTime(curPlayer)
|
| | |
| | | # 如果被禁言的,上线同步前端
|
| | | if curPlayer.GetGMForbidenTalk():
|
| | | curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_ForbidenTalk, curPlayer.GetGMForbidenTalk(), False)
|
| | | |
| | | # 屏蔽跨服下关闭和子服重复的数据的发送 pushsend接口, notifyall正常发送
|
| | | # !!!必要发送的数据要注意位置
|
| | | if GameWorld.IsCrossServer():
|
| | | curPlayer.SetForbiddenSyncClientState(False)
|
| | | PlayerControl.SetCrossRealmState(curPlayer, 1) # 因为主服上传数据之前该值为1,所以登录跨服后在跨服服务器要设置为1
|
| | | |
| | | return
|
| | |
|
| | |
|
| | |
| | |
|
| | | def UpdatePlayerServerGroupID(curPlayer):
|
| | | # 更新自己的服务器组ID, 跨服服务器不处理
|
| | | if GameWorld.IsMergeServer():
|
| | | if GameWorld.IsCrossServer():
|
| | | return
|
| | | serverGroupID = GameWorld.GetServerGroupID()
|
| | | if not serverGroupID:
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_RoomID, 0)
|
| | |
|
| | | #下线召回宠物
|
| | | #PetControl.ReCallFightPet(curPlayer)
|
| | | PetControl.ReCallFightPet(curPlayer)
|
| | |
|
| | | PlayerTJG.CalcPlayerTJG(curPlayer, tick)
|
| | |
|
| | |
| | | #复活冷却时间(秒)
|
| | | rebornTime = GetRebronTime(curPlayer, playerRebornType)
|
| | | #冷却时间到了
|
| | | if not CanRebornByTimeOver(curPlayer, rebornTime):
|
| | | if playerRebornType != ChConfig.rebornType_System and not CanRebornByTimeOver(curPlayer, rebornTime):
|
| | | PlayerControl.NotifyCode(curPlayer, 'RebornCD')
|
| | | return False
|
| | |
|
| | |
| | | SkillCommon.AddBuffBySkillType_NoRefurbish(curPlayer , ChConfig.Def_SkillID_ReviveTired, tick, buffSkillLV)
|
| | | GameWorld.DebugLog(' 复活疲劳BUff buffSkillLV=%s'%(buffSkillLV))
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_IsAddReviveTired,0)
|
| | | #复活后清除角色身上的打BOSS和PK状态
|
| | | validTime = IpyGameDataPY.GetFuncCfg("PKConfig", 4) * 1000
|
| | | if PlayerState.IsInPKState(curPlayer):
|
| | | PlayerState.SetPKStateTick(curPlayer, tick - validTime)
|
| | | if PlayerState.IsInBossState(curPlayer):
|
| | | PlayerState.SetBossStateTick(curPlayer, tick- validTime)
|
| | |
|
| | |
|
| | | #重算属性
|
| | | playerControl = PlayerControl.PlayerControl(curPlayer)
|
| | | playerControl.RefreshAllState()
|
| | |
|
| | | #设置血量
|
| | | curPlayer.SetHP(curPlayer.GetMaxHP() * resetHpPercent / ChConfig.Def_MaxRateValue)
|
| | | curPlayer.SetMP(curPlayer.GetMaxMP() * resetMpPercent / ChConfig.Def_MaxRateValue)
|
| | | #curPlayer.SetMP(curPlayer.GetMaxMP() * resetMpPercent / ChConfig.Def_MaxRateValue)
|
| | | #护盾
|
| | | PlayerControl.SetProDef(curPlayer, PlayerControl.GetMaxProDef(curPlayer))
|
| | |
|
| | | #玩家复活后副本处理
|
| | | FBLogic.OnPlayerRebornOver(curPlayer, playerRebornType)
|
| | |
| | | sendPack.Speed = curPlayer.GetSpeed()
|
| | | sendPack.MoveType = moveType
|
| | | # NotifyAll 做过滤或者数量处理
|
| | | PlayerControl.PyNotifyAll(curPlayer, sendPack, False, -1)
|
| | | PlayerControl.PyNotifyAll(curPlayer, sendPack, False, 0)
|
| | | return
|
| | |
|
| | | def GetDownloadAward(curPlayer, dataEx):
|