| | |
| | | import PlayerGoldInvest
|
| | | import PlayerActivity
|
| | | import FBCommon
|
| | | import PlayerBindJadeWheel
|
| | | import BossHurtMng
|
| | | import PlayerWishingWell
|
| | | import PlayerAttrFruit
|
| | |
| | | import PlayerVip
|
| | | import PlayerRefineStove
|
| | | import PassiveBuffEffMng
|
| | | import PlayerDiceEx
|
| | | import GameLogic_XMZZ
|
| | | import PlayerFlashSale
|
| | | import PlayerFlashGiftbag
|
| | |
| | | import IPY_ServerDefine
|
| | | import CommFunc
|
| | | from PyMongoDB import RecvPackToMapDB
|
| | | import PyMongoMain
|
| | | import PlayerTalk
|
| | | import PlayerHero
|
| | | import PlayerOnline
|
| | | import TurnAttack
|
| | |
|
| | | import datetime
|
| | | import time
|
| | |
| | | if PlayerControl.GetCrossMapID(curPlayer):
|
| | | PlayerControl.SetCrossMapID(curPlayer, 0)
|
| | |
|
| | | PlayerOnline.OnPlayerLogin(curPlayer)
|
| | | TurnAttack.OnPlayerLogin(curPlayer)
|
| | | SyncGuideState(curPlayer)
|
| | |
|
| | | #上线检查一次装备属性
|
| | |
| | |
|
| | | #通知玩家技能信息
|
| | | __Sync_ClientSkill(curPlayer)
|
| | | #清除国家答题Buff
|
| | | #PlayerExam.DoLogic_ExitExam(curPlayer, tick, needRefresh = False)
|
| | | #清除VIPbuff
|
| | | #BuffSkill.DelBuffBySkillID(curPlayer, ChConfig.Def_VIPExp_SkillTypeID, tick)
|
| | |
|
| | |
| | | FunctionNPCCommon.ShopItemOnLogin(curPlayer)
|
| | | # 通知设置的被动功法
|
| | | #PassiveBuffEffMng.OnLoginGFPassive(curPlayer)
|
| | | #我要太极
|
| | | PlayerDiceEx.DiceExOnLogin(curPlayer)
|
| | | #仙魔之争
|
| | | GameLogic_XMZZ.OnXMZZLogin(curPlayer)
|
| | | PlayerOnlinePrize.OnPlayerLogin(curPlayer)
|
| | |
| | | PlayerDogz.OnPlayerLogin(curPlayer)
|
| | | # 骑宠
|
| | | FamilyRobBoss.OnPlayerLogin(curPlayer)
|
| | | # 绑玉转盘
|
| | | PlayerBindJadeWheel.OnLogin(curPlayer)
|
| | | # 许愿池
|
| | | PlayerWishingWell.OnLogin(curPlayer)
|
| | | #幸运鉴宝
|
| | |
| | | pass
|
| | |
|
| | | else:
|
| | | PyMongoMain.GetUserCtrlDB().OnPlayerLogin(curPlayer)
|
| | | PlayerHero.OnPlayerLogin(curPlayer)
|
| | | PlayerMail.OnPlayerLogin(curPlayer)
|
| | | PlayerChatBox.OnPlayerLogin(curPlayer)
|
| | | PlayerFace.OnPlayerLogin(curPlayer)
|
| | |
| | | if GameWorld.GetMap().GetMapFBType() != IPY_GameWorld.fbtNull:
|
| | | #副本地图上线切换才加无敌buff
|
| | | SkillCommon.AddBuffBySkillType_NoRefurbish(curPlayer, ChConfig.Def_SkillID_LimitSuperBuff, tick)
|
| | | |
| | | #刷新玩家的视野
|
| | | if not GameWorld.IsCrossServer() and (PlayerControl.GetCrossMapID(curPlayer) or PlayerControl.GetCustomMapID(curPlayer)):
|
| | | GameWorld.DebugLog("===登录本服地图时,处于跨服或自定义场景状态,不刷新视野!", curPlayer.GetPlayerID())
|
| | | |
| | | #卡牌改为0视野 |
| | | if curPlayer.GetSightLevel() != curPlayer.GetID():
|
| | | PlayerControl.SetPlayerSightLevel(curPlayer, curPlayer.GetID())
|
| | | elif not GameWorld.IsCrossServer():
|
| | | realmDifficulty = PlayerControl.GetMapRealmDifficulty(curPlayer)
|
| | | if realmDifficulty:
|
| | | GameWorld.DebugLog("===登录本服地图时,处于境界难度地图,自动设置难度! realmDifficulty=%s" % realmDifficulty, curPlayer.GetPlayerID())
|
| | | PlayerControl.SetRealmDifficulty(curPlayer, realmDifficulty)
|
| | | |
| | | if curPlayer.GetSight() != 0:
|
| | | PlayerControl.SetSight(curPlayer, 0)
|
| | | #刷新玩家的视野
|
| | | #if not GameWorld.IsCrossServer() and (PlayerControl.GetCrossMapID(curPlayer) or PlayerControl.GetCustomMapID(curPlayer)):
|
| | | # GameWorld.DebugLog("===登录本服地图时,处于跨服或自定义场景状态,不刷新视野!", curPlayer.GetPlayerID())
|
| | | # PlayerControl.SetPlayerSightLevel(curPlayer, curPlayer.GetID())
|
| | | #elif not GameWorld.IsCrossServer():
|
| | | # realmDifficulty = PlayerControl.GetMapRealmDifficulty(curPlayer)
|
| | | # if realmDifficulty:
|
| | | # GameWorld.DebugLog("===登录本服地图时,处于境界难度地图,自动设置难度! realmDifficulty=%s" % realmDifficulty, curPlayer.GetPlayerID())
|
| | | # PlayerControl.SetRealmDifficulty(curPlayer, realmDifficulty)
|
| | | |
| | | PlayerState.ChangePlayerSigh(curPlayer, tick)
|
| | |
|
| | | if GameWorld.IsCrossServer():
|
| | |
| | | #初始化寻宝背包
|
| | | PlayerControl.Init_TreasurePack(curPlayer)
|
| | |
|
| | | #初始化英雄背包
|
| | | PlayerControl.Init_HeroPack(curPlayer)
|
| | | |
| | | #初始化神兽物品背包
|
| | | curPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptDogzItem)
|
| | | curPack.SetCount(ItemCommon.GetPackInitCount(ShareDefine.rptDogzItem))
|
| | |
| | | #将玩家放置在这个地图上
|
| | | curPlayer.InitPos(curPlayer.GetPosX(), curPlayer.GetPosY())
|
| | |
|
| | | #刷新自己的视野
|
| | | if not GameWorld.IsCrossServer() and (PlayerControl.GetCrossMapID(curPlayer) or curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene)):
|
| | | GameWorld.DebugLog("===本服LoadMapOK时玩家处于跨服或自定义场景状态,不设置可见!", curPlayer.GetPlayerID())
|
| | | #卡牌改为0视野
|
| | | if curPlayer.GetSightLevel() != curPlayer.GetID():
|
| | | PlayerControl.SetPlayerSightLevel(curPlayer, curPlayer.GetID())
|
| | | elif not GameWorld.IsCrossServer():
|
| | | realmDifficulty = PlayerControl.GetMapRealmDifficulty(curPlayer)
|
| | | if realmDifficulty:
|
| | | GameWorld.DebugLog("===本服LoadMapOK时玩家处于境界难度地图,自动设置难度!realmDifficulty=%s" % realmDifficulty, curPlayer.GetPlayerID())
|
| | | PlayerControl.SetRealmDifficulty(curPlayer, realmDifficulty)
|
| | | |
| | | if curPlayer.GetSight() != 0:
|
| | | PlayerControl.SetSight(curPlayer, 0)
|
| | | #刷新自己的视野
|
| | | #if not GameWorld.IsCrossServer() and (PlayerControl.GetCrossMapID(curPlayer) or curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene)):
|
| | | # GameWorld.DebugLog("===本服LoadMapOK时玩家处于跨服或自定义场景状态,不设置可见!", curPlayer.GetPlayerID())
|
| | | # PlayerControl.SetPlayerSightLevel(curPlayer, curPlayer.GetID())
|
| | | #elif not GameWorld.IsCrossServer():
|
| | | # realmDifficulty = PlayerControl.GetMapRealmDifficulty(curPlayer)
|
| | | # if realmDifficulty:
|
| | | # GameWorld.DebugLog("===本服LoadMapOK时玩家处于境界难度地图,自动设置难度!realmDifficulty=%s" % realmDifficulty, curPlayer.GetPlayerID())
|
| | | # PlayerControl.SetRealmDifficulty(curPlayer, realmDifficulty)
|
| | | |
| | | curPlayer.RefreshView()
|
| | | curPlayer.SetVisible(True)
|
| | |
|
| | |
| | | #下线了,将存储在字典中的真实XP值,设置给玩家,完成通知和存储
|
| | | #curPlayer.SetXP(curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_RecordXPValue))
|
| | | #######################################################################
|
| | | PlayerOnline.OnPlayerLogoff(curPlayer)
|
| | | #下线逻辑
|
| | | PlayerControl.PlayerLeaveServer(curPlayer, tick)
|
| | |
|
| | |
| | | # WORD RealmDifficulty; //境界难度 = 1000 + 所选境界等级,如境界13,则发1013
|
| | | #};
|
| | | def OnSelectRealmDifficulty(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | PlayerControl.SetRealmDifficulty(curPlayer, clientData.RealmDifficulty)
|
| | | #curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | #PlayerControl.SetRealmDifficulty(curPlayer, clientData.RealmDifficulty)
|
| | | return
|
| | |
|