From 2d73110d152b1b67f30bc12e47193f062ffc8edd Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 8 May 2020 12:56:42 +0000 Subject: [PATCH] Fixed BeastFarm evolve respawn issue. --- .../dist/game/data/scripts/ai/others/FeedableBeasts.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/FeedableBeasts.java b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/FeedableBeasts.java index db94bad928..941e31d92b 100644 --- a/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/FeedableBeasts.java +++ b/L2J_Mobius_C6_Interlude/dist/game/data/scripts/ai/others/FeedableBeasts.java @@ -33,6 +33,7 @@ import org.l2jmobius.gameserver.model.actor.instance.TamedBeastInstance; import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate; import org.l2jmobius.gameserver.model.quest.Quest; import org.l2jmobius.gameserver.model.quest.QuestState; +import org.l2jmobius.gameserver.model.spawn.Spawn; import org.l2jmobius.gameserver.network.serverpackets.CreatureSay; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; import org.l2jmobius.gameserver.util.Util; @@ -388,6 +389,11 @@ public class FeedableBeasts extends Quest // Despawn the old mob npc.deleteMe(); + final Spawn spawn = npc.getSpawn(); + if (spawn != null) + { + spawn.decreaseCount(npc); + } // if this is finally a trained mob, then despawn any other trained mobs that the player might have and initialize the Tamed Beast. if (Util.contains(TAMED_BEASTS, nextNpcId))