mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-02 17:12:58 -04:00
Fixed issue with badly configured weapons breaking
This commit is contained in:
@@ -127,6 +127,11 @@ public class WeaponObject extends TangibleObject implements Serializable {
|
||||
}
|
||||
|
||||
public int getWeaponType() {
|
||||
if (getStringAttribute("cat_wpn_damage.wpn_category") == null) {
|
||||
System.err.println("Error: Weapon Type not defined for " + getTemplate());
|
||||
return 6;
|
||||
}
|
||||
|
||||
return Integer.parseInt(getStringAttribute("cat_wpn_damage.wpn_category").replace("@obj_attr_n:wpn_category_", ""));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user