1352 {
1353 if (aurEff->GetTotalTicks() > 0 && aurEff->GetTickNumber() ==
uint32(aurEff->GetTotalTicks()) - 1)
1354 {
1357 if (!target || !caster || !caster->
IsCreature())
1358 return;
1359
1361 {
1362 if (
Unit* caster2 = aur->GetCaster())
1363 {
1364 if (caster2->IsCreature())
1365 {
1366 caster2->ToCreature()->DespawnOrUnsummon();
1367 }
1368 }
1370 return;
1371 }
1373 {
1376 {
1379 }
1380 }
1382 {
1384 {
1387 }
1388 }
1389 }
1390 }
std::uint32_t uint32
Definition: Define.h:107
@ SPELL_FLASH_FREEZE_TRAPPED_PLAYER
Definition: boss_hodir.cpp:41
@ SPELL_FLASH_FREEZE_INSTAKILL
Definition: boss_hodir.cpp:40
@ SPELL_FLASH_FREEZE_TRAPPED_NPC
Definition: boss_hodir.cpp:42
@ NPC_FLASH_FREEZE_NPC
Definition: boss_hodir.cpp:110
@ NPC_FLASH_FREEZE_PLR
Definition: boss_hodir.cpp:109
@ TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN
Definition: Object.h:47
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: Object.h:51
virtual void SetData(uint32, uint32)
Definition: UnitAI.h:214
virtual void JustSummoned(Creature *)
Definition: CreatureAI.h:134
Definition: Creature.h:43
CreatureAI * AI() const
Definition: Creature.h:140
bool IsPlayer() const
Definition: Object.h:200
bool IsCreature() const
Definition: Object.h:204
Creature * ToCreature()
Definition: Object.h:205
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2366
float GetPositionZ() const
Definition: Position.h:118
float GetPositionX() const
Definition: Position.h:116
float GetPositionY() const
Definition: Position.h:117
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5581
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1167
Definition: SpellAuras.h:87
Unit * GetCaster() const
Definition: SpellScript.cpp:1020
Unit * GetTarget() const
Definition: SpellScript.cpp:1165