Core: Fix more warnings

--HG--
branch : trunk
This commit is contained in:
Spp
2010-08-30 15:25:15 +02:00
parent b0d85ac185
commit 405f312918
103 changed files with 564 additions and 468 deletions
@@ -36,10 +36,10 @@ EndScriptData */
const Position LorgusPosition[4] =
{
{ -458.500610f, -38.343079f, -33.474445f },
{ -469.423615f, -88.400513f, -39.265102f },
{ -622.354980f, -10.350100f, -22.777000f },
{ -759.640564f, 16.658913f, -29.159529f }
{ -458.500610f, -38.343079f, -33.474445f, 0.0f },
{ -469.423615f, -88.400513f, -39.265102f, 0.0f },
{ -622.354980f, -10.350100f, -22.777000f, 0.0f },
{ -759.640564f, 16.658913f, -29.159529f, 0.0f }
};
const Position SpawnsLocation[] =
@@ -525,7 +525,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
}
}
void hyjalAI::SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3])
void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3])
{
// 1 in 4 chance we give a rally yell. Not sure if the chance is offilike.
if (rand()%4 == 0)
@@ -67,7 +67,7 @@ struct Wave
bool IsBoss; // Simply used to inform the wave summoner that the next wave contains a boss to halt all waves after that
};
static Wave AllianceWaves[]= // Waves that will be summoned in the Alliance Base
const Wave AllianceWaves[]= // Waves that will be summoned in the Alliance Base
{ // Rage Winterchill Wave 1-8
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, 0, 0, 0, 0, 0, 0, 0, 0}, 120000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, 0, 0, 0, 0, 0, 0}, 120000, false},
@@ -92,7 +92,7 @@ static Wave AllianceWaves[]= // Waves that will b
{{ANETHERON, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, true}
};
static Wave HordeWaves[]= // Waves that are summoned in the Horde base
const Wave HordeWaves[]= // Waves that are summoned in the Horde base
{ // Kaz'Rogal Wave 1-8
{{GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0}, 180000, false},
{{GHOUL, GHOUL, GHOUL, GHOUL, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, 0, 0, 0, 0}, 180000, false},
@@ -141,7 +141,7 @@ enum YellId
DEATH = 6, // Used on death
};
static Yells JainaQuotes[]=
const Yells JainaQuotes[]=
{
{ATTACKED, -1534000},
{ATTACKED, -1534001},
@@ -154,7 +154,7 @@ static Yells JainaQuotes[]=
{DEATH, -1534008},
};
static Yells ThrallQuotes[]=
const Yells ThrallQuotes[]=
{
{ATTACKED, -1534009},
{ATTACKED, -1534010},
@@ -201,7 +201,7 @@ struct hyjalAI : public npc_escortAI
void SummonCreature(uint32 entry, float Base[4][3]); // Summons a creature for that wave in that base
// Summons the next wave, calls SummonCreature
void SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3]);
void SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]);
void StartEvent(Player* player); // Begins the event by gossip click
@@ -245,9 +245,9 @@ struct Wave
static Wave PortalWaves[]=
{
{C_ASSAS, C_WHELP, C_CHRON, 0},
{C_EXECU, C_CHRON, C_WHELP, C_ASSAS},
{C_EXECU, C_VANQU, C_CHRON, C_ASSAS}
{ {C_ASSAS, C_WHELP, C_CHRON, 0} },
{ {C_EXECU, C_CHRON, C_WHELP, C_ASSAS} },
{ {C_EXECU, C_VANQU, C_CHRON, C_ASSAS} }
};
class npc_time_rift : public CreatureScript
@@ -87,17 +87,17 @@ static sOnyxMove aMoveData[]=
{7, 6, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -55.0548f},//north
};
const Position MiddleRoomLocation = {-23.6155f, -215.357f, -55.7344f};
const Position MiddleRoomLocation = {-23.6155f, -215.357f, -55.7344f, 0.0f};
const Position Phase2Location = {-80.924f, -214.299f, -82.942f};
const Position Phase2Location = {-80.924f, -214.299f, -82.942f, 0.0f};
static Position aSpawnLocations[3]=
{
//Whelps
{-30.127f, -254.463f, -89.440f},
{-30.817f, -177.106f, -89.258f},
{-30.127f, -254.463f, -89.440f, 0.0f},
{-30.817f, -177.106f, -89.258f, 0.0f},
//Lair Guard
{-145.950f, -212.831f, -68.659f}
{-145.950f, -212.831f, -68.659f, 0.0f}
};
class boss_onyxia : public CreatureScript
@@ -177,7 +177,7 @@ public:
}
}
void EnterCombat(Unit* pWho)
void EnterCombat(Unit* /*pWho*/)
{
DoScriptText(SAY_AGGRO, me);
me->SetInCombatWithZone();
@@ -189,7 +189,7 @@ public:
}
}
void JustDied(Unit* killer)
void JustDied(Unit* /*killer*/)
{
if (m_pInstance)
m_pInstance->SetData(DATA_ONYXIA, DONE);
@@ -220,12 +220,12 @@ public:
Summons.Despawn(summon);
}
void KilledUnit(Unit* pVictim)
void KilledUnit(Unit* /*pVictim*/)
{
DoScriptText(SAY_KILL, me);
}
void SpellHit(Unit *pCaster, const SpellEntry* pSpell)
void SpellHit(Unit * /*pCaster*/, const SpellEntry* pSpell)
{
if (pSpell->Id == SPELL_BREATH_EAST_TO_WEST ||
pSpell->Id == SPELL_BREATH_WEST_TO_EAST ||
@@ -260,23 +260,23 @@ public:
me->GetMotionMaster()->MoveChase(me->getVictim());
m_uiBellowingRoarTimer = 1000;
break;
case 10:
me->SetFlying(true);
case 10:
me->SetFlying(true);
me->GetMotionMaster()->MovePoint(11, Phase2Location.GetPositionX(),Phase2Location.GetPositionY(),Phase2Location.GetPositionZ()+25);
me->SetSpeed(MOVE_FLIGHT, 1.0f);
me->SetSpeed(MOVE_FLIGHT, 1.0f);
DoScriptText(SAY_PHASE_2_TRANS, me);
if (m_pInstance)
m_pInstance->SetData(DATA_ONYXIA_PHASE, m_uiPhase);
m_uiWhelpTimer = 5000;
m_uiLairGuardTimer = 15000;
break;
case 11:
break;
case 11:
if (m_pPointData)
me->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ);
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveIdle();
break;
break;
default:
m_bIsMoving = false;
@@ -67,7 +67,7 @@ public:
m_uiEruptTimer = 0;
}
void OnCreatureCreate(Creature* pCreature, bool add)
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
{
switch (pCreature->GetEntry())
{
@@ -230,7 +230,7 @@ public:
}
}
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* source, Unit const* target = NULL, uint32 miscvalue1 = 0)
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ = NULL, uint32 /*miscvalue1*/ = 0)
{
switch(criteria_id)
{
@@ -162,7 +162,7 @@ const Position FleshTentaclePos[2] =
};
//Kick out position
const Position KickPos = { -8545.0f, 1984.0f, -96.0f};
const Position KickPos = { -8545.0f, 1984.0f, -96.0f, 0.0f};
class boss_eye_of_cthun : public CreatureScript
{
@@ -353,6 +353,7 @@ public:
case PHASE_EYE_RED_BEAM:
if (DarkGlareTick < 35)
{
if (DarkGlareTickTimer <= diff)
{
//Set angle and cast
@@ -372,6 +373,7 @@ public:
//1 second per tick
DarkGlareTickTimer = 1000;
} else DarkGlareTickTimer -= diff;
}
//PhaseTimer
if (PhaseTimer <= diff)
@@ -799,6 +801,7 @@ public:
} else StomachEnterTimer -= diff;
if (StomachEnterVisTimer && StomachEnterTarget)
{
if (StomachEnterVisTimer <= diff)
{
//Check for valid player
@@ -812,6 +815,7 @@ public:
StomachEnterTarget = 0;
StomachEnterVisTimer = 0;
} else StomachEnterVisTimer -= diff;
}
//GientClawTentacleTimer
if (GiantClawTentacleTimer <= diff)
@@ -1051,6 +1055,7 @@ public:
//EvadeTimer
if (!me->IsWithinMeleeRange(me->getVictim()))
{
if (EvadeTimer <= diff)
{
if (Unit* p = Unit::GetUnit(*me, Portal))
@@ -1083,6 +1088,7 @@ public:
me->SetVisibility(VISIBILITY_ON);
} else EvadeTimer -= diff;
}
//GroundRuptureTimer
if (GroundRuptureTimer <= diff)
@@ -1161,40 +1167,40 @@ public:
//EvadeTimer
if (!me->IsWithinMeleeRange(me->getVictim()))
if (EvadeTimer <= diff)
{
if (Unit* p = Unit::GetUnit(*me, Portal))
p->Kill(p);
//Dissapear and reappear at new position
me->SetVisibility(VISIBILITY_OFF);
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
if (EvadeTimer <= diff)
{
me->Kill(me);
return;
}
if (Unit* p = Unit::GetUnit(*me, Portal))
p->Kill(p);
if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID))
{
me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0);
if (Creature* pPortal = me->SummonCreature(MOB_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
//Dissapear and reappear at new position
me->SetVisibility(VISIBILITY_OFF);
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
{
pPortal->SetReactState(REACT_PASSIVE);
Portal = pPortal->GetGUID();
me->Kill(me);
return;
}
GroundRuptureTimer = 500;
HamstringTimer = 2000;
ThrashTimer = 5000;
EvadeTimer = 5000;
AttackStart(pTarget);
}
if (!pTarget->HasAura(SPELL_DIGESTIVE_ACID))
{
me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0);
if (Creature* pPortal = me->SummonCreature(MOB_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
pPortal->SetReactState(REACT_PASSIVE);
Portal = pPortal->GetGUID();
}
me->SetVisibility(VISIBILITY_ON);
} else EvadeTimer -= diff;
GroundRuptureTimer = 500;
HamstringTimer = 2000;
ThrashTimer = 5000;
EvadeTimer = 5000;
AttackStart(pTarget);
}
me->SetVisibility(VISIBILITY_ON);
} else EvadeTimer -= diff;
}
//GroundRuptureTimer
if (GroundRuptureTimer <= diff)
@@ -61,7 +61,7 @@ class npc_sergeant_bly : public CreatureScript
public:
npc_sergeant_bly() : CreatureScript("npc_sergeant_bly") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
@@ -179,7 +179,7 @@ public:
DoMeleeAttackIfReady();
}
void DoAction(const int32 param)
void DoAction(const int32 /*param*/)
{
postGossipStep=1;
Text_Timer = 0;
@@ -219,7 +219,7 @@ class go_troll_cage : public GameObjectScript
public:
go_troll_cage() : GameObjectScript("go_troll_cage") { }
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
{
if (InstanceScript* pInstance = pGo->GetInstanceScript())
{
@@ -261,7 +261,7 @@ class npc_weegli_blastfuse : public CreatureScript
public:
npc_weegli_blastfuse() : CreatureScript("npc_weegli_blastfuse") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
@@ -356,7 +356,7 @@ public:
}
}
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 /*type*/, uint32 /*id*/)
{
if (pInstance)
{
@@ -376,7 +376,7 @@ public:
}
}
void DoAction(const int32 param)
void DoAction(const int32 /*param*/)
{
DestroyDoor();
}
@@ -415,7 +415,7 @@ class go_shallow_grave : public GameObjectScript
public:
go_shallow_grave() : GameObjectScript("go_shallow_grave") { }
bool OnGossipHello(Player* pPlayer, GameObject* pGo)
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
{
// randomly summon a zombie or dead hero the first time a grave is used
if (pGo->GetUseCount() == 0)
@@ -448,7 +448,7 @@ class at_zumrah : public AreaTriggerScript
public:
at_zumrah() : AreaTriggerScript("at_zumrah") { }
bool OnTrigger(Player* pPlayer,const AreaTriggerEntry *at)
bool OnTrigger(Player* pPlayer,const AreaTriggerEntry * /*at*/)
{
Creature* pZumrah = pPlayer->FindNearestCreature(ZUMRAH_ID, 30.0f);
+1 -1
View File
@@ -456,7 +456,7 @@ class go_naga_brazier : public GameObjectScript
{
}
bool OnGossipHello(Player* player, GameObject* go)
bool OnGossipHello(Player* /*player*/, GameObject* go)
{
if (Creature* creature = GetClosestCreatureWithEntry(go, NPC_MUGLASH, INTERACTION_DISTANCE*2))
{
+4
View File
@@ -331,11 +331,13 @@ public:
void UpdateAI(const uint32 diff)
{
if (Must_Die)
{
if (Must_Die_Timer <= diff)
{
me->ForcedDespawn();
return;
} else Must_Die_Timer -= diff;
}
if (!Escape)
{
@@ -490,10 +492,12 @@ public:
void UpdateAI(const uint32 diff)
{
if (we_must_die)
{
if (must_die_timer <= diff)
{
me->ForcedDespawn();
} else must_die_timer -= diff;
}
return;
}
@@ -368,7 +368,7 @@ public:
## npc_zelfrax
######*/
const Position MovePosition = {-2967.030f,-3872.1799f,35.620f};
const Position MovePosition = {-2967.030f,-3872.1799f,35.620f, 0.0f};
enum eZelfrax
{
@@ -503,19 +503,19 @@ public:
DoScriptText(SAY_STAY_1, me, pPlayer);
break;
case 11:
DoScriptText(SAY_STAY_2, me, pPlayer);
DoScriptText(SAY_STAY_2, me, pPlayer);
break;
case 25:
DoScriptText(SAY_STAY_3, me, pPlayer);
DoScriptText(SAY_STAY_3, me, pPlayer);
break;
case 26:
DoScriptText(SAY_STAY_4, me, pPlayer);
DoScriptText(SAY_STAY_4, me, pPlayer);
break;
case 27:
DoScriptText(SAY_STAY_5, me, pPlayer);
DoScriptText(SAY_STAY_5, me, pPlayer);
break;
case 28:
DoScriptText(SAY_STAY_6, me, pPlayer);
DoScriptText(SAY_STAY_6, me, pPlayer);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
break;
case 29: