@ -63,12 +63,10 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -63,12 +63,10 @@ public class Mob extends AbstractIntelligenceAgent {
public float spawnRadius ;
//used by static mobs
public int parentZoneUUID ;
protected int dbID ; //the database ID
private int currentID ;
//TODO implement feared object system
public AbstractWorldObject fearedObject = null ;
protected int dbID ; //the database ID
private int currentID ;
private long lastAttackTime = 0 ;
private int lastMobPowerToken = 0 ;
private HashMap < Integer , MobEquipment > equip = null ;
@ -314,13 +312,13 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -314,13 +312,13 @@ public class Mob extends AbstractIntelligenceAgent {
writer . put ( ( byte ) 1 ) ;
if ( ( PlayerCharacter ) mob . guardCaptain ! = null ) {
if ( mob . guardCaptain ! = null ) {
writer . putInt ( ( ( PlayerCharacter ) mob . guardCaptain ) . getObjectType ( ) . ordinal ( ) ) ;
writer . putInt ( mob . guardCaptain . getObjectType ( ) . ordinal ( ) ) ;
writer . putInt ( ( ( PlayerCharacter ) mob . guardCaptain ) . getObjectUUID ( ) ) ;
writer . putInt ( mob . guardCaptain . getObjectUUID ( ) ) ;
} else {
writer . putInt ( 0 ) ; //ownerType
writer . putInt ( 0 ) ; //ownerID
@ -554,6 +552,7 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -554,6 +552,7 @@ public class Mob extends AbstractIntelligenceAgent {
return petMinion ;
}
public static Mob getMob ( int id ) {
if ( id = = 0 )
@ -696,7 +695,7 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -696,7 +695,7 @@ public class Mob extends AbstractIntelligenceAgent {
public Vector3fImmutable getBindLoc ( ) {
if ( this . isPet ( ) & & ! this . behaviourType . equals ( MobBehaviourType . SiegeEngine ) )
return ( PlayerCharacter ) this . guardCaptain ! = null ? ( ( PlayerCharacter ) this . guardCaptain ) . getLoc ( ) : this . getLoc ( ) ;
return this . guardCaptain ! = null ? this . guardCaptain . getLoc ( ) : this . getLoc ( ) ;
else
return this . bindLoc ;
}
@ -1599,8 +1598,8 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -1599,8 +1598,8 @@ public class Mob extends AbstractIntelligenceAgent {
//TODO set these correctly later
this . rangeHandOne = this . mobBase . getAttackRange ( ) ;
this . rangeHandTwo = - 1 ;
this . minDamageHandOne = ( int ) this . mobBase . getMinDmg ( ) ;
this . maxDamageHandOne = ( int ) this . mobBase . getMaxDmg ( ) ;
this . minDamageHandOne = ( int ) this . mobBase . getMinDmg ( ) ;
this . maxDamageHandOne = ( int ) this . mobBase . getMaxDmg ( ) ;
this . minDamageHandTwo = 0 ;
this . maxDamageHandTwo = 0 ;
this . atrHandOne = this . mobBase . getAtr ( ) ;
@ -1665,7 +1664,6 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -1665,7 +1664,6 @@ public class Mob extends AbstractIntelligenceAgent {
this . enemy . addAll ( this . getMobBase ( ) . enemy ) ;
}
try {
NPCManager . applyRuneSetEffects ( this ) ;
recalculateStats ( ) ;
this . setHealth ( this . healthMax ) ;
@ -1678,15 +1676,11 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -1678,15 +1676,11 @@ public class Mob extends AbstractIntelligenceAgent {
//assign 5 random patrol points for regular mobs
if ( this . agentType . equals ( AIAgentType . MOBILE ) ) {
if ( this . agentType . equals ( AIAgentType . MOBILE ) )
NPCManager . AssignPatrolPoints ( this ) ;
}
this . deathTime = 0 ;
} catch ( Exception e ) {
Logger . error ( e . getMessage ( ) ) ;
}
}
@Override