9363 【BT5】【后端】新增魔化之地(跨服)
# Conflicts:
# ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
# ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
# ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
# ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
# ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
| | |
| | | BYTE _CopyMapID; //虚拟线路ID
|
| | | };
|
| | |
|
| | | //跨服Boss魔化之地分区地图表
|
| | |
|
| | | struct tagCrossDemonLandZoneMap
|
| | | {
|
| | | BYTE ZoneID; //分区ID
|
| | | DWORD _MapID; //场景地图ID
|
| | | DWORD _DataMapID; //数据地图ID
|
| | | BYTE _CopyMapID; //虚拟线路ID
|
| | | };
|
| | |
|
| | | //周狂欢活动时间表
|
| | |
|
| | | struct tagActWeekParty
|
| | |
| | | DWORD StoneNPCID; //墓碑NPCID
|
| | | BYTE CanAssist; //是否可协助
|
| | | BYTE SkillResist; //是否技能抵抗
|
| | | DWORD AtkLimitFightPower; //可攻击最低战力, 可配置超20E
|
| | | };
|
| | |
|
| | | //Boss首杀
|
| | |
| | | WORD PosY; //坐标Y
|
| | | };
|
| | |
|
| | | //跨服Boss魔化之地分区地图表
|
| | |
|
| | | struct tagCrossDemonLandZoneMap
|
| | | {
|
| | | BYTE ZoneID; //分区ID
|
| | | DWORD _MapID; //场景地图ID
|
| | | DWORD _DataMapID; //数据地图ID
|
| | | BYTE _CopyMapID; //虚拟线路ID
|
| | | WORD PosX; //坐标X
|
| | | WORD PosY; //坐标Y
|
| | | };
|
| | |
|
| | | //聚魂表
|
| | |
|
| | | struct tagGatherSoul
|
| | |
| | | Def_FBMapID_CrossRealmPK = 32010
|
| | | #跨服蓬莱仙境
|
| | | Def_FBMapID_CrossPenglai = 32020
|
| | | #跨服魔化之地
|
| | | Def_FBMapID_CrossDemonLand = 32080
|
| | | #跨服妖王
|
| | | Def_FBMapID_CrossDemonKing = 32030
|
| | | #本服妖王
|
| | |
| | | #需要刷世界BOSS的副本
|
| | | WorldBossFBMapIDList = [Def_FBMapID_SealDemon, Def_FBMapID_ZhuXianBoss, Def_FBMapID_DemonKing]
|
| | | #跨服地图
|
| | | Def_CrossMapIDList = [Def_FBMapID_CrossRealmPK, Def_FBMapID_CrossPenglai, Def_FBMapID_CrossDemonKing, Def_FBMapID_CrossGrasslandLing, Def_FBMapID_CrossGrasslandXian]
|
| | | Def_CrossMapIDList = [Def_FBMapID_CrossRealmPK, Def_FBMapID_CrossPenglai, Def_FBMapID_CrossDemonLand, Def_FBMapID_CrossDemonKing, Def_FBMapID_CrossGrasslandLing, Def_FBMapID_CrossGrasslandXian]
|
| | | #跨服分区类型配置, 没配置的默认 CrossZoneComm
|
| | | Def_CrossZoneTypeName = {0:"CrossZoneComm", # 特殊0,默认常规分区
|
| | | Def_FBMapID_CrossPenglai:"CrossZoneComm",
|
| | | Def_FBMapID_CrossDemonLand:"CrossZoneComm",
|
| | | Def_FBMapID_CrossRealmPK:"CrossZonePK",
|
| | | Def_FBMapID_CrossDemonKing:"CrossZonePK",
|
| | | Def_FBMapID_CrossGrasslandLing:"CrossZonePK",
|
| | |
| | | }
|
| | | #跨服分区对应地图配置表名 - 仅适用于固定地图及虚拟分线的跨服玩法
|
| | | Def_CrossZoneMapTableName = {Def_FBMapID_CrossPenglai:"CrossPenglaiZoneMap",
|
| | | Def_FBMapID_CrossDemonLand:"CrossDemonLandZoneMap",
|
| | | }
|
| | | #需要动态分配线路的跨服地图
|
| | | Def_CrossDynamicLineMap = [Def_FBMapID_CrossDemonKing, Def_FBMapID_CrossGrasslandLing, Def_FBMapID_CrossGrasslandXian]
|
| | |
| | | ("BYTE", "CopyMapID", 1),
|
| | | ),
|
| | |
|
| | | "CrossDemonLandZoneMap":(
|
| | | ("BYTE", "ZoneID", 0),
|
| | | ("DWORD", "MapID", 1),
|
| | | ("DWORD", "DataMapID", 1),
|
| | | ("BYTE", "CopyMapID", 1),
|
| | | ),
|
| | |
|
| | | "ActWeekParty":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "ActMark", 0),
|
| | |
| | | def GetDataMapID(self): return self.DataMapID # 数据地图ID
|
| | | def GetCopyMapID(self): return self.CopyMapID # 虚拟线路ID |
| | | |
| | | # 跨服Boss魔化之地分区地图表 |
| | | class IPY_CrossDemonLandZoneMap(): |
| | | |
| | | def __init__(self): |
| | | self.ZoneID = 0
|
| | | self.MapID = 0
|
| | | self.DataMapID = 0
|
| | | self.CopyMapID = 0 |
| | | return |
| | | |
| | | def GetZoneID(self): return self.ZoneID # 分区ID
|
| | | def GetMapID(self): return self.MapID # 场景地图ID
|
| | | def GetDataMapID(self): return self.DataMapID # 数据地图ID
|
| | | def GetCopyMapID(self): return self.CopyMapID # 虚拟线路ID |
| | | |
| | | # 周狂欢活动时间表 |
| | | class IPY_ActWeekParty(): |
| | | |
| | |
| | | self.ipyCrossRealmPKDanLen = len(self.ipyCrossRealmPKDanCache)
|
| | | self.ipyCrossPenglaiZoneMapCache = self.__LoadFileData("CrossPenglaiZoneMap", IPY_CrossPenglaiZoneMap)
|
| | | self.ipyCrossPenglaiZoneMapLen = len(self.ipyCrossPenglaiZoneMapCache)
|
| | | self.ipyCrossDemonLandZoneMapCache = self.__LoadFileData("CrossDemonLandZoneMap", IPY_CrossDemonLandZoneMap)
|
| | | self.ipyCrossDemonLandZoneMapLen = len(self.ipyCrossDemonLandZoneMapCache)
|
| | | self.ipyActWeekPartyCache = self.__LoadFileData("ActWeekParty", IPY_ActWeekParty)
|
| | | self.ipyActWeekPartyLen = len(self.ipyActWeekPartyCache)
|
| | | self.ipyActLoginAwardCache = self.__LoadFileData("ActLoginAward", IPY_ActLoginAward)
|
| | |
| | | def GetCrossRealmPKDanByIndex(self, index): return self.ipyCrossRealmPKDanCache[index]
|
| | | def GetCrossPenglaiZoneMapCount(self): return self.ipyCrossPenglaiZoneMapLen
|
| | | def GetCrossPenglaiZoneMapByIndex(self, index): return self.ipyCrossPenglaiZoneMapCache[index]
|
| | | def GetCrossDemonLandZoneMapCount(self): return self.ipyCrossDemonLandZoneMapLen
|
| | | def GetCrossDemonLandZoneMapByIndex(self, index): return self.ipyCrossDemonLandZoneMapCache[index]
|
| | | def GetActWeekPartyCount(self): return self.ipyActWeekPartyLen
|
| | | def GetActWeekPartyByIndex(self, index): return self.ipyActWeekPartyCache[index]
|
| | | def GetActLoginAwardCount(self): return self.ipyActLoginAwardLen
|
| | |
| | | DailyActionID_CrossPenglai, # 跨服蓬莱仙境Boss 28
|
| | | DailyActionID_FamilyChuanGong, # 仙盟传功 29
|
| | | DailyActionID_FamilyParty, # 仙盟宴会 30
|
| | | ) = range(1, 30 + 1)
|
| | | DailyActionID_31, # 活跃修炼 31
|
| | | DailyActionID_SkyTreasureBox, # 天降宝箱 32
|
| | | DailyActionID_Arena, # 竞技场 33
|
| | | DailyActionID_CrossDemonLand, # 跨服魔化之地Boss 34
|
| | | ) = range(1, 34 + 1)
|
| | |
|
| | |
|
| | |
|
| | |
| | | # % (npcID, npcDataEx.GetSuppressFightPower(), PlayerControl.GetFightPower(atkPlayer)))
|
| | | return False
|
| | |
|
| | | |
| | | bossIpyData = IpyGameDataPY.GetIpyGameDataNotLog('BOSSInfo', npcID)
|
| | | if bossIpyData:
|
| | | if bossIpyData.GetAtkLimitFightPower() > PlayerControl.GetFightPower(atkPlayer):
|
| | | if isNotify:
|
| | | PlayerControl.NotifyCode(atkPlayer, "BossFightPowerHint") |
| | | #GameWorld.DebugLog("战力不足,无法攻击boss! npcID=%s,AtkLimitFightPower=%s > playerFightPower=%s" |
| | | # % (npcID, bossIpyData.GetAtkLimitFightPower(), PlayerControl.GetFightPower(atkPlayer))) |
| | | return False
|
| | | |
| | | return True
|
| | |
|
| | |
|
| | |
| | | Def_FBMapID_CrossRealmPK = 32010
|
| | | #跨服蓬莱仙境
|
| | | Def_FBMapID_CrossPenglai = 32020
|
| | | #跨服魔化之地
|
| | | Def_FBMapID_CrossDemonLand = 32080
|
| | | #跨服妖王
|
| | | Def_FBMapID_CrossDemonKing = 32030
|
| | | #本服妖王
|
| | |
| | | ClientCustomScene = [Def_FBMapID_PersonalBoss, Def_FBMapID_ArenaBattle]
|
| | |
|
| | | #注册上传跨服服务器数据后直接进入跨服服务器的地图
|
| | | RegisterEnter_CrossServerMapIDList = [Def_FBMapID_CrossPenglai, Def_FBMapID_CrossDemonKing, Def_FBMapID_CrossGrasslandLing, Def_FBMapID_CrossGrasslandXian]
|
| | | RegisterEnter_CrossServerMapIDList = [Def_FBMapID_CrossPenglai, Def_FBMapID_CrossDemonLand, Def_FBMapID_CrossDemonKing, Def_FBMapID_CrossGrasslandLing, Def_FBMapID_CrossGrasslandXian]
|
| | | #跨服地图
|
| | | Def_CrossMapIDList = [Def_FBMapID_CrossRealmPK, Def_FBMapID_CrossPenglai, Def_FBMapID_CrossDemonKing, Def_FBMapID_CrossGrasslandLing, Def_FBMapID_CrossGrasslandXian]
|
| | | Def_CrossMapIDList = [Def_FBMapID_CrossRealmPK, Def_FBMapID_CrossPenglai, Def_FBMapID_CrossDemonLand, Def_FBMapID_CrossDemonKing, Def_FBMapID_CrossGrasslandLing, Def_FBMapID_CrossGrasslandXian]
|
| | | #跨服分区类型配置, 没配置的默认 CrossZoneComm
|
| | | Def_CrossZoneTypeName = {0:"CrossZoneComm", # 特殊0,默认常规分区
|
| | | Def_FBMapID_CrossPenglai:"CrossZoneComm",
|
| | | Def_FBMapID_CrossDemonLand:"CrossZoneComm",
|
| | | Def_FBMapID_CrossRealmPK:"CrossZonePK",
|
| | | Def_FBMapID_CrossDemonKing:"CrossZonePK",
|
| | | Def_FBMapID_CrossGrasslandLing:"CrossZonePK",
|
| | |
| | | }
|
| | | #跨服分区对应地图配置表名 - 仅适用于固定地图及虚拟分线的跨服玩法
|
| | | Def_CrossZoneMapTableName = {Def_FBMapID_CrossPenglai:"CrossPenglaiZoneMap",
|
| | | Def_FBMapID_CrossDemonLand:"CrossDemonLandZoneMap",
|
| | | }
|
| | | #需要动态分配线路的跨服地图
|
| | | Def_CrossDynamicLineMap = [Def_FBMapID_CrossDemonKing, Def_FBMapID_CrossGrasslandLing, Def_FBMapID_CrossGrasslandXian]
|
| | |
| | | import ChPlayer
|
| | | import PlayerControl
|
| | | import PlayerFB
|
| | | import CrossRealmPlayer
|
| | |
|
| | | ## GM命令执行入口
|
| | | # @param curPlayer 当前玩家
|
| | |
| | | def OnExec(curPlayer, paramList):
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | |
|
| | | if GameWorld.IsCrossServer():
|
| | | CrossRealmPlayer.PlayerExitCrossServer(curPlayer)
|
| | | return
|
| | | |
| | | if PlayerControl.GetCustomMapID(curPlayer):
|
| | | PlayerFB.DoExitCustomScene(curPlayer)
|
| | | return
|
| | |
| | | ("DWORD", "StoneNPCID", 0),
|
| | | ("BYTE", "CanAssist", 0),
|
| | | ("BYTE", "SkillResist", 0),
|
| | | ("DWORD", "AtkLimitFightPower", 0),
|
| | | ),
|
| | |
|
| | | "BOSSFirstKill":(
|
| | |
| | | ),
|
| | |
|
| | | "CrossPenglaiZoneMap":(
|
| | | ("BYTE", "ZoneID", 0),
|
| | | ("DWORD", "MapID", 1),
|
| | | ("DWORD", "DataMapID", 1),
|
| | | ("BYTE", "CopyMapID", 1),
|
| | | ("WORD", "PosX", 0),
|
| | | ("WORD", "PosY", 0),
|
| | | ),
|
| | |
|
| | | "CrossDemonLandZoneMap":(
|
| | | ("BYTE", "ZoneID", 0),
|
| | | ("DWORD", "MapID", 1),
|
| | | ("DWORD", "DataMapID", 1),
|
| | |
| | | self.StoneNPCID = 0
|
| | | self.CanAssist = 0
|
| | | self.SkillResist = 0 |
| | | self.AtkLimitFightPower = 0 |
| | | return |
| | | |
| | | def GetNPCID(self): return self.NPCID # ID
|
| | |
| | | def GetStoneNPCID(self): return self.StoneNPCID # 墓碑NPCID
|
| | | def GetCanAssist(self): return self.CanAssist # 是否可协助
|
| | | def GetSkillResist(self): return self.SkillResist # 是否技能抵抗 |
| | | def GetAtkLimitFightPower(self): return self.AtkLimitFightPower # 可攻击最低战力, 可配置超20E |
| | | |
| | | # Boss首杀 |
| | | class IPY_BOSSFirstKill(): |
| | |
| | | def GetPosX(self): return self.PosX # 坐标X
|
| | | def GetPosY(self): return self.PosY # 坐标Y |
| | | |
| | | # 跨服Boss魔化之地分区地图表 |
| | | class IPY_CrossDemonLandZoneMap(): |
| | | |
| | | def __init__(self): |
| | | self.ZoneID = 0
|
| | | self.MapID = 0
|
| | | self.DataMapID = 0
|
| | | self.CopyMapID = 0
|
| | | self.PosX = 0
|
| | | self.PosY = 0 |
| | | return |
| | | |
| | | def GetZoneID(self): return self.ZoneID # 分区ID
|
| | | def GetMapID(self): return self.MapID # 场景地图ID
|
| | | def GetDataMapID(self): return self.DataMapID # 数据地图ID
|
| | | def GetCopyMapID(self): return self.CopyMapID # 虚拟线路ID
|
| | | def GetPosX(self): return self.PosX # 坐标X
|
| | | def GetPosY(self): return self.PosY # 坐标Y |
| | | |
| | | # 聚魂表 |
| | | class IPY_GatherSoul(): |
| | | |
| | |
| | | self.ipyCrossZonePKLen = len(self.ipyCrossZonePKCache)
|
| | | self.ipyCrossPenglaiZoneMapCache = self.__LoadFileData("CrossPenglaiZoneMap", IPY_CrossPenglaiZoneMap)
|
| | | self.ipyCrossPenglaiZoneMapLen = len(self.ipyCrossPenglaiZoneMapCache)
|
| | | self.ipyCrossDemonLandZoneMapCache = self.__LoadFileData("CrossDemonLandZoneMap", IPY_CrossDemonLandZoneMap)
|
| | | self.ipyCrossDemonLandZoneMapLen = len(self.ipyCrossDemonLandZoneMapCache)
|
| | | self.ipyGatherSoulCache = self.__LoadFileData("GatherSoul", IPY_GatherSoul)
|
| | | self.ipyGatherSoulLen = len(self.ipyGatherSoulCache)
|
| | | self.ipyGatherSoulCompoundCache = self.__LoadFileData("GatherSoulCompound", IPY_GatherSoulCompound)
|
| | |
| | | def GetCrossZonePKByIndex(self, index): return self.ipyCrossZonePKCache[index]
|
| | | def GetCrossPenglaiZoneMapCount(self): return self.ipyCrossPenglaiZoneMapLen
|
| | | def GetCrossPenglaiZoneMapByIndex(self, index): return self.ipyCrossPenglaiZoneMapCache[index]
|
| | | def GetCrossDemonLandZoneMapCount(self): return self.ipyCrossDemonLandZoneMapLen
|
| | | def GetCrossDemonLandZoneMapByIndex(self, index): return self.ipyCrossDemonLandZoneMapCache[index]
|
| | | def GetGatherSoulCount(self): return self.ipyGatherSoulLen
|
| | | def GetGatherSoulByIndex(self, index): return self.ipyGatherSoulCache[index]
|
| | | def GetGatherSoulCompoundCount(self): return self.ipyGatherSoulCompoundLen
|
| | |
| | | if mapID == ChConfig.Def_FBMapID_CrossPenglai:
|
| | | #跨服蓬莱仙境
|
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_CrossPenglai)
|
| | | elif mapID == ChConfig.Def_FBMapID_CrossDemonLand:
|
| | | #跨服魔化之地
|
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_CrossDemonLand)
|
| | | |
| | | if mapID in [ChConfig.Def_FBMapID_CrossPenglai, ChConfig.Def_FBMapID_CrossDemonLand]:
|
| | | PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_CrossBoss)
|
| | | else:
|
| | | PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_KillBoss)
|
| | |
| | | if not costGold:
|
| | | return
|
| | |
|
| | | moneyType = IpyGameDataPY.GetFuncEvalCfg("KillBossCntLimit1", 4, {}).get(str(killBossMark), IPY_GameWorld.TYPE_Price_Gold_Money)
|
| | | infoDict = {"index":killBossMark, ChConfig.Def_Cost_Reason_SonKey:killBossMark}
|
| | | isOK = PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costGold, |
| | | ChConfig.Def_Cost_BuyKillBossCnt, infoDict)
|
| | | isOK = PlayerControl.PayMoney(curPlayer, moneyType, costGold, ChConfig.Def_Cost_BuyKillBossCnt, infoDict)
|
| | |
|
| | | if not isOK:
|
| | | return
|
| | |
| | | DailyActionID_CrossPenglai, # 跨服蓬莱仙境Boss 28
|
| | | DailyActionID_FamilyChuanGong, # 仙盟传功 29
|
| | | DailyActionID_FamilyParty, # 仙盟宴会 30
|
| | | ) = range(1, 30 + 1)
|
| | | DailyActionID_31, # 活跃修炼 31
|
| | | DailyActionID_SkyTreasureBox, # 天降宝箱 32
|
| | | DailyActionID_Arena, # 竞技场 33
|
| | | DailyActionID_CrossDemonLand, # 跨服魔化之地Boss 34
|
| | | ) = range(1, 34 + 1)
|
| | |
|
| | |
|
| | |
|