mta: Use equals when comparing objects

This commit is contained in:
sdburns1998
2019-07-07 15:48:00 +02:00
parent 6b644f92cd
commit 31990d7a4d
2 changed files with 3 additions and 3 deletions

View File

@@ -121,7 +121,7 @@ public class AlchemyRoom extends MTARoom
} }
AlchemyItem bestItem = getBest(); AlchemyItem bestItem = getBest();
if (best == null || best != bestItem) if (best == null || !best.equals(bestItem))
{ {
if (best != null) if (best != null)
{ {
@@ -396,7 +396,7 @@ public class AlchemyRoom extends MTARoom
continue; continue;
} }
if (alchemyItem == best) if (alchemyItem.equals(best))
{ {
client.setHintArrow(object.getWorldLocation()); client.setHintArrow(object.getWorldLocation());
found = true; found = true;

View File

@@ -219,7 +219,7 @@ public class TelekineticRoom extends MTARoom
{ {
NPC npc = event.getNpc(); NPC npc = event.getNpc();
if (npc == guardian) if (npc.equals(guardian))
{ {
guardian = null; guardian = null;
} }