Refactor itembase.name to template.

This commit is contained in:
2024-02-28 16:31:09 -05:00
parent 507769c6b6
commit d9775dbf4e
17 changed files with 131 additions and 90 deletions
+7 -3
View File
@@ -83,10 +83,14 @@ public enum LootManager {
for (Item it : mob.getInventory()) {
ItemBase ib = it.getItemBase();
if(ib == null)
if (ib == null)
break;
if (ib.isDiscRune() || ib.getName().toLowerCase().contains("of the gods")) {
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().zoneName + " has found the " + ib.getName() + ". Are you tough enough to take it?");
ItemTemplate template = ItemTemplate.itemTemplates.get(it.getItemBaseID());
if (ib.isDiscRune() || template.item_base_name.toLowerCase().contains("of the gods")) {
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().zoneName + " has found the " + template.item_base_name + ". Are you tough enough to take it?");
chatMsg.setMessageType(10);
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
DispatchMessage.dispatchMsgToAll(chatMsg);