| | |
| | | if not isMixServer:
|
| | | return
|
| | |
|
| | | lastMixServerDayKey = ShareDefine.Def_Notify_WorldKey_LastMixServerDay
|
| | | lastMixServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(lastMixServerDayKey)
|
| | | GameWorld.DebugLog("合服首登处理lastMixServerDay=%s" % lastMixServerDay, curPlayer.GetPlayerID())
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | lastMixServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_LastMixServerDay)
|
| | |
|
| | | playerDay = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MixLoginDay)
|
| | |
|
| | | if playerDay == lastMixServerDay:
|
| | | GameWorld.DebugLog("本次合服已经登录过.")
|
| | | GameWorld.DebugLog("本次合服已经登录过. lastMixServerDay=%s" % (lastMixServerDay), playerID)
|
| | | return
|
| | |
|
| | | mixServerWorldLV = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_LastMixServerWorldLV) # 合服时的世界等级
|
| | | GameWorld.Log("玩家合服首登处理! lastMixServerDay=%s,mixServerWorldLV=%s" % (lastMixServerDay, mixServerWorldLV), playerID) |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MixLoginDay, lastMixServerDay)
|
| | |
|
| | | # 重置首充双倍
|
| | | PlayerCoin.DoResetCTGCount(curPlayer, "MixServer")
|
| | | |
| | | # 重置商店购买次数
|
| | | FunctionNPCCommon.ResetShopItemBuyCount(curPlayer)
|
| | | |
| | | # 合服邮件,盟主专属邮件在GameServer处理
|
| | | mailItemList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 1)
|
| | | worldLVMailItemList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 2)
|
| | | mailMoneyList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 3)
|
| | | goldPaper, silver = mailMoneyList
|
| | | worldLVItemList = []
|
| | | for itemID, itemCount, isBind in worldLVMailItemList:
|
| | | itemData = GameWorld.GetGameData().GetItemByTypeID(itemID)
|
| | | if not itemData:
|
| | | continue
|
| | | curEff = itemData.GetEffectByIndex(0)
|
| | | curEffID = curEff.GetEffectID()
|
| | | if curEffID != ChConfig.Def_Effect_ItemAddLV:
|
| | | continue
|
| | | lvLimit = curEff.GetEffectValue(1)
|
| | | if not lvLimit:
|
| | | continue
|
| | | if lvLimit <= mixServerWorldLV:
|
| | | worldLVItemList = [[itemID, itemCount, isBind]]
|
| | | else:
|
| | | break
|
| | | detailDict = {"MixServerWorldLV":mixServerWorldLV, "LastMixServerDay":lastMixServerDay}
|
| | | addItemList = mailItemList + worldLVItemList
|
| | | PlayerControl.SendMailByKey("MixServer1", [playerID], addItemList, goldPaper=goldPaper, silver=silver, detail=detailDict)
|
| | | GameWorld.Log(" 发送合服补偿邮件: addItemList=%s" % (addItemList), playerID)
|
| | | |
| | | # 同步排行榜
|
| | | PlayerBillboard.UpdBillboardOnMixServerFirstLogin(curPlayer, lastMixServerDay)
|
| | | PlayerBillboard.UpdatePlayerBillboardOnLeaveServer(curPlayer, isAll=True)
|
| | |
|
| | | # 重置玩家改名次数
|
| | | UpdatePlayerName.ResetChangeNameCnt(curPlayer)
|
| | | #UpdatePlayerName.ResetChangeNameCnt(curPlayer)
|
| | | return
|
| | | #---------------------------------------------------------------------
|
| | |
|