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
+13
-12
@@ -65,8 +65,6 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
{
|
||||
boss_kelidan_the_breakerAI(Creature* creature) : BossAI(creature, DATA_KELIDAN_THE_BREAKER)
|
||||
{
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
Channelers[i] = 0;
|
||||
}
|
||||
|
||||
uint32 ShadowVolley_Timer;
|
||||
@@ -76,7 +74,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
uint32 check_Timer;
|
||||
bool Firenova;
|
||||
bool addYell;
|
||||
uint64 Channelers[5];
|
||||
ObjectGuid Channelers[5];
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -116,7 +114,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
addYell = true;
|
||||
Talk(SAY_ADD_AGGRO);
|
||||
}
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
for (uint8 i = 0; i<5; ++i)
|
||||
{
|
||||
Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
|
||||
if (who && channeler && !channeler->IsInCombat())
|
||||
@@ -126,7 +124,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
|
||||
void ChannelerDied(Unit* killer)
|
||||
{
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
|
||||
if (channeler && channeler->IsAlive())
|
||||
@@ -138,25 +136,25 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
AttackStart(killer);
|
||||
}
|
||||
|
||||
uint64 GetChanneled(Creature* channeler1)
|
||||
ObjectGuid GetChanneled(Creature* channeler1)
|
||||
{
|
||||
SummonChannelers();
|
||||
if (!channeler1)
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
|
||||
uint8 i;
|
||||
for (i=0; i<5; ++i)
|
||||
for (i = 0; i < 5; ++i)
|
||||
{
|
||||
Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
|
||||
if (channeler && channeler->GetGUID() == channeler1->GetGUID())
|
||||
break;
|
||||
}
|
||||
return Channelers[(i+2)%5];
|
||||
return Channelers[(i + 2) % 5];
|
||||
}
|
||||
|
||||
void SummonChannelers()
|
||||
{
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
|
||||
if (!channeler || channeler->isDead())
|
||||
@@ -164,7 +162,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
if (channeler)
|
||||
Channelers[i] = channeler->GetGUID();
|
||||
else
|
||||
Channelers[i] = 0;
|
||||
Channelers[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,16 +308,19 @@ class npc_shadowmoon_channeler : public CreatureScript
|
||||
if (check_Timer <= diff)
|
||||
{
|
||||
if (!me->IsNonMeleeSpellCast(false))
|
||||
{
|
||||
if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||
{
|
||||
uint64 channeler = ENSURE_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->GetChanneled(me);
|
||||
ObjectGuid channeler = ENSURE_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->GetChanneled(me);
|
||||
if (Unit* channeled = ObjectAccessor::GetUnit(*me, channeler))
|
||||
DoCast(channeled, SPELL_CHANNELING);
|
||||
}
|
||||
}
|
||||
check_Timer = 5000;
|
||||
}
|
||||
else
|
||||
check_Timer -= diff;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -74,7 +74,7 @@ class boss_omor_the_unscarred : public CreatureScript
|
||||
Shadowbolt_Timer = 2000;
|
||||
Summon_Timer = 10000;
|
||||
SummonedCount = 0;
|
||||
PlayerGUID = 0;
|
||||
PlayerGUID.Clear();
|
||||
CanPullBack = false;
|
||||
|
||||
_Reset();
|
||||
@@ -141,7 +141,7 @@ class boss_omor_the_unscarred : public CreatureScript
|
||||
DoCast(temp, SPELL_SHADOW_WHIP);
|
||||
}
|
||||
}
|
||||
PlayerGUID = 0;
|
||||
PlayerGUID.Clear();
|
||||
ShadowWhip_Timer = 2000;
|
||||
CanPullBack = false;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ class boss_omor_the_unscarred : public CreatureScript
|
||||
uint32 Shadowbolt_Timer;
|
||||
uint32 Summon_Timer;
|
||||
uint32 SummonedCount;
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
bool CanPullBack;
|
||||
};
|
||||
|
||||
|
||||
+5
-8
@@ -70,7 +70,6 @@ class boss_nazan : public CreatureScript
|
||||
{
|
||||
boss_nazanAI(Creature* creature) : BossAI(creature, DATA_NAZAN)
|
||||
{
|
||||
VazrudenGUID = 0;
|
||||
flight = true;
|
||||
}
|
||||
|
||||
@@ -183,7 +182,7 @@ class boss_nazan : public CreatureScript
|
||||
uint32 Fly_Timer;
|
||||
uint32 Turn_Timer;
|
||||
bool flight;
|
||||
uint64 VazrudenGUID;
|
||||
ObjectGuid VazrudenGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -282,8 +281,6 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
summoned = false;
|
||||
sentryDown = false;
|
||||
lootSpawned = false;
|
||||
NazanGUID = 0;
|
||||
VazrudenGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -304,7 +301,7 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
if (Nazan)
|
||||
{
|
||||
Nazan->DisappearAndDie();
|
||||
NazanGUID = 0;
|
||||
NazanGUID.Clear();
|
||||
}
|
||||
|
||||
Creature* Vazruden = ObjectAccessor::GetCreature(*me, VazrudenGUID);
|
||||
@@ -313,7 +310,7 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
if (Vazruden)
|
||||
{
|
||||
Vazruden->DisappearAndDie();
|
||||
VazrudenGUID = 0;
|
||||
VazrudenGUID.Clear();
|
||||
}
|
||||
summoned = false;
|
||||
me->ClearUnitState(UNIT_STATE_ROOT);
|
||||
@@ -435,8 +432,8 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
uint32 waypoint;
|
||||
uint32 check;
|
||||
bool sentryDown;
|
||||
uint64 NazanGUID;
|
||||
uint64 VazrudenGUID;
|
||||
ObjectGuid NazanGUID;
|
||||
ObjectGuid VazrudenGUID;
|
||||
bool summoned;
|
||||
bool lootSpawned;
|
||||
};
|
||||
|
||||
@@ -85,7 +85,7 @@ enum Spells
|
||||
//count of clickers needed to interrupt blast nova
|
||||
#define CLICKERS_COUNT 5
|
||||
|
||||
typedef std::map<uint64, uint64> CubeMap;
|
||||
typedef std::map<ObjectGuid, ObjectGuid> CubeMap;
|
||||
|
||||
class npc_abyssal : public CreatureScript
|
||||
{
|
||||
@@ -253,10 +253,10 @@ class boss_magtheridon : public CreatureScript
|
||||
instance->SetData(DATA_COLLAPSE, false);
|
||||
}
|
||||
|
||||
void SetClicker(uint64 cubeGUID, uint64 clickerGUID)
|
||||
void SetClicker(ObjectGuid cubeGUID, ObjectGuid clickerGUID)
|
||||
{
|
||||
// to avoid multiclicks from 1 cube
|
||||
if (uint64 guid = Cube[cubeGUID])
|
||||
if (ObjectGuid guid = Cube[cubeGUID])
|
||||
DebuffClicker(ObjectAccessor::GetUnit(*me, guid));
|
||||
Cube[cubeGUID] = clickerGUID;
|
||||
NeedCheckCube = true;
|
||||
@@ -284,7 +284,7 @@ class boss_magtheridon : public CreatureScript
|
||||
if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP))
|
||||
{
|
||||
DebuffClicker(clicker);
|
||||
(*i).second = 0;
|
||||
(*i).second.Clear();
|
||||
}
|
||||
else
|
||||
++ClickerNum;
|
||||
|
||||
+4
-6
@@ -136,8 +136,6 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
{
|
||||
boss_warbringer_omroggAI(Creature* creature) : BossAI(creature, DATA_OMROGG)
|
||||
{
|
||||
LeftHeadGUID = 0;
|
||||
RightHeadGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -145,13 +143,13 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
if (Unit* LeftHead = ObjectAccessor::GetUnit(*me, LeftHeadGUID))
|
||||
{
|
||||
LeftHead->setDeathState(JUST_DIED);
|
||||
LeftHeadGUID = 0;
|
||||
LeftHeadGUID.Clear();
|
||||
}
|
||||
|
||||
if (Unit* RightHead = ObjectAccessor::GetUnit(*me, RightHeadGUID))
|
||||
{
|
||||
RightHead->setDeathState(JUST_DIED);
|
||||
RightHeadGUID = 0;
|
||||
RightHeadGUID.Clear();
|
||||
}
|
||||
|
||||
AggroYell = false;
|
||||
@@ -363,8 +361,8 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 LeftHeadGUID;
|
||||
uint64 RightHeadGUID;
|
||||
ObjectGuid LeftHeadGUID;
|
||||
ObjectGuid RightHeadGUID;
|
||||
int iaggro;
|
||||
int ithreat;
|
||||
int ikilling;
|
||||
|
||||
+4
-4
@@ -143,7 +143,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
|
||||
|
||||
void removeAdds()
|
||||
{
|
||||
for (std::vector<uint64>::const_iterator itr = adds.begin(); itr!= adds.end(); ++itr)
|
||||
for (GuidVector::const_iterator itr = adds.begin(); itr!= adds.end(); ++itr)
|
||||
{
|
||||
Creature* creature = ObjectAccessor::GetCreature(*me, *itr);
|
||||
if (creature && creature->IsAlive())
|
||||
@@ -155,7 +155,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
|
||||
}
|
||||
adds.clear();
|
||||
|
||||
for (std::vector<uint64>::const_iterator itr = assassins.begin(); itr!= assassins.end(); ++itr)
|
||||
for (GuidVector::const_iterator itr = assassins.begin(); itr!= assassins.end(); ++itr)
|
||||
{
|
||||
Creature* creature = ObjectAccessor::GetCreature(*me, *itr);
|
||||
if (creature && creature->IsAlive())
|
||||
@@ -295,8 +295,8 @@ class boss_warchief_kargath_bladefist : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<uint64> adds;
|
||||
std::vector<uint64> assassins;
|
||||
GuidVector adds;
|
||||
GuidVector assassins;
|
||||
uint32 Charge_timer;
|
||||
uint32 Blade_Dance_Timer;
|
||||
uint32 Summon_Assistant_Timer;
|
||||
|
||||
Reference in new issue
Block a user