TrinityCore
boss_krickandick.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "pit_of_saron.h"
19#include "InstanceScript.h"
20#include "Map.h"
21#include "MotionMaster.h"
22#include "ObjectAccessor.h"
23#include "Player.h"
24#include "ScriptedCreature.h"
25#include "ScriptMgr.h"
26#include "SpellInfo.h"
27#include "SpellScript.h"
28#include "TemporarySummon.h"
29#include "Vehicle.h"
30
32{
33 SPELL_MIGHTY_KICK = 69021, // ick's spell
34 SPELL_SHADOW_BOLT = 69028, // krick's spell
35 SPELL_TOXIC_WASTE = 69024, // krick's spell
36 SPELL_EXPLOSIVE_BARRAGE_KRICK = 69012, // special spell 1
37 SPELL_EXPLOSIVE_BARRAGE_ICK = 69263, // special spell 1
38 SPELL_POISON_NOVA = 68989, // special spell 2
39 SPELL_PURSUIT = 68987, // special spell 3
40
42 SPELL_EXPLODING_ORB = 69017, // visual on exploding orb
43 SPELL_AUTO_GROW = 69020, // grow effect on exploding orb
44 SPELL_HASTY_GROW = 44851, // need to check growing stacks
45 SPELL_EXPLOSIVE_BARRAGE_DAMAGE = 69019, // damage done by orb while exploding
46
47 SPELL_STRANGULATING = 69413, // krick's selfcast in intro
51};
52
54{
55 // Krick
66
67 // Ick
70
71 // OUTRO
80};
81
83{
87 EVENT_SPECIAL, // special spell selection (one of event EVENT_PURSUIT, EVENT_POISON_NOVA or EVENT_EXPLOSIVE_BARRAGE)
91
92 // Krick OUTRO
108
110{
112 PHASE_OUTRO = 2
114
116{
121
123{
125 POINT_KRICK_DEATH = 364771
127
128static Position const outroPos[8] =
129{
130 { 828.9342f, 118.6247f, 509.5190f, 0.0000000f }, // Krick's Outro Position
131 { 841.0100f, 196.2450f, 573.9640f, 0.2046099f }, // Scourgelord Tyrannus Outro Position (Tele to...)
132 { 777.2274f, 119.5521f, 510.0363f, 6.0562930f }, // Sylvanas / Jaine Outro Spawn Position (NPC_SYLVANAS_PART1)
133 { 823.3984f, 114.4907f, 509.4899f, 0.0000000f }, // Sylvanas / Jaine Outro Move Position (1)
134 { 835.5887f, 139.4345f, 530.9526f, 0.0000000f }, // Tyrannus fly down Position (not sniffed)
135 { 828.9342f, 118.6247f, 514.5190f, 0.0000000f }, // Krick's Choke Position
136 { 828.9342f, 118.6247f, 509.4958f, 0.0000000f }, // Kirck's Death Position
137 { 914.4820f, 143.1602f, 633.3624f, 0.0000000f } // Tyrannus fly up (not sniffed)
138};
139
140struct boss_ick : public BossAI
141{
142 boss_ick(Creature* creature) : BossAI(creature, DATA_ICK)
143 {
144 _oldTargetThreat = 0.0f;
145 }
146
147 void Reset() override
148 {
149 _Reset();
150
152 _oldTargetThreat = 0.0f;
153 }
154
155 void JustSummoned(Creature* summon) override
156 {
157 if (summon->GetEntry() == NPC_KRICK)
158 return;
159
160 BossAI::JustSummoned(summon);
161 }
162
163 void JustEngagedWith(Unit* who) override
164 {
166
167 if (Creature* krick = GetKrick())
168 krick->AI()->Talk(SAY_KRICK_AGGRO);
169
174 }
175
176 void JustDied(Unit* /*killer*/) override
177 {
178 _JustDied();
179
180 if (Vehicle* _vehicle = me->GetVehicleKit())
181 _vehicle->RemoveAllPassengers();
182
183 if (Creature* krick = GetKrick())
184 {
185 ForceCombatStop(krick, false);
186 if (krick->AI())
187 krick->AI()->DoAction(ACTION_OUTRO);
188 }
189 }
190
191 void DoAction(int32 actionId) override
192 {
193 switch (actionId)
194 {
196 if (Unit* victim = me->GetVictim())
197 {
198 _oldTargetGUID = victim->GetGUID();
199 _oldTargetThreat = GetThreat(victim);
200 }
201 break;
204
205 if (Unit* oldTarget = ObjectAccessor::GetUnit(*me, _oldTargetGUID))
206 {
207 AddThreat(oldTarget, _oldTargetThreat);
209 _oldTargetThreat = 0.0f;
210 }
211 if (Unit* current = me->GetVictim())
212 ResetThreat(current);
213 break;
214 default:
215 break;
216 }
217 }
218
219 void UpdateAI(uint32 diff) override
220 {
221 if (!UpdateVictim())
222 return;
223
224 events.Update(diff);
225
227 return;
228
229 while (uint32 eventId = events.ExecuteEvent())
230 {
231 switch (eventId)
232 {
234 if (Creature* krick = GetKrick())
235 {
236 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.f, true))
237 krick->CastSpell(target, SPELL_TOXIC_WASTE);
238 }
240 break;
242 if (Creature* krick = GetKrick())
243 {
244 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.f, true))
245 krick->CastSpell(target, SPELL_SHADOW_BOLT);
246 }
248 return;
252 return;
253 case EVENT_SPECIAL:
254 // Select one of these three special events
257 break;
259 if (Creature* krick = GetKrick())
260 {
261 krick->AI()->Talk(SAY_KRICK_BARRAGE_1);
262 krick->AI()->Talk(SAY_KRICK_BARRAGE_2);
263 krick->CastSpell(krick, SPELL_EXPLOSIVE_BARRAGE_KRICK, true);
265 }
266 events.DelayEvents(20s);
267 break;
269 if (Creature* krick = GetKrick())
270 krick->AI()->Talk(SAY_KRICK_POISON_NOVA);
271
274 break;
275 case EVENT_PURSUIT:
276 if (Creature* krick = GetKrick())
277 krick->AI()->Talk(SAY_KRICK_CHASE);
279 break;
280 default:
281 break;
282 }
283
285 return;
286 }
287 }
288
289private:
291 {
293 }
294
297};
298
299struct boss_krick : public ScriptedAI
300{
301 boss_krick(Creature* creature) : ScriptedAI(creature), _instanceScript(creature->GetInstanceScript()), _summons(creature)
302 {
303 Initialize();
304 }
305
307 {
311 }
312
313 void Reset() override
314 {
315 _events.Reset();
316 Initialize();
317
320 }
321
322 void KilledUnit(Unit* victim) override
323 {
324 if (victim->GetTypeId() != TYPEID_PLAYER)
325 return;
326
328 }
329
330 void JustSummoned(Creature* summon) override
331 {
332 _summons.Summon(summon);
333 if (summon->GetEntry() == NPC_EXPLODING_ORB)
334 {
335 summon->CastSpell(summon, SPELL_EXPLODING_ORB, true);
336 summon->CastSpell(summon, SPELL_AUTO_GROW, true);
337 }
338 }
339
340 void DoAction(int32 actionId) override
341 {
342 if (actionId == ACTION_OUTRO)
343 {
345 tyrannusPtr->NearTeleportTo(outroPos[1].GetPositionX(), outroPos[1].GetPositionY(), outroPos[1].GetPositionZ(), outroPos[1].GetOrientation());
347 {
348 newTyrannus->SetCanFly(true);
349 newTyrannus->SetFacingToObject(me);
350 }
351
352 me->GetMotionMaster()->MovePoint(POINT_KRICK_INTRO, outroPos[0].GetPositionX(), outroPos[0].GetPositionY(), outroPos[0].GetPositionZ());
353 }
354 }
355
356 void MovementInform(uint32 type, uint32 id) override
357 {
358 if (type != POINT_MOTION_TYPE || id != POINT_KRICK_INTRO)
359 return;
360
363 _events.Reset();
365 }
366
367 void UpdateAI(uint32 diff) override
368 {
369 if (_phase != PHASE_OUTRO)
370 return;
371
372 _events.Update(diff);
373
374 while (uint32 eventId = _events.ExecuteEvent())
375 {
376 switch (eventId)
377 {
378 case EVENT_OUTRO_1:
379 {
381 temp->DespawnOrUnsummon();
382
383 Creature* jainaOrSylvanas = nullptr;
386 else
388
389 if (jainaOrSylvanas)
390 {
391 jainaOrSylvanas->GetMotionMaster()->MovePoint(0, outroPos[3]);
392 _outroNpcGUID = jainaOrSylvanas->GetGUID();
393 }
395 break;
396 }
397 case EVENT_OUTRO_2:
398 if (Creature* jainaOrSylvanas = ObjectAccessor::GetCreature(*me, _outroNpcGUID))
399 {
400 jainaOrSylvanas->SetFacingToObject(me);
401 me->SetFacingToObject(jainaOrSylvanas);
403 jainaOrSylvanas->AI()->Talk(SAY_JAYNA_OUTRO_2);
404 else
405 jainaOrSylvanas->AI()->Talk(SAY_SYLVANAS_OUTRO_2);
406 }
408 break;
409 case EVENT_OUTRO_3:
412 break;
413 case EVENT_OUTRO_4:
414 if (Creature* jainaOrSylvanas = ObjectAccessor::GetCreature(*me, _outroNpcGUID))
415 {
417 jainaOrSylvanas->AI()->Talk(SAY_JAYNA_OUTRO_4);
418 else
419 jainaOrSylvanas->AI()->Talk(SAY_SYLVANAS_OUTRO_4);
420 }
422 break;
423 case EVENT_OUTRO_5:
426 break;
427 case EVENT_OUTRO_6:
429 {
430 tyrannus->SetSpeedRate(MOVE_FLIGHT, 3.5f);
431 tyrannus->GetMotionMaster()->MovePoint(1, outroPos[4]);
432 _tyrannusGUID = tyrannus->GetGUID();
433 }
435 break;
436 case EVENT_OUTRO_7:
438 tyrannus->AI()->Talk(SAY_TYRANNUS_OUTRO_7);
440 break;
441 case EVENT_OUTRO_8:
447 break;
448 case EVENT_OUTRO_9:
451 // there shall be some visual spell effect
453 tyrannus->CastSpell(me, SPELL_NECROMANTIC_POWER, true); //not sure if it's the right spell :/
455 break;
456 case EVENT_OUTRO_10:
462 break;
463 case EVENT_OUTRO_11:
464 DoCast(me, SPELL_KRICK_KILL_CREDIT); // don't really know if we need it
466 me->SetHealth(0);
468 break;
469 case EVENT_OUTRO_12:
471 tyrannus->AI()->Talk(SAY_TYRANNUS_OUTRO_9);
473 break;
474 case EVENT_OUTRO_13:
475 if (Creature* jainaOrSylvanas = ObjectAccessor::GetCreature(*me, _outroNpcGUID))
476 {
478 jainaOrSylvanas->AI()->Talk(SAY_JAYNA_OUTRO_10);
479 else
480 jainaOrSylvanas->AI()->Talk(SAY_SYLVANAS_OUTRO_10);
481 }
482 // End of OUTRO. for now...
485 tyrannus->GetMotionMaster()->MovePoint(0, outroPos[7]);
486 break;
487 case EVENT_OUTRO_END:
489 tyrannus->DespawnOrUnsummon();
490
492 break;
493 default:
494 break;
495 }
496 }
497 }
498
499private:
501 {
503 }
504
508
512};
513
514// 69012 - Explosive Barrage
516{
517 void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
518 {
520 Unit* caster = GetCaster();
521 if (!caster || caster->GetTypeId() != TYPEID_UNIT)
522 return;
523
524 Map::PlayerList const& players = caster->GetMap()->GetPlayers();
525 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
526 {
527 if (Player* player = itr->GetSource())
528 if (player->IsWithinDist(caster, 60.0f)) // don't know correct range
529 caster->CastSpell(player, SPELL_EXPLOSIVE_BARRAGE_SUMMON, true);
530 }
531 }
532
533 void Register() override
534 {
536 }
537};
538
539// 69263 - Explosive Barrage
541{
542 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
543 {
544 Unit* caster = GetCaster();
545 if (!caster || caster->GetTypeId() != TYPEID_UNIT)
546 return;
547
548 caster->GetMotionMaster()->MoveIdle();
550 }
551
552 void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
553 {
554 Unit* caster = GetCaster();
555 if (!caster || caster->GetTypeId() != TYPEID_UNIT)
556 return;
557
558 if (Unit* victim = caster->GetVictim())
559 caster->GetMotionMaster()->MoveChase(victim);
560 }
561
562 void Register() override
563 {
566 }
567};
568
569// 44851 - Hasty Grow
571{
572 void OnStackChange(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
573 {
574 if (GetStackAmount() == 15)
575 {
576 Unit* target = GetTarget(); // store target because aura gets removed
577 target->CastSpell(target, SPELL_EXPLOSIVE_BARRAGE_DAMAGE, false);
581 if (Creature* creature = target->ToCreature())
582 creature->DespawnOrUnsummon();
583 }
584 }
585
586 void Register() override
587 {
589 }
590};
591
592// 68987 - Pursuit
594{
596 {
597 Unit* target = GetHitUnit();
598 if (Creature* ick = GetCaster()->ToCreature())
599 {
600 ick->AI()->Talk(SAY_ICK_CHASE_1, target);
601 ick->AddAura(GetSpellInfo()->Id, target);
602 ick->AI()->DoAction(ACTION_STORE_OLD_TARGET);
603 ick->GetThreatManager().AddThreat(target, float(GetEffectValue()), GetSpellInfo(), true, true);
604 ick->GetThreatManager().FixateTarget(target);
605 }
606 }
607
608 void Register() override
609 {
611 }
612};
613
615{
616 void HandleExtraEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
617 {
618 Unit* caster = GetCaster();
619 if (!caster || caster->GetTypeId() != TYPEID_UNIT)
620 return;
621
623 }
624
625 void Register() override
626 {
628 }
629};
630
631// 69029, 70850 - Pursuit Confusion
633{
634 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
635 {
638 }
639
640 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
641 {
644 }
645
646 void Register() override
647 {
650 }
651};
652
654{
662}
Actions
First const & RAND(First const &first, Second const &second, Rest const &... rest)
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
@ MOTION_PRIORITY_NORMAL
@ POINT_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: ObjectDefines.h:70
@ TYPEID_UNIT
Definition: ObjectGuid.h:40
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
Spells
Definition: PlayerAI.cpp:32
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
Definition: ScriptMgr.h:1371
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
SpellEffIndex
Definition: SharedDefines.h:29
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ EFFECT_2
Definition: SharedDefines.h:32
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_ATTACK_ME
@ IMMUNITY_STATE
@ IMMUNITY_EFFECT
@ ALLIANCE
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAPPLY
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_LINKED
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_TAUNT
@ SPELL_AURA_MOD_SCALE
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELLVALUE_MAX_TARGETS
Definition: SpellDefines.h:230
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:842
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:2040
@ MOVE_FLIGHT
Definition: UnitDefines.h:123
@ REACT_PASSIVE
Definition: UnitDefines.h:506
@ UNIT_STAND_STATE_DEAD
Definition: UnitDefines.h:49
@ MOVEMENTFLAG_FLYING
Definition: UnitDefines.h:382
@ MOVEMENTFLAG_FALLING_FAR
Definition: UnitDefines.h:370
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:145
@ UNIT_STATE_CASTING
Definition: Unit.h:270
void AddSC_boss_ick()
@ ACTION_RESET_THREAT
@ ACTION_STORE_OLD_TARGET
@ ACTION_OUTRO
@ SAY_KRICK_OUTRO_8
@ SAY_KRICK_OUTRO_3
@ SAY_JAYNA_OUTRO_4
@ SAY_ICK_POISON_NOVA
@ SAY_KRICK_OUTRO_1
@ SAY_TYRANNUS_OUTRO_9
@ SAY_ICK_CHASE_1
@ SAY_JAYNA_OUTRO_2
@ SAY_KRICK_SLAY
@ SAY_KRICK_BARRAGE_1
@ SAY_KRICK_POISON_NOVA
@ SAY_JAYNA_OUTRO_10
@ SAY_KRICK_AGGRO
@ SAY_SYLVANAS_OUTRO_10
@ SAY_KRICK_BARRAGE_2
@ SAY_KRICK_OUTRO_5
@ SAY_SYLVANAS_OUTRO_2
@ SAY_SYLVANAS_OUTRO_4
@ SAY_KRICK_CHASE
@ SAY_TYRANNUS_OUTRO_7
@ PHASE_OUTRO
@ PHASE_COMBAT
@ POINT_KRICK_INTRO
@ POINT_KRICK_DEATH
@ SPELL_PURSUIT
@ SPELL_AUTO_GROW
@ SPELL_NECROMANTIC_POWER
@ SPELL_EXPLOSIVE_BARRAGE_ICK
@ SPELL_EXPLODING_ORB
@ SPELL_KRICK_KILL_CREDIT
@ SPELL_STRANGULATING
@ SPELL_SHADOW_BOLT
@ SPELL_SUICIDE
@ SPELL_EXPLOSIVE_BARRAGE_DAMAGE
@ SPELL_HASTY_GROW
@ SPELL_TOXIC_WASTE
@ SPELL_EXPLOSIVE_BARRAGE_SUMMON
@ SPELL_MIGHTY_KICK
@ SPELL_POISON_NOVA
@ SPELL_EXPLOSIVE_BARRAGE_KRICK
static Position const outroPos[8]
@ EVENT_OUTRO_9
@ EVENT_PURSUIT
@ EVENT_OUTRO_2
@ EVENT_SPECIAL
@ EVENT_OUTRO_3
@ EVENT_OUTRO_11
@ EVENT_OUTRO_7
@ EVENT_OUTRO_12
@ EVENT_OUTRO_END
@ EVENT_TOXIC_WASTE
@ EVENT_OUTRO_5
@ EVENT_OUTRO_8
@ EVENT_POISON_NOVA
@ EVENT_OUTRO_13
@ EVENT_OUTRO_6
@ EVENT_OUTRO_10
@ EVENT_EXPLOSIVE_BARRAGE
@ EVENT_OUTRO_1
@ EVENT_MIGHTY_KICK
@ EVENT_OUTRO_4
@ EVENT_SHADOW_BOLT
Yells
void PreventDefaultAction()
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
Unit * GetCaster() const
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectRemove
Definition: SpellScript.h:2035
uint8 GetStackAmount() const
HookList< EffectApplyHandler > OnEffectApply
Definition: SpellScript.h:2024
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void JustSummoned(Creature *summon) override
EventMap events
void _JustDied()
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
void SetReactState(ReactStates st)
Definition: Creature.h:160
void DisappearAndDie()
Definition: Creature.h:83
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void DelayEvents(Milliseconds delay)
Definition: EventMap.cpp:96
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
void Reset()
Definition: EventMap.cpp:21
virtual ObjectGuid GetGuidData(uint32 type) const override
iterator end()
Definition: MapRefManager.h:35
iterator begin()
Definition: MapRefManager.h:34
PlayerList const & GetPlayers() const
Definition: Map.h:367
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
void Clear()
Definition: ObjectGuid.h:286
static Creature * ToCreature(Object *o)
Definition: Object.h:219
TypeID GetTypeId() const
Definition: Object.h:173
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
Unit * GetCaster() const
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:840
SpellInfo const * GetSpellInfo() const
void Summon(Creature const *summon)
void ClearFixate()
virtual void DoAction(int32)
Definition: UnitAI.h:72
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:159
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:79
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
Definition: Unit.cpp:7845
void SetHealth(uint64 val)
Definition: Unit.cpp:9346
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
Definition: Unit.cpp:10100
ThreatManager & GetThreatManager()
Definition: Unit.h:1063
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
void SetFacingToObject(WorldObject const *object, bool force=true)
Definition: Unit.cpp:12671
UnitAI * GetAI() const
Definition: Unit.h:660
void AddUnitMovementFlag(uint32 f)
Definition: Unit.h:1661
Unit * GetVictim() const
Definition: Unit.h:715
bool HasUnitState(const uint32 f) const
Definition: Unit.h:732
void RemoveUnitMovementFlag(uint32 f)
Definition: Unit.h:1662
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:833
Vehicle * GetVehicleKit() const
Definition: Unit.h:1711
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
Map * GetMap() const
Definition: Object.h:624
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:91
void OnStackChange(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
void HandlePeriodicTick(AuraEffect const *)
void HandleExtraEffect(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void HandleScriptEffect(SpellEffIndex)
void Register() override
@ DATA_TEAM_IN_INSTANCE
@ NPC_JAINA_PART1
@ NPC_SYLVANAS_PART1
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
#define RegisterPitOfSaronCreatureAI(ai_name)
Definition: pit_of_saron.h:132
@ DATA_ICK
Definition: pit_of_saron.h:33
@ DATA_TYRANNUS_EVENT
Definition: pit_of_saron.h:41
@ DATA_KRICK
Definition: pit_of_saron.h:38
@ DATA_JAINA_SYLVANAS_1
Definition: pit_of_saron.h:39
@ NPC_TYRANNUS_EVENTS
Definition: pit_of_saron.h:55
@ NPC_KRICK
Definition: pit_of_saron.h:50
@ NPC_EXPLODING_ORB
Definition: pit_of_saron.h:92
void ForceCombatStop(Creature *who, bool reset=true)
float GetThreat(Unit const *victim, Unit const *who=nullptr)
void ResetThreat(Unit *victim, Unit *who=nullptr)
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
boss_ick(Creature *creature)
float _oldTargetThreat
ObjectGuid _oldTargetGUID
void DoAction(int32 actionId) override
Creature * GetKrick()
void JustSummoned(Creature *summon) override
void JustEngagedWith(Unit *who) override
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
void Reset() override
SummonList _summons
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
void JustSummoned(Creature *summon) override
Creature * GetIck()
void DoAction(int32 actionId) override
ObjectGuid _outroNpcGUID
void KilledUnit(Unit *victim) override
InstanceScript * _instanceScript
ObjectGuid _tyrannusGUID
void Reset() override
KrickPhase _phase
boss_krick(Creature *creature)