diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index 9ac52c58..18f0f63e 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -982,29 +982,31 @@ public abstract class AbstractCharacter extends AbstractWorldObject { public final float getRange() { - // Treb range does not appear to be set here - // what gives? - - if (this.getObjectType() == GameObjectType.Mob) { + Mob mob = (Mob) this; + if (mob.isSiege()) { return 300; } float range = 8; if (((Mob) this).getEquip().get(1) != null) { - range = ((Mob) this).getEquip().get(1).getItemBase().getRange(); + range = ((Mob) this).getEquip().get(1).template.item_weapon_max_range; } else if (((Mob) this).getEquip().get(2) != null) { - range = ((Mob) this).getEquip().get(2).getItemBase().getRange(); + range = ((Mob) this).getEquip().get(2).template.item_weapon_max_range; } - if (range > 80) { + + // TODO Is this clamp from live? + + if (range > 80) range = 80; - } + return range; } - if (this.rangeHandOne > this.rangeHandTwo) { + + if (this.rangeHandOne > this.rangeHandTwo) return this.rangeHandOne; - } + return this.rangeHandTwo; }