mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-02 16:49:03 +00:00
Replace get npc name associate array method to indexed array method (#493)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user