| | |
| | | SyncPKModel(curPlayer)
|
| | |
|
| | | #通用强化星级信息
|
| | | ChEquip.NotifyEquipPartStarLV(curPlayer)
|
| | | ChEquip.NotifyEquipPartPlusLV(curPlayer)
|
| | | ChEquip.NotifyEquipPartStar(curPlayer)
|
| | | Operate_EquipWash.OnEquipWashLogin(curPlayer)
|
| | | #通知套装信息
|
| | | ChEquip.NotifyEquipPartSuiteLV(curPlayer)
|
| | | ChEquip.SyncAllEquipAttrActiveInfo(curPlayer)
|
| | | #ChEquip.SyncAllEquipAttrActiveInfo(curPlayer)
|
| | | #装备位宝石镶嵌通知
|
| | | Operate_EquipStone.OnLogin(curPlayer)
|
| | |
|
| | |
| | | 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")
|
| | | |
| | | # 重置商店购买次数,暂定只重置类型 7 的
|
| | | FunctionNPCCommon.ResetShopItemBuyCount(curPlayer, [7])
|
| | | |
| | | # 合服邮件,盟主专属邮件在GameServer处理
|
| | | mailItemList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 1)
|
| | | worldLVMailItemList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 2)
|
| | | mailMoneyList = IpyGameDataPY.GetFuncEvalCfg("MixServerMail", 3)
|
| | | worldLVDown = IpyGameDataPY.GetFuncCfg("MixServerMail", 5) # 等级丹相对合服世界等级差值
|
| | | itemWorldLV = max(150, mixServerWorldLV - worldLVDown)
|
| | | 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 <= itemWorldLV:
|
| | | worldLVItemList = [[itemID, itemCount, isBind]]
|
| | | else:
|
| | | break
|
| | | detailDict = {"MixServerWorldLV":mixServerWorldLV, "LastMixServerDay":lastMixServerDay, "ItemWorldLV":itemWorldLV}
|
| | | addItemList = mailItemList + worldLVItemList
|
| | | PlayerControl.SendMailByKey("MixServer1", [playerID], addItemList, goldPaper=goldPaper, silver=silver, detail=detailDict)
|
| | | GameWorld.Log(" 发送合服补偿邮件: itemWorldLV=%s,addItemList=%s" % (itemWorldLV, addItemList), playerID)
|
| | | |
| | | # 同步排行榜
|
| | | PlayerBillboard.UpdBillboardOnMixServerFirstLogin(curPlayer, lastMixServerDay)
|
| | | PlayerBillboard.UpdatePlayerBillboardOnLeaveServer(curPlayer, isAll=True)
|
| | |
|
| | | # 重置玩家改名次数
|
| | | UpdatePlayerName.ResetChangeNameCnt(curPlayer)
|
| | | #UpdatePlayerName.ResetChangeNameCnt(curPlayer)
|
| | | return
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | |
| | |
|
| | | #设置装备实际个数
|
| | | curPack = itemManager.GetPack(IPY_GameWorld.rptEquip)
|
| | | curPack.SetCount(ShareDefine.retMax)
|
| | | curPack.SetCount(ChConfig.Def_PackCnt_Equip)
|
| | |
|
| | | #初始化垃圾桶
|
| | | #curPack = itemManager.GetPack(IPY_GameWorld.rptRecycle)
|
| | |
| | | return
|
| | |
|
| | | #===============================================================================
|
| | | # //B4 14 根据类型来决定移动的方式 #tagMCMoveByType
|
| | | # |
| | | # struct tagMCMoveByType
|
| | | # {
|
| | | # tagHead Head;
|
| | | # DWORD ID; //玩家ID
|
| | | # WORD PosX; // 目标X
|
| | | # WORD PosY; // 目标Y
|
| | | # BYTE MoveType; //移动方式
|
| | | # };
|
| | | #===============================================================================
|
| | | def OnMoveByType(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | |
| | | #玩家移动通用检查
|
| | | if not __CheckPlayerCanMove(curPlayer):
|
| | | return
|
| | | |
| | | #先验证目标点是否合法
|
| | | if not GameWorld.GetMap().CanMove(clientData.PosX, clientData.PosY):
|
| | | return
|
| | | |
| | | curPlayer.StopMove()
|
| | | curPlayer.ChangePos(clientData.PosX, clientData.PosY)
|
| | | sendPack = ChPyNetSendPack.tagMCMoveByType()
|
| | | sendPack.Clear()
|
| | | sendPack.ID = curPlayer.GetID()
|
| | | sendPack.ObjType = curPlayer.GetGameObjType()
|
| | | sendPack.PosX = clientData.PosX
|
| | | sendPack.PosY = clientData.PosY
|
| | | sendPack.MoveType = clientData.MoveType
|
| | | |
| | | PlayerControl.PyNotifyAll(curPlayer, sendPack, False, -1)
|
| | | return
|
| | |
|
| | | #===============================================================================
|
| | | # //B4 04 战前冲锋 #tagCMRush
|
| | | #
|
| | | # struct tagCMRush
|
| | |
| | |
|
| | | #超出视野
|
| | | if GameWorld.GetDist(curPlayer.GetPosX(), curPlayer.GetPosY(), clientData.PosX, clientData.PosY) > curPlayer.GetSight():
|
| | | return
|
| | | |
| | | #玩家移动通用检查
|
| | | if not __CheckPlayerCanMove(curPlayer):
|
| | | return
|
| | | |
| | | #先验证目标点是否合法
|
| | | if not GameWorld.GetMap().CanMove(clientData.PosX, clientData.PosY):
|
| | | return
|
| | |
|
| | | curPlayer.StopMove()
|
| | |
| | | PlayerControl.SendMailByKey('SubpackageDownload', [curPlayer.GetID()], awardItemList)
|
| | | else:
|
| | | for itemID, itemCnt, isBind in awardItemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [IPY_GameWorld.rptItem])
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
|
| | | SyncPackDownloadAward(curPlayer)
|
| | | return
|
| | |
|