Refactor itembase.name to template.
This commit is contained in:
1 parent
507769c6b6
commit
d9775dbf4e
17 files changed
+131
-90
No files matched your search
@@ -1212,10 +1212,13 @@ public class Item extends AbstractWorldObject {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
if (this.customName.isEmpty())
|
||||
if (this.getItemBase() != null)
|
||||
return this.getItemBase().getName();
|
||||
return this.customName;
|
||||
|
||||
if (this.customName.isEmpty() == false)
|
||||
return this.customName;
|
||||
|
||||
ItemTemplate template = ItemTemplate.itemTemplates.get(this.getItemBaseID());
|
||||
return template.item_base_name;
|
||||
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
|
||||
Reference in new issue
Block a user