forked from MagicBane/Server
logic for wall archers
This commit is contained in:
@@ -502,29 +502,12 @@ public class MobileFSM {
|
|||||||
}
|
}
|
||||||
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){
|
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){
|
||||||
//this is a player slotted guard minion
|
//this is a player slotted guard minion
|
||||||
if(mob.despawned){
|
GuardMinionLogic(mob);
|
||||||
if(System.currentTimeMillis() > mob.deathTime + (mob.spawnTime * 1000)){
|
return;
|
||||||
if(mob.getEquipmentSetID() != ((Mob)mob.npcOwner).getEquipmentSetID()){
|
}
|
||||||
mob.equipmentSetID = ((Mob)mob.npcOwner).getEquipmentSetID();
|
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardWallArcher.ordinal()){
|
||||||
mob.runAfterLoad();
|
//this is a player slotted guard minion
|
||||||
}
|
GuardWallArcherLogic(mob);
|
||||||
mob.respawn();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(mob.isAlive() == false){
|
|
||||||
CheckForRespawn(mob);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
CheckToSendMobHome(mob);
|
|
||||||
if(mob.npcOwner.isAlive() == false){
|
|
||||||
CheckForPlayerGuardAggro(mob);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
CheckMobMovement(mob);
|
|
||||||
if(mob.getCombatTarget() != null){
|
|
||||||
CheckForAttack(mob);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mob.isPet() == false && mob.isSummonedPet() == false && mob.isNecroPet() == false) {
|
if (mob.isPet() == false && mob.isSummonedPet() == false && mob.isNecroPet() == false) {
|
||||||
@@ -783,6 +766,44 @@ public class MobileFSM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public static void GuardMinionLogic(Mob mob){
|
||||||
|
if(mob.despawned){
|
||||||
|
if(System.currentTimeMillis() > mob.deathTime + (mob.spawnTime * 1000)){
|
||||||
|
if(mob.getEquipmentSetID() != ((Mob)mob.npcOwner).getEquipmentSetID()){
|
||||||
|
mob.equipmentSetID = ((Mob)mob.npcOwner).getEquipmentSetID();
|
||||||
|
mob.runAfterLoad();
|
||||||
|
}
|
||||||
|
mob.respawn();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(mob.isAlive() == false){
|
||||||
|
CheckForRespawn(mob);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CheckToSendMobHome(mob);
|
||||||
|
if(mob.npcOwner.isAlive() == false){
|
||||||
|
CheckForPlayerGuardAggro(mob);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CheckMobMovement(mob);
|
||||||
|
if(mob.getCombatTarget() != null){
|
||||||
|
CheckForAttack(mob);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void GuardWallArcherLogic(Mob mob){
|
||||||
|
if(mob.isAlive() == false){
|
||||||
|
CheckForRespawn(mob);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(mob.npcOwner.isAlive() == false){
|
||||||
|
CheckForPlayerGuardAggro(mob);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(mob.getCombatTarget() != null){
|
||||||
|
CheckForAttack(mob);
|
||||||
|
}
|
||||||
|
}
|
||||||
public static void CheckForPlayerGuardAggro(Mob mob) {
|
public static void CheckForPlayerGuardAggro(Mob mob) {
|
||||||
//looks for and sets mobs combatTarget
|
//looks for and sets mobs combatTarget
|
||||||
if (!mob.isAlive()) {
|
if (!mob.isAlive()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user