Fixed capturing holy artefact under the shrine.
Thanks to Sahar.
This commit is contained in:
		| @@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.handler.IAdminCommandHandler; | ||||
| import org.l2jmobius.gameserver.model.World; | ||||
| import org.l2jmobius.gameserver.model.WorldObject; | ||||
| import org.l2jmobius.gameserver.model.actor.Npc; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; | ||||
| @@ -70,8 +69,8 @@ public class AdminMissingHtmls implements IAdminCommandHandler | ||||
| 				{ | ||||
| 					if (obj.isNpc() // | ||||
| 						&& !obj.isMonster() // | ||||
| 						&& !(obj.isArtefact()) // | ||||
| 						&& !(obj instanceof ObservationInstance) // | ||||
| 						&& !(obj instanceof ArtefactInstance) // | ||||
| 						&& !(obj instanceof FlyTerrainObjectInstance) // | ||||
| 						&& !results.contains(obj.getId())) | ||||
| 					{ | ||||
| @@ -105,8 +104,8 @@ public class AdminMissingHtmls implements IAdminCommandHandler | ||||
| 				{ | ||||
| 					if (obj.isNpc() // | ||||
| 						&& !obj.isMonster() // | ||||
| 						&& !(obj.isArtefact()) // | ||||
| 						&& !(obj instanceof ObservationInstance) // | ||||
| 						&& !(obj instanceof ArtefactInstance) // | ||||
| 						&& !(obj instanceof FlyTerrainObjectInstance) // | ||||
| 						&& !results.contains(obj.getId())) | ||||
| 					{ | ||||
| @@ -138,8 +137,8 @@ public class AdminMissingHtmls implements IAdminCommandHandler | ||||
| 				{ | ||||
| 					if (obj.isNpc() // | ||||
| 						&& !obj.isMonster() // | ||||
| 						&& !(obj.isArtefact()) // | ||||
| 						&& !(obj instanceof ObservationInstance) // | ||||
| 						&& !(obj instanceof ArtefactInstance) // | ||||
| 						&& !(obj instanceof FlyTerrainObjectInstance)) | ||||
| 					{ | ||||
| 						final Npc npc = (Npc) obj; | ||||
|   | ||||
| @@ -66,7 +66,7 @@ public class PossessHolythingSkillCondition implements ISkillCondition | ||||
| 			player.sendPacket(SystemMessageId.INVALID_TARGET); | ||||
| 			canTakeCastle = false; | ||||
| 		} | ||||
| 		else if (!Util.checkIfInRange(skill.getCastRange(), player, target, true)) | ||||
| 		else if (!Util.checkIfInRange(skill.getCastRange(), player, target, true) || (Math.abs(player.getZ() - target.getZ()) > 40)) | ||||
| 		{ | ||||
| 			player.sendPacket(SystemMessageId.THE_DISTANCE_IS_TOO_FAR_AND_SO_THE_CASTING_HAS_BEEN_STOPPED); | ||||
| 			canTakeCastle = false; | ||||
|   | ||||
| @@ -19,7 +19,6 @@ package handlers.targethandlers; | ||||
| import org.l2jmobius.gameserver.handler.ITargetTypeHandler; | ||||
| import org.l2jmobius.gameserver.model.WorldObject; | ||||
| import org.l2jmobius.gameserver.model.actor.Creature; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; | ||||
| import org.l2jmobius.gameserver.model.skills.Skill; | ||||
| import org.l2jmobius.gameserver.model.skills.targets.TargetType; | ||||
| import org.l2jmobius.gameserver.network.SystemMessageId; | ||||
| @@ -39,9 +38,10 @@ public class HolyThing implements ITargetTypeHandler | ||||
| 	@Override | ||||
| 	public WorldObject getTarget(Creature creature, WorldObject selectedTarget, Skill skill, boolean forceUse, boolean dontMove, boolean sendMessage) | ||||
| 	{ | ||||
| 		if (creature.getTarget() instanceof ArtefactInstance) | ||||
| 		final WorldObject target = creature.getTarget(); | ||||
| 		if ((target != null) && target.isArtefact()) | ||||
| 		{ | ||||
| 			return creature.getTarget(); | ||||
| 			return target; | ||||
| 		} | ||||
| 		 | ||||
| 		if (sendMessage) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment