forked from MagicBane/Server
added hamlet guard logic
This commit is contained in:
@@ -2826,7 +2826,7 @@ public class Enum {
|
|||||||
GuardMinion(GuardCaptain, false, true, true, false, true),
|
GuardMinion(GuardCaptain, false, true, true, false, true),
|
||||||
GuardWallArcher(null, false, true, false, false, false),
|
GuardWallArcher(null, false, true, false, false, false),
|
||||||
Wanderer(null, false, false, false, false, false),
|
Wanderer(null, false, false, false, false, false),
|
||||||
HamletGuard(null, false, false, false, false, false),
|
HamletGuard(null, false, true, false, false, false),
|
||||||
AggroWanderer(null, false, false, false, false, false);
|
AggroWanderer(null, false, false, false, false, false);
|
||||||
|
|
||||||
private static HashMap<Integer, MobBehaviourType> _behaviourTypes = new HashMap<>();
|
private static HashMap<Integer, MobBehaviourType> _behaviourTypes = new HashMap<>();
|
||||||
|
|||||||
@@ -368,6 +368,9 @@ public class MobileFSM {
|
|||||||
case Pet1:
|
case Pet1:
|
||||||
PetLogic(mob);
|
PetLogic(mob);
|
||||||
break;
|
break;
|
||||||
|
case HamletGuard:
|
||||||
|
HamletGuardLogic(mob);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
DefaultLogic(mob);
|
DefaultLogic(mob);
|
||||||
break;
|
break;
|
||||||
@@ -606,10 +609,19 @@ public class MobileFSM {
|
|||||||
CheckForAttack(mob);
|
CheckForAttack(mob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private static void HamletGuardLogic(Mob mob){
|
||||||
|
if (mob.getCombatTarget() == null) {
|
||||||
|
//safehold guard
|
||||||
|
SafeGuardAggro(mob);
|
||||||
|
if(mob.getCombatTarget() != null){
|
||||||
|
CheckForAttack(mob);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
private static void DefaultLogic(Mob mob){
|
private static void DefaultLogic(Mob mob){
|
||||||
//check for players that can be aggroed if mob is agressive and has no target
|
//check for players that can be aggroed if mob is agressive and has no target
|
||||||
if (mob.BehaviourType.isAgressive && mob.getCombatTarget() == null) {
|
if (mob.BehaviourType.isAgressive && mob.getCombatTarget() == null) {
|
||||||
if (mob.BehaviourType == Enum.MobBehaviourType.SimpleStandingGuard) {
|
if (mob.BehaviourType == Enum.MobBehaviourType.HamletGuard) {
|
||||||
//safehold guard
|
//safehold guard
|
||||||
SafeGuardAggro(mob);
|
SafeGuardAggro(mob);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user