[Spells] Implemented SPA 281 SE_PetFeignMinion (#1900)

* start

* update

* debugs in

* test

* clean up

* debugs removed

* Update mob_ai.cpp

* Update spdat.h

* [Spells] Implemented SPA 281 SE_PetFeignMinion

debug remoevd

* [Spells] Implemented SPA 281 SE_PetFeignMinion

npc forget timer

* [Spells] Implemented SPA 281 SE_PetFeignMinion
This commit is contained in:
KayenEQ
2021-12-27 11:33:57 -05:00
committed by GitHub
parent 7f23c93ce5
commit 323b35989c
13 changed files with 164 additions and 81 deletions
+21
View File
@@ -109,6 +109,7 @@ Mob::Mob(
stunned_timer(0),
spun_timer(0),
bardsong_timer(6000),
forget_timer(0),
gravity_timer(1000),
viral_timer(0),
m_FearWalkTarget(-999999.0f, -999999.0f, -999999.0f),
@@ -282,6 +283,8 @@ Mob::Mob(
InitializeBuffSlots();
feigned = false;
// clear the proc arrays
for (int j = 0; j < MAX_PROCS; j++) {
PermaProcs[j].spellID = SPELL_UNKNOWN;
@@ -6505,6 +6508,24 @@ void Mob::ShieldAbilityClearVariables()
}
}
void Mob::SetFeigned(bool in_feigned) {
if (in_feigned) {
if (IsClient()) {
if (RuleB(Character, FeignKillsPet)){
SetPet(0);
}
CastToClient()->SetHorseId(0);
}
entity_list.ClearFeignAggro(this);
forget_timer.Start(FeignMemoryDuration);
}
else {
forget_timer.Disable();
}
feigned = in_feigned;
}
#ifdef BOTS
bool Mob::JoinHealRotationTargetPool(std::shared_ptr<HealRotation>* heal_rotation)
{