Fix most of the recently introduced warnings

--HG--
branch : trunk
This commit is contained in:
azazel
2010-10-16 13:32:30 +06:00
parent 8823549694
commit 3bd1ee0665
12 changed files with 49 additions and 45 deletions

View File

@@ -160,7 +160,7 @@ class boss_professor_putricide : public CreatureScript
}
case ACTION_ROTFACE_OOZE:
DoScriptText(RAND(SAY_ROTFACE_OOZE_FLOOD1, SAY_ROTFACE_OOZE_FLOOD2), me);
if (Creature* rotface = Unit::GetCreature(*me, instance->GetData64(DATA_ROTFACE)))
if (Unit::GetCreature(*me, instance->GetData64(DATA_ROTFACE)))
if (Creature* dummy = Unit::GetCreature(*me, oozeFloodDummy[oozeFloodStage]))
dummy->CastSpell(dummy, oozeFloodSpells[oozeFloodStage], true, NULL, NULL, me->GetGUID()); // cast from self for LoS (with prof's GUID for logs)
if (++oozeFloodStage == 4)

View File

@@ -141,7 +141,7 @@ class boss_rotface : public CreatureScript
professor->AI()->EnterEvadeMode();
}
void SpellHitTarget(Unit* target, SpellEntry const* spell)
void SpellHitTarget(Unit* /*target*/, SpellEntry const* spell)
{
if (spell->Id == SPELL_SLIME_SPRAY)
DoScriptText(SAY_SLIME_SPRAY, me);
@@ -190,7 +190,7 @@ class boss_rotface : public CreatureScript
{
Position pos;
target->GetPosition(&pos);
if (Creature* dummy = DoSummon(NPC_OOZE_SPRAY_STALKER, pos, 8000, TEMPSUMMON_TIMED_DESPAWN))
if (DoSummon(NPC_OOZE_SPRAY_STALKER, pos, 8000, TEMPSUMMON_TIMED_DESPAWN))
{
DoScriptText(EMOTE_SLIME_SPRAY, me);
DoCastAOE(SPELL_SLIME_SPRAY);
@@ -680,7 +680,7 @@ class spell_rotface_unstable_ooze_explosion : public SpellScriptLoader
// let Rotface handle the cast - caster dies before this executes
if (InstanceScript* script = GetTargetUnit()->GetInstanceScript())
if (Creature* rotface = script->instance->GetCreature(script->GetData64(DATA_ROTFACE)))
rotface->CastSpell(x, y, z, GetSpellInfo()->EffectTriggerSpell[effIndex], true, NULL, NULL, GetCaster()->GetGUID(), GetTargetUnit());
rotface->CastSpell(x, y, z, triggered_spell_id, true, NULL, NULL, GetCaster()->GetGUID(), GetTargetUnit());
}
void Register()

View File

@@ -144,7 +144,7 @@ public:
vehicle->RemoveAllPassengers();
}
void EnterCombat(Unit *who)
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
DoScriptText(SAY_AGGRO, me);
@@ -160,7 +160,7 @@ public:
Shattered = false;
}
void JustDied(Unit *victim)
void JustDied(Unit* /*victim*/)
{
_JustDied();
DoScriptText(SAY_DEATH, me);
@@ -267,7 +267,7 @@ public:
DoMeleeAttackIfReady();
}
void KilledUnit(Unit* Victim)
void KilledUnit(Unit* /*victim*/)
{
if (!(rand()%5))
DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
@@ -329,7 +329,7 @@ public:
Brittled = false;
}
void DamageTaken(Unit *attacker, uint32 &damage)
void DamageTaken(Unit* /*attacker*/, uint32& damage)
{
if (me->HasAura(SPELL_BRITTLE) && damage >= 5000)
{
@@ -342,7 +342,7 @@ public:
}
}
void UpdateAI(const uint32 uiDiff)
void UpdateAI(const uint32 /*uiDiff*/)
{
if (!UpdateVictim())
return;

View File

@@ -392,9 +392,9 @@ public:
uint8 random = urand(1,4);
for (uint8 i = 0; i < random; ++i)
{
float x = irand(540.0f, 640.0f); // Safe range is between 500 and 650
float y = irand(-230.0f, -195.0f); // Safe range is between -235 and -145
float z = 391.5f; // Ground level
float x = float(irand(540, 640)); // Safe range is between 500 and 650
float y = float(irand(-230, -195)); // Safe range is between -235 and -145
float z = 391.5f; // Ground level
me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
}
}
@@ -425,7 +425,6 @@ public:
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
InstanceScript* pInstance = pCreature->GetInstanceScript();
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
@@ -588,7 +587,9 @@ public:
void Reset()
{
if (MoleMachine = me->SummonGameObject(GOB_MOLE_MACHINE,me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),urand(0,6),0,0,0,0,300))
MoleMachine = me->SummonGameObject(GOB_MOLE_MACHINE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(),
float(urand(0, 6)), 0, 0, 0, 0, 300);
if (MoleMachine)
MoleMachine->SetGoState(GO_STATE_ACTIVE);
SummonTimer = 6000;
}

View File

@@ -241,6 +241,7 @@ public:
for (uint8 i = 0; i < 16; i++)
{
if (!DoneAdds[i % 4])
{
if (next == 0)
{
move = (Phase)(i % 4);
@@ -248,6 +249,7 @@ public:
}
else if (next > 0)
--next;
}
}
++AddCount;
DoneAdds[move] = true;