forked from MagicBane/Server
Logic cleanup
This commit is contained in:
@@ -530,7 +530,11 @@ public class ItemTemplate {
|
|||||||
if (itemManager == null || abstractCharacter == null)
|
if (itemManager == null || abstractCharacter == null)
|
||||||
return false;
|
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))
|
if (!validForSlot(slot, itemManager.getEquipped(), item))
|
||||||
return false;
|
return false;
|
||||||
@@ -546,7 +550,4 @@ public class ItemTemplate {
|
|||||||
return item.template.item_value != 0 || Kit.IsNoobGear(item.getItemBase().uuid);
|
return item.template.item_value != 0 || Kit.IsNoobGear(item.getItemBase().uuid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true; //Mobiles and NPC's don't need to check equip
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user