| | |
| | | def __doPlayerOnDay(curPlayer):
|
| | | PlayerFamilyZhenbaoge.PlayerOnDay(curPlayer)
|
| | | PlayerFamilyTaofa.PlayerOnDay(curPlayer)
|
| | | Do_MapServer_PlayerOnDay(curPlayer)
|
| | | ResetDailyDonateCnt(curPlayer)
|
| | | return
|
| | |
|
| | | def OnPlayerLogin(curPlayer, tick):
|
| | | Do_MapServer_PlayerLogin(curPlayer)
|
| | | if DBFamily.IsFamilyCross():
|
| | | GameWorld.DebugLog("公会已跨服不处理,由所属跨服服务器处理成员登录逻辑 OnPlayerLogin", curPlayer.GetPlayerID())
|
| | | return
|
| | |
| | |
|
| | | def OnCrossPlayerLogin(crossPlayer):
|
| | | ## 玩家上线,游戏服跨服通用,流程上当做以前GameServer处理公会一样,处理后再通知地图(现在的游戏服)
|
| | | PlayerLoginRefreshFamily(crossPlayer)
|
| | | PlayerLoginRefreshFamily(crossPlayer) # 必须先刷新
|
| | | Sync_RequestAddFamilyInfo(crossPlayer, False)
|
| | | PlayerTalk.NotifyTalkCache(crossPlayer, [IPY_GameWorld.tcFamily]) # 公会聊天缓存
|
| | | #PlayerFamilyTaofa.OnPlayerLogin(curPlayer) 讨伐待修改
|
| | | PlayerFamilyTaofa.OnCrossPlayerLogin(crossPlayer)
|
| | | return
|
| | |
|
| | | def OnPlayerLogout(curPlayer):
|
| | |
| | | C2S_FamilyMapPlayer(dataMsg, playerID)
|
| | | return
|
| | |
|
| | | def MapServer_FamilyRefresh(crossPlayer, familyID, isVoluntarily=0):
|
| | | def MapServer_FamilyRefresh(crossPlayer, familyID, isVoluntarily=0, isLogin=False):
|
| | | ''' 相当于GameServer调用 curPlayer.MapServer_FamilyRefresh()
|
| | | '''
|
| | | playerID = crossPlayer.GetPlayerID()
|
| | | FmLV = 0 # ְλ
|
| | | FamilyLV = 0 # 公会等级
|
| | | JoinTime = 0
|
| | | FamilyName = ""
|
| | | EmblemID, EmblemWord = 0, ""
|
| | | if familyID:
|
| | |
| | | member = curFamily.FindMember(playerID)
|
| | | if member:
|
| | | FmLV = member.GetFmLV()
|
| | | JoinTime = member.GetJoinTime()
|
| | | else:
|
| | | familyID = 0
|
| | |
|
| | |
| | |
|
| | | doData = {"FamilyID":familyID}
|
| | | if familyID:
|
| | | doData.update({"FmLV":FmLV, "FamilyLV":FamilyLV, "FamilyName":FamilyName, "EmblemID":EmblemID, "EmblemWord":EmblemWord})
|
| | | doData.update({"FmLV":FmLV, "JoinTime":JoinTime, "FamilyLV":FamilyLV, "FamilyName":FamilyName, "EmblemID":EmblemID, "EmblemWord":EmblemWord})
|
| | | if isVoluntarily:
|
| | | doData["isVoluntarily"] = 1
|
| | | if isLogin:
|
| | | doData["isLogin"] = 1
|
| | | SendToFamilyMapPlayer(crossPlayer, "FamilyRefresh", doData)
|
| | | return
|
| | |
|
| | |
| | | refreshFamilyID = familyMgr.GetPlayerFamilyID(playerID)
|
| | | GameWorld.DebugLog("PlayerLoginRefreshFamily playerID=%s,refreshFamilyID=%s" % (playerID, refreshFamilyID))
|
| | | crossPlayer.SetFamilyID(refreshFamilyID)
|
| | | MapServer_FamilyRefresh(crossPlayer, refreshFamilyID) # 登录
|
| | | MapServer_FamilyRefresh(crossPlayer, refreshFamilyID, isLogin=True) # 登录
|
| | | familyID = refreshFamilyID
|
| | | if not familyID:
|
| | | return
|
| | |
| | | Do_MapServer_FamilyRefresh(curPlayer, doData)
|
| | | return
|
| | |
|
| | | def Do_MapServer_PlayerOnDay(curPlayer):
|
| | | ResetDailyDonateCnt(curPlayer)
|
| | | return
|
| | |
|
| | | def Do_MapServer_PlayerLogin(curPlayer):
|
| | | DBFamily.Sync_FamilyCrossInfo(curPlayer)
|
| | | SyncDonateCntInfo(curPlayer)
|
| | | PlayerFamilyZhenbaoge.OnPlayerLogin(curPlayer)
|
| | | return
|
| | |
|
| | | def Do_MapServer_FamilyRefresh(curPlayer, doData):
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | refreshFamilyID = doData["FamilyID"]
|
| | | refreshFmLV = doData.get("FmLV", 0)
|
| | | refreshJoinTime = doData.get("JoinTime", 0)
|
| | | refreshFamilyLV = doData.get("FamilyLV", 0)
|
| | | refreshFamilyName = doData.get("FamilyName", "")
|
| | | refreshEmblemID = doData.get("EmblemID", 0)
|
| | | refreshEmblemWord = doData.get("EmblemWord", "")
|
| | | isLogin = doData.get("isLogin", 0) # 是否登录刷新的
|
| | |
|
| | | PlayerViewCache.UpdPlayerViewFamilyInfo(playerID, refreshFamilyID, refreshFamilyName, refreshEmblemID, refreshEmblemWord)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FamilyJoinTime, refreshJoinTime)
|
| | |
|
| | | lastFamilyID = curPlayer.GetFamilyID()
|
| | | lastFamilyLV = curPlayer.GetFamilyLV() # 公会等级,非职位等级
|
| | |
| | |
|
| | | #---通知客户端刷新属性---
|
| | | curPlayer.View_FamilyInfoRefresh() #//04 30 玩家家族名字职位等信息刷新#tagPlayerInFamilyInfoRefresh
|
| | | |
| | | if isLogin:
|
| | | Do_MapServer_PlayerLogin(curPlayer)
|
| | | return
|
| | |
|
| | | def Do_MapServer_PlayerLogin(curPlayer):
|
| | | ## 地图公会玩家的登录逻辑由最新所属公会刷新后处理
|
| | | DBFamily.Sync_FamilyCrossInfo(curPlayer)
|
| | | SyncDonateCntInfo(curPlayer)
|
| | | PlayerFamilyZhenbaoge.OnPlayerLogin(curPlayer)
|
| | | PlayerFamilyTaofa.OnPlayerLogin(curPlayer)
|
| | | return
|
| | |
|
| | | def __OnEnterFamily(curPlayer, tick):
|