Pets cannot use shields or sigils.
Contributed by petryxa.
This commit is contained in:
		| @@ -12,6 +12,7 @@ import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.Pet; | ||||
| import org.l2jmobius.gameserver.model.item.ItemTemplate; | ||||
| import org.l2jmobius.gameserver.model.item.instance.Item; | ||||
| import org.l2jmobius.gameserver.model.item.type.ArmorType; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneId; | ||||
| import org.l2jmobius.gameserver.network.GameClient; | ||||
| import org.l2jmobius.gameserver.network.SystemMessageId; | ||||
| @@ -170,6 +171,13 @@ public class ExPetEquipItem implements ClientPacket | ||||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			// Pets cannot use shields or sigils. | ||||
| 			if (item.isArmor() && ((item.getArmorItem().getItemType() == ArmorType.SHIELD) || (item.getArmorItem().getItemType() == ArmorType.SIGIL))) | ||||
| 			{ | ||||
| 				player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); | ||||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			// Pets cannot use time-limited items. | ||||
| 			if (item.isTimeLimitedItem() || item.isShadowItem()) | ||||
| 			{ | ||||
|   | ||||
| @@ -12,6 +12,7 @@ import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.Pet; | ||||
| import org.l2jmobius.gameserver.model.item.ItemTemplate; | ||||
| import org.l2jmobius.gameserver.model.item.instance.Item; | ||||
| import org.l2jmobius.gameserver.model.item.type.ArmorType; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneId; | ||||
| import org.l2jmobius.gameserver.network.GameClient; | ||||
| import org.l2jmobius.gameserver.network.SystemMessageId; | ||||
| @@ -170,6 +171,13 @@ public class ExPetEquipItem implements ClientPacket | ||||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			// Pets cannot use shields or sigils. | ||||
| 			if (item.isArmor() && ((item.getArmorItem().getItemType() == ArmorType.SHIELD) || (item.getArmorItem().getItemType() == ArmorType.SIGIL))) | ||||
| 			{ | ||||
| 				player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); | ||||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			// Pets cannot use time-limited items. | ||||
| 			if (item.isTimeLimitedItem() || item.isShadowItem()) | ||||
| 			{ | ||||
|   | ||||
| @@ -12,6 +12,7 @@ import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.Pet; | ||||
| import org.l2jmobius.gameserver.model.item.ItemTemplate; | ||||
| import org.l2jmobius.gameserver.model.item.instance.Item; | ||||
| import org.l2jmobius.gameserver.model.item.type.ArmorType; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneId; | ||||
| import org.l2jmobius.gameserver.network.GameClient; | ||||
| import org.l2jmobius.gameserver.network.SystemMessageId; | ||||
| @@ -170,6 +171,13 @@ public class ExPetEquipItem implements ClientPacket | ||||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			// Pets cannot use shields or sigils. | ||||
| 			if (item.isArmor() && ((item.getArmorItem().getItemType() == ArmorType.SHIELD) || (item.getArmorItem().getItemType() == ArmorType.SIGIL))) | ||||
| 			{ | ||||
| 				player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); | ||||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			// Pets cannot use time-limited items. | ||||
| 			if (item.isTimeLimitedItem() || item.isShadowItem()) | ||||
| 			{ | ||||
|   | ||||
| @@ -12,6 +12,7 @@ import org.l2jmobius.gameserver.model.actor.Player; | ||||
| import org.l2jmobius.gameserver.model.actor.instance.Pet; | ||||
| import org.l2jmobius.gameserver.model.item.ItemTemplate; | ||||
| import org.l2jmobius.gameserver.model.item.instance.Item; | ||||
| import org.l2jmobius.gameserver.model.item.type.ArmorType; | ||||
| import org.l2jmobius.gameserver.model.zone.ZoneId; | ||||
| import org.l2jmobius.gameserver.network.GameClient; | ||||
| import org.l2jmobius.gameserver.network.SystemMessageId; | ||||
| @@ -170,6 +171,13 @@ public class ExPetEquipItem implements ClientPacket | ||||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			// Pets cannot use shields or sigils. | ||||
| 			if (item.isArmor() && ((item.getArmorItem().getItemType() == ArmorType.SHIELD) || (item.getArmorItem().getItemType() == ArmorType.SIGIL))) | ||||
| 			{ | ||||
| 				player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM); | ||||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			// Pets cannot use time-limited items. | ||||
| 			if (item.isTimeLimitedItem() || item.isShadowItem()) | ||||
| 			{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment