| | |
| | | import AuctionHouse
|
| | | import PlayerAssist
|
| | | import PlayerFB
|
| | | import PlayerLove
|
| | | import PlayerCharm
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | except:
|
| | | curPlayer.Kick(IPY_PlayerDefine.disWaitForPlayerLoinError)
|
| | | import traceback
|
| | | GameWorld.ErrLog("玩家上线逻辑错误~~~~~\r\n%s" % traceback.format_exc())
|
| | | if GameWorld.GetGameWorld().GetDebugLevel():
|
| | | raise Exception("玩家上线逻辑错误~~~~\r\n%s" % traceback.format_exc())
|
| | | GameWorld.RaiseException("玩家上线逻辑错误\r\n%s" % traceback.format_exc())
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | PlayerStore.OnPlayerLogin(curPlayer)
|
| | | #通知世界boss信息
|
| | | GameWorldBoss.OnPlayerLogin(curPlayer)
|
| | | #家族副本boss状态通知
|
| | | PlayerFamilyBoss.OnLogin(curPlayer)
|
| | | #渡劫
|
| | | PlayerDuJie.OnPlayerLogin(curPlayer)
|
| | | #守卫人皇
|
| | |
| | | else:
|
| | | #协助
|
| | | PlayerAssist.OnPlayerLogin(curPlayer, True)
|
| | | |
| | | return
|
| | |
|
| | | def DoPlayerRealLoginOK(curPlayer, tick):
|
| | | ''' 玩家最终登录成功处理, 由 MapServer DoPlayerRealLoginOK 通知
|
| | | 该函数为地图最终登录成功才会执行到,以后一些功能类的登录处理建议均写到这里
|
| | | 旧的功能先不动( __DoPlayerLoginServer 函数中的功能),如果有登录相关的bug再考虑是否移动到此函数
|
| | | '''
|
| | | |
| | | GameWorld.Log("GameServer->DoPlayerRealLoginOK", curPlayer.GetPlayerID())
|
| | | |
| | | if not PlayerControl.GetIsTJG(curPlayer):
|
| | | #家族副本boss状态通知
|
| | | PlayerFamilyBoss.OnLogin(curPlayer)
|
| | | #魅力
|
| | | PlayerCharm.OnPlayerLogin(curPlayer)
|
| | | #情缘
|
| | | PlayerLove.OnPlayerLogin(curPlayer)
|
| | |
|
| | | return
|
| | |
|
| | |
| | | __Func_PlayerDisconnect(curPlayer, tick)
|
| | | except:
|
| | | import traceback
|
| | | GameWorld.ErrLog("玩家下线逻辑错误~~~~~\r\n%s" % traceback.format_exc())
|
| | | if GameWorld.GetGameWorld().GetDebugLevel():
|
| | | raise Exception("玩家下线逻辑错误~~~~\r\n%s" % traceback.format_exc())
|
| | | GameWorld.RaiseException("玩家下线逻辑错误\r\n%s" % traceback.format_exc())
|
| | | #调用底层下线
|
| | | curPlayer.DoDisconnect()
|
| | | return
|
| | |
| | | AuctionHouse.OnPlayerLeaveServer(curPlayer)
|
| | | #协助
|
| | | PlayerAssist.OnLeaveServer(curPlayer)
|
| | | #红包
|
| | | PlayerFamilyRedPacket.OnLeaveServer(curPlayer)
|
| | | #------------镖车逻辑
|
| | | #TruckPlayerDisconnectProcess(curPlayer, tick)
|
| | |
|
| | |
| | |
|
| | | playerStatePack = IPY_GameServer.IPY_GRefreshPlayerProperty()
|
| | | packValue = playerStatePack.GetValue()
|
| | | packValueEx = playerStatePack.GetValueEx()
|
| | | packType = playerStatePack.GetType()
|
| | |
|
| | | #---特殊逻辑处理---
|
| | |
| | | return
|
| | |
|
| | | if packType == IPY_GameServer.CDBPlayerRefresh_FightPower:
|
| | | curPlayer.SetFightPower(packValue)
|
| | | curPlayer.SetFightPower(packValue, packValueEx)
|
| | | return
|
| | |
|
| | | if packType == IPY_GameServer.CDBPlayerRefresh_ExAttr2:
|
| | |
| | |
|
| | | elif packType == IPY_GameServer.CDBPlayerRefresh_LV:
|
| | | curPlayer.SetLV(packValue)
|
| | | PlayerSocial.UpdateSocialInfo(curPlayer, packType, packValue)
|
| | | PlayerSocial.UpdateSocialInfo(curPlayer.GetID(), packType, packValue)
|
| | | #玩家等级记录
|
| | | playerID = curPlayer.GetID()
|
| | | if playerID in PyGameData.g_todayPlayerLVDict:
|
| | |
| | |
|
| | | elif packType == IPY_GameServer.CDBPlayerRefresh_OfficialRank:
|
| | | curPlayer.SetOfficialRank(packValue)
|
| | | PlayerSocial.UpdateSocialInfo(curPlayer, packType, packValue)
|
| | | PlayerSocial.UpdateSocialInfo(curPlayer.GetID(), packType, packValue)
|
| | | #更新排行榜的境界
|
| | | PlayerBillboard.UpdateBillboardRealm(curPlayer)
|
| | |
|