Prevent multiple FeedableBeasts spawns from spamming feed.
This commit is contained in:
parent
ddeb0b1f48
commit
310ea57339
@ -342,6 +342,17 @@ public class FeedableBeasts extends Quest
|
||||
|
||||
private void spawnNext(Npc npc, int growthLevel, Player player, int food)
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
npc.setScriptValue(1);
|
||||
|
||||
if (!npc.isSpawned())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int npcId = npc.getNpcId();
|
||||
int nextNpcId = 0;
|
||||
|
||||
|
@ -342,6 +342,17 @@ public class FeedableBeasts extends Quest
|
||||
|
||||
private void spawnNext(Npc npc, int growthLevel, Player player, int food)
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
npc.setScriptValue(1);
|
||||
|
||||
if (!npc.isSpawned())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int npcId = npc.getNpcId();
|
||||
int nextNpcId = 0;
|
||||
|
||||
|
@ -354,6 +354,17 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
|
||||
private void spawnNext(Npc npc, int growthLevel, Player player, int food)
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
npc.setScriptValue(1);
|
||||
|
||||
if (!npc.isSpawned())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int npcId = npc.getId();
|
||||
int nextNpcId = 0;
|
||||
|
||||
@ -397,6 +408,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
FEED_INFO.remove(npc.getObjectId());
|
||||
}
|
||||
|
||||
// despawn the old mob
|
||||
// TODO: same code? FIXED?
|
||||
// @formatter:off
|
||||
|
@ -356,6 +356,17 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
|
||||
private void spawnNext(Npc npc, int growthLevel, Player player, int food)
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
npc.setScriptValue(1);
|
||||
|
||||
if (!npc.isSpawned())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int npcId = npc.getId();
|
||||
int nextNpcId = 0;
|
||||
|
||||
@ -399,6 +410,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
FEED_INFO.remove(npc.getObjectId());
|
||||
}
|
||||
|
||||
// despawn the old mob
|
||||
// TODO: same code? FIXED?
|
||||
// @formatter:off
|
||||
|
@ -341,6 +341,17 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
|
||||
private void spawnNext(Npc npc, int growthLevel, Player player, int food)
|
||||
{
|
||||
if (npc.isScriptValue(1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
npc.setScriptValue(1);
|
||||
|
||||
if (!npc.isSpawned())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int npcId = npc.getId();
|
||||
int nextNpcId = 0;
|
||||
|
||||
@ -387,6 +398,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
_feedInfo.remove(npc.getObjectId());
|
||||
}
|
||||
}
|
||||
|
||||
// despawn the old mob
|
||||
// TODO: same code? FIXED?
|
||||
// @formatter:off
|
||||
|
Loading…
Reference in New Issue
Block a user