|
|
@ -18,6 +18,7 @@ import engine.job.JobContainer; |
|
|
|
import engine.job.JobScheduler; |
|
|
|
import engine.job.JobScheduler; |
|
|
|
import engine.jobs.UpgradeNPCJob; |
|
|
|
import engine.jobs.UpgradeNPCJob; |
|
|
|
import engine.math.Bounds; |
|
|
|
import engine.math.Bounds; |
|
|
|
|
|
|
|
import engine.math.Quaternion; |
|
|
|
import engine.math.Vector3f; |
|
|
|
import engine.math.Vector3f; |
|
|
|
import engine.math.Vector3fImmutable; |
|
|
|
import engine.math.Vector3fImmutable; |
|
|
|
import engine.net.ByteBufferWriter; |
|
|
|
import engine.net.ByteBufferWriter; |
|
|
@ -319,6 +320,7 @@ public class NPC extends AbstractCharacter { |
|
|
|
|
|
|
|
|
|
|
|
int slot; |
|
|
|
int slot; |
|
|
|
Vector3fImmutable slotLocation; |
|
|
|
Vector3fImmutable slotLocation; |
|
|
|
|
|
|
|
Quaternion slotRotation; |
|
|
|
|
|
|
|
|
|
|
|
if (ConfigManager.serverType.equals(ServerType.LOGINSERVER)) |
|
|
|
if (ConfigManager.serverType.equals(ServerType.LOGINSERVER)) |
|
|
|
return; |
|
|
|
return; |
|
|
@ -358,7 +360,7 @@ public class NPC extends AbstractCharacter { |
|
|
|
// Override bind and location for this npc derived
|
|
|
|
// Override bind and location for this npc derived
|
|
|
|
// from BuildingManager slot location data.
|
|
|
|
// from BuildingManager slot location data.
|
|
|
|
|
|
|
|
|
|
|
|
slotLocation = BuildingManager.getSlotLocation(building, slot); |
|
|
|
slotLocation = BuildingManager.getSlotLocation(building, slot).getLocation(); |
|
|
|
|
|
|
|
|
|
|
|
this.bindLoc = building.getLoc().add(slotLocation); |
|
|
|
this.bindLoc = building.getLoc().add(slotLocation); |
|
|
|
|
|
|
|
|
|
|
@ -368,6 +370,11 @@ public class NPC extends AbstractCharacter { |
|
|
|
|
|
|
|
|
|
|
|
this.loc = new Vector3fImmutable(bindLoc); |
|
|
|
this.loc = new Vector3fImmutable(bindLoc); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Rotate NPC by slot rotation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
slotRotation = BuildingManager.getSlotLocation(building, slot).getRotation(); |
|
|
|
|
|
|
|
this.setRot(new Vector3f(0, slotRotation.y, 0)); |
|
|
|
|
|
|
|
|
|
|
|
// Configure region and floor/level for this NPC
|
|
|
|
// Configure region and floor/level for this NPC
|
|
|
|
|
|
|
|
|
|
|
|
this.region = BuildingManager.GetRegion(this.building, bindLoc.x, bindLoc.y, bindLoc.z); |
|
|
|
this.region = BuildingManager.GetRegion(this.building, bindLoc.x, bindLoc.y, bindLoc.z); |
|
|
|