| | |
| | | import ReadChConfig
|
| | | import ChConfig
|
| | | import GameWorld
|
| | | import EventShell
|
| | | import FBLogic
|
| | | import IPY_GameWorld
|
| | | import ChPlayer
|
| | | import GameLogInfo
|
| | | import GameServerRefresh
|
| | | import ShareDefine
|
| | | import PlayerGameWallow
|
| | | import Operate_PlayerBuyZhenQi
|
| | | import PlayerSignDay
|
| | | import PlayerCoin
|
| | | import PlayerControl
|
| | | import PlayerWorldAverageLv
|
| | | import PlayerFamily
|
| | | import PlayerFamilyZhenfa
|
| | | import PlayerOnlinePrize
|
| | | import NPCCustomRefresh
|
| | | import PlayerLoginDayAward
|
| | | import NPCCommon
|
| | | import FunctionNPCCommon
|
| | | import PlayerGoldGift
|
| | | import PlayerActivity
|
| | | import PlayerBindJadeWheel
|
| | | import FBCommon
|
| | | import PlayerSuccess
|
| | | import PlayerFreeGoods
|
| | | import PlayerMagicWeapon
|
| | | import ChItem
|
| | | import PlayerGoldInvest
|
| | | import PlayerNewGuyCard
|
| | | import PlayerCrossRealmPK
|
| | | import PlayerCrossChampionship
|
| | | import PlayerCrossBattlefield
|
| | | import PlayerPet
|
| | | import BossHurtMng
|
| | | import PlayerRecover
|
| | | import GameLogic_FamilyParty
|
| | | import PlayerFamilyRedPacket
|
| | | import GameLogic_FamilyInvade
|
| | | import GameLogic_ElderBattlefield
|
| | | import GameLogic_AllFamilyBoss
|
| | | import GameLogic_HorsePetBoss
|
| | | import GameLogic_FamilyWar
|
| | | import OpenServerCampaign
|
| | | import PlayerCostRebate
|
| | | import CrossActCTGBillboard
|
| | |
| | | import PlayerActLogin
|
| | | import PlayerFlashGiftbag
|
| | | import PlayerDailyGiftbag
|
| | | import PlayerFairyCeremony
|
| | | import PlayerNewFairyCeremony
|
| | | import PlayerOfflineSupport
|
| | | import PlayerActHorsePetFeast
|
| | | import PlayerFeastRedPacket
|
| | | import PlayerCrossYaomoBoss
|
| | | import PlayerLuckyCloudBuy
|
| | | import PlayerLuckyTreasure
|
| | | import PlayerAuctionHouse
|
| | | import PlayerTongTianLing
|
| | | import PlayerRefineStove
|
| | | import PlayerFlashSale
|
| | | import PlayerWishingWell
|
| | | import PlayerFairyDomain
|
| | | import CrossPlayerData
|
| | | import PlayerTreasure
|
| | | import PlayerZhanling
|
| | | import PlayerVip
|
| | | import PlayerLove
|
| | | import PlayerDiceEx
|
| | | import IpyGameDataPY
|
| | | import FamilyRobBoss
|
| | | import FBHelpBattle
|
| | | import QuestManager
|
| | | import PlayerAssist
|
| | | import PlayerArena
|
| | | import PyGameData
|
| | | import PlayerGuaji
|
| | | import PlayerXiangong
|
| | | import PlayerMineArea
|
| | | import PlayerBillboard
|
| | | import PlayerViewCache
|
| | | import PlayerMail
|
| | | import PlayerHero
|
| | | import PlayerTree
|
| | |
|
| | | import datetime
|
| | | import time
|
| | |
| | |
|
| | | def DoLogic_OnDay(tick):
|
| | | GameWorld.Log("MapServer -> OnDay!")
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | #处理所有玩家信件的onday事件, 把存在时间+1
|
| | | playerManager.ProcessAllPlayerMailOnDay()
|
| | | #清空每日日记记录信息
|
| | | GameLogInfo.ClearGameLogInfo()
|
| | | |
| | | #副本OnDay事件响应
|
| | | FBLogic.OnDay(tick)
|
| | |
|
| | | #删除所有的任务发布
|
| | | missionPubManager = GameWorld.GetGameWorld().GetDBMissionPubManager()
|
| | | missionPubManager.Clear()
|
| | | #仙盟
|
| | | PlayerFamily.FamilyOnDay()
|
| | |
|
| | | PlayerOfflineSupport.OnDay()
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for i in xrange(playerManager.GetPlayerCount()):
|
| | | curPlayer = playerManager.GetPlayerByIndex(i)
|
| | |
|
| | |
| | | curPlayer.SetDayProcessGameEventCount(0)
|
| | |
|
| | | #重置宠物每天的训练次数
|
| | | PlayerPet.DoLogic_PetInfo_OnDay(curPlayer)
|
| | | |
| | | PlayerGameWallow.RevertHealthGame_OnDay(curPlayer)
|
| | | #PlayerPet.DoLogic_PetInfo_OnDay(curPlayer)
|
| | |
|
| | | PlayerOnlinePrize.ResetPrizeInfoOnDay(curPlayer)
|
| | |
|
| | |
| | |
|
| | | #------------------------------------------------------------------------------
|
| | |
|
| | | PlayerVip.VipOnDay(curPlayer)
|
| | | |
| | | PlayerCoin.OnDay(curPlayer)
|
| | | |
| | | PlayerTree.PlayerOnDay(curPlayer)
|
| | | #成就
|
| | | PlayerSuccess.SuccOnDay(curPlayer)
|
| | | |
| | | # 新手卡
|
| | | PlayerNewGuyCard.NewGuyCardOnday(curPlayer)
|
| | | |
| | | #投资
|
| | | PlayerGoldInvest.OnDay(curPlayer)
|
| | | #战令
|
| | | PlayerZhanling.OnDay(curPlayer)
|
| | | #寻宝
|
| | | PlayerTreasure.OnDay(curPlayer)
|
| | | #法宝
|
| | | PlayerMagicWeapon.OnDay(curPlayer)
|
| | | PlayerGoldGift.OnDay(curPlayer)
|
| | | #炼丹
|
| | | PlayerRefineStove.OnDay(curPlayer)
|
| | | #绑玉转盘
|
| | | PlayerBindJadeWheel.OnDay(curPlayer)
|
| | | #转盘
|
| | | PlayerActTurntable.PlayerOnDay(curPlayer)
|
| | | #情缘
|
| | |
| | | ChPlayer.Sync_RewardGetRecordInfo(curPlayer, ChConfig.Def_RewardType_RechargeDayAward, 0)
|
| | | # 特殊时间点X点过天
|
| | | elif onEventType == ShareDefine.Def_OnEventTypeEx:
|
| | | PlayerHero.PlayerOnDay(curPlayer)
|
| | | # 资源找回
|
| | | PlayerRecover.RecoverOnDay(curPlayer)
|
| | | #触发每日任务重置脚本
|
| | | EventShell.EventResponse_OnDay(curPlayer)
|
| | | #购买次数清空
|
| | | Operate_PlayerBuyZhenQi.PlayerOnDay(curPlayer)
|
| | | |
| | | #我要太极过天
|
| | | PlayerDiceEx.OnDay(curPlayer)
|
| | | # 世界boss
|
| | | BossHurtMng.OnDay(curPlayer)
|
| | | # 仙盟过天
|
| | | PlayerFamily.PlayerOnDay(curPlayer)
|
| | | # 重置物品每日使用次数
|
| | |
| | | PlayerFreeGoods.OnDay(curPlayer)
|
| | | #采集次数重置
|
| | | NPCCommon.PlayerOnDay(curPlayer)
|
| | | #副本助战
|
| | | FBHelpBattle.DoPlayerOnDay(curPlayer)
|
| | | #跨服竞技场
|
| | | PlayerCrossRealmPK.DoPlayerOnDay(curPlayer)
|
| | | #跨服排位
|
| | | PlayerCrossChampionship.DoPlayerOnDay(curPlayer)
|
| | | #跨服战场
|
| | | PlayerCrossBattlefield.DoPlayerOnDay(curPlayer)
|
| | | #缥缈仙域
|
| | | PlayerFairyDomain.OnDay(curPlayer)
|
| | | #仙盟宴会
|
| | | GameLogic_FamilyParty.OnDayFamilyPartyPlayer(curPlayer)
|
| | | #竞技场
|
| | | PlayerArena.OnDayEx(curPlayer)
|
| | | #协助
|
| | | PlayerAssist.DoPlayerOnDay(curPlayer)
|
| | | #福地
|
| | | PlayerMineArea.PlayerOnDay(curPlayer)
|
| | | #挂机
|
| | | PlayerGuaji.PlayerOnDay(curPlayer)
|
| | | #特殊时间点过天的,一般是游戏功能,此时立即同步一次跨服玩家数据
|
| | | CrossPlayerData.SendMergePlayerDataNow(curPlayer)
|
| | |
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_HasVIPClubNote, 0)
|
| | |
|
| | | elif onEventType == ShareDefine.Def_OnEventTypeEx:
|
| | | #触发每周任务重置脚本
|
| | | EventShell.EventResponse_OnWeek(curPlayer)
|
| | | #竞技场
|
| | | PlayerArena.OnWeekEx(curPlayer)
|
| | | PlayerFamily.OnWeekEx(curPlayer)
|
| | | PlayerCrossBattlefield.DoPlayerOnWeek(curPlayer)
|
| | |
|
| | | # 以下为支持两种重置模式切换配置的
|
| | | FBCommon.FBOnWeek(curPlayer, onEventType)
|
| | |
| | |
|
| | | GameWorld.Log("PlayerOnHour!" , curPlayerID)
|
| | |
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | #PlayerVip.CalcVIPTimeByTick(curPlayer, tick)
|
| | | |
| | | #记录
|
| | | curDateTime = GameWorld.GetCurrentTime()
|
| | | curHour = curDateTime.hour
|
| | |
| | | if curHour == 1:
|
| | | #从数据库中查询当前排行榜等级
|
| | | curPlayer.DataServer_GetBillboardLV()
|
| | | |
| | | |
| | | #触发每小时任务重置脚本
|
| | | EventShell.EventResponse_OnHour(curPlayer)
|
| | | #缥缈仙域
|
| | | PlayerFairyDomain.OnHour(curPlayer)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | PyGameData.g_bossShuntLineState = eval(msgValue)
|
| | | return
|
| | |
|
| | | if key == ShareDefine.Def_Notify_WorldKey_FamilyKillHorsePetRobBossCnt:
|
| | | PyGameData.g_familyKillHorsePetRobBossCntDict = eval(msgValue)
|
| | | FamilyRobBoss.OnFamilyKillHorsePetRobBossCntChange(tick)
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_FBEnterTimeLimiitMapID:
|
| | | PyGameData.FBEnterTimeLimiitMapID = eval(msgValue)
|
| | | return
|
| | |
| | | PyGameData.VSFamilyInfo = eval(msgValue)
|
| | | return
|
| | |
|
| | | if key == ShareDefine.Def_Notify_WorldKey_FamilyPartyInfo:
|
| | | if GameWorld.GetMap().GetMapID() == ChConfig.Def_FBMapID_FamilyParty:
|
| | | PyGameData.g_familyPartyInfo = eval(msgValue)
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_FamilyPartyAddFamilyActivity:
|
| | | mapID, familyID, addFamilyActivity = eval(msgValue)
|
| | | if GameWorld.GetMap().GetMapID() == mapID:
|
| | | GameLogic_FamilyParty.DoAddFamilyMemberFamilyActivity(familyID, addFamilyActivity)
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_FamilyZhenfaInfo:
|
| | | PlayerFamilyZhenfa.GameServer_FamilyZhenfa(eval(msgValue))
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_AssistBoss:
|
| | | assistData = eval(msgValue)
|
| | | if GameWorld.GetMap().GetMapID() == assistData[0]:
|
| | | PlayerAssist.GameServer_AssistBossMsg(assistData[1:])
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_AddFamilyAuctionItem:
|
| | | mapID, familyAuctionItemDict = eval(msgValue)
|
| | | if GameWorld.GetMap().GetMapID() == mapID:
|
| | | PlayerAuctionHouse.DoAddFamilyAuctionItem(familyAuctionItemDict)
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_AddSystemAuctionItem:
|
| | | mapID, sysAuctionItemList = eval(msgValue)
|
| | | if GameWorld.GetMap().GetMapID() == mapID:
|
| | | PlayerAuctionHouse.DoAddSystemAuctionItem(sysAuctionItemList)
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_FairyDomainLimit:
|
| | | isAdd, limitList = eval(msgValue)
|
| | | if isAdd:
|
| | | PyGameData.g_fairyDomainLimit += limitList
|
| | | else:
|
| | | PyGameData.g_fairyDomainLimit = limitList
|
| | | return
|
| | |
|
| | | if key == ShareDefine.Def_Notify_WorldKey_CoupleInfo:
|
| | |
| | |
|
| | | elif actionName == ShareDefine.OperationActionName_FamilyCTGAssist:
|
| | | PlayerActFamilyCTGAssist.RefreshFamilyCTGAssistActionInfo(actNum)
|
| | | |
| | | elif actionName == ShareDefine.OperationActionName_FairyCeremony:
|
| | | PlayerFairyCeremony.RefreshOperationAction_FairyCeremony()
|
| | | |
| | | elif actionName == ShareDefine.OperationActionName_NewFairyCeremony:
|
| | | PlayerNewFairyCeremony.RefreshOperationAction_NewFairyCeremony()
|
| | |
|
| | | elif actionName == ShareDefine.OperationActionName_FlashSale:
|
| | | PlayerFlashSale.RefreshflashSaleActionInfo(actNum)
|
| | |
| | | PlayerLuckyCloudBuy.OnLuckyCloudBuyChange()
|
| | | return
|
| | |
|
| | | if key == ShareDefine.Def_Notify_WorldKey_CrossBattlefieldCallTeamInfo:
|
| | | PyGameData.g_crossBattlefieldCallTeamInfo = eval(msgValue)
|
| | | return
|
| | | |
| | | if key == ShareDefine.Def_Notify_WorldKey_CrossBattlefieldSysCallBuyInfo:
|
| | | PyGameData.g_crossBattlefieldSysCallBuyList = eval(msgValue)
|
| | | return
|
| | | |
| | | if msgValue.isdigit():
|
| | | value = int(msgValue)
|
| | | else:
|
| | |
| | | # 跨服PK
|
| | | elif key == ShareDefine.Def_Notify_WorldKey_CrossPKSeasonID:
|
| | | PlayerCrossRealmPK.OnCrossRealmPKSeasonChange(value)
|
| | | |
| | | # 守卫人皇
|
| | | elif key == ShareDefine.Def_Notify_WorldKey_FBFuncState % ChConfig.Def_FBMapID_FamilyInvade:
|
| | | if gameWorldMgr.GetGameWorldDictByKey(key) != value:
|
| | | GameLogic_FamilyInvade.OnFamilyInvadeStateChange(value, tick)
|
| | | # 上古战场
|
| | | elif key == ShareDefine.Def_Notify_WorldKey_FBFuncState % ChConfig.Def_FBMapID_ElderBattlefield:
|
| | | if gameWorldMgr.GetGameWorldDictByKey(key) != value:
|
| | | GameLogic_ElderBattlefield.OnElderBattlefieldStateChange(value, tick)
|
| | | # 多仙盟BOSS
|
| | | elif key in [ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyBoss1]:
|
| | | if gameWorldMgr.GetGameWorldDictByKey(key) != value:
|
| | | GameLogic_AllFamilyBoss.OnAllFamilyBossStateChange(value, tick)
|
| | | # 骑宠BOSS
|
| | | elif key == ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_HorsePetBoss:
|
| | | if gameWorldMgr.GetGameWorldDictByKey(key) != value:
|
| | | GameLogic_HorsePetBoss.OnHorsePetBossStateChange(value, tick)
|
| | | |
| | | |
| | | # 跨服妖魔boss
|
| | | elif key == ShareDefine.Def_Notify_WorldKey_CrossDailyActionState % ShareDefine.CrossDailyActionID_YaomoBoss:
|
| | | if gameWorldMgr.GetGameWorldDictByKey(key) != value:
|
| | | PlayerCrossYaomoBoss.OnYaomoBossStateChange(value, tick)
|
| | | |
| | | # 世界等级 |
| | | elif key == ShareDefine.Def_Notify_WorldKey_WorldAverageLv:
|
| | | if value and gameWorldMgr.GetGameWorldDictByKey(key) != value:
|
| | | gameWorldMgr.SetGameWorldDict(key, value) # 世界等级先更新再处理
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for index in xrange(playerManager.GetPlayerCount()):
|
| | | curPlayer = playerManager.GetPlayerByIndex(index)
|
| | | if not GameWorld.IsNormalPlayer(curPlayer):
|
| | | continue
|
| | | PlayerWorldAverageLv.UpdatePlayerWorldAverageLv(curPlayer)
|
| | |
|
| | | #通用设置
|
| | | befValue = gameWorldMgr.GetGameWorldDictByKey(key)
|
| | |
| | | #-------在设置了字典值以后处理---------------------------------
|
| | | # 刷新世界boss
|
| | | if key.startswith('GameWorldBossReborn_'):
|
| | | NPCCustomRefresh.ProcessAllNPCRefresh(tick)
|
| | | |
| | | # 王者仙盟
|
| | | elif key == ShareDefine.Def_Notify_WorldKey_ChampionFamilyID:
|
| | | GameLogic_FamilyWar.OnChampionFamilyIDChange()
|
| | | |
| | | # 仙盟宴会
|
| | | elif key == ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyParty:
|
| | | if befValue != value:
|
| | | GameLogic_FamilyParty.OnFamilyPartyStateChange(value, tick)
|
| | | |
| | | pass
|
| | | |
| | | #===============================================================================
|
| | | # ---修改为上述的 统一字典处理
|
| | | # if msg == ChConfig.Def_Notify_Key_PurTalk:
|
| | |
| | | gameWorldMgr.SetGameWorldDict(ShareDefine.Def_Notify_WorldKey_ReloadJpegCaptcha, value)
|
| | |
|
| | | IpyGameDataPY.IPYData.IpyDataClear()
|
| | | |
| | | #任务重读,需放在配置重读后面,暂时默认关闭,仅有需要重读任务时开启配置
|
| | | if IpyGameDataPY.GetFuncCfg("ReloadQuests", 1):
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | QuestManager.ReloadQuests(tick)
|
| | | EventShell.DoReloadRefresh()
|
| | | return
|
| | |
|
| | | #===============================================================================
|