Refactor of item.name; simplification.

This commit is contained in:
2024-03-16 09:01:56 -04:00
parent 3fdafe176b
commit e4b0823911
2 changed files with 3 additions and 5 deletions
+3 -4
View File
@@ -68,7 +68,6 @@ public class Item extends AbstractWorldObject {
super();
this.templateID = templateID;
this.template = ItemTemplate.templates.get(templateID);
this.name = this.template.item_base_name;
this.chargesRemaining = this.template.item_initial_charges;
this.durabilityCurrent = this.template.combat_health_full;
this.equipSlot = EquipSlotType.NONE;
@@ -90,12 +89,12 @@ public class Item extends AbstractWorldObject {
if (this.template == null)
Logger.error("Null template of " + this.templateID);
// Name override in db.
this.name = rs.getString("item_name");
if (this.name == null)
this.name = this.template.item_base_name;
else if (this.name.isEmpty())
this.name = this.template.item_base_name;
this.name = "";
// Set container enumeration
-1
View File
@@ -583,7 +583,6 @@ public class ItemFactory {
//set value to 0 so magicvalue can be recalculated in getValue.
ml.setValue(0);
float time;
float rank = npc.getBuilding().getRank() - 1;
float rate = (float) (2.5 * rank);