Core/Scripts: Fixed build of boss_* scripts
This commit is contained in:
1 parent
6ce0a3107d
commit
a3d8f1d879
88 files changed
+453
-508
No files matched your search
@@ -170,13 +170,11 @@ public:
|
||||
boss_skadiAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
m_uiGraufGUID = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
SummonList Summons;
|
||||
uint64 m_uiGraufGUID;
|
||||
std::vector<uint64> triggersGUID;
|
||||
ObjectGuid m_uiGraufGUID;
|
||||
|
||||
uint32 m_uiCrushTimer;
|
||||
uint32 m_uiPoisonedSpearTimer;
|
||||
@@ -192,8 +190,6 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
triggersGUID.clear();
|
||||
|
||||
m_uiCrushTimer = 8000;
|
||||
m_uiPoisonedSpearTimer = 10000;
|
||||
m_uiWhirlwindTimer = 20000;
|
||||
@@ -266,7 +262,7 @@ public:
|
||||
void SummonedCreatureDespawn(Creature* summoned) override
|
||||
{
|
||||
if (summoned->GetEntry() == NPC_GRAUF)
|
||||
m_uiGraufGUID = 0;
|
||||
m_uiGraufGUID.Clear();
|
||||
Summons.Despawn(summoned);
|
||||
}
|
||||
|
||||
|
||||
@@ -153,9 +153,9 @@ class boss_svala : public CreatureScript
|
||||
|
||||
me->SetDisableGravity(events.IsInPhase(NORMAL));
|
||||
|
||||
_arthasGUID = 0;
|
||||
_arthasGUID.Clear();
|
||||
|
||||
instance->SetGuidData(DATA_SACRIFICED_PLAYER, 0);
|
||||
instance->SetGuidData(DATA_SACRIFICED_PLAYER, ObjectGuid::Empty);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -181,7 +181,7 @@ class boss_svala : public CreatureScript
|
||||
events.SetPhase(INTRO);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, DATA_UTGARDE_MIRROR))
|
||||
if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_UTGARDE_MIRROR)))
|
||||
mirror->SetGoState(GO_STATE_READY);
|
||||
|
||||
if (Creature* arthas = me->SummonCreature(NPC_ARTHAS, ArthasPos, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
@@ -324,12 +324,12 @@ class boss_svala : public CreatureScript
|
||||
break;
|
||||
}
|
||||
case EVENT_INTRO_DESPAWN_ARTHAS:
|
||||
if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, DATA_UTGARDE_MIRROR))
|
||||
if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_UTGARDE_MIRROR)))
|
||||
mirror->SetGoState(GO_STATE_ACTIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
if (Creature* arthas = ObjectAccessor::GetCreature(*me, _arthasGUID))
|
||||
arthas->DespawnOrUnsummon();
|
||||
_arthasGUID = 0;
|
||||
_arthasGUID.Clear();
|
||||
events.SetPhase(NORMAL);
|
||||
_introCompleted = true;
|
||||
events.ScheduleEvent(EVENT_SINISTER_STRIKE, 7 * IN_MILLISECONDS, 0, NORMAL);
|
||||
@@ -378,7 +378,7 @@ class boss_svala : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _arthasGUID;
|
||||
ObjectGuid _arthasGUID;
|
||||
bool _sacrificed;
|
||||
bool _introCompleted;
|
||||
};
|
||||
|
||||
@@ -138,8 +138,8 @@ public:
|
||||
uint32 m_uiHealthAmountModifier;
|
||||
uint32 m_uiHealthAmountMultipler;
|
||||
|
||||
uint64 m_uiActivedCreatureGUID;
|
||||
uint64 m_uiOrbGUID;
|
||||
ObjectGuid m_uiActivedCreatureGUID;
|
||||
ObjectGuid m_uiOrbGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -167,8 +167,8 @@ public:
|
||||
m_uiHealthAmountModifier = 1;
|
||||
m_uiHealthAmountMultipler = DUNGEON_MODE(20, 25);
|
||||
|
||||
m_uiActivedCreatureGUID = 0;
|
||||
m_uiOrbGUID = 0;
|
||||
m_uiActivedCreatureGUID.Clear();
|
||||
m_uiOrbGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -361,13 +361,13 @@ public:
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void DespawnBoatGhosts(uint64& m_uiCreatureGUID)
|
||||
void DespawnBoatGhosts(ObjectGuid& m_uiCreatureGUID)
|
||||
{
|
||||
if (m_uiCreatureGUID)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, m_uiCreatureGUID))
|
||||
temp->DisappearAndDie();
|
||||
|
||||
m_uiCreatureGUID = 0;
|
||||
m_uiCreatureGUID.Clear();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user