Misc Fixes
This commit is contained in:
@@ -73,16 +73,25 @@ namespace Game.AI
|
||||
if (!me.IsWithinMeleeRange(victim))
|
||||
return;
|
||||
|
||||
bool sparAttack = me.GetFactionTemplateEntry().ShouldSparAttack() && victim.GetFactionTemplateEntry().ShouldSparAttack();
|
||||
//Make sure our attack is ready and we aren't currently casting before checking distance
|
||||
if (me.isAttackReady())
|
||||
{
|
||||
me.AttackerStateUpdate(victim);
|
||||
if (sparAttack)
|
||||
me.FakeAttackerStateUpdate(victim);
|
||||
else
|
||||
me.AttackerStateUpdate(victim);
|
||||
|
||||
me.resetAttackTimer();
|
||||
}
|
||||
|
||||
if (me.haveOffhandWeapon() && me.isAttackReady(WeaponAttackType.OffAttack))
|
||||
{
|
||||
me.AttackerStateUpdate(victim, WeaponAttackType.OffAttack);
|
||||
if (sparAttack)
|
||||
me.FakeAttackerStateUpdate(victim, WeaponAttackType.OffAttack);
|
||||
else
|
||||
me.AttackerStateUpdate(victim, WeaponAttackType.OffAttack);
|
||||
|
||||
me.resetAttackTimer(WeaponAttackType.OffAttack);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -594,6 +594,7 @@ namespace Game.AI
|
||||
|
||||
if (!who)
|
||||
who = me;
|
||||
|
||||
TempSummon whoSummon = who.ToTempSummon();
|
||||
if (whoSummon)
|
||||
{
|
||||
@@ -602,7 +603,7 @@ namespace Game.AI
|
||||
return;
|
||||
}
|
||||
|
||||
me.DespawnOrUnsummon(0, TimeSpan.FromSeconds(delayToRespawn));
|
||||
who.DespawnOrUnsummon(0, TimeSpan.FromSeconds(delayToRespawn));
|
||||
|
||||
if (instance != null && who == me)
|
||||
instance.SetBossState(_bossId, EncounterState.Fail);
|
||||
|
||||
@@ -1069,12 +1069,7 @@ namespace Game.AI
|
||||
if (obj.IsTypeId(TypeId.Unit))
|
||||
{
|
||||
Creature target = obj.ToCreature();
|
||||
if (target.IsAlive() && IsSmart(target))
|
||||
{
|
||||
((SmartAI)target.GetAI()).SetDespawnTime(e.Action.forceDespawn.delay + 1, e.Action.forceDespawn.respawn); // Next tick
|
||||
((SmartAI)target.GetAI()).StartDespawn();
|
||||
}
|
||||
else
|
||||
if (target)
|
||||
target.DespawnOrUnsummon(e.Action.forceDespawn.delay, TimeSpan.FromSeconds(e.Action.forceDespawn.respawn));
|
||||
}
|
||||
else if (obj.IsTypeId(TypeId.GameObject))
|
||||
|
||||
Reference in New Issue
Block a user