154 {
156 if (!creatureTarget)
157 {
158 return;
159 }
160
164
167
169 {
170 return;
171 }
172
173 bool shouldDie = true;
174 std::list<Creature*> hounds;
176
177
178 if (!hounds.empty())
179 {
180
181 if (std::find_if(hounds.begin(), hounds.end(), [creatureTarget](
Creature const* hound)
182 {
183 return creatureTarget != hound && creatureTarget->IsWithinLOSInMap(hound) && hound->IsAlive() && hound->IsInCombat() && !hound->HasAura(SPELL_PLAY_DEAD);
184 }) != hounds.end())
185 {
186 shouldDie = false;
187 }
188 }
189
190 if (!shouldDie)
191 {
193 {
197 }
198 }
199 else
200 {
203 }
204 }
@ REACT_AGGRESSIVE
Definition: Unit.h:550
@ SPELL_FULL_HEALTH
Definition: molten_core.cpp:36
@ SPELL_FIRE_NOVA_VISUAL
Definition: molten_core.cpp:37
@ EMOTE_IGNITE
Definition: molten_core.cpp:28
@ NPC_CORE_HOUND
Definition: molten_core.h:63
Definition: CreatureAI.h:71
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2173
CreatureAI * AI() const
Definition: Creature.h:143
virtual void RemoveDynamicFlag(uint32 flag)
Definition: Object.h:121
void GetCreaturesWithEntryInRange(std::list< Creature * > &creatureList, float radius, uint32 entry)
Definition: Object.cpp:3084
static void Kill(Unit *killer, Unit *victim, bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition: Unit.cpp:17658
void RemoveUnitFlag2(UnitFlags2 flags)
Definition: Unit.h:690
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4891
bool IsInCombat() const
Definition: Unit.h:820