mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 01:23:47 +00:00
Scripts: Step 4 - Fixed all warnings inside scripts
issue #121 Next step: enabling -DWITH_WARNINGS and fix
This commit is contained in:
@@ -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