Equipment slot refactor started.

This commit is contained in:
2024-03-08 12:19:57 -05:00
parent 7d1d8891ff
commit d8d017669a
15 changed files with 163 additions and 443 deletions
+7 -7
View File
@@ -402,15 +402,15 @@ public class Resists {
if (ac.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) {
if (ac.getCharItemManager() != null && ac.getCharItemManager().getEquipped() != null) {
float[] phys = {0f, 0f, 0f};
ConcurrentHashMap<Integer, Item> equip = ac.getCharItemManager().getEquipped();
ConcurrentHashMap<Enum.EquipSlotType, Item> equip = ac.getCharItemManager().getEquipped();
// get base physical resists
phys = Resists.getArmorResists(equip.get(MBServerStatics.SLOT_HELMET), phys);
phys = Resists.getArmorResists(equip.get(MBServerStatics.SLOT_CHEST), phys);
phys = Resists.getArmorResists(equip.get(MBServerStatics.SLOT_ARMS), phys);
phys = Resists.getArmorResists(equip.get(MBServerStatics.SLOT_GLOVES), phys);
phys = Resists.getArmorResists(equip.get(MBServerStatics.SLOT_LEGGINGS), phys);
phys = Resists.getArmorResists(equip.get(MBServerStatics.SLOT_FEET), phys);
phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.HELM), phys);
phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.CHEST), phys);
phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.UPARM), phys);
phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.HANDS), phys);
phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.LEGS), phys);
phys = Resists.getArmorResists(equip.get(Enum.EquipSlotType.FEET), phys);
slash += phys[0];
crush += phys[1];
pierce += phys[2];