|
|
@ -77,7 +77,6 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
public float spawnRadius; |
|
|
|
public float spawnRadius; |
|
|
|
//used by static mobs
|
|
|
|
//used by static mobs
|
|
|
|
public int parentZoneUUID; |
|
|
|
public int parentZoneUUID; |
|
|
|
public boolean isSiege = false; |
|
|
|
|
|
|
|
protected int dbID; //the database ID
|
|
|
|
protected int dbID; //the database ID
|
|
|
|
|
|
|
|
|
|
|
|
private int currentID; |
|
|
|
private int currentID; |
|
|
@ -371,7 +370,7 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
|
|
|
|
|
|
|
|
if (!mob.isAlive() && !mob.isPet() && !mob.isNecroPet() && !mob.isSiege && !mob.isPlayerGuard) { |
|
|
|
if (!mob.isAlive() && !mob.isPet() && !mob.isNecroPet() && !mob.behaviourType.equals(MobBehaviourType.SiegeEngine) && !mob.isPlayerGuard) { |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
} |
|
|
|
} |
|
|
@ -382,7 +381,7 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
writer.putInt(2); |
|
|
|
writer.putInt(2); |
|
|
|
writer.putInt(0x00008A2E); |
|
|
|
writer.putInt(0x00008A2E); |
|
|
|
writer.putInt(0x1AB84003); |
|
|
|
writer.putInt(0x1AB84003); |
|
|
|
} else if (mob.isSiege) { |
|
|
|
} else if (mob.behaviourType.equals(MobBehaviourType.SiegeEngine)) { |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(74620179); |
|
|
|
writer.putInt(74620179); |
|
|
|
} else |
|
|
|
} else |
|
|
@ -685,7 +684,7 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
mob.setObjectTypeMask(MBServerStatics.MASK_MOB | mob.getTypeMasks()); |
|
|
|
mob.setObjectTypeMask(MBServerStatics.MASK_MOB | mob.getTypeMasks()); |
|
|
|
|
|
|
|
|
|
|
|
//mob.setMob();
|
|
|
|
//mob.setMob();
|
|
|
|
mob.setSiege(true); |
|
|
|
// mob.setSiege(true);
|
|
|
|
|
|
|
|
|
|
|
|
int slot = 0; |
|
|
|
int slot = 0; |
|
|
|
|
|
|
|
|
|
|
@ -805,9 +804,10 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Vector3fImmutable getBindLoc() { |
|
|
|
public Vector3fImmutable getBindLoc() { |
|
|
|
|
|
|
|
|
|
|
|
if (this.isPet() && !this.isSiege) |
|
|
|
if (this.isPet() && !this.behaviourType.equals(MobBehaviourType.SiegeEngine)) |
|
|
|
return this.getOwner() != null ? this.getOwner().getLoc() : this.getLoc(); |
|
|
|
return this.getOwner() != null ? this.getOwner().getLoc() : this.getLoc(); |
|
|
|
return this.bindLoc; |
|
|
|
else |
|
|
|
|
|
|
|
return this.bindLoc; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void calculateModifiedStats() { |
|
|
|
public void calculateModifiedStats() { |
|
|
@ -982,7 +982,7 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
try { |
|
|
|
try { |
|
|
|
//resync corpses
|
|
|
|
//resync corpses
|
|
|
|
//this.setLoc(this.getMovementLoc());
|
|
|
|
//this.setLoc(this.getMovementLoc());
|
|
|
|
if (this.isSiege) { |
|
|
|
if (this.behaviourType.equals(MobBehaviourType.SiegeEngine)) { |
|
|
|
this.deathTime = System.currentTimeMillis(); |
|
|
|
this.deathTime = System.currentTimeMillis(); |
|
|
|
//this.state = STATE.Dead;
|
|
|
|
//this.state = STATE.Dead;
|
|
|
|
try { |
|
|
|
try { |
|
|
@ -1089,7 +1089,7 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
else if (this.building != null) |
|
|
|
else if (this.building != null) |
|
|
|
this.region = BuildingManager.GetRegion(this.building, bindLoc.x, bindLoc.y, bindLoc.z); |
|
|
|
this.region = BuildingManager.GetRegion(this.building, bindLoc.x, bindLoc.y, bindLoc.z); |
|
|
|
|
|
|
|
|
|
|
|
if (!this.isSiege && !this.isPlayerGuard && contract == null) |
|
|
|
if (!this.behaviourType.equals(MobBehaviourType.SiegeEngine) && !this.isPlayerGuard && contract == null) |
|
|
|
loadInventory(); |
|
|
|
loadInventory(); |
|
|
|
|
|
|
|
|
|
|
|
this.updateLocation(); |
|
|
|
this.updateLocation(); |
|
|
@ -1840,11 +1840,7 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isSiege() { |
|
|
|
public boolean isSiege() { |
|
|
|
return isSiege; |
|
|
|
return this.behaviourType.equals(MobBehaviourType.SiegeEngine); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setSiege(boolean isSiege) { |
|
|
|
|
|
|
|
this.isSiege = isSiege; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setNpcOwner(AbstractCharacter npcOwner) { |
|
|
|
public void setNpcOwner(AbstractCharacter npcOwner) { |
|
|
|