From 7f452d18bc0450817abec7c3de3e6fc9635fe6af Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 27 Mar 2024 17:54:28 -0500 Subject: [PATCH] remove ItemBase from NPCManager --- src/engine/gameManager/NPCManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index ef92876e..0a06200e 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -351,9 +351,9 @@ public enum NPCManager { int strength = guard.getStatStrCurrent(); int baseAtr = guard.mobBase.getAttackRating(); if (guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD) != null) - guard.atrHandOne = baseAtr + (int) ((strength * 0.5f) + (guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD).getItemBase().getPercentRequired() * 4) + (guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD).getItemBase().getPercentRequired() * 3)); + guard.atrHandOne = baseAtr + (int) ((strength * 0.5f) + ((int)guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD).template.item_skill_required.values().toArray()[0] * 4) + ((int)guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD).template.item_skill_required.values().toArray()[0] * 3)); else if (guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD) != null && !ItemTemplate.isShield(guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).template)) - guard.atrHandTwo = baseAtr + (int) ((strength * 0.5f) + (guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).getItemBase().getPercentRequired() * 4) + (guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).getItemBase().getPercentRequired() * 3)); + guard.atrHandTwo = baseAtr + (int) ((strength * 0.5f) + ((int)guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).template.item_skill_required.values().toArray()[0] * 4) + ((int)guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).template.item_skill_required.values().toArray()[0] * 3)); else guard.atrHandOne = baseAtr; } @@ -383,6 +383,7 @@ public enum NPCManager { guard.healthMax = 5412; break; } + guard.setHealth(guard.healthMax); } public static void applyMobbaseEffects(Mob mob) {