| | |
| | | import ChPyNetSendPack
|
| | | import DataRecordPack
|
| | | import PlayerBillboard
|
| | | import PlayerLVAward
|
| | | import PlayerGoldGift
|
| | | import PlayerSignDay
|
| | | import PlayerPrestigeSys
|
| | | import PlayerFamily
|
| | | import PlayerLoginDayAward
|
| | | import PlayerGoldInvest
|
| | | import PlayerActivity
|
| | | import FBCommon
|
| | | import PlayerWishingWell
|
| | | import PlayerSuccess
|
| | | import PlayerFreeGoods
|
| | | import GameFuncComm
|
| | | import PlayerFamilyTaofa
|
| | | import PlayerFeastLogin
|
| | | import PlayerFeastWish
|
| | | import PlayerActLogin
|
| | | import PlayerTreasure
|
| | | import IpyGameDataPY
|
| | | import EventReport
|
| | | import PassiveBuffEffMng
|
| | | import PlayerFlashSale
|
| | | import PlayerFlashGiftbag
|
| | | import PlayerDailyGiftbag
|
| | | import PlayerActBuyOne
|
| | | import PlayerActGrowupBuy
|
| | | import PlayerActCollectWords
|
| | | import PlayerActTotalRecharge
|
| | | import PlayerActLianqi
|
| | | import PlayerActGodGift
|
| | | import PlayerActFamilyCTGAssist
|
| | | import PlayerActManyDayRecharge
|
| | | import PlayerActSingleRecharge
|
| | | import PlayerSpringSale
|
| | | import PlayerLuckyTreasure
|
| | | import PlayerFuncSysPrivilege
|
| | | import PlayerActTurntable
|
| | | import OpenServerActivity
|
| | | import ChNetSendPack
|
| | | import PlayerArena
|
| | | import PyGameData
|
| | | import PlayerCoin
|
| | | import PlayerCharm
|
| | | import PlayerDogz
|
| | | import PlayerFB
|
| | | import PlayerFaQi
|
| | | import SkillShell
|
| | | import PlayerGubao
|
| | | import PlayerCustomAward
|
| | | import PlayerZhanling
|
| | | import PlayerTree
|
| | | import PlayerLLMJ
|
| | | import PlayerLianTi
|
| | | import PlayerTask
|
| | | import PlayerYinji
|
| | | import PlayerLove
|
| | | import GameObj
|
| | | import PlayerChangeJob
|
| | | import PlayerXiangong
|
| | | import PlayerGoldRush
|
| | | import PlayerActLoginNew
|
| | | import PlayerActSign
|
| | | import PlayerActBuyCountGift
|
| | | import PlayerActLunhuidian
|
| | | import PlayerActHeroAppear
|
| | | import PlayerActFamilyGCZ
|
| | | import PlayerActYunshi
|
| | | import PlayerActTask
|
| | | import PlayerMail
|
| | | import DBDataMgr
|
| | | import PlayerViewCache
|
| | | import UpdatePlayerName
|
| | | import GameServerRefresh
|
| | | #import GameServerRefresh
|
| | | import IPY_ServerDefine
|
| | | import IPY_PlayerDefine
|
| | | import CommFunc
|
| | |
| | | if FBLogic.PlayerLoginInFBCheck(curPlayer, tick):
|
| | | #玩家是第一次登录, 并且玩家需要踢回原来地图
|
| | | return
|
| | | |
| | | #刷新人物日期状态
|
| | | #GameWorld.Log('PlayerEventCounter.UpdatePlayerLoginTime')
|
| | | PlayerEventCounter.UpdatePlayerLoginTime(curPlayer)
|
| | | return
|
| | |
|
| | | #// A1 20 货币兑换 #tagCMMoneyExchange
|
| | | #
|
| | | #struct tagCMMoneyExchange
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE SrcMoneyType; // 源货币类型
|
| | | # BYTE TagMoneyType; // 目标货币类型
|
| | | # DWORD ExchangeValue; // 兑换数量(消耗源货币的数量)
|
| | | #};
|
| | | def OnMoneyExchange(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | srcMoneyType = clientData.SrcMoneyType
|
| | | tagMoneyType = clientData.TagMoneyType
|
| | | exchangeValue = clientData.ExchangeValue
|
| | | |
| | | exchangeMoneyInfo = IpyGameDataPY.GetFuncEvalCfg("EqualValueMoney", 1, {})
|
| | | if str(srcMoneyType) not in exchangeMoneyInfo:
|
| | | return
|
| | | exchangeInfo = exchangeMoneyInfo[str(srcMoneyType)]
|
| | | if tagMoneyType != exchangeInfo[0]:
|
| | | return
|
| | | multiple = exchangeInfo[1]
|
| | | if exchangeValue <= 0:
|
| | | return
|
| | | |
| | | if not PlayerControl.PayMoney(curPlayer, srcMoneyType, exchangeValue, "MoneyExchange"):
|
| | | return
|
| | | |
| | | tagMoneyAdd = exchangeValue * multiple
|
| | | PlayerControl.GiveMoney(curPlayer, tagMoneyType, tagMoneyAdd, "MoneyExchange")
|
| | | GameWorld.Log("货币兑换: srcMoneyType=%s,exchangeValue=%s,tagMoneyType=%s,tagMoneyAdd=%s" |
| | | % (srcMoneyType, exchangeValue, tagMoneyType, tagMoneyAdd), curPlayer.GetPlayerID())
|
| | | return
|
| | |
|
| | | #// A1 21 תְҵ #tagCMChangeJob
|
| | | #
|
| | | #struct tagCMChangeJob
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE TagJob;
|
| | | #};
|
| | | def OnChangeJob(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | PlayerChangeJob.DoChangeJob(curPlayer, curPlayer.GetJob(), clientData.TagJob)
|
| | | return
|
| | |
|
| | | #// A1 08 刷新主服角色信息 #tagCMRefreshMainServerRole
|
| | | #
|
| | | #struct tagCMRefreshMainServerRole
|
| | | #{
|
| | | # tagHead Head;
|
| | | #};
|
| | | def OnRefreshMainServerRole(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | |
| | | Sync_DBPlayer(curPlayer)
|
| | | |
| | | # 死亡复活
|
| | | if GameObj.GetHP(curPlayer) <=0 or curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
|
| | | PlayerRebornByType(curPlayer, ChConfig.rebornType_System, tick)
|
| | | |
| | | # 强刷一次属性,刷之前重置还没同步过所有属性
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_NotifyAllAttrState, 0)
|
| | | playerControl = PlayerControl.PlayerControl(curPlayer)
|
| | | playerControl.ReCalcAllState()
|
| | | |
| | | # 同步所有buff
|
| | | __Sync_ClientBuff(curPlayer)
|
| | | |
| | | PlayerState.Sync_PKBossState(curPlayer)
|
| | | |
| | | # 恢复视野,刷新自己的视野
|
| | | curPlayer.SetVisible(True)
|
| | | PlayerControl.SetSight(curPlayer, 0)
|
| | | curPlayer.RefreshView()
|
| | | PlayerControl.SetSight(curPlayer, ChConfig.Def_PlayerSight_Default)
|
| | | curPlayer.RefreshView()
|
| | | |
| | | msgInfo = ""
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(curPlayer.GetPlayerID(), 0, 0, "RefreshMainServerRole", msgInfo, len(msgInfo))
|
| | | return
|
| | |
|
| | | def Sync_DBPlayer(curPlayer):
|
| | | ## 同步DBPlayer信息,同0102封包
|
| | | dbPlayer = ChPyNetSendPack.tagMCDBPlayer()
|
| | | dbPlayer.AccID = curPlayer.GetAccID()
|
| | | dbPlayer.PlayerID = curPlayer.GetPlayerID()
|
| | | dbPlayer.PlayerName = curPlayer.GetPlayerName()
|
| | | dbPlayer.AccState = curPlayer.GetAccState()
|
| | | dbPlayer.GMLevel = curPlayer.GetGMLevel()
|
| | | dbPlayer.Sex = curPlayer.GetSex()
|
| | | dbPlayer.Job = curPlayer.GetJob()
|
| | | dbPlayer.ReincarnationLv = curPlayer.GetReincarnationLv()
|
| | | dbPlayer.LV = curPlayer.GetLV()
|
| | | dbPlayer.LVEx = curPlayer.GetLVEx()
|
| | | dbPlayer.LV2 = curPlayer.GetLV2()
|
| | | dbPlayer.ExpPoint = curPlayer.GetExpPoint()
|
| | | dbPlayer.TotalExp = curPlayer.GetTotalExp()
|
| | | dbPlayer.Family = curPlayer.GetFamilyID()
|
| | | dbPlayer.FamilyName = curPlayer.GetFamilyName()
|
| | | dbPlayer.TeamHornor = curPlayer.GetTeamHornor()
|
| | | dbPlayer.FamilyHornor = curPlayer.GetFamilyHornor()
|
| | | dbPlayer.FamilyActiveValue = curPlayer.GetFamilyActiveValue()
|
| | | dbPlayer.LastWeekFamilyActiveValue = curPlayer.GetLastWeekFamilyActiveValue()
|
| | | dbPlayer.CountryHornor = curPlayer.GetCountryHornor()
|
| | | dbPlayer.CountryLastWeekHornor = curPlayer.GetCountryLastWeekHornor()
|
| | | dbPlayer.Mate = curPlayer.GetMate()
|
| | | dbPlayer.Gold = curPlayer.GetGold()
|
| | | dbPlayer.GoldPaper = curPlayer.GetGoldPaper()
|
| | | dbPlayer.Silver = curPlayer.GetSilver()
|
| | | dbPlayer.SilverPaper = curPlayer.GetSilverPaper()
|
| | | dbPlayer.FightPoint = curPlayer.GetFightPoint()
|
| | | dbPlayer.HappyPoint = curPlayer.GetHappyPoint()
|
| | | dbPlayer.LineID = curPlayer.GetLineID()
|
| | | dbPlayer.MapID = curPlayer.GetMapID() # 玩家身上的 GetMapID 返回的就是 GetDataMapID
|
| | | dbPlayer.PosX = curPlayer.GetPosX()
|
| | | dbPlayer.PosY = curPlayer.GetPosY()
|
| | | dbPlayer.RebornMapID = curPlayer.GetRebornMapID()
|
| | | dbPlayer.RebornPosX = curPlayer.GetRebornPosX()
|
| | | dbPlayer.RebornPosY = curPlayer.GetRebornPosY()
|
| | | dbPlayer.State = curPlayer.GetState()
|
| | | dbPlayer.HP = curPlayer.GetHP()
|
| | | dbPlayer.HPEx = curPlayer.GetHPEx()
|
| | | dbPlayer.XP = curPlayer.GetXP()
|
| | | dbPlayer.HPRestoreSetting = curPlayer.GetHPRestoreSetting()
|
| | | dbPlayer.MPRestoreSetting = curPlayer.GetMPRestoreSetting()
|
| | | dbPlayer.FreePoint = curPlayer.GetFreePoint()
|
| | | dbPlayer.FreeSkillPoint = curPlayer.GetFreeSkillPoint()
|
| | | dbPlayer.BaseSTR = curPlayer.GetBaseSTR()
|
| | | dbPlayer.BasePNE = curPlayer.GetBasePNE()
|
| | | dbPlayer.BasePHY = curPlayer.GetBasePHY()
|
| | | dbPlayer.BaseCON = curPlayer.GetBaseCON()
|
| | | dbPlayer.STR = curPlayer.GetSTR()
|
| | | dbPlayer.PNE = curPlayer.GetPNE()
|
| | | dbPlayer.PHY = curPlayer.GetPHY()
|
| | | dbPlayer.CON = curPlayer.GetCON()
|
| | | #dbPlayer.Setting = curPlayer.GetSetting() # 没有
|
| | | dbPlayer.PKValue = curPlayer.GetPKValue()
|
| | | #dbPlayer.ActiveValue = curPlayer.GetActiveValue() # 没有
|
| | | dbPlayer.BackpackLV = curPlayer.GetBackpackLV()
|
| | | dbPlayer.WarehouseLV = curPlayer.GetWarehouseLV()
|
| | | dbPlayer.TeamID = curPlayer.GetTeamID()
|
| | | dbPlayer.UseGoldType = curPlayer.GetUseGoldType()
|
| | | dbPlayer.UseSilverType = curPlayer.GetUseSilverType()
|
| | | dbPlayer.AttackMode = curPlayer.GetAttackMode()
|
| | | dbPlayer.LastWeekOnlineTime = curPlayer.GetLastWeekOnlineTime()
|
| | | dbPlayer.FBID = curPlayer.GetClientLineID()
|
| | | dbPlayer.FamilyLV = curPlayer.GetFamilyLV()
|
| | | dbPlayer.FriendFavor = curPlayer.GetFriendFavor()
|
| | | dbPlayer.Energy = curPlayer.GetEnergy()
|
| | | dbPlayer.EquipShowSwitch = curPlayer.GetEquipShowSwitch()
|
| | | dbPlayer.LuckValue = curPlayer.GetLuckValue()
|
| | | dbPlayer.ExAttr1 = curPlayer.GetExAttr1()
|
| | | dbPlayer.ExAttr2 = curPlayer.GetExAttr2()
|
| | | dbPlayer.ExAttr3 = curPlayer.GetExAttr3()
|
| | | dbPlayer.ExAttr4 = curPlayer.GetExAttr4()
|
| | | dbPlayer.ExAttr5 = curPlayer.GetExAttr5()
|
| | | dbPlayer.Faction = curPlayer.GetFaction()
|
| | | dbPlayer.InfamyValue = curPlayer.GetInfamyValue()
|
| | | dbPlayer.OfficialRank = curPlayer.GetOfficialRank()
|
| | | dbPlayer.ChangeCoinPointTotal = curPlayer.GetChangeCoinPointTotal()
|
| | | dbPlayer.VIPLv = curPlayer.GetVIPLv()
|
| | | dbPlayer.VIPLvForPhone = curPlayer.GetVIPLvForPhone()
|
| | | dbPlayer.ExAttr6 = curPlayer.GetExAttr6()
|
| | | dbPlayer.ExAttr7 = curPlayer.GetExAttr7()
|
| | | dbPlayer.ExAttr8 = curPlayer.GetExAttr8()
|
| | | dbPlayer.ExAttr9 = curPlayer.GetExAttr9()
|
| | | dbPlayer.ExAttr10 = curPlayer.GetExAttr10()
|
| | | dbPlayer.ModelMark = curPlayer.GetModelMark()
|
| | | dbPlayer.ExAttr11 = curPlayer.GetExAttr11()
|
| | | dbPlayer.ExAttr12 = curPlayer.GetExAttr12()
|
| | | dbPlayer.ExAttr13 = curPlayer.GetExAttr13()
|
| | | dbPlayer.ExAttr14 = curPlayer.GetExAttr14()
|
| | | dbPlayer.OperateInfo = curPlayer.GetOperateInfo()
|
| | | dbPlayer.Operate = curPlayer.GetOperate()
|
| | | dbPlayer.ServerID = curPlayer.GetServerID()
|
| | | dbPlayer.ExAttr15 = curPlayer.GetExAttr15()
|
| | | dbPlayer.ExAttr16 = curPlayer.GetExAttr16()
|
| | | dbPlayer.ExAttr17 = curPlayer.GetExAttr17()
|
| | | dbPlayer.ExAttr18 = curPlayer.GetExAttr18()
|
| | | dbPlayer.ExAttr19 = curPlayer.GetExAttr19()
|
| | | dbPlayer.ExAttr20 = curPlayer.GetExAttr20()
|
| | | dbPlayer.Face = curPlayer.GetFace()
|
| | | dbPlayer.FacePic = curPlayer.GetFacePic()
|
| | | dbPlayer.RoleType = curPlayer.GetRoleType()
|
| | | NetPackCommon.SendFakePack(curPlayer, dbPlayer)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | # !!!必要发送的数据要注意位置
|
| | | if GameWorld.IsCrossServer():
|
| | | curPlayer.SetForbiddenSyncClientState(True)
|
| | | |
| | | # !!!先处理检查OnDay,再处理玩家登录的功能数据,防止某些功能login处理数据后又被onday重置
|
| | | PlayerEventCounter.UpdatePlayerLoginTime(curPlayer)
|
| | |
|
| | | __DoPlayerLoginServer(curPlayer, tick)
|
| | |
|
| | |
| | | #PKģʽ
|
| | | #SyncPKModel(curPlayer)
|
| | |
|
| | | # 通知等级奖励领取记录
|
| | | PlayerLVAward.Sync_LVAwardGetRecordInfo(curPlayer)
|
| | | |
| | | PlayerCoin.OnLogin(curPlayer)
|
| | | # 首充/天天首充/充值豪礼
|
| | | PlayerGoldGift.OnLogin(curPlayer)
|
| | |
| | | # 坐骑相关通知
|
| | | PlayerHorse.PlayerHorseLogin(curPlayer)
|
| | |
|
| | | # 法器
|
| | | PlayerFaQi.PlayerFaQiLogin(curPlayer)
|
| | | |
| | | # 炼体
|
| | | PlayerLianTi.OnPlayerLogin(curPlayer)
|
| | | |
| | | PlayerTreasure.OnTreasureLogin(curPlayer)
|
| | | |
| | | # 通知累计登陆礼
|
| | | PlayerLoginDayAward.OnLoginNotifyLoginDayAward(curPlayer)
|
| | |
|
| | | # 副本进入时间
|
| | | FBCommon.FBOnLogin(curPlayer)
|
| | |
| | | #成就
|
| | | PlayerSuccess.SuccOnLogin(curPlayer)
|
| | |
|
| | | #魅力
|
| | | PlayerCharm.OnPlayerLogin(curPlayer)
|
| | | |
| | | #情缘
|
| | | PlayerLove.DoPlayerLogin(curPlayer)
|
| | | |
| | | #同步自动战斗配置记录
|
| | | # Sync_AutoFightSetting(curPlayer)
|
| | | |
| | | PlayerFamily.OnPlayerLogin(curPlayer, tick)
|
| | |
|
| | | # 竞技场
|
| | | PlayerArena.OnLogin(curPlayer)
|
| | |
| | | #NotifyPlayerBasePoint(curPlayer)
|
| | | #累计充值
|
| | | PlayerActTotalRecharge.OnPlayerLogin(curPlayer)
|
| | | #成长必买
|
| | | PlayerActGrowupBuy.OnPlayerLogin(curPlayer)
|
| | | #限时特惠
|
| | | PlayerSpringSale.OnPlayerLogin(curPlayer)
|
| | | #限时礼包
|
| | | PlayerFlashGiftbag.OnPlayerLogin(curPlayer)
|
| | | #每日礼包
|
| | | PlayerDailyGiftbag.OnPlayerLogin(curPlayer)
|
| | | #限时抢购
|
| | | PlayerFlashSale.OnPlayerLogin(curPlayer)
|
| | | #买一送多活动
|
| | | PlayerActBuyOne.OnPlayerLogin(curPlayer)
|
| | | #仙盟充值互助
|
| | |
| | | FunctionNPCCommon.ShopItemOnLogin(curPlayer)
|
| | | # 通知设置的被动功法
|
| | | #PassiveBuffEffMng.OnLoginGFPassive(curPlayer)
|
| | | # 极品白拿
|
| | | PlayerFreeGoods.OnLogin(curPlayer)
|
| | | # 购买次数礼包活动
|
| | | PlayerActBuyCountGift.OnPlayerLogin(curPlayer)
|
| | | # 任务活动
|
| | | PlayerActTask.OnPlayerLogin(curPlayer)
|
| | | # 运势活动
|
| | | PlayerActYunshi.OnPlayerLogin(curPlayer)
|
| | | # 登录活动
|
| | | PlayerActLoginNew.OnPlayerLogin(curPlayer)
|
| | | # 节日登录活动
|
| | | PlayerFeastLogin.OnPlayerLogin(curPlayer)
|
| | | # 节日祝福活动
|
| | | PlayerFeastWish.OnPlayerLogin(curPlayer)
|
| | | # 登录奖励活动
|
| | | PlayerActLogin.OnLogin(curPlayer)
|
| | | # 炼器活动
|
| | | PlayerActLianqi.OnPlayerLogin(curPlayer)
|
| | | # 天帝礼包活动
|
| | | PlayerActGodGift.OnPlayerLogin(curPlayer)
|
| | | # 多日连充活动
|
| | | PlayerActManyDayRecharge.OnPlayerLogin(curPlayer)
|
| | | # 单笔累充活动
|
| | | PlayerActSingleRecharge.OnPlayerLogin(curPlayer)
|
| | | # 转盘活动
|
| | | PlayerActTurntable.OnPlayerLogin(curPlayer)
|
| | | # 分支下载奖励记录通知
|
| | | SyncPackDownloadAward(curPlayer)
|
| | | # 登录触发功能开启(老号处理)
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer)
|
| | | # 神兽
|
| | | PlayerDogz.OnPlayerLogin(curPlayer)
|
| | | # 许愿池
|
| | | PlayerWishingWell.OnLogin(curPlayer)
|
| | | #幸运鉴宝
|
| | | PlayerLuckyTreasure.OnLogin(curPlayer)
|
| | | # 小助手
|
| | | SyncLittleHelper(curPlayer)
|
| | | PlayerFB.OnLogin(curPlayer)
|
| | |
| | | Sync_CreateRoleAwardInfo(curPlayer)
|
| | | #自定义奖励
|
| | | PlayerCustomAward.OnPlayerLogin(curPlayer)
|
| | | #功能系统特权
|
| | | PlayerFuncSysPrivilege.OnPlayerLogin(curPlayer)
|
| | | #玩法前瞻奖励
|
| | | gameNoticeAwardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GameNoticeAwardState)
|
| | | if gameNoticeAwardState:
|
| | |
| | | else:
|
| | | PyMongoMain.GetUserCtrlDB().OnPlayerLogin(curPlayer)
|
| | | GMT_BroadCast.OnPlayerLogin(curPlayer)
|
| | | PlayerFamily.OnPlayerLogin(curPlayer, tick)
|
| | | PlayerHero.OnPlayerLogin(curPlayer)
|
| | | PlayerMail.OnPlayerLogin(curPlayer)
|
| | | PlayerHJG.OnPlayerLogin(curPlayer)
|
| | | PlayerXiangong.OnPlayerLogin(curPlayer)
|
| | | PlayerGubao.OnPlayerLogin(curPlayer)
|
| | | PlayerZhanling.OnPlayerLogin(curPlayer)
|
| | | PlayerTask.OnPlayerLogin(curPlayer)
|
| | |
| | | PlayerPreset.OnPlayerLogin(curPlayer)
|
| | | CrossPlayer.OnPlayerLogin(curPlayer)
|
| | | PlayerActLunhuidian.OnPlayerLogin(curPlayer)
|
| | | PlayerActHeroAppear.OnPlayerLogin(curPlayer)
|
| | |
|
| | | __OnFixVersion(curPlayer) # 修正线上玩家数据用,暂时放最后
|
| | | # 上线查询一次充值订单
|
| | |
| | | '''
|
| | |
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | sysFixVersion = 2025123012 # 系统定义的最后一次修正版本号,一般以 yyyyMMddhh 定义为版本号
|
| | | sysFixVersion = 2026021300 # 系统定义的最后一次修正版本号,一般以 yyyyMMddhh 定义为版本号
|
| | | playerVersion = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FixVersion)
|
| | | if not playerVersion:
|
| | | createRoleTime = curPlayer.GetCreateRoleTime() # 按创角
|
| | |
| | | # 每个版本修正完需要立即更新到对应的版本号值,防止中间某个版本修正失败,导致重登后重复修正已经处理的版本
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FixVersion, fixVersion)
|
| | |
|
| | | # 修正公会跨服首次没有过天
|
| | | fixVersion = 2026021300
|
| | | if playerVersion < fixVersion:
|
| | | if DBFamily.IsFamilyCross():
|
| | | GameWorld.Log("跨服公会玩家登录补过天")
|
| | | PlayerFamily.__doPlayerOnDay(curPlayer)
|
| | | |
| | | # 其他
|
| | | # 需要按修正版本时间顺序依次处理!!!需要按修正版本时间顺序依次处理!!!需要按修正版本时间顺序依次处理!!!
|
| | |
|
| | |
| | |
|
| | | # --------------------------------------------------------------
|
| | |
|
| | | syncCD = 2000
|
| | | if refreshType == IPY_PlayerDefine.CDBPlayerRefresh_FightPower:
|
| | | syncCD = 60 * 1000
|
| | | |
| | | # 同步给相关跨服
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | lastSyncTick = curPlayer.GetDictByKey("S2C_PlayerBaseInfo")
|
| | | if lastSyncTick and (tick - lastSyncTick) <= 2000:
|
| | | if lastSyncTick and (tick - lastSyncTick) <= syncCD:
|
| | | # 短时间内只同步一次
|
| | | #GameWorld.DebugLog("同步基础属性CD中! refreshType=%s,syncCD=%s,pass=%s" % (refreshType, syncCD, tick - lastSyncTick))
|
| | | return
|
| | | curPlayer.SetDict("S2C_PlayerBaseInfo", tick)
|
| | |
|
| | |
| | | #首登邮件
|
| | | mailList = IpyGameDataPY.GetFuncEvalCfg("MailLVAward", 2)
|
| | | for mailTypeKey, mailItemList in mailList:
|
| | | PlayerControl.SendMailByKey(mailTypeKey, [curPlayer.GetPlayerID()], mailItemList)
|
| | | PlayerMail.SendMailByKey(mailTypeKey, playerID, mailItemList)
|
| | | appID = GameWorld.GetAppIDByAccID(curPlayer.GetAccID())
|
| | | appIDMailDict = IpyGameDataPY.GetFuncEvalCfg("MailLVAward", 3, {})
|
| | | mailDict = appIDMailDict.get(appID, {})
|
| | | for mailTypeKey, mailItemList in mailDict.items():
|
| | | PlayerMail.SendMailByKey(mailTypeKey, playerID, mailItemList)
|
| | |
|
| | | PlayerHero.OnPlayerFirstLogin(curPlayer)
|
| | |
|
| | |
| | | #到此处已经可以保存数据,即使客户端不回包断线
|
| | | #原 //01 07 地图读取OK#tagCInitMapOK 逻辑 直接调用
|
| | | __Func_LoadMapOK(index, tick)
|
| | | GameServerRefresh.GameSever_PlayerInitOK(index, tick)
|
| | | DoPlayerRealLoginOK(curPlayer, tick)
|
| | | #GameServerRefresh.GameSever_PlayerInitOK(index, tick) GameServer已废弃,不再执行该逻辑
|
| | | except:
|
| | | curPlayer.Kick(IPY_GameWorld.disWaitForPlayerLoinError)
|
| | | import traceback
|
| | |
| | | #初始化寻宝背包
|
| | | PlayerControl.Init_PackCount(curPlayer, ShareDefine.rptTreasure)
|
| | |
|
| | | #初始化神兽物品背包
|
| | | #curPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptDogzItem)
|
| | | #curPack.SetCount(ItemCommon.GetPackInitCount(ShareDefine.rptDogzItem))
|
| | | #curPack.Sync_PackCanUseCount()
|
| | | #初始化神兽装备背包
|
| | | #curPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptDogzEquip)
|
| | | #curPack.SetCount(ItemCommon.GetPackInitCount(ShareDefine.rptDogzEquip))
|
| | | #curPack.Sync_PackCanUseCount()
|
| | | #初始化垃圾分类背包
|
| | | #curPack = itemManager.GetPack(ShareDefine.rptGarbage)
|
| | |
| | | #申请得到奖励物品
|
| | | #curPlayer.DataServer_CheckPrizeItem()
|
| | |
|
| | | #防止玩家读取地图时未触发OnDay,读取地图后再次验证(2009.9.11)
|
| | | PlayerEventCounter.UpdatePlayerLoginTime(curPlayer)
|
| | | |
| | | #设置阵营
|
| | | if curPlayer.GetFaction() != ChConfig.CampType_Neutral \
|
| | | and FBCommon.GetRecordMapID(GameWorld.GetMap().GetMapID()) not in ChConfig.Def_MapID_NeedCamp:
|
| | |
| | | SyncPKModel(curPlayer)
|
| | | GameWorld.DebugLog("进入地图强制切换PK模式: %s" % initAttackModel)
|
| | |
|
| | | PassiveBuffEffMng.OnLoadMapGFPassive(curPlayer)
|
| | | PlayerYinji.OnLoadMap(curPlayer)
|
| | | #PassiveBuffEffMng.OnLoadMapGFPassive(curPlayer)
|
| | |
|
| | | #EndLoadMap需放在最后, 0403 tagPlayerLoginLoadOK
|
| | | curPlayer.EndLoadMap()
|
| | |
| | | if (curPlayer.GetAccState() & pow(2, ChConfig.Def_PysForbidByPy)) <= 0:
|
| | | return True
|
| | |
|
| | | GameWorld.Log("玩家被封号禁止登录" , curPlayer.GetPlayerID())
|
| | | curPlayer.Kick(IPY_GameWorld.disGMKick)
|
| | | return
|
| | |
|
| | |
| | | #@return 返回值无意义
|
| | | #@remarks C++封包触发, 玩家下线
|
| | | def PlayerDisconnect(index, tick):
|
| | | GameWorld.GetPsycoFunc(__Func_PlayerDisconnect)(index, tick)
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | PlayerDisconnectEx(curPlayer, tick)
|
| | | return
|
| | |
|
| | | ##C++封包触发, 玩家下线
|
| | |
| | | #@param tick 时间戳
|
| | | #@return 返回值无意义
|
| | | #@remarks C++封包触发, 玩家下线
|
| | | def __Func_PlayerDisconnect(index, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | def PlayerDisconnectEx(curPlayer, tick):
|
| | | try:
|
| | | # 避免因逻辑错误导致下线失败,可能导致回档的情况
|
| | | DoPlayerDisconnect(curPlayer, tick)
|
| | |
| | | GameObj.SetHP(curPlayer, GameObj.GetMaxHP(curPlayer) * resetHpPercent / ChConfig.Def_MaxRateValue)
|
| | | #curPlayer.SetMP(curPlayer.GetMaxMP() * resetMpPercent / ChConfig.Def_MaxRateValue)
|
| | | #护盾
|
| | | PlayerControl.SetProDef(curPlayer, PlayerControl.GetMaxProDef(curPlayer))
|
| | | #PlayerControl.SetProDef(curPlayer, PlayerControl.GetMaxProDef(curPlayer))
|
| | |
|
| | | #玩家复活后副本处理
|
| | | FBLogic.OnPlayerRebornOver(curPlayer, rebornType)
|
| | |
| | | # 轮回殿奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_LunhuidianAward:
|
| | | PlayerActLunhuidian.GetLunhuidianAward(curPlayer, dataEx, dataExStr)
|
| | | # 武将登场升星计划免费奖励 10
|
| | | elif rewardType == ChConfig.Def_RewardType_ActHeroAppearStarFreeAward:
|
| | | PlayerActHeroAppear.GetHeroAppearStarFreeAward(curPlayer, dataEx)
|
| | | # 领取活动签到奖励 70
|
| | | elif rewardType == ChConfig.Def_RewardType_ActSignAward:
|
| | | PlayerActSign.OnGetActSignAward(curPlayer, dataEx, dataExStr)
|
| | |
|
| | |
|
| | | # 每日免费直购礼包
|
| | | elif rewardType == ChConfig.Def_RewardType_DayFreeGoldGift:
|
| | | PlayerDailyGiftbag.OnGetDailyFreeGiftbag(curPlayer)
|
| | | # 玩家等级奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_LVAward:
|
| | | PlayerLVAward.GetPlayerLVAward(curPlayer, dataEx)
|
| | | # 首充礼包奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_FirstCharge:
|
| | | PlayerGoldGift.GetPlayerFirstCharge(curPlayer, dataEx, dataExStr)
|
| | | # 领取极品白拿
|
| | | elif rewardType == ChConfig.Def_RewardType_FreeGoods:
|
| | | PlayerFreeGoods.OnGetFreeGoods(curPlayer, dataEx)
|
| | | # 领取累计充值奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_TotalRecharge:
|
| | | PlayerActTotalRecharge.OnGetTotalRechargeAward(curPlayer, dataEx, dataExStr)
|
| | |
| | | # 领取单笔累充领取
|
| | | elif rewardType == ChConfig.Def_RewardType_SingleRecharge:
|
| | | PlayerActSingleRecharge.OnGetSingleRechargeAward(curPlayer, dataEx, dataExStr)
|
| | | # 领取许愿池奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_WishingWell:
|
| | | PlayerWishingWell.DoGetWishingAward(curPlayer)
|
| | | # 领取登录奖励活动奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_ActLoginAwardAct:
|
| | | PlayerActLogin.GetLoginAwardActionAward(curPlayer, dataEx, dataExStr)
|
| | | # 领取节日登录奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_FeastLogin:
|
| | | PlayerFeastLogin.GetFeastLoginAward(curPlayer, dataEx)
|
| | | # 领取登录活动奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_ActLoginAwardNew:
|
| | | PlayerActLoginNew.OnGetActLoginAward(curPlayer, dataEx, dataExStr)
|
| | | # 领取购买次数礼包活动
|
| | | elif rewardType == ChConfig.Def_RewardType_ActBuyCountGift:
|
| | | PlayerActBuyCountGift.OnGetBuyCountGiftAward(curPlayer, dataEx, dataExStr)
|
| | |
| | | # 仙盟攻城战活动奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_FamilyGCZ:
|
| | | PlayerActFamilyGCZ.GetFamilyGCZAward(curPlayer, dataEx, tick)
|
| | | # 天道树奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_TiandaoTree:
|
| | | PlayerXiangong.GetTiandaoTreeAward(curPlayer, dataEx)
|
| | | # 寻宝累计次数奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_TreasureCntAward:
|
| | | PlayerTreasure.GetTreasureCntAward(curPlayer, dataEx, dataExStr)
|
| | |
| | | if recType in ShareDefine.Def_ViewGameRecSelfList:
|
| | | recID = curPlayer.GetPlayerID()
|
| | | recTypeIDMgr = DBDataMgr.GetGameRecMgr().GetRecTypeIDMgr(recType, recID)
|
| | | SyncGameRecInfo(curPlayer, recType, recID, recTypeIDMgr.GetDataList())
|
| | | SyncGameRecInfo(curPlayer, recTypeIDMgr.GetDataList(), recType, recID)
|
| | | return
|
| | |
|
| | | def SyncGameRecInfo(curPlayer, recType, recID, recDataList):
|
| | | def SyncGameRecInfo(curPlayer, recDataList, recType=0, recID=0):
|
| | | recList = []
|
| | | for recData in recDataList:
|
| | | if not recData:
|
| | | continue
|
| | | if not recType:
|
| | | recType = recData.GetRecType()
|
| | | recID = recData.GetRecID()
|
| | | rec = ChPyNetSendPack.tagSCGameRec()
|
| | | rec.Time = recData.GetTime()
|
| | | rec.Value1 = recData.GetValue1()
|