| | |
| | | import PassiveBuffEffMng
|
| | | import PlayerDiceEx
|
| | | import QuestCommon
|
| | | import PlayerTJG
|
| | | import GameLogic_XMZZ
|
| | | import PlayerFlashSale
|
| | | import PlayerFlashGiftbag
|
| | |
| | | import PlayerArena
|
| | | import PyGameData
|
| | | import PlayerCoin
|
| | | import PlayerGeTui
|
| | | import PlayerCharm
|
| | | import PlayerDogz
|
| | | import PlayerCoat
|
| | |
| | | import PlayerShentong
|
| | | import PlayerCustomAward
|
| | | import PlayerZhanling
|
| | | import PlayerTree
|
| | | import PlayerLianTi
|
| | | import PlayerTask
|
| | | import PlayerYinji
|
| | | import PlayerLove
|
| | | import GameObj
|
| | |
| | | import IPY_ServerDefine
|
| | | import CommFunc
|
| | | from PyMongoDB import RecvPackToMapDB
|
| | | import PlayerTalk
|
| | |
|
| | | import datetime
|
| | | import time
|
| | |
| | | #初始化玩家的时钟个数
|
| | | if curPlayer.GetTickTypeCount() == 0:
|
| | | curPlayer.SetTickTypeCount(ChConfig.TYPE_Player_Tick_Count)
|
| | | |
| | | #初始化玩家聊天频道
|
| | | if curPlayer.GetMaxChannelCount() == 0:
|
| | | curPlayer.SetMaxChannelCount(ChConfig.Def_PlayerTalkChannelMaxCount)
|
| | |
|
| | | #===============================================================================
|
| | | # #初始化玩家鉴定管理器物品最大个数
|
| | |
| | |
|
| | | #---------------------------------------------------------------------
|
| | | '''
|
| | | 旧登录流程 -- 留着对比
|
| | | 登录流程
|
| | | UserCrtlDB
|
| | | onAuthentication 玩家登录 :验证账号-若没有角色则创角-返回角色信息-通知Map C++
|
| | | Map C++调用 PlayerLogin
|
| | | MapServer
|
| | | ChPlayer:def PlayerLogin(index, tick)
|
| | | DoPlayerLogin
|
| | | curPlayer.Sync_ClientPlayerLogin()
|
| | | curPlayer.Sync_GameServer_MapID() #同步GameServer自己的地图ID
|
| | | curPlayer.BalanceServer_PlayerLoginInitOK()
|
| | | |
| | | GameServer
|
| | | ChPlayer:def PlayerLoadMapState(index, tick) pack.GetLoadState()=0 此时的 LoadState 为0
|
| | | curPlayer.SetIsLoadMap(True) 设置在加载地图
|
| | | |
| | | ChPlayer:def PlayerLogin(index, tick)
|
| | | curPlayer.MapServer_InitOK() 通知地图自己OK了
|
| | | |
| | | MapServer
|
| | | PlayerEventCounter:def GameServer_InitOK(index, tick)
|
| | | curPlayer.SendToBServerServerInitOK() #通知BServer自己OK了
|
| | | ChPlayer:def OnAllServerInitOK(curPlayer, tick)
|
| | | DoPlayerLogin
|
| | | curPlayer.Sync_ClientPlayerLogin() #01 02 玩家初始化#tagCDBPlayer
|
| | | curPlayer.BalanceServer_PlayerLoginInitOK() #向route设置玩家在map中的索引
|
| | | |
| | | curPlayer.SendToBServerServerInitOK() #通知route登录成功 ,route向客户端发送//01 09 服务器准备就绪#tagServerPrepareOK
|
| | | ChPlayer:def OnAllServerInitOK(curPlayer, tick)
|
| | |
|
| | | ChPlayer:def LoadMapOK(curPlayer, tick)
|
| | | curPlayer.GameServer_SetLoadMapState(1) #通知GameServer切换地图停止
|
| | | curPlayer.SetMapLoadOK(True)
|
| | | curPlayer.SetInitOK(True)
|
| | | curPlayer.EndLoadMap()
|
| | |
|
| | | GameServer
|
| | | ChPlayer:def PlayerLoadMapState(index, tick) pack.GetLoadState()=1 此时的 LoadState 为1
|
| | | PlayerLoginLoadMapOK
|
| | | ChPlayer:def __Func_LoadMapOK(curPlayer, tick) #!!!直接调用不等待客户端封包 //01 07 地图读取OK#tagCInitMapOK
|
| | | curPlayer.SetMapLoadOK(True)
|
| | | curPlayer.SetInitOK(True)
|
| | | curPlayer.MapServer_GameServerRefreshOK() #通知地图服务器玩家初始化成功
|
| | | curPlayer.SetIsLoadMap(False)
|
| | | |
| | | MapServer
|
| | | GameServerRefresh:GameSever_PlayerInitOK curPlayer.GetGameServerInitOK()=0
|
| | | curPlayer.SetGameServerInitOK(True)
|
| | | |
| | | 后续补充流程
|
| | | MapServer
|
| | | ChPlayer:def DoPlayerRealLoginOK(curPlayer, tick)
|
| | | 玩家真正登录成功处理,用于替换 __DoPlayerLoginServer 中的功能登录逻辑
|
| | | 通知GameServer地图最终登录成功了
|
| | | |
| | | GameServer
|
| | | ChPlayer:def DoPlayerRealLoginOK(curPlayer, tick)
|
| | | 玩家真正登录成功处理,用于替换 __DoPlayerLoginServer 中的功能登录逻辑
|
| | | curPlayer.EndLoadMap() #通知客户端 04 03 玩家登录数据发送完毕OK#tagPlayerLoginLoadOK
|
| | |
|
| | | GameServerRefresh:GameSever_PlayerInitOK
|
| | | curPlayer.SetGameServerInitOK(True)
|
| | |
|
| | | ChPlayer:def DoPlayerRealLoginOK(curPlayer, tick) 玩家真正登录成功处理,用于替换 __DoPlayerLoginServer 中的功能登录逻辑
|
| | |
|
| | | '''
|
| | |
|
| | | ##玩家登陆游戏逻辑处理
|
| | |
| | |
|
| | | #大师
|
| | | PlayerGreatMaster.MasterOnLogin(curPlayer)
|
| | | |
| | | # 推送提醒
|
| | | PlayerGeTui.LoginNotifySetting(curPlayer)
|
| | |
|
| | | #֪ͨVIP
|
| | | PlayerVip.DoOnLogin(curPlayer, tick)
|
| | |
| | | PlayerEquipDecompose.PlayerLogin(curPlayer)
|
| | | #防沉迷
|
| | | PlayerGameWallow.DoLogic_CheckWallow(curPlayer, tick)
|
| | | # 通知脱机挂信息
|
| | | #PlayerTJG.NotifyTJGInfo(curPlayer)
|
| | | # 协助
|
| | | PlayerAssist.OnPlayerLogin(curPlayer)
|
| | | # 极品白拿
|
| | |
| | |
|
| | | curPlayer.SetState(0) # 脱机挂恢复为正常上线
|
| | | curPlayer.SetCountryLastWeekHornor(0) # 通知数据库是否保存还是下线,做一次恢复,1为保存 0为正常下线
|
| | | #tjgTime = PlayerTJG.GetTJGTime(curPlayer)
|
| | | #if tjgTime:
|
| | | # PlayerControl.SendGameServerRefreshState(curPlayer, IPY_GameWorld.CDBPlayerRefresh_HappyPoint, tjgTime)
|
| | | |
| | | |
| | | PlayerControl.DoGMForbidenTalkOnLogin(curPlayer)
|
| | | DataRecordPack.DR_PlayerLogin(curPlayer) # 放最后,记录等级、经验等信息
|
| | | return
|
| | |
| | | PlayerGubao.OnPlayerLogin(curPlayer)
|
| | | PlayerShentong.OnPlayerLogin(curPlayer)
|
| | | PlayerZhanling.OnPlayerLogin(curPlayer)
|
| | | PlayerTask.OnPlayerLogin(curPlayer)
|
| | | PlayerTree.OnPlayerLogin(curPlayer)
|
| | | PlayerMineArea.OnPlayerLogin(curPlayer)
|
| | | PlayerGuaji.OnPlayerLogin(curPlayer)
|
| | | PlayerActFamilyGCZ.OnPlayerLogin(curPlayer)
|
| | | PlayerTalk.OnPlayerLogin(curPlayer)
|
| | |
|
| | | # 上线查询一次充值订单
|
| | | curPlayer.SendDBQueryRecharge()
|
| | |
| | | #---等级限制---
|
| | | if GameWorld.IsCrossServer():
|
| | | return
|
| | | #PlayerTJG.TJGDeadOffline(curPlayer)
|
| | |
|
| | | #===============================================================================
|
| | | # #---等级限制---
|
| | |
| | | curPlayer.SendToBServerServerInitOK() #通知route登录成功 ,route向客户端发送0109包
|
| | | OnAllServerInitOK(curPlayer, tick)
|
| | | #到此处已经可以保存数据,即使客户端不回包断线
|
| | | #后续登录流程等客户端回复 //01 07 地图读取OK#tagCInitMapOK 调用 LoadMapOK
|
| | | #原 //01 07 地图读取OK#tagCInitMapOK 逻辑 直接调用
|
| | | __Func_LoadMapOK(index, tick)
|
| | | GameServerRefresh.GameSever_PlayerInitOK(index, tick)
|
| | | except:
|
| | | curPlayer.Kick(IPY_GameWorld.disWaitForPlayerLoinError)
|
| | | import traceback
|
| | |
| | | PetControl.Sync_PetInfo_ChangeMap(curPlayer, tick)
|
| | |
|
| | | #通知GameServer自己现在的地图
|
| | | curPlayer.Sync_GameServer_MapID()
|
| | | #curPlayer.Sync_GameServer_MapID()
|
| | |
|
| | | #如果本地图是副本的话, 则通知GameServer玩家进入副本
|
| | | if GameWorld.GetMap().GetMapFBType() == IPY_GameWorld.fbtTeam:
|
| | |
| | | #@return 返回值无意义
|
| | | #@remarks C++封包触发, 切换地图成功( 目标地图 )
|
| | | def LoadMapOK(index, tick):
|
| | | GameWorld.GetPsycoFunc(__Func_LoadMapOK)(index, tick)
|
| | | GameServerRefresh.GameSever_PlayerInitOK(index, tick)
|
| | | #不需要等待客户端,以前有视野客户端未加载成功会被偷袭的问题,可以通过加x秒无敌BUFF解决,不应该增加流程
|
| | | # GameWorld.GetPsycoFunc(__Func_LoadMapOK)(index, tick)
|
| | | # GameServerRefresh.GameSever_PlayerInitOK(index, tick)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | |
|
| | | #下线召回宠物
|
| | | PetControl.ReCallFightPet(curPlayer)
|
| | | |
| | | #PlayerTJG.CalcPlayerTJG(curPlayer, tick)
|
| | |
|
| | | #离线session
|
| | | EventReport.WriteEvent_session(curPlayer)
|
| | |
| | | #打包直购礼包奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_DailyPackBuyGift:
|
| | | PlayerGoldGift.GetDailyPackBuyGift(curPlayer, dataEx)
|
| | | #任务奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_Task:
|
| | | PlayerTask.GetTaskAward(curPlayer, dataEx)
|
| | | #战令奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_Zhanling:
|
| | | PlayerZhanling.GetZhanlingReward(curPlayer, dataEx, dataExStr)
|