| | |
| | | import PlayerFamilySWRH
|
| | | import PlayerViewCache
|
| | | import GameWorldBoss
|
| | | import AuctionHouse
|
| | | import PlayerTalk
|
| | | import PlayerTeam
|
| | |
|
| | |
| | | def GetCurWeekMissionMoney(curFamily): return curFamily.GetExtra2()
|
| | | def SetCurWeekMissionMoney(curFamily, value): return curFamily.SetExtra2(min(value, ChConfig.Def_UpperLimit_DWord))
|
| | |
|
| | | # 仙盟上次处理的合服天
|
| | | def GetFamilyMixServerDay(curFamily): return curFamily.GetExtra1()
|
| | | def SetFamilyMixServerDay(curFamily, value): return curFamily.SetExtra1(value)
|
| | | ## ------------------ 成员 ----------------------
|
| | | def GetMemberFightPower(curMember): return curMember.GetExattr3()
|
| | | def SetMemberFightPower(curMember, fightPower): return curMember.SetExattr3(fightPower)
|
| | |
| | | curFamily.SetAcceptJoin(ShareDefine.FamilyAcceptJoin_Agree) #设置收人方式为直接通过申请
|
| | | PyDataManager.GetFamilyStoreItemManager().DelFamilyStoreItemAll(curFamily.GetID())
|
| | |
|
| | | #新创建的仙盟默认设置已处理过合服
|
| | | SetFamilyMixServerDay(curFamily, PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_LastMixServerDay))
|
| | | |
| | | #-设置家族成员属性
|
| | | DoPlayerJionFamily(curFamily, curPlayer, IPY_GameServer.fmlLeader)
|
| | |
|
| | |
| | | PlayerFamilyBoss.NotifyFamilyBossFBInfo(jionPlayer)
|
| | | #通知家族仓库
|
| | | PyDataManager.GetFamilyStoreItemManager().SyncFamilyStoreItem(jionPlayer, curFamily.GetID())
|
| | | |
| | | #仙盟拍品
|
| | | AuctionHouse.Sync_FamilyAuctionItemInfo(jionPlayer, curFamily.GetID())
|
| | | SetMemberFightPower(familyMember, jionPlayer.GetFightPower())
|
| | | AddFamilyIDToFightPowerChangeList(curFamily.GetID())
|
| | |
|
| | |
| | | GameWorld.DebugLog(' 玩家战盟名变更处理, newFamilyName=%s' % familyName, playerID)
|
| | | #不处理排行榜
|
| | | needChangeFamilyBillboardList = [
|
| | | #ShareDefine.Def_BT_RechargeTeHui, # 充值特惠活动排行榜-当前期记录
|
| | | ]
|
| | | billboardMgr = GameWorld.GetBillboard()
|
| | | for billboardIndex in needChangeFamilyBillboardList:
|
| | |
| | | if GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyRobBoss):
|
| | | PlayerControl.NotifyCode(curPlayer, "FairyGrabBossExitError")
|
| | | return
|
| | | |
| | | if PlayerFamilyBoss.IsInAllFamilyBoss():
|
| | | PlayerControl.NotifyCode(curPlayer, "LeagueBOSSExitError1")
|
| | | return
|
| | | if AuctionHouse.IsFamilyMemberBiddingAuctionItem(curFamily.GetID(), tagMemberID):
|
| | | PlayerControl.NotifyCode(curPlayer, "Paimai7")
|
| | | return
|
| | | tagPlayerName = curTagMember.GetName() # 被踢玩家名
|
| | | tagPlayerID = curTagMember.GetPlayerID() # 被踢玩家ID
|
| | | tagFamilyLV = curTagMember.GetFamilyLV() # 被踢玩家职位
|
| | |
| | |
|
| | | if GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyRobBoss):
|
| | | PlayerControl.NotifyCode(curPlayer, "FairyGrabBossExitError")
|
| | | return
|
| | | if PlayerFamilyBoss.IsInAllFamilyBoss():
|
| | | PlayerControl.NotifyCode(curPlayer, "LeagueBOSSExitError1")
|
| | | return
|
| | | if AuctionHouse.IsFamilyMemberBiddingAuctionItem(curFamily.GetID(), curMember.GetPlayerID()):
|
| | | PlayerControl.NotifyCode(curPlayer, "Paimai8")
|
| | | return
|
| | | #判断退出时间间隔
|
| | | curTime = int(time.time())
|
| | |
| | | PlayerRefresh(curPlayer, tick)
|
| | |
|
| | | GameWorldFamilyWar.OnPlayerLogin(curFamily, curPlayer)
|
| | | |
| | | # 盟主上线处理
|
| | | if curMember.GetFamilyLV() == IPY_GameServer.fmlLeader:
|
| | | OnFamilyLeaderLogin(curPlayer, curFamily)
|
| | | return
|
| | |
|
| | | def OnFamilyLeaderLogin(curPlayer, curFamily):
|
| | | ## 盟主登录处理
|
| | | __DoFamilyMixServerLogicOnLeaderLogin(curPlayer, curFamily)
|
| | | return
|
| | |
|
| | | def __DoFamilyMixServerLogicOnLeaderLogin(curPlayer, curFamily):
|
| | | ## 合服仙盟盟主登录处理
|
| | | |
| | | isMixServer = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServer)
|
| | | if not isMixServer:
|
| | | return
|
| | | lastMixServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_LastMixServerDay)
|
| | | familyID = curFamily.GetID()
|
| | | familyMixServerDay = GetFamilyMixServerDay(curFamily)
|
| | | if familyMixServerDay == lastMixServerDay:
|
| | | GameWorld.DebugLog("已经处理过仙盟盟主合服登录逻辑! lastMixServerDay=%s" % (lastMixServerDay), familyID)
|
| | | return
|
| | | SetFamilyMixServerDay(curFamily, lastMixServerDay)
|
| | | GameWorld.Log("处理合服仙盟盟主登录! lastMixServerDay=%s" % (lastMixServerDay), familyID)
|
| | | |
| | | mailItemList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 4)
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | detailDict = {}
|
| | | GameWorld.Log(" 发送合服盟主专属补偿邮件! familyID=%s,mailItemList=%s" % (familyID, mailItemList), playerID)
|
| | | PlayerCompensation.SendMailByKey("MixServer2", [playerID], mailItemList, detail=detailDict)
|
| | | return
|
| | | #---------------------------------------------------------------------
|
| | | ## 玩家下线家族刷新逻辑
|