Removed more warnings, mostly related to unused-variable

issue #121

We still have to work on unused-parameter
This commit is contained in:
Yehonal
2017-09-18 03:16:32 +02:00
parent cf627d8327
commit 5ec07ef31f
78 changed files with 190 additions and 213 deletions

View File

@@ -150,10 +150,10 @@ enum Events
const Position portalPos[4] =
{
{3247.29f, 529.804f, 58.9595f},
{3248.62f, 646.739f, 85.2939f},
{3151.20f, 517.862f, 90.3389f},
{3351.78f, 517.138f, 99.1620f},
{3247.29f, 529.804f, 58.9595f, 0.0f},
{3248.62f, 646.739f, 85.2939f, 0.0f},
{3151.20f, 517.862f, 90.3389f, 0.0f},
{3351.78f, 517.138f, 99.1620f, 0.0f},
};
const Position EggsPos[12] =

View File

@@ -2444,7 +2444,6 @@ public:
if (!go->loot.items.size())
return false;
uint8 invalidCount = 0;
for( std::vector<LootItem>::iterator itr = go->loot.items.begin(); itr != go->loot.items.end(); ++itr )
if( ItemTemplate const *iProto = sObjectMgr->GetItemTemplate((*itr).itemid) )
if( ((iProto->Flags2 & ITEM_FLAGS_EXTRA_HORDE_ONLY) && plr->GetTeamId() != TEAM_HORDE) || ((iProto->Flags2 & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) && plr->GetTeamId() != TEAM_ALLIANCE) )

View File

