mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
Scripts: Step 4 - Fixed all warnings inside scripts
issue #121 Next step: enabling -DWITH_WARNINGS and fix
This commit is contained in:
@@ -474,7 +474,7 @@ public:
|
||||
me->SetCanDualWield(true);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data) const
|
||||
uint64 GetData64(uint32 data) const override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
@@ -355,7 +355,8 @@ public:
|
||||
void PeriodicTick(AuraEffect const* auraEffect)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetUnitOwner()->CastCustomSpell(SPELL_OVERLOAD, SPELLVALUE_BASE_POINT0, int32(auraEffect->GetAmount() * (2.0, auraEffect->GetTickNumber())), GetUnitOwner(), true);
|
||||
//Should stop at 3200 damage, maybe check needed(?)
|
||||
GetUnitOwner()->CastCustomSpell(SPELL_OVERLOAD, SPELLVALUE_BASE_POINT0, int32(auraEffect->GetAmount() * pow(2.0, auraEffect->GetTickNumber())), GetUnitOwner(), true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
float o = rand_norm()*2*M_PI;
|
||||
if (cr = me->SummonCreature(NPC_ANTAGONIST, me->GetPositionX()+3*cos(o), me->GetPositionY()+3*sin(o), me->GetPositionZ(), me->GetOrientation()))
|
||||
if ((cr = me->SummonCreature(NPC_ANTAGONIST, me->GetPositionX()+3*cos(o), me->GetPositionY()+3*sin(o), me->GetPositionZ(), me->GetOrientation())))
|
||||
{
|
||||
if (i == 0)
|
||||
cr->MonsterSay("Time to die.", LANG_UNIVERSAL, 0);
|
||||
@@ -811,24 +811,24 @@ class npc_dark_iron_attack_generator : public CreatureScript
|
||||
Creature* cr;
|
||||
if (me->GetMapId() == 1) // Kalimdor
|
||||
{
|
||||
if (cr = me->SummonCreature(NPC_DROHN_KEG, 1183.69f, -4315.15f, 21.1875f, 0.750492f))
|
||||
if ((cr = me->SummonCreature(NPC_DROHN_KEG, 1183.69f, -4315.15f, 21.1875f, 0.750492f)))
|
||||
summons.Summon(cr);
|
||||
if (cr = me->SummonCreature(NPC_VOODOO_KEG, 1182.42f, -4272.45f, 21.1182f, -1.02974f))
|
||||
if ((cr = me->SummonCreature(NPC_VOODOO_KEG, 1182.42f, -4272.45f, 21.1182f, -1.02974f)))
|
||||
summons.Summon(cr);
|
||||
if (cr = me->SummonCreature(NPC_GORDOK_KEG, 1223.78f, -4296.48f, 21.1707f, -2.86234f))
|
||||
if ((cr = me->SummonCreature(NPC_GORDOK_KEG, 1223.78f, -4296.48f, 21.1707f, -2.86234f)))
|
||||
summons.Summon(cr);
|
||||
}
|
||||
else if (me->GetMapId() == 0) // Eastern Kingdom
|
||||
{
|
||||
if (cr = me->SummonCreature(NPC_BARLEYBREW_KEG, -5187.23f, -599.779f, 397.176f, 0.017453f))
|
||||
if ((cr = me->SummonCreature(NPC_BARLEYBREW_KEG, -5187.23f, -599.779f, 397.176f, 0.017453f)))
|
||||
summons.Summon(cr);
|
||||
if (cr = me->SummonCreature(NPC_THUNDERBREW_KEG, -5160.05f, -632.632f, 397.178f, 1.39626f))
|
||||
if ((cr = me->SummonCreature(NPC_THUNDERBREW_KEG, -5160.05f, -632.632f, 397.178f, 1.39626f)))
|
||||
summons.Summon(cr);
|
||||
if (cr = me->SummonCreature(NPC_GORDOK_KEG, -5145.75f, -575.667f, 397.176f, -2.28638f))
|
||||
if ((cr = me->SummonCreature(NPC_GORDOK_KEG, -5145.75f, -575.667f, 397.176f, -2.28638f)))
|
||||
summons.Summon(cr);
|
||||
}
|
||||
|
||||
if (cr = me->SummonCreature(NPC_DARK_IRON_HERALD, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000))
|
||||
if ((cr = me->SummonCreature(NPC_DARK_IRON_HERALD, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000)))
|
||||
summons.Summon(cr);
|
||||
|
||||
kegCounter = 0;
|
||||
@@ -1621,20 +1621,20 @@ public:
|
||||
|
||||
if (caster->GetMapId() == 1) // Kalimdor
|
||||
{
|
||||
if (cr = caster->FindNearestCreature(NPC_NORMAL_VOODOO, 40.0f))
|
||||
if ((cr = caster->FindNearestCreature(NPC_NORMAL_VOODOO, 40.0f)))
|
||||
cr->CastSpell(caster, SPELL_THROW_MUG_TO_PLAYER, true);
|
||||
else if (cr = caster->FindNearestCreature(NPC_NORMAL_DROHN, 40.0f))
|
||||
else if ((cr = caster->FindNearestCreature(NPC_NORMAL_DROHN, 40.0f)))
|
||||
cr->CastSpell(caster, SPELL_THROW_MUG_TO_PLAYER, true);
|
||||
else if (cr = caster->FindNearestCreature(NPC_NORMAL_GORDOK, 40.0f))
|
||||
else if ((cr = caster->FindNearestCreature(NPC_NORMAL_GORDOK, 40.0f)))
|
||||
cr->CastSpell(caster, SPELL_THROW_MUG_TO_PLAYER, true);
|
||||
}
|
||||
else // EK
|
||||
{
|
||||
if (cr = caster->FindNearestCreature(NPC_NORMAL_THUNDERBREW, 40.0f))
|
||||
if ((cr = caster->FindNearestCreature(NPC_NORMAL_THUNDERBREW, 40.0f)))
|
||||
cr->CastSpell(caster, SPELL_THROW_MUG_TO_PLAYER, true);
|
||||
else if (cr = caster->FindNearestCreature(NPC_NORMAL_BARLEYBREW, 40.0f))
|
||||
else if ((cr = caster->FindNearestCreature(NPC_NORMAL_BARLEYBREW, 40.0f)))
|
||||
cr->CastSpell(caster, SPELL_THROW_MUG_TO_PLAYER, true);
|
||||
else if (cr = caster->FindNearestCreature(NPC_NORMAL_GORDOK, 40.0f))
|
||||
else if ((cr = caster->FindNearestCreature(NPC_NORMAL_GORDOK, 40.0f)))
|
||||
cr->CastSpell(caster, SPELL_THROW_MUG_TO_PLAYER, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -436,11 +436,11 @@ public:
|
||||
SetRun(false);
|
||||
|
||||
Creature* cr = NULL;
|
||||
if (cr = me->SummonCreature(NPC_CITY_MAN3, EventPos[EVENT_SRC_HALL_CITYMAN1]))
|
||||
if ((cr = me->SummonCreature(NPC_CITY_MAN3, EventPos[EVENT_SRC_HALL_CITYMAN1])))
|
||||
cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
|
||||
if (cr = me->SummonCreature(NPC_CITY_MAN4, EventPos[EVENT_SRC_HALL_CITYMAN2]))
|
||||
if ((cr = me->SummonCreature(NPC_CITY_MAN4, EventPos[EVENT_SRC_HALL_CITYMAN2])))
|
||||
cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
|
||||
if (cr = me->SummonCreature(NPC_CITY_MAN, EventPos[EVENT_SRC_HALL_CITYMAN3]))
|
||||
if ((cr = me->SummonCreature(NPC_CITY_MAN, EventPos[EVENT_SRC_HALL_CITYMAN3])))
|
||||
cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
|
||||
}
|
||||
else if (param == ACTION_START_SECRET_PASSAGE)
|
||||
|
||||
@@ -189,14 +189,14 @@ class npc_cork_gizelton : public CreatureScript
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
|
||||
Creature* cr = NULL;
|
||||
if (cr = me->SummonCreature(NPC_RIGGER_GIZELTON, *me))
|
||||
if ((cr = me->SummonCreature(NPC_RIGGER_GIZELTON, *me)))
|
||||
{
|
||||
cr->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
summons[0] = cr->GetGUID();
|
||||
}
|
||||
if (cr = me->SummonCreature(NPC_CARAVAN_KODO, *me))
|
||||
if ((cr = me->SummonCreature(NPC_CARAVAN_KODO, *me)))
|
||||
summons[1] = cr->GetGUID();
|
||||
if (cr = me->SummonCreature(NPC_CARAVAN_KODO, *me))
|
||||
if ((cr = me->SummonCreature(NPC_CARAVAN_KODO, *me)))
|
||||
summons[2] = cr->GetGUID();
|
||||
|
||||
SummonsFollow();
|
||||
@@ -334,8 +334,8 @@ class npc_cork_gizelton : public CreatureScript
|
||||
float o = (i*M_PI/2)+(M_PI/4);
|
||||
float x = me->GetPositionX()+cos(o)*15.0f;
|
||||
float y = me->GetPositionY()+sin(o)*15.0f;
|
||||
if (cr = me->SummonCreature((i%2 == 0 ? NPC_KOLKAR_WAYLAYER : NPC_KOLKAR_AMBUSHER),
|
||||
x, y, me->GetMap()->GetHeight(x, y, MAX_HEIGHT), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
if ((cr = me->SummonCreature((i%2 == 0 ? NPC_KOLKAR_WAYLAYER : NPC_KOLKAR_AMBUSHER),
|
||||
x, y, me->GetMap()->GetHeight(x, y, MAX_HEIGHT), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)))
|
||||
cr->AI()->AttackStart(me);
|
||||
}
|
||||
if (cr)
|
||||
@@ -363,7 +363,7 @@ class npc_cork_gizelton : public CreatureScript
|
||||
if (i)
|
||||
entry = i == 1 ? NPC_DOOMWARDER : NPC_NETHER;
|
||||
|
||||
if (cr = me->SummonCreature(entry, x, y, me->GetMap()->GetHeight(x, y, MAX_HEIGHT), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
if ((cr = me->SummonCreature(entry, x, y, me->GetMap()->GetHeight(x, y, MAX_HEIGHT), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)))
|
||||
cr->AI()->AttackStart(me);
|
||||
}
|
||||
if (cr)
|
||||
|
||||
@@ -332,8 +332,8 @@ class spell_hadronox_summon_periodic : public SpellScriptLoader
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _spellEntry;
|
||||
uint32 _delay;
|
||||
uint32 _spellEntry;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
@@ -342,8 +342,8 @@ class spell_hadronox_summon_periodic : public SpellScriptLoader
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _spellEntry;
|
||||
uint32 _delay;
|
||||
uint32 _spellEntry;
|
||||
};
|
||||
|
||||
class spell_hadronox_leech_poison : public SpellScriptLoader
|
||||
|
||||
@@ -80,14 +80,14 @@ public:
|
||||
Creature *cr;
|
||||
if (swarm)
|
||||
{
|
||||
if (cr = me->SummonCreature(NPC_AHNKAHAR_SWARMER, 640.425f, -919.544f, 25.8701f, 2.56563f))
|
||||
if ((cr = me->SummonCreature(NPC_AHNKAHAR_SWARMER, 640.425f, -919.544f, 25.8701f, 2.56563f)))
|
||||
summons.Summon(cr);
|
||||
if (cr = me->SummonCreature(NPC_AHNKAHAR_SWARMER, 655.891f, -930.445f, 25.6978f, 3.64774f))
|
||||
if ((cr = me->SummonCreature(NPC_AHNKAHAR_SWARMER, 655.891f, -930.445f, 25.6978f, 3.64774f)))
|
||||
summons.Summon(cr);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cr = me->SummonCreature(NPC_AHNKAHAR_GUARDIAN_ENTRY, 658.677f, -934.332f, 25.6978f, 3.03687f))
|
||||
if ((cr = me->SummonCreature(NPC_AHNKAHAR_GUARDIAN_ENTRY, 658.677f, -934.332f, 25.6978f, 3.03687f)))
|
||||
summons.Summon(cr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,15 +158,15 @@ public:
|
||||
me->CastSpell(me->GetVictim(), SPELL_CONJURE_FLAME_SPHERE, false);
|
||||
events.RescheduleEvent(EVENT_PRINCE_VANISH, 14000);
|
||||
Creature *cr;
|
||||
if (cr = me->SummonCreature(CREATURE_FLAME_SPHERE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+5.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS))
|
||||
if ((cr = me->SummonCreature(CREATURE_FLAME_SPHERE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+5.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS)))
|
||||
summons.Summon(cr);
|
||||
|
||||
if (me->GetMap()->IsHeroic())
|
||||
{
|
||||
if (cr = me->SummonCreature(CREATURE_FLAME_SPHERE_1, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+5.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS))
|
||||
if ((cr = me->SummonCreature(CREATURE_FLAME_SPHERE_1, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+5.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS)))
|
||||
summons.Summon(cr);
|
||||
|
||||
if (cr = me->SummonCreature(CREATURE_FLAME_SPHERE_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+5.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS))
|
||||
if ((cr = me->SummonCreature(CREATURE_FLAME_SPHERE_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+5.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS)))
|
||||
summons.Summon(cr);
|
||||
}
|
||||
events.RepeatEvent(15000);
|
||||
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
{
|
||||
Unit* cr = NULL;
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
if (cr = ObjectAccessor::GetUnit(*me, pInstance->GetData64(DATA_TENEBRON+i)))
|
||||
if ((cr = ObjectAccessor::GetUnit(*me, pInstance->GetData64(DATA_TENEBRON+i))))
|
||||
{
|
||||
if (!cr->IsAlive())
|
||||
continue;
|
||||
@@ -301,7 +301,7 @@ public:
|
||||
Creature* cr = NULL;
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
if (dragons[i])
|
||||
if (cr = ObjectAccessor::GetCreature(*me, dragons[i]))
|
||||
if ((cr = ObjectAccessor::GetCreature(*me, dragons[i])))
|
||||
{
|
||||
if (combat && cr->IsInCombat())
|
||||
continue;
|
||||
@@ -478,7 +478,7 @@ void boss_sartharion::boss_sartharionAI::HandleSartharionAbilities()
|
||||
uint8 iter = 0;
|
||||
for (SummonList::iterator i = summons.begin(); i != summons.end(); ++i)
|
||||
{
|
||||
if (cr = ObjectAccessor::GetCreature(*me, *i))
|
||||
if ((cr = ObjectAccessor::GetCreature(*me, *i)))
|
||||
if (cr->GetEntry() == NPC_FIRE_CYCLONE)
|
||||
{
|
||||
if (iter == rand)
|
||||
@@ -508,7 +508,7 @@ void boss_sartharion::boss_sartharionAI::HandleSartharionAbilities()
|
||||
summons.RemoveNotExisting();
|
||||
for (SummonList::iterator i = summons.begin(); i != summons.end(); ++i)
|
||||
{
|
||||
if (cr = ObjectAccessor::GetCreature(*me, *i))
|
||||
if ((cr = ObjectAccessor::GetCreature(*me, *i)))
|
||||
if (cr->GetEntry() == NPC_FIRE_CYCLONE)
|
||||
cr->CastSpell(cr, SPELL_CYCLONE_AURA_PERIODIC, true);
|
||||
}
|
||||
@@ -754,12 +754,12 @@ public:
|
||||
Creature* cr = NULL;
|
||||
for (uint8 i = 0; i < 6; ++i)
|
||||
{
|
||||
if (cr = me->SummonCreature(NPC_TWILIGHT_EGG, EggsPos[isSartharion ? i+6 : i].GetPositionX(), EggsPos[isSartharion ? i+6 : i].GetPositionY(), EggsPos[isSartharion ? i+6 : i].GetPositionZ(), EggsPos[isSartharion ? i+6 : i].GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000))
|
||||
if ((cr = me->SummonCreature(NPC_TWILIGHT_EGG, EggsPos[isSartharion ? i+6 : i].GetPositionX(), EggsPos[isSartharion ? i+6 : i].GetPositionY(), EggsPos[isSartharion ? i+6 : i].GetPositionZ(), EggsPos[isSartharion ? i+6 : i].GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000)))
|
||||
{
|
||||
summons.Summon(cr);
|
||||
cr->SetPhaseMask(16, true);
|
||||
}
|
||||
if (cr = me->SummonCreature(NPC_TWILIGHT_WHELP, EggsPos[isSartharion ? i+6 : i].GetPositionX(), EggsPos[isSartharion ? i+6 : i].GetPositionY(), EggsPos[isSartharion ? i+6 : i].GetPositionZ(), EggsPos[isSartharion ? i+6 : i].GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000))
|
||||
if ((cr = me->SummonCreature(NPC_TWILIGHT_WHELP, EggsPos[isSartharion ? i+6 : i].GetPositionX(), EggsPos[isSartharion ? i+6 : i].GetPositionY(), EggsPos[isSartharion ? i+6 : i].GetPositionZ(), EggsPos[isSartharion ? i+6 : i].GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000)))
|
||||
{
|
||||
summons.Summon(cr);
|
||||
cr->SetPhaseMask(16, true);
|
||||
@@ -777,13 +777,13 @@ public:
|
||||
summons.DespawnEntry(NPC_TWILIGHT_WHELP);
|
||||
for (SummonList::iterator i = summons.begin(); i != summons.end(); ++i)
|
||||
{
|
||||
if (cr = ObjectAccessor::GetCreature(*me, *i))
|
||||
if ((cr = ObjectAccessor::GetCreature(*me, *i)))
|
||||
{
|
||||
if (!cr->IsAlive())
|
||||
continue;
|
||||
|
||||
if (cr->GetEntry() == NPC_TWILIGHT_EGG)
|
||||
if (cr = me->SummonCreature(NPC_TWILIGHT_WHELP, cr->GetPositionX(), cr->GetPositionY(), cr->GetPositionZ(), cr->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000))
|
||||
if ((cr = me->SummonCreature(NPC_TWILIGHT_WHELP, cr->GetPositionX(), cr->GetPositionY(), cr->GetPositionZ(), cr->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000)))
|
||||
summons2.Summon(cr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,6 +697,8 @@ class npc_halion_controller : public CreatureScript
|
||||
--_corporeality;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
_instance->DoUpdateWorldState(WORLDSTATE_CORPOREALITY_MATERIAL, _corporeality * 10);
|
||||
|
||||
@@ -58,7 +58,7 @@ class boss_dred : public CreatureScript
|
||||
uint32 GetData(uint32 data) const
|
||||
{
|
||||
if (data == me->GetEntry())
|
||||
return uint32(_raptorCount >= _raptorCount);
|
||||
return uint32(_raptorCount);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -394,8 +394,8 @@ public:
|
||||
{
|
||||
if (pInstance && pInstance->GetData(DATA_INSTANCE_PROGRESS) == INSTANCE_PROGRESS_NONE)
|
||||
{
|
||||
if (me->GetPositionX() > 490.0f && me->GetPositionX() < 504.0f && me->GetPositionY() > 192.0f && me->GetPositionY() < 206.0f ||
|
||||
me->GetPositionX() > 490.0f && me->GetPositionX() < 504.0f && me->GetPositionY() > 240.0f && me->GetPositionY() < 254.0f)
|
||||
if ((me->GetPositionX() > 490.0f && me->GetPositionX() < 504.0f && me->GetPositionY() > 192.0f && me->GetPositionY() < 206.0f) ||
|
||||
(me->GetPositionX() > 490.0f && me->GetPositionX() < 504.0f && me->GetPositionY() > 240.0f && me->GetPositionY() < 254.0f))
|
||||
{
|
||||
isInvincible = true;
|
||||
if (SPELL_NECROLYTE_CHANNELING)
|
||||
|
||||
@@ -158,8 +158,8 @@ class boss_festergut : public CreatureScript
|
||||
else if (Player* p = target->ToPlayer())
|
||||
{
|
||||
// Gaseous Blight damage
|
||||
if ((spell->Id == 69159 || spell->Id == 70136 || spell->Id == 69161 || spell->Id == 70139 || spell->Id == 69163 || spell->Id == 70469) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) == QUEST_STATUS_INCOMPLETE ||
|
||||
(spell->Id == 70135 || spell->Id == 70138 || spell->Id == 70468 || spell->Id == 70137 || spell->Id == 70140 || spell->Id == 70470) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) == QUEST_STATUS_INCOMPLETE)
|
||||
if (((spell->Id == 69159 || spell->Id == 70136 || spell->Id == 69161 || spell->Id == 70139 || spell->Id == 69163 || spell->Id == 70469) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) == QUEST_STATUS_INCOMPLETE) ||
|
||||
((spell->Id == 70135 || spell->Id == 70138 || spell->Id == 70468 || spell->Id == 70137 || spell->Id == 70140 || spell->Id == 70470) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) == QUEST_STATUS_INCOMPLETE))
|
||||
p->CastSpell(p, SPELL_ORANGE_BLIGHT_RESIDUE, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,10 +646,10 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
bool _introDone;
|
||||
uint64 _darnavanGUID;
|
||||
std::deque<uint64> _reanimationQueue;
|
||||
uint32 _waveCounter;
|
||||
bool _introDone;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
|
||||
@@ -211,7 +211,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
Unit* unit = SelectTarget(SELECT_TARGET_RANDOM, 0, BoneStormMoveTargetSelector(me));
|
||||
if (!unit)
|
||||
{
|
||||
if (unit = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 175.0f, true))
|
||||
if ((unit = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 175.0f, true)))
|
||||
if (unit->GetPositionX() > -337.0f)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
|
||||
@@ -411,7 +411,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
switch (id)
|
||||
{
|
||||
case POINT_FESTERGUT:
|
||||
if (Creature* c = instance->instance->GetCreature(instance->GetData64(DATA_FESTERGUT)))
|
||||
if (Creature* c = instance->instance->GetCreature(instance->GetData64(DATA_FESTERGUT))) {
|
||||
if (c->IsInCombat())
|
||||
{
|
||||
instance->SetBossState(DATA_FESTERGUT, IN_PROGRESS);
|
||||
@@ -419,18 +419,24 @@ class boss_professor_putricide : public CreatureScript
|
||||
DoAction(ACTION_FESTERGUT_GAS);
|
||||
c->CastSpell(c, SPELL_GASEOUS_BLIGHT_LARGE, true, NULL, NULL, c->GetGUID());
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
bCallEvade = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case POINT_ROTFACE:
|
||||
if (Creature* c = instance->instance->GetCreature(instance->GetData64(DATA_ROTFACE)))
|
||||
if (Creature* c = instance->instance->GetCreature(instance->GetData64(DATA_ROTFACE))) {
|
||||
if (c->IsInCombat())
|
||||
{
|
||||
instance->SetBossState(DATA_ROTFACE, IN_PROGRESS);
|
||||
me->SetFacingTo(rotfaceWatchPos.GetOrientation());
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
bCallEvade = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case POINT_TABLE:
|
||||
me->SetFacingTo(tablePos.GetOrientation());
|
||||
@@ -982,7 +988,7 @@ class spell_putricide_unstable_experiment : public SpellScriptLoader
|
||||
std::list<Creature*> creList;
|
||||
GetCreatureListWithEntryInGrid(creList, GetCaster(), NPC_ABOMINATION_WING_MAD_SCIENTIST_STALKER, 200.0f);
|
||||
for (std::list<Creature*>::iterator itr = creList.begin(); itr != creList.end(); ++itr)
|
||||
if ((*itr)->GetPositionX() > 4350.0f && stage == 0 || (*itr)->GetPositionX() < 4350.0f && stage == 1)
|
||||
if (((*itr)->GetPositionX() > 4350.0f && stage == 0) || ((*itr)->GetPositionX() < 4350.0f && stage == 1))
|
||||
{
|
||||
target = (*itr);
|
||||
break;
|
||||
|
||||
@@ -881,9 +881,9 @@ public:
|
||||
if (p->getClass() == CLASS_HUNTER)
|
||||
return true;
|
||||
uint8 maxIndex = p->GetMostPointsTalentTree();
|
||||
if (p->getClass() == CLASS_PALADIN && maxIndex >= 1 || p->getClass() == CLASS_SHAMAN && maxIndex == 1 || p->getClass() == CLASS_DRUID && maxIndex == 1)
|
||||
if ((p->getClass() == CLASS_PALADIN && maxIndex >= 1) || (p->getClass() == CLASS_SHAMAN && maxIndex == 1) || (p->getClass() == CLASS_DRUID && maxIndex == 1))
|
||||
return true;
|
||||
if (_removeHealers == (p->getClass() == CLASS_DRUID && maxIndex == 2 || p->getClass() == CLASS_PALADIN && maxIndex == 0 || p->getClass() == CLASS_PRIEST && maxIndex <= 1 || p->getClass() == CLASS_SHAMAN && maxIndex == 2))
|
||||
if (_removeHealers == ((p->getClass() == CLASS_DRUID && maxIndex == 2) || (p->getClass() == CLASS_PALADIN && maxIndex == 0) || (p->getClass() == CLASS_PRIEST && maxIndex <= 1) || (p->getClass() == CLASS_SHAMAN && maxIndex == 2)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -377,7 +377,7 @@ public:
|
||||
return false;
|
||||
if (_maxDist && _source->GetExactDist(target) > _maxDist)
|
||||
return false;
|
||||
if (_exclude1 && target->HasAura(_exclude1) || _exclude2 && target->HasAura(_exclude2))
|
||||
if ((_exclude1 && target->HasAura(_exclude1)) || (_exclude2 && target->HasAura(_exclude2)))
|
||||
return false;
|
||||
if (_reqLOS && !_source->IsWithinLOSInMap(target))
|
||||
return false;
|
||||
@@ -1238,7 +1238,7 @@ class npc_tirion_fordring_tft : public CreatureScript
|
||||
void Reset()
|
||||
{
|
||||
_events.Reset();
|
||||
if (_instance->GetBossState(DATA_THE_LICH_KING) == DONE || me->GetMap()->IsHeroic() && !_instance->GetData(DATA_LK_HC_AVAILABLE))
|
||||
if (_instance->GetBossState(DATA_THE_LICH_KING) == DONE || (me->GetMap()->IsHeroic() && !_instance->GetData(DATA_LK_HC_AVAILABLE)))
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
@@ -1310,7 +1310,7 @@ class npc_tirion_fordring_tft : public CreatureScript
|
||||
void JustReachedHome()
|
||||
{
|
||||
ScriptedAI::JustReachedHome();
|
||||
if (!(_instance->GetBossState(DATA_THE_LICH_KING) == DONE || me->GetMap()->IsHeroic() && !_instance->GetData(DATA_LK_HC_AVAILABLE)))
|
||||
if (!(_instance->GetBossState(DATA_THE_LICH_KING) == DONE || (me->GetMap()->IsHeroic() && !_instance->GetData(DATA_LK_HC_AVAILABLE))))
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
}
|
||||
@@ -2485,11 +2485,11 @@ class npc_valkyr_shadowguard : public CreatureScript
|
||||
}
|
||||
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
Position _destPoint;
|
||||
uint64 _grabbedPlayer;
|
||||
bool didbelow50pct;
|
||||
bool dropped;
|
||||
InstanceScript* _instance;
|
||||
|
||||
bool IsHeroic() { return me->GetMap()->IsHeroic(); }
|
||||
|
||||
|
||||
@@ -2004,7 +2004,7 @@ class spell_icc_geist_alarm : public SpellScriptLoader
|
||||
{
|
||||
bool hasTarget = false;
|
||||
Unit* target = NULL;
|
||||
if (target = l->SelectNearestTarget(20.0f))
|
||||
if ((target = l->SelectNearestTarget(20.0f)))
|
||||
hasTarget = true;
|
||||
else
|
||||
{
|
||||
@@ -3231,7 +3231,7 @@ public:
|
||||
--currPipeWP;
|
||||
}
|
||||
me->SetHomePosition(VengefulWP[currPipeWP].GetPositionX(), VengefulWP[currPipeWP].GetPositionY(), VengefulWP[currPipeWP].GetPositionZ(), me->GetOrientation());
|
||||
if (forward && currPipeWP == 3 || !forward && currPipeWP == 2)
|
||||
if ((forward && currPipeWP == 3) || (!forward && currPipeWP == 2))
|
||||
me->GetMotionMaster()->MoveJump(VengefulWP[currPipeWP].GetPositionX(), VengefulWP[currPipeWP].GetPositionY(), VengefulWP[currPipeWP].GetPositionZ(), 10.0f, 6.0f, 1);
|
||||
else
|
||||
me->GetMotionMaster()->MovePoint(1, VengefulWP[currPipeWP].GetPositionX(), VengefulWP[currPipeWP].GetPositionY(), VengefulWP[currPipeWP].GetPositionZ());
|
||||
@@ -3275,7 +3275,7 @@ public:
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (creature->GetEntry() == NPC_GARROSH_HELLSCREAM && player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 11206 || creature->GetEntry() == NPC_KING_VARIAN_WRYNN && player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 11204)
|
||||
if ((creature->GetEntry() == NPC_GARROSH_HELLSCREAM && player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 11206) || (creature->GetEntry() == NPC_KING_VARIAN_WRYNN && player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 11204))
|
||||
{
|
||||
if (!player->GetGroup() || !player->GetGroup()->isRaidGroup() || !player->GetGroup()->IsLeader(player->GetGUID()))
|
||||
{
|
||||
|
||||
@@ -526,7 +526,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
return entry;
|
||||
return 0;
|
||||
case NPC_SPIRE_FROSTWYRM:
|
||||
if (TeamIdInInstance == TEAM_ALLIANCE && data->posY < 2200.0f || TeamIdInInstance == TEAM_HORDE && data->posY > 2200.0f)
|
||||
if ((TeamIdInInstance == TEAM_ALLIANCE && data->posY < 2200.0f) || (TeamIdInInstance == TEAM_HORDE && data->posY > 2200.0f))
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -493,25 +493,25 @@ public:
|
||||
{
|
||||
Creature* cr;
|
||||
_horsemanKilled = 0;
|
||||
if (cr = instance->GetCreature(_blaumeuxGUID))
|
||||
if ((cr = instance->GetCreature(_blaumeuxGUID)))
|
||||
if (!cr->IsAlive())
|
||||
{
|
||||
cr->SetPosition(cr->GetHomePosition());
|
||||
cr->Respawn();
|
||||
}
|
||||
if (cr = instance->GetCreature(_rivendareGUID))
|
||||
if ((cr = instance->GetCreature(_rivendareGUID)))
|
||||
if (!cr->IsAlive())
|
||||
{
|
||||
cr->SetPosition(cr->GetHomePosition());
|
||||
cr->Respawn();
|
||||
}
|
||||
if (cr = instance->GetCreature(_zeliekGUID))
|
||||
if ((cr = instance->GetCreature(_zeliekGUID)))
|
||||
if (!cr->IsAlive())
|
||||
{
|
||||
cr->SetPosition(cr->GetHomePosition());
|
||||
cr->Respawn();
|
||||
}
|
||||
if (cr = instance->GetCreature(_korthazzGUID))
|
||||
if ((cr = instance->GetCreature(_korthazzGUID)))
|
||||
if (!cr->IsAlive())
|
||||
{
|
||||
cr->SetPosition(cr->GetHomePosition());
|
||||
@@ -521,13 +521,13 @@ public:
|
||||
else if (data == IN_PROGRESS)
|
||||
{
|
||||
Creature* cr;
|
||||
if (cr = instance->GetCreature(_blaumeuxGUID))
|
||||
if ((cr = instance->GetCreature(_blaumeuxGUID)))
|
||||
cr->SetInCombatWithZone();
|
||||
if (cr = instance->GetCreature(_rivendareGUID))
|
||||
if ((cr = instance->GetCreature(_rivendareGUID)))
|
||||
cr->SetInCombatWithZone();
|
||||
if (cr = instance->GetCreature(_zeliekGUID))
|
||||
if ((cr = instance->GetCreature(_zeliekGUID)))
|
||||
cr->SetInCombatWithZone();
|
||||
if (cr = instance->GetCreature(_korthazzGUID))
|
||||
if ((cr = instance->GetCreature(_korthazzGUID)))
|
||||
cr->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
Creature* spark;
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
if (spark = me->SummonCreature(NPC_SPARK_OF_IONAR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
|
||||
if ((spark = me->SummonCreature(NPC_SPARK_OF_IONAR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 20000)))
|
||||
{
|
||||
summons.Summon(spark);
|
||||
spark->CastSpell(spark, me->GetMap()->IsHeroic() ? SPELL_SPARK_VISUAL_TRIGGER_H : SPELL_SPARK_VISUAL_TRIGGER_N, true);
|
||||
|
||||
@@ -243,9 +243,9 @@ public:
|
||||
void DespawnHeads()
|
||||
{
|
||||
Creature *cr;
|
||||
if (cr = GetAbedneum()) cr->DespawnOrUnsummon();
|
||||
if (cr = GetMarnak()) cr->DespawnOrUnsummon();
|
||||
if (cr = GetKaddrak()) cr->DespawnOrUnsummon();
|
||||
if ((cr = GetAbedneum())) cr->DespawnOrUnsummon();
|
||||
if ((cr = GetMarnak())) cr->DespawnOrUnsummon();
|
||||
if ((cr = GetKaddrak())) cr->DespawnOrUnsummon();
|
||||
SwitchHeadVisaul(0x7, false);
|
||||
}
|
||||
|
||||
@@ -256,15 +256,15 @@ public:
|
||||
|
||||
GameObject *go = NULL;
|
||||
if (headMask & 0x1) // Kaddrak
|
||||
if (go = me->GetMap()->GetGameObject(pInstance->GetData64(GO_KADDRAK)))
|
||||
if ((go = me->GetMap()->GetGameObject(pInstance->GetData64(GO_KADDRAK))))
|
||||
activate ? go->SendCustomAnim(0) : go->SetGoState(GO_STATE_READY);
|
||||
|
||||
if (headMask & 0x2) // Marnak
|
||||
if (go = me->GetMap()->GetGameObject(pInstance->GetData64(GO_MARNAK)))
|
||||
if ((go = me->GetMap()->GetGameObject(pInstance->GetData64(GO_MARNAK))))
|
||||
activate ? go->SendCustomAnim(0) : go->SetGoState(GO_STATE_READY);
|
||||
|
||||
if (headMask & 0x4) // Abedneum
|
||||
if (go = me->GetMap()->GetGameObject(pInstance->GetData64(GO_ABEDNEUM)))
|
||||
if ((go = me->GetMap()->GetGameObject(pInstance->GetData64(GO_ABEDNEUM))))
|
||||
activate ? go->SendCustomAnim(0) : go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -596,17 +596,17 @@ public:
|
||||
void brann_bronzebeard::brann_bronzebeardAI::InitializeEvent()
|
||||
{
|
||||
Creature* cr = NULL;
|
||||
if (cr = me->SummonCreature(NPC_KADDRAK, 923.7f, 326.9f, 219.5f, 2.1f, TEMPSUMMON_TIMED_DESPAWN, 580000))
|
||||
if ((cr = me->SummonCreature(NPC_KADDRAK, 923.7f, 326.9f, 219.5f, 2.1f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
|
||||
{
|
||||
cr->SetInCombatWithZone();
|
||||
KaddrakGUID = cr->GetGUID();
|
||||
}
|
||||
if (cr = me->SummonCreature(NPC_MARNAK, 895.974f, 363.571f, 219.337f, 5.5f, TEMPSUMMON_TIMED_DESPAWN, 580000))
|
||||
if ((cr = me->SummonCreature(NPC_MARNAK, 895.974f, 363.571f, 219.337f, 5.5f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
|
||||
{
|
||||
cr->SetInCombatWithZone();
|
||||
MarnakGUID = cr->GetGUID();
|
||||
}
|
||||
if (cr = me->SummonCreature(NPC_ABEDNEUM, 892.25f, 331.25f, 223.86f, 0.6f, TEMPSUMMON_TIMED_DESPAWN, 580000))
|
||||
if ((cr = me->SummonCreature(NPC_ABEDNEUM, 892.25f, 331.25f, 223.86f, 0.6f, TEMPSUMMON_TIMED_DESPAWN, 580000)))
|
||||
{
|
||||
cr->SetInCombatWithZone();
|
||||
AbedneumGUID = cr->GetGUID();
|
||||
|
||||
@@ -275,11 +275,11 @@ class boss_algalon_the_observer : public CreatureScript
|
||||
{
|
||||
if (!item) // should not happen, but checked in GetAverageItemLevel()
|
||||
return true;
|
||||
if (item->ItemLevel <= 226 || item->ItemLevel <= 232 && (
|
||||
if (item->ItemLevel <= 226 || (item->ItemLevel <= 232 && (
|
||||
item->InventoryType == INVTYPE_SHIELD ||
|
||||
item->Class == ITEM_CLASS_WEAPON ||
|
||||
item->Class == ITEM_CLASS_ARMOR && (item->InventoryType == INVTYPE_RELIC || item->InventoryType == INVTYPE_HOLDABLE)
|
||||
))
|
||||
(item->Class == ITEM_CLASS_ARMOR && (item->InventoryType == INVTYPE_RELIC || item->InventoryType == INVTYPE_HOLDABLE))
|
||||
)))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -537,24 +537,24 @@ void boss_flame_leviathan::boss_flame_leviathanAI::TurnGates(bool _start, bool _
|
||||
{
|
||||
// first one is ALWAYS turned on, unless leviathan is beaten
|
||||
GameObject* go = NULL;
|
||||
if (go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_LIGHTNING_WALL2)))
|
||||
if ((go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_LIGHTNING_WALL2))))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
|
||||
if (m_pInstance->GetData(TYPE_LEVIATHAN) == NOT_STARTED)
|
||||
if (go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(GO_LEVIATHAN_DOORS)))
|
||||
if ((go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(GO_LEVIATHAN_DOORS))))
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameObject* go = NULL;
|
||||
if (_death)
|
||||
if (go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_LIGHTNING_WALL1)))
|
||||
if ((go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_LIGHTNING_WALL1))))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
if (go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_LIGHTNING_WALL2)))
|
||||
if ((go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_LIGHTNING_WALL2))))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
if (go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(GO_LEVIATHAN_DOORS)))
|
||||
if ((go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(GO_LEVIATHAN_DOORS))))
|
||||
{
|
||||
if (m_pInstance->GetData(TYPE_LEVIATHAN) == SPECIAL || m_pInstance->GetData(TYPE_LEVIATHAN) == DONE)
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
@@ -572,16 +572,16 @@ void boss_flame_leviathan::boss_flame_leviathanAI::TurnHealStations(bool _apply)
|
||||
GameObject* go = NULL;
|
||||
if (_apply)
|
||||
{
|
||||
if (go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_REPAIR_STATION1)))
|
||||
if ((go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_REPAIR_STATION1))))
|
||||
go->SetLootState(GO_READY);
|
||||
if (go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_REPAIR_STATION2)))
|
||||
if ((go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_REPAIR_STATION2))))
|
||||
go->SetLootState(GO_READY);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_REPAIR_STATION1)))
|
||||
if ((go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_REPAIR_STATION1))))
|
||||
go->SetLootState(GO_ACTIVATED);
|
||||
if (go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_REPAIR_STATION2)))
|
||||
if ((go = ObjectAccessor::GetGameObject(*me, m_pInstance->GetData64(DATA_REPAIR_STATION2))))
|
||||
go->SetLootState(GO_ACTIVATED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,8 +470,8 @@ public:
|
||||
if( faction )
|
||||
for( uint8 k=0; k<4; ++k )
|
||||
{
|
||||
if( faction == 'A' && ( k>1 || k==1 && RAID_MODE(1,0) ) ||
|
||||
faction == 'H' && ( k<2 || k==3 && RAID_MODE(1,0) ) )
|
||||
if( (faction == 'A' && ( k>1 || (k==1 && RAID_MODE(1,0)) )) ||
|
||||
(faction == 'H' && ( k<2 || (k==3 && RAID_MODE(1,0)) )) )
|
||||
continue;
|
||||
|
||||
for( uint8 i=0; i<4; ++i )
|
||||
@@ -636,10 +636,10 @@ public:
|
||||
if (timer <= diff)
|
||||
{
|
||||
timer = 2500;
|
||||
if (me->IsSummon())
|
||||
if (me->IsSummon()) {
|
||||
if (Unit* s = me->ToTempSummon()->GetSummoner())
|
||||
{
|
||||
if (s->GetTypeId() == TYPEID_PLAYER && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER) || s->GetTypeId() == TYPEID_UNIT && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_NPC))
|
||||
if ((s->GetTypeId() == TYPEID_PLAYER && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER)) || (s->GetTypeId() == TYPEID_UNIT && !s->HasAura(SPELL_FLASH_FREEZE_TRAPPED_NPC)))
|
||||
me->DespawnOrUnsummon(2000);
|
||||
else if (s->GetTypeId() == TYPEID_PLAYER)
|
||||
if (InstanceScript* pInstance = me->GetInstanceScript())
|
||||
@@ -650,7 +650,10 @@ public:
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
me->DespawnOrUnsummon(2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
timer -= diff;
|
||||
|
||||
@@ -491,11 +491,11 @@ public:
|
||||
Creature* VX001 = NULL;
|
||||
Creature* LMK2 = NULL;
|
||||
Creature* ACU = NULL;
|
||||
if (VX001 = GetVX001())
|
||||
if ((VX001 = GetVX001()))
|
||||
VX001->CastSpell(VX001, SPELL_BERSERK, true);
|
||||
if (LMK2 = GetLMK2())
|
||||
if ((LMK2 = GetLMK2()))
|
||||
LMK2->CastSpell(LMK2, SPELL_BERSERK, true);
|
||||
if (ACU = GetACU())
|
||||
if ((ACU = GetACU()))
|
||||
ACU->CastSpell(ACU, SPELL_BERSERK, true);
|
||||
events.RepeatEvent(30000);
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ public:
|
||||
boss_thorimAI(Creature* pCreature) : ScriptedAI(pCreature), summons(me)
|
||||
{
|
||||
m_pInstance = pCreature->GetInstanceScript();
|
||||
if (_encounterFinished = (!me->IsAlive()))
|
||||
if ((_encounterFinished = (!me->IsAlive())))
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_THORIM, DONE);
|
||||
}
|
||||
@@ -406,18 +406,18 @@ public:
|
||||
void CloseDoors()
|
||||
{
|
||||
GameObject* go;
|
||||
if (go = GetThorimObject(DATA_THORIM_LEVER))
|
||||
if ((go = GetThorimObject(DATA_THORIM_LEVER)))
|
||||
{
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 48);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
if (go = GetThorimObject(DATA_THORIM_FIRST_DOORS))
|
||||
if ((go = GetThorimObject(DATA_THORIM_FIRST_DOORS)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
|
||||
if (go = GetThorimObject(DATA_THORIM_SECOND_DOORS))
|
||||
if ((go = GetThorimObject(DATA_THORIM_SECOND_DOORS)))
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
|
||||
if (go = GetThorimObject(DATA_THORIM_FENCE))
|
||||
if ((go = GetThorimObject(DATA_THORIM_FENCE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
@@ -572,14 +572,14 @@ public:
|
||||
events.ScheduleEvent(EVENT_THORIM_OUTRO1, 2000, 0, EVENT_PHASE_OUTRO);
|
||||
|
||||
GameObject* go = NULL;
|
||||
if (go = GetThorimObject(DATA_THORIM_FENCE))
|
||||
if ((go = GetThorimObject(DATA_THORIM_FENCE)))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
uint32 chestId = me->GetMap()->Is25ManRaid() ? GO_THORIM_CHEST_HERO : GO_THORIM_CHEST;
|
||||
if (_hardMode)
|
||||
chestId += 1; // hard mode offset
|
||||
|
||||
if (go = me->SummonGameObject(chestId, 2134.73f, -286.32f, 419.51f, 0.0f, 0, 0, 0, 0, 0))
|
||||
if ((go = me->SummonGameObject(chestId, 2134.73f, -286.32f, 419.51f, 0.0f, 0, 0, 0, 0, 0)))
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, 0);
|
||||
|
||||
// Defeat credit
|
||||
@@ -602,7 +602,7 @@ public:
|
||||
for (uint8 i = 0; i < (_spawnCommoners ? 7 : 2); ++i)
|
||||
{
|
||||
rnd = urand(0, 13);
|
||||
if (cr = me->SummonCreature((_spawnCommoners ? NPC_DARK_RUNE_COMMONER : RollTable[urand(0,2)]), ArenaNPCs[rnd], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000))
|
||||
if ((cr = me->SummonCreature((_spawnCommoners ? NPC_DARK_RUNE_COMMONER : RollTable[urand(0,2)]), ArenaNPCs[rnd], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000)))
|
||||
cr->GetMotionMaster()->MoveJump(
|
||||
Middle.GetPositionX()+urand(19,24)*cos(Middle.GetAngle(cr)),
|
||||
Middle.GetPositionY()+urand(19,24)*sin(Middle.GetAngle(cr)),
|
||||
@@ -1405,14 +1405,14 @@ public:
|
||||
events.ScheduleEvent(EVENT_RC_RUNIC_SMASH, 0);
|
||||
Creature* c;
|
||||
|
||||
if (c = me->SummonCreature(33140, 2221, -385, me->GetPositionZ()))
|
||||
if ((c = me->SummonCreature(33140, 2221, -385, me->GetPositionZ())))
|
||||
_triggerRightGUID[0] = c->GetGUID();
|
||||
if (c = me->SummonCreature(33140, 2210, -385, me->GetPositionZ()))
|
||||
if ((c = me->SummonCreature(33140, 2210, -385, me->GetPositionZ())))
|
||||
_triggerRightGUID[1] = c->GetGUID();
|
||||
|
||||
if (c = me->SummonCreature(33141, 2235, -385, me->GetPositionZ()))
|
||||
if ((c = me->SummonCreature(33141, 2235, -385, me->GetPositionZ())))
|
||||
_triggerLeftGUID[0] = c->GetGUID();
|
||||
if (c = me->SummonCreature(33141, 2246, -385, me->GetPositionZ()))
|
||||
if ((c = me->SummonCreature(33141, 2246, -385, me->GetPositionZ())))
|
||||
_triggerLeftGUID[1] = c->GetGUID();
|
||||
}
|
||||
|
||||
|
||||
@@ -484,7 +484,7 @@ public:
|
||||
if (!summon || summon->GetEntry() != NPC_OMINOUS_CLOUD || me->GetDistance(summon) < 20)
|
||||
continue;
|
||||
|
||||
if ((!cloud || urand(0,1) && !summon->HasAura(SPELL_SUMMON_GUARDIAN_OF_YS)))
|
||||
if ((!cloud || (urand(0,1) && !summon->HasAura(SPELL_SUMMON_GUARDIAN_OF_YS))))
|
||||
cloud = summon;
|
||||
}
|
||||
|
||||
@@ -525,7 +525,7 @@ public:
|
||||
for (uint8 i = 0; i < RAID_MODE(4, 10); ++i)
|
||||
{
|
||||
float ang = i ? (M_PI*2.0f/i) : M_PI*2.0f;
|
||||
if (cr = me->SummonCreature(NPC_DESCEND_INTO_MADNESS, me->GetPositionX()+25*cos(ang), me->GetPositionY()+25*sin(ang), 326, 0, TEMPSUMMON_TIMED_DESPAWN, 15000))
|
||||
if ((cr = me->SummonCreature(NPC_DESCEND_INTO_MADNESS, me->GetPositionX()+25*cos(ang), me->GetPositionY()+25*sin(ang), 326, 0, TEMPSUMMON_TIMED_DESPAWN, 15000)))
|
||||
{
|
||||
cr->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
cr->SetArmor(_currentIllusion);
|
||||
|
||||
@@ -618,9 +618,9 @@ public:
|
||||
instance->LoadGrid(364.0f, -16.0f); //make sure leviathan is loaded
|
||||
m_leviathanTowers[type-EVENT_TOWER_OF_LIFE_DESTROYED] = data;
|
||||
GameObject* gobj = NULL;
|
||||
if (gobj = instance->GetGameObject(m_leviathanVisualTowers[type-EVENT_TOWER_OF_LIFE_DESTROYED][0]))
|
||||
if ((gobj = instance->GetGameObject(m_leviathanVisualTowers[type-EVENT_TOWER_OF_LIFE_DESTROYED][0])))
|
||||
gobj->SetGoState(GO_STATE_ACTIVE);
|
||||
if (gobj = instance->GetGameObject(m_leviathanVisualTowers[type-EVENT_TOWER_OF_LIFE_DESTROYED][1]))
|
||||
if ((gobj = instance->GetGameObject(m_leviathanVisualTowers[type-EVENT_TOWER_OF_LIFE_DESTROYED][1])))
|
||||
gobj->SetGoState(GO_STATE_ACTIVE);
|
||||
return;
|
||||
}
|
||||
@@ -1121,11 +1121,11 @@ void instance_ulduar::instance_ulduar_InstanceMapScript::SpawnLeviathanEncounter
|
||||
TempSummon* veh = NULL;
|
||||
for (uint8 i = 0; i < (instance->Is25ManRaid() ? 5 : 2); ++i)
|
||||
{
|
||||
if (veh = instance->SummonCreature(NPC_SALVAGED_SIEGE_ENGINE, vehiclePositions[15*mode+i]))
|
||||
if ((veh = instance->SummonCreature(NPC_SALVAGED_SIEGE_ENGINE, vehiclePositions[15*mode+i])))
|
||||
_leviathanVehicles.push_back(veh->GetGUID());
|
||||
if (veh = instance->SummonCreature(NPC_VEHICLE_CHOPPER, vehiclePositions[15*mode+i+5]))
|
||||
if ((veh = instance->SummonCreature(NPC_VEHICLE_CHOPPER, vehiclePositions[15*mode+i+5])))
|
||||
_leviathanVehicles.push_back(veh->GetGUID());
|
||||
if (veh = instance->SummonCreature(NPC_SALVAGED_DEMOLISHER, vehiclePositions[15*mode+i+10]))
|
||||
if ((veh = instance->SummonCreature(NPC_SALVAGED_DEMOLISHER, vehiclePositions[15*mode+i+10])))
|
||||
_leviathanVehicles.push_back(veh->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,8 +131,8 @@ public:
|
||||
{
|
||||
if( me->GetEntry() != NPC_SKARVALD )
|
||||
return;
|
||||
if( pInstance )
|
||||
if( Creature* dalronn = pInstance->instance->GetCreature(pInstance->GetData64(DATA_DALRONN)) )
|
||||
if( pInstance ) {
|
||||
if( Creature* dalronn = pInstance->instance->GetCreature(pInstance->GetData64(DATA_DALRONN)) ) {
|
||||
if( dalronn->isDead() )
|
||||
{
|
||||
Talk(YELL_SKARVALD_SKA_DIEDFIRST);
|
||||
@@ -145,6 +145,9 @@ public:
|
||||
Talk(YELL_SKARVALD_DAL_DIED);
|
||||
dalronn->AI()->DoAction(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
me->CastSpell((Unit*)NULL, SPELL_SUMMON_SKARVALD_GHOST, true);
|
||||
}
|
||||
|
||||
@@ -281,8 +284,8 @@ public:
|
||||
{
|
||||
if( me->GetEntry() != NPC_DALRONN )
|
||||
return;
|
||||
if( pInstance )
|
||||
if( Creature* skarvald = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SKARVALD)) )
|
||||
if( pInstance ) {
|
||||
if( Creature* skarvald = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SKARVALD)) ) {
|
||||
if( skarvald->isDead() )
|
||||
{
|
||||
Talk(YELL_DALRONN_DAL_DIEDFIRST);
|
||||
@@ -295,6 +298,8 @@ public:
|
||||
Talk(YELL_DALRONN_SKA_DIED);
|
||||
skarvald->AI()->DoAction(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
me->CastSpell((Unit*)NULL, SPELL_SUMMON_DALRONN_GHOST, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -329,13 +329,13 @@ public:
|
||||
if (point == 0)
|
||||
{
|
||||
Creature *cr;
|
||||
if (cr = me->SummonCreature(NPC_BREATH_TRIGGER, 483, -484.9f, 105, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000))
|
||||
if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 483, -484.9f, 105, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
|
||||
cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH_N, true);
|
||||
if (cr = me->SummonCreature(NPC_BREATH_TRIGGER, 471.0f, -484.7f, 105, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000))
|
||||
if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 471.0f, -484.7f, 105, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
|
||||
cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH_N, true);
|
||||
|
||||
for (uint8 j = 0; j < 7; j++)
|
||||
if (cr = me->SummonCreature(NPC_BREATH_TRIGGER, 477.0f, -507.0f+(j*3), 105.0f, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000))
|
||||
if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 477.0f, -507.0f+(j*3), 105.0f, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
|
||||
cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH_N, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
|
||||
Creature *pGuard1 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_1_GUID));
|
||||
Creature *pGuard2 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_EREKEM_GUARD_2_GUID));
|
||||
if (pGuard1 && !pGuard1->IsAlive() || pGuard2 && !pGuard2->IsAlive())
|
||||
if ((pGuard1 && !pGuard1->IsAlive()) || (pGuard2 && !pGuard2->IsAlive()))
|
||||
{
|
||||
events.RepeatEvent(urand(3000,6000));
|
||||
break;
|
||||
|
||||
@@ -397,7 +397,7 @@ public:
|
||||
pBoss->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
pBoss->SetReactState(REACT_AGGRESSIVE);
|
||||
if (WaveCount == 6 && m_auiEncounter[0] == DONE || WaveCount == 12 && m_auiEncounter[1] == DONE)
|
||||
if ((WaveCount == 6 && m_auiEncounter[0] == DONE) || (WaveCount == 12 && m_auiEncounter[1] == DONE))
|
||||
pBoss->SetLootMode(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ class spell_ioc_gunship_portal : public SpellScriptLoader
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
/*Player* caster = GetCaster()->ToPlayer();
|
||||
/*
|
||||
*
|
||||
* HACK: GetWorldLocation() returns real position and not transportposition.
|
||||
* ServertoClient: SMSG_MOVE_TELEPORT (0x0B39)
|
||||
* counter: 45
|
||||
|
||||
@@ -369,7 +369,7 @@ public:
|
||||
for (uint8 i = 0; i < count[phase]; ++i)
|
||||
{
|
||||
me->GetNearPoint(me, x, y, z, me->GetCombatReach(), 10.0f, rand_norm()*2*M_PI);
|
||||
if (cr = me->SummonCreature(randEntry(), x, y, z+2.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
if ((cr = me->SummonCreature(randEntry(), x, y, z+2.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)))
|
||||
{
|
||||
cr->CastSpell(cr, SPELL_TELEPORT_EFFECT, true);
|
||||
cr->AI()->AttackStart(me);
|
||||
@@ -380,7 +380,7 @@ public:
|
||||
else if (phase == 3)
|
||||
{
|
||||
me->GetNearPoint(me, x, y, z, me->GetCombatReach(), 20.0f, rand_norm()*2*M_PI);
|
||||
if (cr = me->SummonCreature(NPC_INFINITE_TIMERENDER, x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
if ((cr = me->SummonCreature(NPC_INFINITE_TIMERENDER, x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)))
|
||||
{
|
||||
cr->CastSpell(cr, SPELL_TELEPORT_EFFECT, true);
|
||||
cr->AI()->AttackStart(me);
|
||||
|
||||
@@ -121,13 +121,13 @@ public:
|
||||
me->SetControlled(false, UNIT_STATE_STUNNED);
|
||||
|
||||
Creature *cr;
|
||||
if (cr = me->SummonCreature(NPC_JALOOT, 5616.91f, 3772.67f, -94.26f, 1.78f))
|
||||
if ((cr = me->SummonCreature(NPC_JALOOT, 5616.91f, 3772.67f, -94.26f, 1.78f)))
|
||||
{
|
||||
summons.Summon(cr);
|
||||
cr->CastSpell(cr, SPELL_TOMB_OF_THE_HEARTLESS, true);
|
||||
cr->setFaction(me->getFaction());
|
||||
}
|
||||
if (cr = me->SummonCreature(NPC_ZEPIK, 5631.63f, 3794.36f, -92.24f, 3.45f))
|
||||
if ((cr = me->SummonCreature(NPC_ZEPIK, 5631.63f, 3794.36f, -92.24f, 3.45f)))
|
||||
{
|
||||
summons.Summon(cr);
|
||||
cr->CastSpell(cr, SPELL_TOMB_OF_THE_HEARTLESS, true);
|
||||
|
||||
@@ -496,7 +496,7 @@ public:
|
||||
if (checkTimer >= 2000)
|
||||
{
|
||||
checkTimer = 1;
|
||||
if (me->HealthBelowPct(25))
|
||||
if (me->HealthBelowPct(25)) {
|
||||
if (Player* player = GetValidPlayer())
|
||||
{
|
||||
Talk(3);
|
||||
@@ -513,6 +513,7 @@ public:
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (checkTimer < 20000)
|
||||
|
||||
@@ -22,7 +22,7 @@ OutdoorPvPGH::OutdoorPvPGH()
|
||||
bool OutdoorPvPGH::SetupOutdoorPvP()
|
||||
{
|
||||
RegisterZone(GH_ZONE);
|
||||
if (m_obj = new OPvPCapturePointGH(this))
|
||||
if ((m_obj = new OPvPCapturePointGH(this)))
|
||||
{
|
||||
AddCapturePoint(m_obj);
|
||||
return true;
|
||||
@@ -95,6 +95,8 @@ void OPvPCapturePointGH::ChangeState()
|
||||
sGameEventMgr->StartEvent(GH_HORDE_DEFENSE_EVENT);
|
||||
artkit = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (GameObject* flag = HashMapHolder<GameObject>::Find(m_capturePointGUID))
|
||||
|
||||
@@ -209,6 +209,8 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
BossAI::Reset();
|
||||
Creature* member = NULL;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (member = ObjectAccessor::GetCreature(*me, councilGUIDs[i]))
|
||||
if ((member = ObjectAccessor::GetCreature(*me, councilGUIDs[i])))
|
||||
member->AI()->EnterEvadeMode();
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
{
|
||||
Creature* member = NULL;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (member = ObjectAccessor::GetCreature(*me, councilGUIDs[i]))
|
||||
if ((member = ObjectAccessor::GetCreature(*me, councilGUIDs[i])))
|
||||
member->AI()->DoAction(ACTION_ENRAGE);
|
||||
}
|
||||
else if (param == ACTION_END_ENCOUNTER)
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
me->setActive(false);
|
||||
Creature* member = NULL;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (member = ObjectAccessor::GetCreature(*me, councilGUIDs[i]))
|
||||
if ((member = ObjectAccessor::GetCreature(*me, councilGUIDs[i])))
|
||||
if (member->IsAlive())
|
||||
Unit::Kill(me, member);
|
||||
Unit::Kill(me, me);
|
||||
|
||||
@@ -186,7 +186,7 @@ class boss_the_lurker_below : public CreatureScript
|
||||
|
||||
if (target)
|
||||
me->AttackerStateUpdate(target);
|
||||
else if (target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
else if ((target = SelectTarget(SELECT_TARGET_RANDOM, 0)))
|
||||
me->CastSpell(target, SPELL_WATER_BOLT, false);
|
||||
|
||||
me->resetAttackTimer();
|
||||
|
||||
@@ -79,8 +79,8 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _targetGUID;
|
||||
Creature& _owner;
|
||||
uint64 _targetGUID;
|
||||
};
|
||||
|
||||
class boss_magtheridon : public CreatureScript
|
||||
|
||||
@@ -221,6 +221,8 @@ class npc_millhouse_manastorm : public CreatureScript
|
||||
me->CastSpell(me->GetVictim(), SPELL_FROSTBOLT, false);
|
||||
events.ScheduleEvent(EVENT_MILL_BASE_SPELL, 4000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -160,6 +160,8 @@ class spell_botanica_shift_form : public SpellScriptLoader
|
||||
case SPELL_SCHOOL_FROST: form = SPELL_FROST_FORM; break;
|
||||
case SPELL_SCHOOL_ARCANE: form = SPELL_ARCANE_FORM; break;
|
||||
case SPELL_SCHOOL_SHADOW: form = SPELL_SHADOW_FORM; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (form)
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
if (timer)
|
||||
{
|
||||
timer += diff;
|
||||
if ((timer >= 0 && timer < 10000) || (timer >= 20000 && timer < 30000))
|
||||
if (timer < 10000 || (timer >= 20000 && timer < 30000))
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
if (Creature* cr = me->SummonCreature((roll_chance_i(50) ? 22474 : 22500), me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
|
||||
@@ -61,13 +61,14 @@ public:
|
||||
{
|
||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
Creature* cr;
|
||||
if (cr = creature->SummonCreature(17957, -186, -790, 43.8f, 4.2f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
if ((cr = creature->SummonCreature(17957, -186, -790, 43.8f, 4.2f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)))
|
||||
cr->AI()->AttackStart(creature);
|
||||
if (cr = creature->SummonCreature(17960, -188, -783, 43.8f, 4.2f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
if ((cr = creature->SummonCreature(17960, -188, -783, 43.8f, 4.2f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)))
|
||||
cr->AI()->AttackStart(player);
|
||||
if (cr = creature->SummonCreature(17957, -196, -783, 43.8f, 4.4f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
|
||||
if ((cr = creature->SummonCreature(17957, -196, -783, 43.8f, 4.4f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)))
|
||||
cr->AI()->AttackStart(player);
|
||||
if (GameObject* cage = creature->FindNearestGameObject(GO_CAGE_ENTRY, 20.0f))
|
||||
GameObject* cage = creature->FindNearestGameObject(GO_CAGE_ENTRY, 20.0f);
|
||||
if (cage)
|
||||
cage->SetGoState(GO_STATE_ACTIVE);
|
||||
creature->SetHomePosition(-195.39f, -795.91f, 43.8f, 1.0f);
|
||||
creature->AI()->Talk(1);
|
||||
|
||||
Reference in New Issue
Block a user