|
|
|
@ -530,7 +530,11 @@ public class ItemTemplate {
@@ -530,7 +530,11 @@ public class ItemTemplate {
|
|
|
|
|
if (itemManager == null || abstractCharacter == null) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
if (abstractCharacter.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) { |
|
|
|
|
// Early exit for mobiles and NPCS.
|
|
|
|
|
// Perhaps not needed now that mobs have skills.
|
|
|
|
|
|
|
|
|
|
if (EnumSet.of(Enum.GameObjectType.NPC, Enum.GameObjectType.Mob).contains(abstractCharacter.getObjectType())) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
if (!validForSlot(slot, itemManager.getEquipped(), item)) |
|
|
|
|
return false; |
|
|
|
@ -546,7 +550,4 @@ public class ItemTemplate {
@@ -546,7 +550,4 @@ public class ItemTemplate {
|
|
|
|
|
return item.template.item_value != 0 || Kit.IsNoobGear(item.getItemBase().uuid); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true; //Mobiles and NPC's don't need to check equip
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|