From 39e1fcf5f17a36b32c0964ebc09035d4d6a173c3 Mon Sep 17 00:00:00 2001 From: Estrayl Date: Thu, 14 Nov 2024 00:54:39 +0100 Subject: [PATCH] Birthday event 2024 --- .../panesterra/PanesterraEntryCorridorAI.java | 23 +- .../static_data/bounties/kill_bounties.xml | 92 +- .../static_data/chests/chest_templates.xml | 3 + .../static_data/custom_drop/custom_drop.xml | 59 +- .../events/timed_events/custom_events.xml | 1306 +++++++++++------ .../spawns/Sieges/400020000_Belus.xml | 215 +-- .../panesterra/PanesterraService.java | 35 + .../services/player/PlayerReviveService.java | 9 +- 8 files changed, 1086 insertions(+), 656 deletions(-) diff --git a/game-server/data/handlers/ai/worlds/panesterra/PanesterraEntryCorridorAI.java b/game-server/data/handlers/ai/worlds/panesterra/PanesterraEntryCorridorAI.java index f104d800a..b595e5539 100644 --- a/game-server/data/handlers/ai/worlds/panesterra/PanesterraEntryCorridorAI.java +++ b/game-server/data/handlers/ai/worlds/panesterra/PanesterraEntryCorridorAI.java @@ -4,7 +4,6 @@ import java.util.stream.Stream; -import com.aionemu.commons.utils.Rnd; import com.aionemu.gameserver.ai.AIName; import com.aionemu.gameserver.model.gameobjects.Npc; import com.aionemu.gameserver.model.gameobjects.player.Player; @@ -14,9 +13,7 @@ import com.aionemu.gameserver.services.event.EventService; import com.aionemu.gameserver.services.panesterra.PanesterraService; import com.aionemu.gameserver.services.panesterra.ahserion.PanesterraFaction; -import com.aionemu.gameserver.services.teleport.TeleportService; import com.aionemu.gameserver.utils.PacketSendUtility; -import com.aionemu.gameserver.world.WorldPosition; import ai.GeneralNpcAI; @@ -48,7 +45,7 @@ protected void handleSpawned() { public boolean onDialogSelect(Player player, int dialogActionId, int questId, int extendedRewardIndex) { if (dialogActionId == SETPRO1 && canTeleport(player)) { // teleportToFortress(player); - teleportToEventLocation(player); + PanesterraService.getInstance().teleportToEventLocation(player); } return true; } @@ -80,22 +77,4 @@ private void teleportToFortress(Player player) { // TODO player.setPanesterraFaction(PanesterraFaction.getByFortressId(relatedFortressId)); } - - private void teleportToEventLocation(Player player) { - switch (player.getRace()) { - case ELYOS -> { - // North + South - WorldPosition pos = Rnd.nextBoolean() ? new WorldPosition(400020000, 11.173f, 1024.187f, 1428.60f, (byte) 0) - : new WorldPosition(400020000, 2037.754f, 1023.808f, 1428.60f, (byte) 0); - TeleportService.teleportTo(player, pos); - } - case ASMODIANS -> { - // West + East - WorldPosition pos = Rnd.nextBoolean() ? new WorldPosition(400020000, 1023.702f, 10.531f, 1428.60f, (byte) 90) - : new WorldPosition(400020000, 1024.310f, 2036.593f, 1428.60f, (byte) 90); - TeleportService.teleportTo(player, pos); - } - } - PanesterraService.getInstance().onEnterPanesterra(player); - } } diff --git a/game-server/data/static_data/bounties/kill_bounties.xml b/game-server/data/static_data/bounties/kill_bounties.xml index 9a1dedc06..d6284bb86 100644 --- a/game-server/data/static_data/bounties/kill_bounties.xml +++ b/game-server/data/static_data/bounties/kill_bounties.xml @@ -91,96 +91,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/game-server/data/static_data/chests/chest_templates.xml b/game-server/data/static_data/chests/chest_templates.xml index 3823a78e5..416650cb2 100644 --- a/game-server/data/static_data/chests/chest_templates.xml +++ b/game-server/data/static_data/chests/chest_templates.xml @@ -592,6 +592,9 @@ + + + diff --git a/game-server/data/static_data/custom_drop/custom_drop.xml b/game-server/data/static_data/custom_drop/custom_drop.xml index 385e73d01..b9e738393 100644 --- a/game-server/data/static_data/custom_drop/custom_drop.xml +++ b/game-server/data/static_data/custom_drop/custom_drop.xml @@ -5457,7 +5457,7 @@ - + @@ -5468,34 +5468,77 @@ - - + + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/game-server/data/static_data/events/timed_events/custom_events.xml b/game-server/data/static_data/events/timed_events/custom_events.xml index d19a44499..0f117143a 100644 --- a/game-server/data/static_data/events/timed_events/custom_events.xml +++ b/game-server/data/static_data/events/timed_events/custom_events.xml @@ -1226,43 +1226,43 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1982,784 +1982,784 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -3046,7 +3046,7 @@ - + @@ -3062,7 +3062,275 @@ - + + + gameserver.event.headhunting.enable = true + gameserver.event.headhunting.maps = 210050000, 220070000, 301220000, 400020000, 600090000, 600100000 + gameserver.event.headhunting.consolation_prize_kills = 99999 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3070,6 +3338,10 @@ + + + + @@ -3077,161 +3349,337 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/game-server/data/static_data/spawns/Sieges/400020000_Belus.xml b/game-server/data/static_data/spawns/Sieges/400020000_Belus.xml index ca6f7133e..9e9b6917f 100644 --- a/game-server/data/static_data/spawns/Sieges/400020000_Belus.xml +++ b/game-server/data/static_data/spawns/Sieges/400020000_Belus.xml @@ -935,119 +935,124 @@ - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + diff --git a/game-server/src/com/aionemu/gameserver/services/panesterra/PanesterraService.java b/game-server/src/com/aionemu/gameserver/services/panesterra/PanesterraService.java index 00f1086d8..74fa447e7 100644 --- a/game-server/src/com/aionemu/gameserver/services/panesterra/PanesterraService.java +++ b/game-server/src/com/aionemu/gameserver/services/panesterra/PanesterraService.java @@ -4,6 +4,9 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Stream; +import com.aionemu.commons.utils.Rnd; +import com.aionemu.gameserver.world.WorldPosition; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -273,6 +276,38 @@ public int getTeamMemberCount(PanesterraFaction faction) { public PanesterraTeam getTeam(PanesterraFaction faction) { return activeFactionTeams.get(faction); } + + // TODO: Event START + public boolean reviveInEventLocation(Player player) { + if (!WorldMapType.isPanesterraMap(player.getWorldId())) + return false; + + teleportToEventLocation(player); + return true; + } + + public void teleportToEventLocation(Player player) { + teleport(player); + PanesterraService.getInstance().onEnterPanesterra(player); + } + + private void teleport(Player player) { + switch (player.getRace()) { + case ELYOS -> { + // North + South + WorldPosition pos = Rnd.nextBoolean() ? new WorldPosition(400020000, 11.173f, 1024.187f, 1428.60f, (byte) 0) + : new WorldPosition(400020000, 2037.754f, 1023.808f, 1428.60f, (byte) 0); + TeleportService.teleportTo(player, pos); + } + case ASMODIANS -> { + // West + East + WorldPosition pos = Rnd.nextBoolean() ? new WorldPosition(400020000, 1023.702f, 10.531f, 1428.60f, (byte) 90) + : new WorldPosition(400020000, 1024.310f, 2036.593f, 1428.60f, (byte) 90); + TeleportService.teleportTo(player, pos); + } + } + } + // TODO: Event END public static PanesterraService getInstance() { return SingletonHolder.INSTANCE; diff --git a/game-server/src/com/aionemu/gameserver/services/player/PlayerReviveService.java b/game-server/src/com/aionemu/gameserver/services/player/PlayerReviveService.java index 24edbebca..4b845755d 100644 --- a/game-server/src/com/aionemu/gameserver/services/player/PlayerReviveService.java +++ b/game-server/src/com/aionemu/gameserver/services/player/PlayerReviveService.java @@ -1,5 +1,9 @@ package com.aionemu.gameserver.services.player; +import com.aionemu.gameserver.services.panesterra.PanesterraService; + +import com.aionemu.gameserver.world.WorldMapType; + import org.slf4j.LoggerFactory; import com.aionemu.gameserver.configs.administration.AdminConfig; @@ -113,7 +117,10 @@ public static void bindRevive(Player player, int skillId) { TeleportService.teleportToPrison(player); } else if (player.isInCustomState(CustomPlayerState.EVENT_MODE)) { TeleportService.teleportToEvent(player); - } else if (player.getWorldId() != 400030000 || !AhserionRaid.getInstance().teleportToTeamStartPosition(player)) { + } else if (WorldMapType.getWorld(player.getWorldId()) == WorldMapType.BELUS) { + PanesterraService.getInstance().teleportToEventLocation(player); + } else if (player.getWorldId() != 400030000 || !AhserionRaid.getInstance().teleportToTeamStartPosition(player) + || !PanesterraService.getInstance().reviveInEventLocation(player)) { WorldPosition resPos = null; for (VortexLocation loc : VortexService.getInstance().getVortexLocations().values()) { if (loc.isInsideActiveVotrex(player) && player.getRace().equals(loc.getInvadersRace())) {