@@ -831,7 +831,7 @@ class spell_valkyr_touch : public SpellScriptLoader
{
uint32 absorb=0;
uint32 resist=0;
CleanDamage cleanDamage = CleanDamage(0, 0, BASE_ATTACK, MELEE_HIT_NORMAL);
CleanDamage(0, 0, BASE_ATTACK, MELEE_HIT_NORMAL);
int32 dmg = urand(2925,3075)*(caster->GetMap()->GetDifficulty()-1);
if (caster->CanApplyResilience())
Unit::ApplyResilience(plr, NULL, &dmg, false, CR_CRIT_TAKEN_SPELL);

View File

@@ -155,18 +155,17 @@ public:
bool IsEncounterInProgress() const
{
uint8 aliveCount = 0;
Map::PlayerList const &pl = instance->GetPlayers();
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
if( Player* plr = itr->GetSource() )
if( plr->IsAlive() && !plr->IsGameMaster() )
return EncounterStatus == IN_PROGRESS; // found alive player
if( EncounterStatus != NOT_STARTED )
*(const_cast<uint32*>(&EncounterStatus)) = NOT_STARTED;
return false;
}
void OnCreatureCreate(Creature* creature)
{
switch( creature->GetEntry() )

View File

@@ -158,7 +158,7 @@ public:
void SpellHitTarget(Unit* target, const SpellInfo* spell)
{
if (spell->Id == SPELL_SARONITE_TRIGGERED)
if (spell->Id == uint32(SPELL_SARONITE_TRIGGERED))
{
if (bCanSayBoulderHit)
{
@@ -166,7 +166,7 @@ public:
Talk(SAY_BOULDER_HIT);
}
}
if (spell->Id == SPELL_FORGE_BLADE)
if (spell->Id == uint32(SPELL_FORGE_BLADE))
{
events.RescheduleEvent(EVENT_SPELL_CHILLING_WAVE, 10000);
SetEquipmentSlots(false, EQUIP_ID_SWORD);
@@ -179,7 +179,7 @@ public:
me->SetTarget(me->GetVictim()->GetGUID());
}
}
else if (spell->Id == SPELL_FORGE_MACE)
else if (spell->Id == uint32(SPELL_FORGE_MACE))
{
events.RescheduleEvent(EVENT_SPELL_DEEP_FREEZE, 10000);
SetEquipmentSlots(false, EQUIP_ID_MACE);

View File

@@ -954,7 +954,7 @@ public:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
me->GetMotionMaster()->MovePoint(2, TSCenterPos);
float ZeroAngle = TSSpawnPos.GetAngle(&TSMidPos);
TSSpawnPos.GetAngle(&TSMidPos);
for (std::list<uint64>::iterator itr = summons.begin(); itr != summons.end(); ++itr)
if (Creature* c = pInstance->instance->GetCreature(*itr))
@@ -1502,7 +1502,7 @@ public:
void HandleEffectPeriodic(AuraEffect const * aurEff)
{
if (aurEff->GetTickNumber() == aurEff->GetTotalTicks())
if (aurEff->GetTotalTicks() >= 0 && aurEff->GetTickNumber() == uint32(aurEff->GetTotalTicks()))
if (Unit* target = GetTarget())
target->CastSpell(target, 69604, true);
}

View File

@@ -53,11 +53,11 @@ enum Misc
static Position mojoPosition[] =
{
{1663.1f, 743.6f, 143.1f},
{1669.97f, 753.7f, 143.1f},
{1680.7f, 750.7f, 143.1f},
{1680.7f, 737.1f, 143.1f},
{1670.4f, 733.5f, 143.1f}
{1663.1f, 743.6f, 143.1f, 0.0f},
{1669.97f, 753.7f, 143.1f, 0.0f},
{1680.7f, 750.7f, 143.1f, 0.0f},
{1680.7f, 737.1f, 143.1f, 0.0f},
{1670.4f, 733.5f, 143.1f, 0.0f}
};
class RestoreFight : public BasicEvent

View File

@@ -1665,8 +1665,6 @@ class spell_valanar_kinetic_bomb_summon : public SpellScriptLoader
{
BeforeCast += SpellCastFn(spell_valanar_kinetic_bomb_summon_SpellScript::SelectDest);
}
uint32 _targetCount;
};
SpellScript* GetSpellScript() const

View File

@@ -221,7 +221,7 @@ Position const chokePos[6] =
{-510.7041f, 2211.069f, 546.5298f, 0.0f} // back right
};
Position const finalPos = {-563.7552f, 2211.328f, 538.7848f, 0.0f};
//Position const finalPos = {-563.7552f, 2211.328f, 538.7848f, 0.0f};
class boss_deathbringer_saurfang : public CreatureScript
{

View File

@@ -198,34 +198,34 @@ Position const SkybreakerTeleportExit = { -17.55738f, -0.090421f, 21.18366f
uint32 const MuradinExitPathSize = 10;
Position const MuradinExitPath[MuradinExitPathSize] =
{
{ 8.130936f, -0.2699585f, 20.31728f },
{ 6.380936f, -0.2699585f, 20.31728f },
{ 3.507703f, 0.02986573f, 20.78463f },
{ -2.767633f, 3.743143f, 20.37663f },
{ -4.017633f, 4.493143f, 20.12663f },
{ -7.242224f, 6.856013f, 20.03468f },
{ -7.742224f, 8.606013f, 20.78468f },
{ -7.992224f, 9.856013f, 21.28468f },
{ -12.24222f, 23.10601f, 21.28468f },
{ -14.88477f, 25.20844f, 21.59985f },
{ 8.130936f, -0.2699585f, 20.31728f, 0.0f },
{ 6.380936f, -0.2699585f, 20.31728f, 0.0f },
{ 3.507703f, 0.02986573f, 20.78463f, 0.0f },
{ -2.767633f, 3.743143f, 20.37663f, 0.0f },
{ -4.017633f, 4.493143f, 20.12663f, 0.0f },
{ -7.242224f, 6.856013f, 20.03468f, 0.0f },
{ -7.742224f, 8.606013f, 20.78468f, 0.0f },
{ -7.992224f, 9.856013f, 21.28468f, 0.0f },
{ -12.24222f, 23.10601f, 21.28468f, 0.0f },
{ -14.88477f, 25.20844f, 21.59985f, 0.0f },
};
uint32 const SaurfangExitPathSize = 13;
Position const SaurfangExitPath[SaurfangExitPathSize] =
{
{ 30.43987f, 0.1475817f, 36.10674f },
{ 21.36141f, -3.056458f, 35.42970f },
{ 19.11141f, -3.806458f, 35.42970f },
{ 19.01736f, -3.299440f, 35.39428f },
{ 18.6747f, -5.862823f, 35.66611f },
{ 18.6747f, -7.862823f, 35.66611f },
{ 18.1747f, -17.36282f, 35.66611f },
{ 18.1747f, -22.61282f, 35.66611f },
{ 17.9247f, -24.36282f, 35.41611f },
{ 17.9247f, -26.61282f, 35.66611f },
{ 17.9247f, -27.86282f, 35.66611f },
{ 17.9247f, -29.36282f, 35.66611f },
{ 15.33203f, -30.42621f, 35.93796f }
{ 30.43987f, 0.1475817f, 36.10674f, 0.0f },
{ 21.36141f, -3.056458f, 35.42970f, 0.0f },
{ 19.11141f, -3.806458f, 35.42970f, 0.0f },
{ 19.01736f, -3.299440f, 35.39428f, 0.0f },
{ 18.6747f, -5.862823f, 35.66611f, 0.0f },
{ 18.6747f, -7.862823f, 35.66611f, 0.0f },
{ 18.1747f, -17.36282f, 35.66611f, 0.0f },
{ 18.1747f, -22.61282f, 35.66611f, 0.0f },
{ 17.9247f, -24.36282f, 35.41611f, 0.0f },
{ 17.9247f, -26.61282f, 35.66611f, 0.0f },
{ 17.9247f, -27.86282f, 35.66611f, 0.0f },
{ 17.9247f, -29.36282f, 35.66611f, 0.0f },
{ 15.33203f, -30.42621f, 35.93796f, 0.0f }
};
enum PassengerSlots

View File

@@ -926,8 +926,6 @@ class spell_putricide_slime_puddle_spawn : public SpellScriptLoader
{
BeforeCast += SpellCastFn(spell_putricide_slime_puddle_spawn_SpellScript::SelectDest);
}
uint32 _targetCount;
};
SpellScript* GetSpellScript() const

View File

@@ -38,9 +38,9 @@ enum Misc
const Position PosWrap[3] =
{
{3546.796f, -3869.082f, 296.450f},
{3531.271f, -3847.424f, 299.450f},
{3497.067f, -3843.384f, 302.384f}
{3546.796f, -3869.082f, 296.450f, 0.0f},
{3531.271f, -3847.424f, 299.450f, 0.0f},
{3497.067f, -3843.384f, 302.384f, 0.0f}
};
class boss_maexxna : public CreatureScript

View File

@@ -286,7 +286,7 @@ class spell_boss_magus_telestra_gravity_well : public SpellScriptLoader
{
pos.Relocate(GetCaster()->GetPositionX(), GetCaster()->GetPositionY(), GetCaster()->GetPositionZ()+1.0f);
float o = frand(0, 2*M_PI);
target->MovePositionToFirstCollision(pos, 20.0f, frand(0, 2*M_PI));
target->MovePositionToFirstCollision(pos, 20.0f, o);
pos.m_positionZ += frand(5.0f, 15.0f);
}
else

View File

@@ -86,9 +86,9 @@ enum SummonPhases
static Position RoomPosition[] =
{
{1293.0f, 610.0f, 199.3f},
{1294.2f, 724.3f, 199.3f},
{1295.2f, 667.1f, 189.7f},
{1293.0f, 610.0f, 199.3f, 0.0f},
{1294.2f, 724.3f, 199.3f, 0.0f},
{1295.2f, 667.1f, 189.7f, 0.0f},
};
class boss_sjonnir : public CreatureScript

View File

@@ -781,7 +781,7 @@ public:
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
{
if (spellInfo->Id == SPELL_CHAIN_LIGHTNING || spellInfo->Id == RAID_MODE(61916, 63482)) // Lightning Whirl triggered
if (spellInfo->Id == SPELL_CHAIN_LIGHTNING || spellInfo->Id == uint32(RAID_MODE(61916, 63482))) // Lightning Whirl triggered
_stunnedAchievement = false;
}

View File

@@ -232,7 +232,7 @@ public:
void EnterCombat(Unit* pWho)
{
if (summons.size() != RAID_MODE(8, 16))
if (summons.size() != uint32(RAID_MODE(8, 16)))
{
EnterEvadeMode();
return;
@@ -1289,7 +1289,7 @@ public:
void HandleEffectPeriodic(AuraEffect const * aurEff)
{
if (aurEff->GetTickNumber() == aurEff->GetTotalTicks()-1)
if (aurEff->GetTotalTicks() > 0 && aurEff->GetTickNumber() == uint32(aurEff->GetTotalTicks())-1)
{
Unit* target = GetTarget();
Unit* caster = GetCaster();

View File

@@ -448,7 +448,7 @@ public:
void HandleEffectPeriodic(AuraEffect const * aurEff)
{
if (aurEff->GetTickNumber() == aurEff->GetTotalTicks())
if (aurEff->GetTotalTicks() >= 0 && aurEff->GetTickNumber() == uint32(aurEff->GetTotalTicks()))
if (Unit* c = GetCaster())
if (Creature* s = c->SummonCreature(NPC_SCORCHED_GROUND, c->GetPositionX()+20.0f*cos(c->GetOrientation()), c->GetPositionY()+20.0f*sin(c->GetOrientation()), 361.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 30000))
{

View File

@@ -297,7 +297,7 @@ enum Misc
DATA_LOSE_YOUR_ILLUSION = 2,
};
const Position Middle = {2134.68f, -263.13f, 419.44f};
const Position Middle = {2134.68f, -263.13f, 419.44f, M_PI*1.5f};
const uint32 RollTable[3] = { 32877, 32878, 32876 };

View File

@@ -295,7 +295,7 @@ enum Misc
DATA_GET_SARA_PHASE = 3,
};
const Position Middle = {1980.28f, -25.5868f, 329.397f};
const Position Middle = {1980.28f, -25.5868f, 329.397f, M_PI*1.5f};
class boss_yoggsaron_sara : public CreatureScript
@@ -1098,7 +1098,7 @@ public:
me->LowerPlayerDamageReq(me->GetMaxHealth()*0.7f);
me->RemoveAura(SPELL_SHADOW_BARRIER);
events.ScheduleEvent(EVENT_YS_LUNATIC_GAZE, 7000);
events.ScheduleEvent(EVENT_YS_SHADOW_BEACON, 20000);
events.ScheduleEvent(EVENT_YS_SUMMON_GUARDIAN, 0);

View File

@@ -71,16 +71,16 @@ enum Events
static Position TrashPosition[]=
{
{441.236f, -512.000f, 104.930f},
{478.436f, -494.475f, 104.730f}
{441.236f, -512.000f, 104.930f, 0.0f},
{478.436f, -494.475f, 104.730f, 0.0f}
};
static Position SkadiPosition[] =
{
{338.679f, -507.254f, 124.122f},
{338.679f, -513.254f, 124.122f},
{490.096f, -510.86f, 123.368f},
{490.76f, -517.389f, 123.368f}
{338.679f, -507.254f, 124.122f, 0.0f},
{338.679f, -513.254f, 124.122f, 0.0f},
{490.096f, -510.86f, 123.368f, 0.0f},
{490.76f, -517.389f, 123.368f, 0.0f}
};
#define EMOTE_IN_RANGE "Skadi the Ruthless is within range of the harpoon launchers"

View File

@@ -229,11 +229,10 @@ public:
uint64 _aquanosGUID;
uint8 _lCount;
uint32 _lSource;
uint32 _resetTime;
bool _canWash;
};
bool OnGossipHello(Player* player, Creature* creature)
{
if (creature->IsQuestGiver())
@@ -251,7 +250,7 @@ public:
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
return true;
}
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
{
switch (action)

View File

@@ -114,7 +114,7 @@ public:
questList[playerGUID] = itemCode;
// Decode Item Entry, Get Item Name, Generate Emotes
uint32 itemEntry = GetTaskItemEntry(itemCode);
//uint32 itemEntry = GetTaskItemEntry(itemCode);
uint32 auraId = GetTaskAura(itemCode);
const char* itemName = GetTaskItemName(itemCode);