From 4114fee07ca4cf74e083d51b358458abd50bc329 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 23 May 2018 13:28:18 +0000 Subject: [PATCH] Addition of Movie enum. --- .../scripts/ai/areas/Gracia/AI/Lindvior.java | 5 +- .../HeartInfinityAttack.java | 8 +- .../SeedOfDestruction/SeedOfDestruction.java | 5 +- .../Gracia/vehicles/AirShipController.java | 13 +-- .../KeucereusNorthController.java | 3 +- .../KeucereusSouthController.java | 3 +- .../vehicles/SoDController/SoDController.java | 3 +- .../vehicles/SoIController/SoIController.java | 3 +- .../IceQueensCastle/IceQueensCastle.java | 3 +- .../IceQueensCastleBattle.java | 25 +++--- .../SSQDisciplesNecropolisPast.java | 5 +- .../SSQMonasteryOfSilence.java | 11 +-- .../SSQSanctumOfTheLordsOfDawn.java | 3 +- .../Q00192_SevenSignsSeriesOfDoubt.java | 3 +- .../Q00193_SevenSignsDyingMessage.java | 3 +- .../Q00194_SevenSignsMammonsContract.java | 3 +- .../Q00198_SevenSignsEmbryo.java | 3 +- ...294_SevenSignsToTheMonasteryOfSilence.java | 9 +- .../com/l2jmobius/gameserver/enums/Movie.java | 85 +++++++++++++++++++ .../model/actor/instance/L2PcInstance.java | 40 ++++++--- .../model/events/AbstractScript.java | 47 ++++++++++ .../gameserver/model/holders/MovieHolder.java | 49 +++++++++++ .../network/clientpackets/EndScenePlayer.java | 13 +-- .../serverpackets/ExStartScenePlayer.java | 10 ++- 24 files changed, 279 insertions(+), 76 deletions(-) create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/enums/Movie.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/holders/MovieHolder.java diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/AI/Lindvior.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/AI/Lindvior.java index bf4ef6c58e..545f253f10 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/AI/Lindvior.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/AI/Lindvior.java @@ -21,6 +21,7 @@ import java.util.GregorianCalendar; import com.l2jmobius.gameserver.datatables.SpawnTable; import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -38,8 +39,6 @@ public class Lindvior extends AbstractNpcAI private static final int TOMARIS = 32552; private static final int ARTIUS = 32559; - private static int LINDVIOR_SCENE_ID = 1; - private static final int RESET_HOUR = 18; private static final int RESET_MIN = 58; private static final int RESET_DAY_1 = Calendar.TUESDAY; @@ -85,7 +84,7 @@ public class Lindvior extends AbstractNpcAI { if ((pl.getZ() >= 1100) && (pl.getZ() <= 3100)) { - pl.showQuestMovie(LINDVIOR_SCENE_ID); + playMovie(pl, Movie.SC_LINDVIOR); } }); } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityAttack/HeartInfinityAttack.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityAttack/HeartInfinityAttack.java index 5ed250d62c..21d7e2538d 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityAttack/HeartInfinityAttack.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityAttack/HeartInfinityAttack.java @@ -27,6 +27,7 @@ import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.ai.CtrlIntention; import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.instancemanager.SoIManager; import com.l2jmobius.gameserver.instancemanager.ZoneManager; @@ -352,12 +353,7 @@ public class HeartInfinityAttack extends AbstractNpcAI conquestBegun = true; ThreadPool.schedule(() -> { - for (int objId : world.getAllowed()) - { - final L2PcInstance player = L2World.getInstance().getPlayer(objId); - player.showQuestMovie(2); // ExStartScenePlayer.SCENE_ECHMUS_OPENING - } - + playMovie(world, Movie.SC_ECHMUS_OPENING); ThreadPool.schedule(() -> conquestBegins(world), 62500); }, 20000); } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/SeedOfDestruction/SeedOfDestruction.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/SeedOfDestruction/SeedOfDestruction.java index 9af7a381f6..6b98dbe77a 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/SeedOfDestruction/SeedOfDestruction.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/SeedOfDestruction/SeedOfDestruction.java @@ -27,6 +27,7 @@ import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.commons.util.Rnd; import com.l2jmobius.gameserver.ai.CtrlIntention; import com.l2jmobius.gameserver.data.xml.impl.SkillData; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.instancemanager.SoDManager; import com.l2jmobius.gameserver.model.L2CommandChannel; @@ -1486,7 +1487,7 @@ public class SeedOfDestruction extends AbstractNpcAI continue; } SetMovieMode(plr, true); - plr.showQuestMovie(6); + playMovie(plr, Movie.SC_BOSS_TIAT_ENDING_SUCCES); } Delete(npc); for (L2Npc mob : InstanceManager.getInstance().getInstance(world.getInstanceId()).getNpcs()) @@ -1708,7 +1709,7 @@ public class SeedOfDestruction extends AbstractNpcAI continue; } SetMovieMode(player, true); - player.showQuestMovie(5); + playMovie(player, Movie.SC_BOSS_TIAT_OPENING); world.ZoneWaitForTP = false; } } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/AirShipController.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/AirShipController.java index 87e7481878..198e0c633f 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/AirShipController.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/AirShipController.java @@ -22,6 +22,7 @@ import java.util.logging.Logger; import com.l2jmobius.commons.concurrent.ThreadPool; import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.instancemanager.AirShipManager; import com.l2jmobius.gameserver.instancemanager.ZoneManager; import com.l2jmobius.gameserver.model.ClanPrivilege; @@ -92,7 +93,7 @@ public abstract class AirShipController extends AbstractNpcAI protected int[] _fuelTable = null; - protected int _movieId = 0; + protected Movie _movie = null; protected boolean _isBusy = false; protected L2ControllableAirShipInstance _dockedShip = null; @@ -296,15 +297,9 @@ public abstract class AirShipController extends AbstractNpcAI // Ship is not empty - display movie to passengers and dock if (!_dockedShip.isEmpty()) { - if (_movieId != 0) + if (_movie != null) { - for (L2PcInstance passenger : _dockedShip.getPassengers()) - { - if (passenger != null) - { - passenger.showQuestMovie(_movieId); - } - } + playMovie(_dockedShip.getPassengers(), _movie); } ThreadPool.schedule(_decayTask, 1000); diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/KeucereusNorthController/KeucereusNorthController.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/KeucereusNorthController/KeucereusNorthController.java index 95d6dfc514..5ef81fe89e 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/KeucereusNorthController/KeucereusNorthController.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/KeucereusNorthController/KeucereusNorthController.java @@ -16,6 +16,7 @@ */ package ai.areas.Gracia.vehicles.KeucereusNorthController; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.VehiclePathPoint; @@ -87,7 +88,7 @@ public final class KeucereusNorthController extends AirShipController _teleportsTable = TELEPORTS; _fuelTable = FUEL; - _movieId = 1001; + _movie = Movie.LAND_KSERTH_B; validityCheck(); } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/KeucereusSouthController/KeucereusSouthController.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/KeucereusSouthController/KeucereusSouthController.java index ccbe2c7b0c..f2a857d659 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/KeucereusSouthController/KeucereusSouthController.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/KeucereusSouthController/KeucereusSouthController.java @@ -16,6 +16,7 @@ */ package ai.areas.Gracia.vehicles.KeucereusSouthController; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.VehiclePathPoint; @@ -87,7 +88,7 @@ public final class KeucereusSouthController extends AirShipController _oustLoc = new Location(-186148, 246296, 1360); - _movieId = 1000; + _movie = Movie.LAND_KSERTH_A; validityCheck(); } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/SoDController/SoDController.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/SoDController/SoDController.java index ab9981dbc6..c5962f1906 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/SoDController/SoDController.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/SoDController/SoDController.java @@ -16,6 +16,7 @@ */ package ai.areas.Gracia.vehicles.SoDController; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.VehiclePathPoint; @@ -77,7 +78,7 @@ public final class SoDController extends AirShipController _teleportsTable = TELEPORTS; _fuelTable = FUEL; - _movieId = 1003; + _movie = Movie.LAND_DISTRUCTION_A; validityCheck(); } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/SoIController/SoIController.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/SoIController/SoIController.java index 797dcaf3fc..a59960139a 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/SoIController/SoIController.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/vehicles/SoIController/SoIController.java @@ -16,6 +16,7 @@ */ package ai.areas.Gracia.vehicles.SoIController; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.VehiclePathPoint; @@ -81,7 +82,7 @@ public final class SoIController extends AirShipController _teleportsTable = TELEPORTS; _fuelTable = FUEL; - _movieId = 1002; + _movie = Movie.LAND_UNDEAD_A; validityCheck(); } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/IceQueensCastle/IceQueensCastle.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/IceQueensCastle/IceQueensCastle.java index b3e96ed491..1056ab19de 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/IceQueensCastle/IceQueensCastle.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/IceQueensCastle/IceQueensCastle.java @@ -18,6 +18,7 @@ package instances.IceQueensCastle; import com.l2jmobius.gameserver.ai.CtrlIntention; import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; @@ -107,7 +108,7 @@ public final class IceQueensCastle extends AbstractInstance { if (npc != null) { - player.showQuestMovie(21); + playMovie(player, Movie.SC_BOSS_FREYA_FORCED_DEFEAT); npc.deleteMe(); startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player); } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/IceQueensCastleBattle/IceQueensCastleBattle.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/IceQueensCastleBattle/IceQueensCastleBattle.java index db22f30f8e..4d87d0d73c 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/IceQueensCastleBattle/IceQueensCastleBattle.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/IceQueensCastleBattle/IceQueensCastleBattle.java @@ -23,6 +23,7 @@ import java.util.List; import com.l2jmobius.gameserver.ai.CtrlIntention; import com.l2jmobius.gameserver.enums.ChatType; import com.l2jmobius.gameserver.enums.MountType; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.model.L2CommandChannel; import com.l2jmobius.gameserver.model.L2Party; @@ -245,7 +246,7 @@ public final class IceQueensCastleBattle extends AbstractInstance } world.getNpc(SUPP_KEGOR).deleteMe(); freya.decayMe(); - manageMovie(world, 20); + manageMovie(world, Movie.SC_BOSS_FREYA_ENDING_B); cancelQuestTimer("FINISH_WORLD", controller, null); startQuestTimer("FINISH_WORLD", 58500, controller, null); break; @@ -258,7 +259,7 @@ public final class IceQueensCastleBattle extends AbstractInstance { world.closeDoor(DOOR_ID); world.setStatus(1); - manageMovie(world, 15); + manageMovie(world, Movie.SC_BOSS_FREYA_OPENING); startQuestTimer("STAGE_1_START", 53500, controller, null); break; } @@ -285,7 +286,7 @@ public final class IceQueensCastleBattle extends AbstractInstance world.setParameter("freya", null); freya.deleteMe(); manageDespawnMinions(world); - manageMovie(world, 16); + manageMovie(world, Movie.SC_BOSS_FREYA_PHASECH_A); startQuestTimer("STAGE_1_PAUSE", 24100 - 1000, controller, null); } break; @@ -317,7 +318,7 @@ public final class IceQueensCastleBattle extends AbstractInstance } case "STAGE_2_MOVIE": { - manageMovie(world, 23); + manageMovie(world, Movie.SC_ICE_HEAVYKNIGHT_SPAWN); startQuestTimer("STAGE_2_GLAKIAS", 7000, controller, null); break; } @@ -344,7 +345,7 @@ public final class IceQueensCastleBattle extends AbstractInstance } case "STAGE_2_FAILED": { - manageMovie(world, 22); + manageMovie(world, Movie.SC_BOSS_FREYA_DEFEAT); startQuestTimer("STAGE_2_FAILED2", 22000, npc, null); break; } @@ -355,7 +356,7 @@ public final class IceQueensCastleBattle extends AbstractInstance } case "STAGE_3_MOVIE": { - manageMovie(world, 17); + manageMovie(world, Movie.SC_BOSS_FREYA_PHASECH_B); startQuestTimer("STAGE_3_START", 21500, controller, null); break; } @@ -874,7 +875,7 @@ public final class IceQueensCastleBattle extends AbstractInstance players.setIsInvul(true); players.abortAttack(); } - manageMovie(world, 18); + manageMovie(world, Movie.SC_BOSS_KEGOR_INTRUSION); startQuestTimer("SPAWN_SUPPORT", 27000, controller, null); } @@ -1133,7 +1134,7 @@ public final class IceQueensCastleBattle extends AbstractInstance case FREYA_STAND_HARD: { world.setParameter("isSupportActive", false); - manageMovie(world, 19); + manageMovie(world, Movie.SC_BOSS_FREYA_ENDING_A); manageDespawnMinions(world); finishInstance(world); DecayTaskManager.getInstance().cancel(npc); @@ -1368,13 +1369,13 @@ public final class IceQueensCastleBattle extends AbstractInstance } } - private void manageMovie(InstanceWorld world, int movie) + private void manageMovie(InstanceWorld world, Movie movie) { - for (L2PcInstance players : world.getParameters().getList("playersInside", L2PcInstance.class)) + for (L2PcInstance player : world.getParameters().getList("playersInside", L2PcInstance.class)) { - if ((players != null) && (players.getInstanceId() == world.getInstanceId())) + if ((player != null) && (player.getInstanceId() == world.getInstanceId())) { - players.showQuestMovie(movie); + playMovie(player, movie); } } } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQDisciplesNecropolisPast/SSQDisciplesNecropolisPast.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQDisciplesNecropolisPast/SSQDisciplesNecropolisPast.java index a265774189..0a63681c89 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQDisciplesNecropolisPast/SSQDisciplesNecropolisPast.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQDisciplesNecropolisPast/SSQDisciplesNecropolisPast.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.actor.L2Npc; @@ -205,7 +206,7 @@ public final class SSQDisciplesNecropolisPast extends AbstractInstance { if (getQuestItemsCount(player, SEAL_OF_BINDING) >= 4) { - player.showQuestMovie(13); + playMovie(player, Movie.SSQ_SEALING_EMPEROR_2ND); startQuestTimer("TELEPORT", 27000, null, player); } break; @@ -458,7 +459,7 @@ public final class SSQDisciplesNecropolisPast extends AbstractInstance if (world != null) { world.openDoor(DISCIPLES_NECROPOLIS_DOOR); - talker.showQuestMovie(12); + playMovie(talker, Movie.SSQ_SEALING_EMPEROR_1ST); startQuestTimer("FIGHT", 1000, null, talker); } } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQMonasteryOfSilence/SSQMonasteryOfSilence.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQMonasteryOfSilence/SSQMonasteryOfSilence.java index 1ff03f2b51..fe4f22b654 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQMonasteryOfSilence/SSQMonasteryOfSilence.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQMonasteryOfSilence/SSQMonasteryOfSilence.java @@ -18,6 +18,7 @@ package instances.SSQMonasteryOfSilence; import com.l2jmobius.gameserver.ai.CtrlIntention; import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.actor.L2Attackable; @@ -220,7 +221,7 @@ public final class SSQMonasteryOfSilence extends AbstractInstance } case "START_MOVIE": { - player.showQuestMovie(24); + playMovie(player, Movie.SSQ2_HOLY_BURIAL_GROUND_OPENING); break; } case "BACK": @@ -294,7 +295,7 @@ public final class SSQMonasteryOfSilence extends AbstractInstance } case "START_MOVIE_Q10295": { - player.showQuestMovie(26); + playMovie(player, Movie.SSQ2_SOLINA_TOMB_OPENING); break; } case "CASKET_ROOM": @@ -427,7 +428,7 @@ public final class SSQMonasteryOfSilence extends AbstractInstance } case "START_MOVIE_Q10296": { - player.showQuestMovie(29); + playMovie(player, Movie.SSQ2_BOSS_OPENING); startQuestTimer("TELEPORT_SPACE", 60000, npc, player); world.getParameters().getObject("elcadia", L2Npc.class).teleToLocation(ELCADIA_LOC, world.getInstanceId(), 0); break; @@ -484,7 +485,7 @@ public final class SSQMonasteryOfSilence extends AbstractInstance world.setParameter("deadSolinaGuardianCount", deadSolinaGuardianCount); if (deadSolinaGuardianCount == 4) { - player.showQuestMovie(27); + playMovie(player, Movie.SSQ2_SOLINA_TOMB_CLOSING); final QuestState st = player.getQuestState(Q10295_SevenSignsSolinasTomb.class.getSimpleName()); if ((st != null) && st.isMemoState(1)) { @@ -495,7 +496,7 @@ public final class SSQMonasteryOfSilence extends AbstractInstance } case ETIS_VAN_ETINA: { - player.showQuestMovie(30); + playMovie(player, Movie.SSQ2_BOSS_CLOSING); world.getParameters().getObject("elcadia", L2Npc.class).teleToLocation(ELCADIA_LOC, world.getInstanceId(), 0); startQuestTimer("TELEPORT_TO_PLAYER", 63000, npc, player); final QuestState st = player.getQuestState(Q10296_SevenSignsOneWhoSeeksThePowerOfTheSeal.class.getSimpleName()); diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQSanctumOfTheLordsOfDawn/SSQSanctumOfTheLordsOfDawn.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQSanctumOfTheLordsOfDawn/SSQSanctumOfTheLordsOfDawn.java index b1842bb8a5..723e2abbff 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQSanctumOfTheLordsOfDawn/SSQSanctumOfTheLordsOfDawn.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/instances/SSQSanctumOfTheLordsOfDawn/SSQSanctumOfTheLordsOfDawn.java @@ -17,6 +17,7 @@ package instances.SSQSanctumOfTheLordsOfDawn; import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.instancemanager.InstanceManager; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; @@ -220,7 +221,7 @@ public final class SSQSanctumOfTheLordsOfDawn extends AbstractInstance final L2PcInstance pl = L2World.getInstance().getPlayer(objId); if (pl != null) { - pl.showQuestMovie(11); + playMovie(pl, Movie.SSQ_RITUAL_OF_PRIEST); startQuestTimer("spawn", 35000, null, talker); } } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00192_SevenSignsSeriesOfDoubt/Q00192_SevenSignsSeriesOfDoubt.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00192_SevenSignsSeriesOfDoubt/Q00192_SevenSignsSeriesOfDoubt.java index afe572f61f..ec5527df8e 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00192_SevenSignsSeriesOfDoubt/Q00192_SevenSignsSeriesOfDoubt.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00192_SevenSignsSeriesOfDoubt/Q00192_SevenSignsSeriesOfDoubt.java @@ -16,6 +16,7 @@ */ package quests.Q00192_SevenSignsSeriesOfDoubt; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.quest.Quest; @@ -77,7 +78,7 @@ public final class Q00192_SevenSignsSeriesOfDoubt extends Quest if (qs.isCond(1)) { qs.setCond(2, true); - player.showQuestMovie(8); + playMovie(player, Movie.SSQ_SUSPICIOUS_DEATHS); startQuestTimer("back", 32000, npc, player); return ""; } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00193_SevenSignsDyingMessage/Q00193_SevenSignsDyingMessage.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00193_SevenSignsDyingMessage/Q00193_SevenSignsDyingMessage.java index d1a0303b2b..5a7b05b532 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00193_SevenSignsDyingMessage/Q00193_SevenSignsDyingMessage.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00193_SevenSignsDyingMessage/Q00193_SevenSignsDyingMessage.java @@ -18,6 +18,7 @@ package quests.Q00193_SevenSignsDyingMessage; import com.l2jmobius.gameserver.ai.CtrlIntention; import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.enums.QuestSound; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; @@ -118,7 +119,7 @@ public final class Q00193_SevenSignsDyingMessage extends Quest { takeItems(player, DEADMANS_HERB, -1); qs.setCond(4, true); - player.showQuestMovie(9); + playMovie(player, Movie.SSQ_DYING_MASSAGE); return ""; } break; diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00194_SevenSignsMammonsContract/Q00194_SevenSignsMammonsContract.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00194_SevenSignsMammonsContract/Q00194_SevenSignsMammonsContract.java index 97ad563f13..c604f36b74 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00194_SevenSignsMammonsContract/Q00194_SevenSignsMammonsContract.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00194_SevenSignsMammonsContract/Q00194_SevenSignsMammonsContract.java @@ -16,6 +16,7 @@ */ package quests.Q00194_SevenSignsMammonsContract; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.enums.QuestSound; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -99,7 +100,7 @@ public final class Q00194_SevenSignsMammonsContract extends Quest if (qs.isCond(1)) { qs.setCond(2, true); - player.showQuestMovie(10); + playMovie(player, Movie.SSQ_CONTRACT_OF_MAMMON); return ""; } break; diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00198_SevenSignsEmbryo/Q00198_SevenSignsEmbryo.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00198_SevenSignsEmbryo/Q00198_SevenSignsEmbryo.java index 6f74088572..d9956c1320 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00198_SevenSignsEmbryo/Q00198_SevenSignsEmbryo.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00198_SevenSignsEmbryo/Q00198_SevenSignsEmbryo.java @@ -18,6 +18,7 @@ package quests.Q00198_SevenSignsEmbryo; import com.l2jmobius.gameserver.ai.CtrlIntention; import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -182,7 +183,7 @@ public final class Q00198_SevenSignsEmbryo extends Quest cancelQuestTimers("heal"); npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.S1_YOU_MAY_HAVE_WON_THIS_TIME_BUT_NEXT_TIME_I_WILL_SURELY_CAPTURE_YOU).addStringParameter(partyMember.getName())); npc.deleteMe(); - partyMember.showQuestMovie(14); + playMovie(partyMember, Movie.SSQ_EMBRYO); return super.onKill(npc, player, isSummon); } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java index a55d55ff13..2fc88dd8b8 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q10294_SevenSignsToTheMonasteryOfSilence/Q10294_SevenSignsToTheMonasteryOfSilence.java @@ -16,6 +16,7 @@ */ package quests.Q10294_SevenSignsToTheMonasteryOfSilence; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.holders.SkillHolder; @@ -213,7 +214,7 @@ public final class Q10294_SevenSignsToTheMonasteryOfSilence extends Quest htmltext = "32821-02.html"; if (hasCheckedAllRightBooks(qs)) { - player.showQuestMovie(25); + playMovie(player, Movie.SSQ2_HOLY_BURIAL_GROUND_CLOSING); } break; } @@ -226,7 +227,7 @@ public final class Q10294_SevenSignsToTheMonasteryOfSilence extends Quest htmltext = "32821-02.html"; if (hasCheckedAllRightBooks(qs)) { - player.showQuestMovie(25); + playMovie(player, Movie.SSQ2_HOLY_BURIAL_GROUND_CLOSING); } break; } @@ -240,7 +241,7 @@ public final class Q10294_SevenSignsToTheMonasteryOfSilence extends Quest htmltext = "32821-02.html"; if (hasCheckedAllRightBooks(qs)) { - player.showQuestMovie(25); + playMovie(player, Movie.SSQ2_HOLY_BURIAL_GROUND_CLOSING); } break; } @@ -254,7 +255,7 @@ public final class Q10294_SevenSignsToTheMonasteryOfSilence extends Quest htmltext = "32821-02.html"; if (hasCheckedAllRightBooks(qs)) { - player.showQuestMovie(25); + playMovie(player, Movie.SSQ2_HOLY_BURIAL_GROUND_CLOSING); } break; } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/enums/Movie.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/enums/Movie.java new file mode 100644 index 0000000000..ea5b4caa46 --- /dev/null +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/enums/Movie.java @@ -0,0 +1,85 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jmobius.gameserver.enums; + +/** + * This file contains all movies. + * @author St3eT + */ +public enum Movie +{ + SC_LINDVIOR(1, true), + SC_ECHMUS_OPENING(2, true), + SC_ECHMUS_SUCCESS(3, true), + SC_ECHMUS_FAIL(4, true), + SC_BOSS_TIAT_OPENING(5, true), + SC_BOSS_TIAT_ENDING_SUCCES(6, true), + SC_BOSS_TIAT_ENDING_FAIL(7, true), + SSQ_SUSPICIOUS_DEATHS(8, true), + SSQ_DYING_MASSAGE(9, true), + SSQ_CONTRACT_OF_MAMMON(10, true), + SSQ_RITUAL_OF_PRIEST(11, true), + SSQ_SEALING_EMPEROR_1ST(12, true), + SSQ_SEALING_EMPEROR_2ND(13, true), + SSQ_EMBRYO(14, true), + SC_BOSS_FREYA_OPENING(15, false), + SC_BOSS_FREYA_PHASECH_A(16, true), + SC_BOSS_FREYA_PHASECH_B(17, true), + SC_BOSS_KEGOR_INTRUSION(18, false), + SC_BOSS_FREYA_ENDING_A(19, false), + SC_BOSS_FREYA_ENDING_B(20, false), + SC_BOSS_FREYA_FORCED_DEFEAT(21, true), + SC_BOSS_FREYA_DEFEAT(22, true), + SC_ICE_HEAVYKNIGHT_SPAWN(23, false), + SSQ2_HOLY_BURIAL_GROUND_OPENING(24, true), + SSQ2_HOLY_BURIAL_GROUND_CLOSING(25, true), + SSQ2_SOLINA_TOMB_OPENING(26, false), + SSQ2_SOLINA_TOMB_CLOSING(27, true), + SSQ2_ELYSS_NARRATION(28, false), + SSQ2_BOSS_OPENING(29, false), + SSQ2_BOSS_CLOSING(30, false), + LAND_KSERTH_A(1000, true), + LAND_KSERTH_B(1001, true), + LAND_UNDEAD_A(1002, true), + LAND_DISTRUCTION_A(1003, true), + LAND_ANNIHILATION_A(1004, true); + + private final int _clientId; + private final boolean _isEscapable; + + private Movie(int clientId, boolean isEscapable) + { + _clientId = clientId; + _isEscapable = isEscapable; + } + + /** + * @return the client id. + */ + public int getClientId() + { + return _clientId; + } + + /** + * @return {@code true} if movie can be escaped (skipped), {@code false} otherwise. + */ + public boolean isEscapable() + { + return _isEscapable; + } +} \ No newline at end of file diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 87337c2556..00b9be2c06 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -207,6 +207,7 @@ import com.l2jmobius.gameserver.model.fishing.L2Fish; import com.l2jmobius.gameserver.model.fishing.L2Fishing; import com.l2jmobius.gameserver.model.holders.AdditionalSkillHolder; import com.l2jmobius.gameserver.model.holders.ItemHolder; +import com.l2jmobius.gameserver.model.holders.MovieHolder; import com.l2jmobius.gameserver.model.holders.PlayerEventHolder; import com.l2jmobius.gameserver.model.holders.SellBuffHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; @@ -801,7 +802,7 @@ public final class L2PcInstance extends L2Playable private int _multiSocialTarget = 0; private int _multiSociaAction = 0; - private int _movieId = 0; + private MovieHolder _movieHolder = null; private String _adminConfirmCmd = null; @@ -10862,6 +10863,12 @@ public final class L2PcInstance extends L2Playable } TvTEvent.onTeleported(this); + + // show movie if available + if (_movieHolder != null) + { + sendPacket(new ExStartScenePlayer(_movieHolder.getMovie())); + } } @Override @@ -13211,17 +13218,25 @@ public final class L2PcInstance extends L2Playable } } - public void showQuestMovie(int id) + public void playMovie(MovieHolder holder) { - if (_movieId > 0) + if (getMovieHolder() != null) { return; } abortAttack(); - abortCast(); + // abortCast(); Confirmed in retail, playing a movie does not abort cast. stopMove(null); - _movieId = id; - sendPacket(new ExStartScenePlayer(id)); + setMovieHolder(holder); + if (!isTeleporting()) + { + sendPacket(new ExStartScenePlayer(holder.getMovie())); + } + } + + public void stopMovie() + { + setMovieHolder(null); } public boolean isAllowedToEnchantSkills() @@ -13586,17 +13601,14 @@ public final class L2PcInstance extends L2Playable _fallingTimestamp = System.currentTimeMillis() + FALLING_VALIDATION_DELAY; } - /** - * @return the _movieId - */ - public int getMovieId() + public MovieHolder getMovieHolder() { - return _movieId; + return _movieHolder; } - public void setMovieId(int id) + public void setMovieHolder(MovieHolder movie) { - _movieId = id; + _movieHolder = movie; } /** @@ -13619,7 +13631,7 @@ public final class L2PcInstance extends L2Playable @Override public boolean isMovementDisabled() { - return super.isMovementDisabled() || (_movieId > 0); + return super.isMovementDisabled() || (getMovieHolder() != null); } private void restoreUISettings() diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/events/AbstractScript.java index 79d9d6bef1..4380932775 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/events/AbstractScript.java @@ -38,11 +38,13 @@ import com.l2jmobius.gameserver.GameTimeController; import com.l2jmobius.gameserver.ai.CtrlIntention; import com.l2jmobius.gameserver.data.xml.impl.NpcData; import com.l2jmobius.gameserver.datatables.ItemTable; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.enums.QuestSound; import com.l2jmobius.gameserver.instancemanager.CastleManager; import com.l2jmobius.gameserver.instancemanager.FortManager; import com.l2jmobius.gameserver.instancemanager.ZoneManager; import com.l2jmobius.gameserver.model.L2Spawn; +import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.actor.L2Attackable; import com.l2jmobius.gameserver.model.actor.L2Character; @@ -106,7 +108,9 @@ import com.l2jmobius.gameserver.model.events.listeners.RunnableEventListener; import com.l2jmobius.gameserver.model.events.returns.AbstractEventReturn; import com.l2jmobius.gameserver.model.events.returns.TerminateReturn; import com.l2jmobius.gameserver.model.holders.ItemHolder; +import com.l2jmobius.gameserver.model.holders.MovieHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; +import com.l2jmobius.gameserver.model.instancezone.InstanceWorld; import com.l2jmobius.gameserver.model.interfaces.IPositionable; import com.l2jmobius.gameserver.model.itemcontainer.Inventory; import com.l2jmobius.gameserver.model.itemcontainer.PcInventory; @@ -2884,4 +2888,47 @@ public abstract class AbstractScript extends ManagedScript { player.getRadar().removeAllMarkers(); } + + /** + * Play scene for PlayerInstance. + * @param player the player + * @param movie the movie + */ + public void playMovie(L2PcInstance player, Movie movie) + { + new MovieHolder(Arrays.asList(player), movie); + } + + /** + * Play scene for all PlayerInstance inside list. + * @param players list with PlayerInstance + * @param movie the movie + */ + public void playMovie(List players, Movie movie) + { + new MovieHolder(players, movie); + } + + /** + * Play scene for all PlayerInstance inside set. + * @param players set with PlayerInstance + * @param movie the movie + */ + public void playMovie(Set players, Movie movie) + { + new MovieHolder(new ArrayList<>(players), movie); + } + + /** + * Play scene for all PlayerInstance inside instance. + * @param world InstanceWorld object + * @param movie the movie + */ + public void playMovie(InstanceWorld world, Movie movie) + { + for (int objId : world.getAllowed()) + { + playMovie(L2World.getInstance().getPlayer(objId), movie); + } + } } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/holders/MovieHolder.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/holders/MovieHolder.java new file mode 100644 index 0000000000..024b995b88 --- /dev/null +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/holders/MovieHolder.java @@ -0,0 +1,49 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jmobius.gameserver.model.holders; + +import java.util.List; + +import com.l2jmobius.gameserver.enums.Movie; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; + +/** + * @author St3eT + */ +public final class MovieHolder +{ + private final Movie _movie; + private final List _players; + + public MovieHolder(List players, Movie movie) + { + _players = players; + _movie = movie; + + getPlayers().forEach(p -> p.playMovie(this)); + } + + public Movie getMovie() + { + return _movie; + } + + public List getPlayers() + { + return _players; + } +} \ No newline at end of file diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/EndScenePlayer.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/EndScenePlayer.java index 3ba611cc05..774513ab75 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/EndScenePlayer.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/EndScenePlayer.java @@ -17,7 +17,9 @@ package com.l2jmobius.gameserver.network.clientpackets; import com.l2jmobius.commons.network.PacketReader; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.MovieHolder; import com.l2jmobius.gameserver.network.L2GameClient; /** @@ -38,20 +40,21 @@ public final class EndScenePlayer implements IClientIncomingPacket public void run(L2GameClient client) { final L2PcInstance activeChar = client.getActiveChar(); - if (activeChar == null) + if ((activeChar == null) || (_movieId == 0)) { return; } - if (_movieId == 0) + final MovieHolder movieHolder = activeChar.getMovieHolder(); + if (movieHolder == null) { return; } - if (activeChar.getMovieId() != _movieId) + final Movie movie = movieHolder.getMovie(); + if ((movie.getClientId() != _movieId) || !movie.isEscapable()) { - LOGGER.warning("Player " + client + " sent EndScenePlayer with wrong movie id: " + _movieId); return; } - activeChar.setMovieId(0); + activeChar.stopMovie(); activeChar.setIsTeleporting(true, false); // avoid to get player removed from L2World activeChar.decayMe(); activeChar.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ()); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ExStartScenePlayer.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ExStartScenePlayer.java index 711b6aa728..ddb7acd86a 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ExStartScenePlayer.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ExStartScenePlayer.java @@ -17,6 +17,7 @@ package com.l2jmobius.gameserver.network.serverpackets; import com.l2jmobius.commons.network.PacketWriter; +import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.network.OutgoingPackets; /** @@ -24,18 +25,19 @@ import com.l2jmobius.gameserver.network.OutgoingPackets; */ public class ExStartScenePlayer implements IClientOutgoingPacket { - private final int _movieId; + private final Movie _movie; - public ExStartScenePlayer(int id) + public ExStartScenePlayer(Movie movie) { - _movieId = id; + _movie = movie; } @Override public boolean write(PacketWriter packet) { OutgoingPackets.EX_START_SCENE_PLAYER.writeId(packet); - packet.writeD(_movieId); + + packet.writeD(_movie.getClientId()); return true; } }