Sync with L2JServer Feb 3rd 2015.
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
package instances.NornilsGarden;
|
||||
|
||||
import instances.AbstractInstance;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.instancemanager.InstanceManager;
|
||||
import com.l2jserver.gameserver.model.L2Party;
|
||||
@@ -29,7 +31,6 @@ import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.entity.Instance;
|
||||
import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
import com.l2jserver.gameserver.model.zone.L2ZoneType;
|
||||
@@ -42,37 +43,39 @@ import com.l2jserver.gameserver.util.Util;
|
||||
* @author Gnacik
|
||||
* @version 2010-10-15 Based on official server Naia
|
||||
*/
|
||||
public final class NornilsGarden extends Quest
|
||||
public final class NornilsGarden extends AbstractInstance
|
||||
{
|
||||
protected class NornilsWorld extends InstanceWorld
|
||||
{
|
||||
public L2Npc first_npc = null;
|
||||
public boolean spawned_1 = false;
|
||||
public boolean spawned_2 = false;
|
||||
public boolean spawned_3 = false;
|
||||
public boolean spawned_4 = false;
|
||||
protected L2Npc first_npc = null;
|
||||
protected boolean spawned_1 = false;
|
||||
protected boolean spawned_2 = false;
|
||||
protected boolean spawned_3 = false;
|
||||
protected boolean spawned_4 = false;
|
||||
}
|
||||
|
||||
private static final int TEMPLATE_ID = 11;
|
||||
|
||||
private static final int DURATION_TIME = 70;
|
||||
private static final int EMPTY_DESTROY_TIME = 5;
|
||||
|
||||
private static final int INSTANCE_LVL_MIN = 18;
|
||||
private static final int INSTANCE_LVL_MAX = 22;
|
||||
|
||||
// NPCs
|
||||
private static final int _garden_guard = 32330;
|
||||
|
||||
private static final int[] _final_gates =
|
||||
{
|
||||
32260,
|
||||
32261,
|
||||
32262
|
||||
};
|
||||
|
||||
// Skills
|
||||
private static final Skill skill1 = SkillData.getInstance().getSkill(4322, 1);
|
||||
private static final Skill skill2 = SkillData.getInstance().getSkill(4327, 1);
|
||||
private static final Skill skill3 = SkillData.getInstance().getSkill(4329, 1);
|
||||
private static final Skill skill4 = SkillData.getInstance().getSkill(4324, 1);
|
||||
// Locations
|
||||
private static final Location SPAWN_PPL = new Location(-111184, 74540, -12430);
|
||||
private static final Location EXIT_PPL = new Location(-74058, 52040, -3680);
|
||||
|
||||
// Misc
|
||||
private static final int TEMPLATE_ID = 11;
|
||||
private static final int DURATION_TIME = 70;
|
||||
private static final int EMPTY_DESTROY_TIME = 5;
|
||||
private static final int INSTANCE_LVL_MIN = 18;
|
||||
private static final int INSTANCE_LVL_MAX = 22;
|
||||
private static final int[][] _auto_gates =
|
||||
{
|
||||
// Warriors gate
|
||||
@@ -91,14 +94,7 @@ public final class NornilsGarden extends Quest
|
||||
16200013
|
||||
}
|
||||
};
|
||||
|
||||
private static final Skill skill1 = SkillData.getInstance().getSkill(4322, 1);
|
||||
private static final Skill skill2 = SkillData.getInstance().getSkill(4327, 1);
|
||||
private static final Skill skill3 = SkillData.getInstance().getSkill(4329, 1);
|
||||
private static final Skill skill4 = SkillData.getInstance().getSkill(4324, 1);
|
||||
|
||||
private static final int _herb_jar = 18478;
|
||||
|
||||
// @formatter:off
|
||||
private static final int[][] _gatekeepers =
|
||||
{
|
||||
@@ -114,7 +110,6 @@ public final class NornilsGarden extends Quest
|
||||
{ 18361, 9711, 0 }, // Guardian of Prediction
|
||||
{ 25528, 9712, 0 } // Tiberias
|
||||
};
|
||||
|
||||
private static final int[][] HP_HERBS_DROPLIST =
|
||||
{
|
||||
// itemId, count, chance
|
||||
@@ -122,7 +117,6 @@ public final class NornilsGarden extends Quest
|
||||
{ 8601, 2, 40 },
|
||||
{ 8600, 3, 70 }
|
||||
};
|
||||
|
||||
private static final int[][] _group_1 =
|
||||
{
|
||||
{ 18363, -109899, 74431, -12528, 16488 },
|
||||
@@ -131,7 +125,6 @@ public final class NornilsGarden extends Quest
|
||||
{ 18363, -109703, 74879, -12528, 49336 }
|
||||
|
||||
};
|
||||
|
||||
private static final int[][] _group_2 =
|
||||
{
|
||||
{ 18363, -110393, 78276, -12848, 49152 },
|
||||
@@ -143,7 +136,6 @@ public final class NornilsGarden extends Quest
|
||||
{ 18483, -110389, 79131, -12915, 48539 },
|
||||
{ 18483, -110551, 79134, -12915, 49151 }
|
||||
};
|
||||
|
||||
private static final int[][] _group_3 =
|
||||
{
|
||||
{ 18483, -107798, 80721, -12912, 0 },
|
||||
@@ -153,8 +145,7 @@ public final class NornilsGarden extends Quest
|
||||
{ 18483, -108740, 80752, -12912, 0 },
|
||||
{ 18363, -109016, 80642, -12912, 0 },
|
||||
{ 18483, -108740, 80546, -12912, 0 }
|
||||
};
|
||||
|
||||
};
|
||||
private static final int[][] _group_4 =
|
||||
{
|
||||
{ 18362, -110082, 83998, -12928, 0 },
|
||||
@@ -167,7 +158,6 @@ public final class NornilsGarden extends Quest
|
||||
{ 18362, -109122, 84490, -12880, 0 },
|
||||
{ 18347, -108939, 84489, -12880, 0 }
|
||||
};
|
||||
|
||||
private static final int[][] MP_HERBS_DROPLIST =
|
||||
{
|
||||
// itemId, count, chance
|
||||
@@ -189,11 +179,6 @@ public final class NornilsGarden extends Quest
|
||||
}
|
||||
}
|
||||
|
||||
private static final void removeBuffs(L2Character ch)
|
||||
{
|
||||
ch.stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||
}
|
||||
|
||||
private static final void giveBuffs(L2Character ch)
|
||||
{
|
||||
if (skill1 != null)
|
||||
@@ -214,9 +199,9 @@ public final class NornilsGarden extends Quest
|
||||
}
|
||||
}
|
||||
|
||||
private NornilsGarden()
|
||||
public NornilsGarden()
|
||||
{
|
||||
super(-1, NornilsGarden.class.getSimpleName(), "instances");
|
||||
super(NornilsGarden.class.getSimpleName());
|
||||
addStartNpc(_garden_guard);
|
||||
addFirstTalkId(_garden_guard);
|
||||
addTalkId(_garden_guard);
|
||||
@@ -236,17 +221,14 @@ public final class NornilsGarden extends Quest
|
||||
@Override
|
||||
public final void teleportPlayer(L2PcInstance player, Location loc, int instanceId)
|
||||
{
|
||||
removeBuffs(player);
|
||||
giveBuffs(player);
|
||||
final L2Summon pet = player.getPet();
|
||||
if (pet != null)
|
||||
{
|
||||
removeBuffs(pet);
|
||||
giveBuffs(pet);
|
||||
}
|
||||
player.getServitors().values().forEach(s ->
|
||||
{
|
||||
removeBuffs(s);
|
||||
giveBuffs(s);
|
||||
});
|
||||
super.teleportPlayer(player, loc, instanceId);
|
||||
@@ -282,7 +264,7 @@ public final class NornilsGarden extends Quest
|
||||
return null;
|
||||
}
|
||||
// check what instance still exist
|
||||
Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
|
||||
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
|
||||
if (inst != null)
|
||||
{
|
||||
teleportPlayer(player, SPAWN_PPL, world.getInstanceId());
|
||||
@@ -644,8 +626,9 @@ public final class NornilsGarden extends Quest
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
@Override
|
||||
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
|
||||
{
|
||||
new NornilsGarden();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user