Addition of Movie enum.

This commit is contained in:
MobiusDev
2018-05-23 13:28:18 +00:00
parent f9e6716ef0
commit 4114fee07c
24 changed files with 279 additions and 76 deletions

View File

@@ -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);
}
});
}

View File

@@ -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);
}

View File

@@ -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;
}
}

View File

@@ -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);

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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);
}

View File

@@ -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);
}
}
}

View File

@@ -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);
}
}

View File

@@ -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());

View File

@@ -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);
}
}

View File

@@ -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 "";
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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;
}