Unsummon siege weapons when exiting siege zone.
This commit is contained in:
parent
fdc8b91095
commit
439dff1703
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@ import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.TeleportWhereType;
|
||||
import com.l2jmobius.gameserver.model.actor.Creature;
|
||||
import com.l2jmobius.gameserver.model.actor.Summon;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import com.l2jmobius.gameserver.model.entity.Fort;
|
||||
import com.l2jmobius.gameserver.model.entity.FortSiege;
|
||||
@ -238,6 +239,15 @@ public class SiegeZone extends ZoneType
|
||||
player.getInventory().unEquipItemInBodySlot(slot);
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
|
||||
final Summon summon = player.getSummon();
|
||||
if (summon != null)
|
||||
{
|
||||
summon.abortAttack();
|
||||
summon.abortCast();
|
||||
summon.stopAllEffects();
|
||||
summon.unSummon(player);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.zone.type;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.MountType;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@ -219,6 +220,20 @@ public class SiegeZone extends ZoneType
|
||||
player.destroyItem("CombatFlag", player.getInventory().getItemByItemId(9819), null, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.hasServitors())
|
||||
{
|
||||
player.getServitors().values().forEach(servitor ->
|
||||
{
|
||||
if (servitor.getRace() == Race.SIEGE_WEAPON)
|
||||
{
|
||||
servitor.abortAttack();
|
||||
servitor.abortCast();
|
||||
servitor.stopAllEffects();
|
||||
servitor.unSummon(player);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user