Replace get npc name associate array method to indexed array method (#493)

This commit is contained in:
Jeremy
2021-04-24 04:03:04 +12:00
committed by GitHub
parent 48d7b09bdd
commit e1fde5c1d3
@@ -163,7 +163,14 @@ public class CombatSounds {
}
public static String GetNpcName(int NpcID) {
return NpcHandler.NpcList[NpcID].npcName;
for (int i = 0; i < NpcHandler.NpcList.length; i++) {
if (NpcHandler.NpcList[i] != null) {
if (NpcHandler.NpcList[i].npcId == NpcID) {
return NpcHandler.NpcList[i].npcName;
}
}
}
return "";
}
public static String getItemName(int ItemID) {