loot manager: add nex

This commit is contained in:
Adam
2022-01-05 13:26:02 -05:00
parent ce56056e2f
commit 1a88fcc57b

View File

@@ -353,6 +353,7 @@ public class LootManager
case NpcID.VORKATH_8059: case NpcID.VORKATH_8059:
case NpcID.VORKATH_8060: case NpcID.VORKATH_8060:
case NpcID.VORKATH_8061: case NpcID.VORKATH_8061:
{
int x = worldLocation.getX() + 3; int x = worldLocation.getX() + 3;
int y = worldLocation.getY() + 3; int y = worldLocation.getY() + 3;
if (playerLocationLastTick.getX() < x) if (playerLocationLastTick.getX() < x)
@@ -373,6 +374,27 @@ public class LootManager
} }
worldLocation = new WorldPoint(x, y, worldLocation.getPlane()); worldLocation = new WorldPoint(x, y, worldLocation.getPlane());
break; break;
}
case NpcID.NEX:
case NpcID.NEX_11279:
case NpcID.NEX_11280:
case NpcID.NEX_11281:
case NpcID.NEX_11282:
{
// Nex loot is under the player, or under nex
LocalPoint localPoint = LocalPoint.fromWorld(client, playerLocationLastTick);
if (localPoint != null)
{
int x = localPoint.getSceneX();
int y = localPoint.getSceneY();
final int packed = x << 8 | y;
if (itemSpawns.containsKey(packed))
{
return playerLocationLastTick;
}
}
break;
}
} }
return worldLocation; return worldLocation;