Added instance world support for StatsSet parameters.
This commit is contained in:
@@ -64,14 +64,8 @@ public class HallOfErosionAttack extends AbstractNpcAI
|
||||
tumorCount += value;
|
||||
}
|
||||
|
||||
public synchronized void addTag(int value)
|
||||
{
|
||||
tag += value;
|
||||
}
|
||||
|
||||
public HEAWorld()
|
||||
{
|
||||
tag = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,7 +532,8 @@ public class HallOfErosionAttack extends AbstractNpcAI
|
||||
|
||||
if (npc.getId() == TUMOR_DEAD)
|
||||
{
|
||||
world.addTag(1);
|
||||
final int tag = world.getParameters().getInt("tag", -1);
|
||||
world.getParameters().set("tag", tag + 1);
|
||||
}
|
||||
}
|
||||
return super.onSpawn(npc);
|
||||
@@ -659,7 +654,8 @@ public class HallOfErosionAttack extends AbstractNpcAI
|
||||
final L2Npc tumor = addSpawn(TUMOR_ALIVE, _deadTumor.getLocation(), _world.getInstanceId());
|
||||
_world.npcList.add(tumor);
|
||||
_deadTumor.deleteMe();
|
||||
_world.addTag(-1);
|
||||
final int tag = _world.getParameters().getInt("tag", -1);
|
||||
_world.getParameters().set("tag", tag - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -58,14 +58,8 @@ public class HallOfErosionDefence extends AbstractNpcAI
|
||||
public long startTime = 0;
|
||||
public ScheduledFuture<?> finishTask = null;
|
||||
|
||||
public synchronized void addTag(int value)
|
||||
{
|
||||
tag += value;
|
||||
}
|
||||
|
||||
public HEDWorld()
|
||||
{
|
||||
tag = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,7 +515,8 @@ public class HallOfErosionDefence extends AbstractNpcAI
|
||||
final HEDWorld world = (HEDWorld) tmpworld;
|
||||
if (npc.getId() == TUMOR_DEAD)
|
||||
{
|
||||
world.addTag(1);
|
||||
final int tag = world.getParameters().getInt("tag", -1);
|
||||
world.getParameters().set("tag", tag + 1);
|
||||
}
|
||||
}
|
||||
return super.onSpawn(npc);
|
||||
|
@@ -60,52 +60,6 @@ public class HallOfSufferingAttack extends AbstractNpcAI
|
||||
|
||||
public HSAWorld()
|
||||
{
|
||||
tag = -1;
|
||||
}
|
||||
|
||||
protected void calcRewardItemId()
|
||||
{
|
||||
final Long finishDiff = storeTime[1] - storeTime[0];
|
||||
if (finishDiff < 1260000)
|
||||
{
|
||||
tag = 13777;
|
||||
}
|
||||
else if (finishDiff < 1380000)
|
||||
{
|
||||
tag = 13778;
|
||||
}
|
||||
else if (finishDiff < 1500000)
|
||||
{
|
||||
tag = 13779;
|
||||
}
|
||||
else if (finishDiff < 1620000)
|
||||
{
|
||||
tag = 13780;
|
||||
}
|
||||
else if (finishDiff < 1740000)
|
||||
{
|
||||
tag = 13781;
|
||||
}
|
||||
else if (finishDiff < 1860000)
|
||||
{
|
||||
tag = 13782;
|
||||
}
|
||||
else if (finishDiff < 1980000)
|
||||
{
|
||||
tag = 13783;
|
||||
}
|
||||
else if (finishDiff < 2100000)
|
||||
{
|
||||
tag = 13784;
|
||||
}
|
||||
else if (finishDiff < 2220000)
|
||||
{
|
||||
tag = 13785;
|
||||
}
|
||||
else
|
||||
{
|
||||
tag = 13786;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +519,49 @@ public class HallOfSufferingAttack extends AbstractNpcAI
|
||||
{
|
||||
world.incStatus();
|
||||
world.storeTime[1] = System.currentTimeMillis();
|
||||
world.calcRewardItemId();
|
||||
|
||||
final Long finishDiff = world.storeTime[1] - world.storeTime[0];
|
||||
if (finishDiff < 1260000)
|
||||
{
|
||||
world.getParameters().set("tag", 13777);
|
||||
}
|
||||
else if (finishDiff < 1380000)
|
||||
{
|
||||
world.getParameters().set("tag", 13778);
|
||||
}
|
||||
else if (finishDiff < 1500000)
|
||||
{
|
||||
world.getParameters().set("tag", 13779);
|
||||
}
|
||||
else if (finishDiff < 1620000)
|
||||
{
|
||||
world.getParameters().set("tag", 13780);
|
||||
}
|
||||
else if (finishDiff < 1740000)
|
||||
{
|
||||
world.getParameters().set("tag", 13781);
|
||||
}
|
||||
else if (finishDiff < 1860000)
|
||||
{
|
||||
world.getParameters().set("tag", 13782);
|
||||
}
|
||||
else if (finishDiff < 1980000)
|
||||
{
|
||||
world.getParameters().set("tag", 13783);
|
||||
}
|
||||
else if (finishDiff < 2100000)
|
||||
{
|
||||
world.getParameters().set("tag", 13784);
|
||||
}
|
||||
else if (finishDiff < 2220000)
|
||||
{
|
||||
world.getParameters().set("tag", 13785);
|
||||
}
|
||||
else
|
||||
{
|
||||
world.getParameters().set("tag", 13786);
|
||||
}
|
||||
|
||||
world.klanikus = null;
|
||||
world.klodekus = null;
|
||||
cancelQuestTimers("ressurectTwin");
|
||||
|
@@ -60,52 +60,6 @@ public class HallOfSufferingDefence extends AbstractNpcAI
|
||||
|
||||
public HSDWorld()
|
||||
{
|
||||
tag = -1;
|
||||
}
|
||||
|
||||
protected void calcRewardItemId()
|
||||
{
|
||||
final Long finishDiff = storeTime[1] - storeTime[0];
|
||||
if (finishDiff < 1260000)
|
||||
{
|
||||
tag = 13777;
|
||||
}
|
||||
else if (finishDiff < 1380000)
|
||||
{
|
||||
tag = 13778;
|
||||
}
|
||||
else if (finishDiff < 1500000)
|
||||
{
|
||||
tag = 13779;
|
||||
}
|
||||
else if (finishDiff < 1620000)
|
||||
{
|
||||
tag = 13780;
|
||||
}
|
||||
else if (finishDiff < 1740000)
|
||||
{
|
||||
tag = 13781;
|
||||
}
|
||||
else if (finishDiff < 1860000)
|
||||
{
|
||||
tag = 13782;
|
||||
}
|
||||
else if (finishDiff < 1980000)
|
||||
{
|
||||
tag = 13783;
|
||||
}
|
||||
else if (finishDiff < 2100000)
|
||||
{
|
||||
tag = 13784;
|
||||
}
|
||||
else if (finishDiff < 2220000)
|
||||
{
|
||||
tag = 13785;
|
||||
}
|
||||
else
|
||||
{
|
||||
tag = 13786;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +519,49 @@ public class HallOfSufferingDefence extends AbstractNpcAI
|
||||
{
|
||||
world.incStatus();
|
||||
world.storeTime[1] = System.currentTimeMillis();
|
||||
world.calcRewardItemId();
|
||||
|
||||
final Long finishDiff = world.storeTime[1] - world.storeTime[0];
|
||||
if (finishDiff < 1260000)
|
||||
{
|
||||
world.getParameters().set("tag", 13777);
|
||||
}
|
||||
else if (finishDiff < 1380000)
|
||||
{
|
||||
world.getParameters().set("tag", 13778);
|
||||
}
|
||||
else if (finishDiff < 1500000)
|
||||
{
|
||||
world.getParameters().set("tag", 13779);
|
||||
}
|
||||
else if (finishDiff < 1620000)
|
||||
{
|
||||
world.getParameters().set("tag", 13780);
|
||||
}
|
||||
else if (finishDiff < 1740000)
|
||||
{
|
||||
world.getParameters().set("tag", 13781);
|
||||
}
|
||||
else if (finishDiff < 1860000)
|
||||
{
|
||||
world.getParameters().set("tag", 13782);
|
||||
}
|
||||
else if (finishDiff < 1980000)
|
||||
{
|
||||
world.getParameters().set("tag", 13783);
|
||||
}
|
||||
else if (finishDiff < 2100000)
|
||||
{
|
||||
world.getParameters().set("tag", 13784);
|
||||
}
|
||||
else if (finishDiff < 2220000)
|
||||
{
|
||||
world.getParameters().set("tag", 13785);
|
||||
}
|
||||
else
|
||||
{
|
||||
world.getParameters().set("tag", 13786);
|
||||
}
|
||||
|
||||
world.klanikus = null;
|
||||
world.klodekus = null;
|
||||
cancelQuestTimers("ressurectTwin");
|
||||
|
@@ -69,14 +69,8 @@ public class HeartInfinityAttack extends AbstractNpcAI
|
||||
tumorCount += value;
|
||||
}
|
||||
|
||||
public synchronized void addTag(int value)
|
||||
{
|
||||
tag += value;
|
||||
}
|
||||
|
||||
public HIAWorld()
|
||||
{
|
||||
tag = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -585,7 +579,8 @@ public class HeartInfinityAttack extends AbstractNpcAI
|
||||
|
||||
if (npc.getId() == DEADTUMOR)
|
||||
{
|
||||
world.addTag(1);
|
||||
final int tag = world.getParameters().getInt("tag", -1);
|
||||
world.getParameters().set("tag", tag + 1);
|
||||
}
|
||||
}
|
||||
return super.onSpawn(npc);
|
||||
@@ -661,7 +656,8 @@ public class HeartInfinityAttack extends AbstractNpcAI
|
||||
notifyTumorRevival(_world);
|
||||
_world.npcList.add(alivetumor);
|
||||
_deadTumor.deleteMe();
|
||||
_world.addTag(-1);
|
||||
final int tag = _world.getParameters().getInt("tag", -1);
|
||||
_world.getParameters().set("tag", tag - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -99,7 +99,8 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
|
||||
if ((world != null) && (world.getTemplateId() == 115))
|
||||
{
|
||||
if (world.tag == -1)
|
||||
final int tag = world.getParameters().getInt("tag", -1);
|
||||
if (tag == -1)
|
||||
{
|
||||
htmltext = "32530-11.html";
|
||||
}
|
||||
@@ -110,7 +111,7 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
final QuestState qs1 = member.getQuestState(getName());
|
||||
if (qs1 != null)
|
||||
{
|
||||
if (world.tag == 13777)
|
||||
if (tag == 13777)
|
||||
{
|
||||
if (getQuestItemsCount(member, MARK) == 0)
|
||||
{
|
||||
@@ -124,7 +125,7 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-00.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13778)
|
||||
else if (tag == 13778)
|
||||
{
|
||||
if (getQuestItemsCount(member, MARK) == 0)
|
||||
{
|
||||
@@ -138,7 +139,7 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-01.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13779)
|
||||
else if (tag == 13779)
|
||||
{
|
||||
if (getQuestItemsCount(member, MARK) == 0)
|
||||
{
|
||||
@@ -152,7 +153,7 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-02.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13780)
|
||||
else if (tag == 13780)
|
||||
{
|
||||
if (getQuestItemsCount(member, MARK) == 0)
|
||||
{
|
||||
@@ -166,7 +167,7 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-03.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13781)
|
||||
else if (tag == 13781)
|
||||
{
|
||||
if (getQuestItemsCount(member, MARK) == 0)
|
||||
{
|
||||
@@ -180,7 +181,7 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-04.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13782)
|
||||
else if (tag == 13782)
|
||||
{
|
||||
if (getQuestItemsCount(member, MARK) == 0)
|
||||
{
|
||||
@@ -194,7 +195,7 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-05.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13783)
|
||||
else if (tag == 13783)
|
||||
{
|
||||
if (getQuestItemsCount(member, MARK) == 0)
|
||||
{
|
||||
@@ -208,7 +209,7 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-06.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13784)
|
||||
else if (tag == 13784)
|
||||
{
|
||||
if (getQuestItemsCount(member, MARK) == 0)
|
||||
{
|
||||
@@ -222,7 +223,7 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-07.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13785)
|
||||
else if (tag == 13785)
|
||||
{
|
||||
if (getQuestItemsCount(member, MARK) == 0)
|
||||
{
|
||||
@@ -236,7 +237,7 @@ public final class Q00694_BreakThroughTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-08.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13786)
|
||||
else if (tag == 13786)
|
||||
{
|
||||
if (getQuestItemsCount(member, MARK) == 0)
|
||||
{
|
||||
|
@@ -108,7 +108,8 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
|
||||
if ((world != null) && (world.getTemplateId() == 116))
|
||||
{
|
||||
if (world.tag == -1)
|
||||
final int tag = world.getParameters().getInt("tag", -1);
|
||||
if (tag == -1)
|
||||
{
|
||||
htmltext = "32530-11.html";
|
||||
}
|
||||
@@ -119,7 +120,7 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
final QuestState qs1 = member.getQuestState(getName());
|
||||
if (qs1 != null)
|
||||
{
|
||||
if (world.tag == 13777)
|
||||
if (tag == 13777)
|
||||
{
|
||||
giveItems(member, 13777, 1);
|
||||
giveItems(member, SOE, 1);
|
||||
@@ -129,7 +130,7 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-00.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13778)
|
||||
else if (tag == 13778)
|
||||
{
|
||||
giveItems(member, 13778, 1);
|
||||
giveItems(member, SOE, 1);
|
||||
@@ -139,7 +140,7 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-01.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13779)
|
||||
else if (tag == 13779)
|
||||
{
|
||||
giveItems(member, 13779, 1);
|
||||
giveItems(member, SOE, 1);
|
||||
@@ -149,7 +150,7 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-02.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13780)
|
||||
else if (tag == 13780)
|
||||
{
|
||||
giveItems(member, 13780, 1);
|
||||
giveItems(member, SOE, 1);
|
||||
@@ -159,7 +160,7 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-03.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13781)
|
||||
else if (tag == 13781)
|
||||
{
|
||||
giveItems(member, 13781, 1);
|
||||
giveItems(member, SOE, 1);
|
||||
@@ -169,7 +170,7 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-04.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13782)
|
||||
else if (tag == 13782)
|
||||
{
|
||||
giveItems(member, 13782, 1);
|
||||
giveItems(member, SOE, 1);
|
||||
@@ -179,7 +180,7 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-05.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13783)
|
||||
else if (tag == 13783)
|
||||
{
|
||||
giveItems(member, 13783, 1);
|
||||
giveItems(member, SOE, 1);
|
||||
@@ -189,7 +190,7 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-06.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13784)
|
||||
else if (tag == 13784)
|
||||
{
|
||||
giveItems(member, 13784, 1);
|
||||
giveItems(member, SOE, 1);
|
||||
@@ -199,7 +200,7 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-07.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13785)
|
||||
else if (tag == 13785)
|
||||
{
|
||||
giveItems(member, 13785, 1);
|
||||
giveItems(member, SOE, 1);
|
||||
@@ -209,7 +210,7 @@ public final class Q00695_DefendTheHallOfSuffering extends Quest
|
||||
htmltext = "32530-08.html";
|
||||
finishInstance(player);
|
||||
}
|
||||
else if (world.tag == 13786)
|
||||
else if (tag == 13786)
|
||||
{
|
||||
giveItems(member, 13786, 1);
|
||||
giveItems(member, SOE, 1);
|
||||
|
Reference in New Issue
Block a user