aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-05-07 20:09:45 +0200
committerShauren <shauren.trinity@gmail.com>2011-05-07 20:09:45 +0200
commit551889c42f78548d8c99542036efa1fd276e3d48 (patch)
treee37d4f44c79324643d6c11ec57c5ffa49c9dffcf /src/server/scripts
parent7905200ebaa16171748840f893da0bcea29c2138 (diff)
Core: More warning fixes
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp2
-rw-r--r--src/server/scripts/Kalimdor/bloodmyst_isle.cpp9
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp55
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp4
-rw-r--r--src/server/scripts/Outland/nagrand.cpp6
5 files changed, 37 insertions, 39 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index 91028e8745a..7a1e8179151 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -1215,7 +1215,7 @@ class npc_crate_helper : public CreatureScript
_marked = false;
}
- void SpellHit(Unit* caster, SpellEntry const* spell)
+ void SpellHit(Unit* /*caster*/, SpellEntry const* spell)
{
if (spell->Id == SPELL_ARCANE_DISRUPTION && !_marked)
{
diff --git a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
index 632dd0925ac..4b00da28629 100644
--- a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
@@ -173,8 +173,8 @@ public:
{
go->SetGoState(GO_STATE_ACTIVE);
stillpine->GetMotionMaster()->MovePoint(1, go->GetPositionX(), go->GetPositionY()-15, go->GetPositionZ());
- player->CastedCreatureOrGO(NPC_PRINCESS_STILLPINE, 0, SPELL_OPENING_PRINCESS_STILLPINE_CREDIT);
- }
+ player->CastedCreatureOrGO(NPC_PRINCESS_STILLPINE, 0, SPELL_OPENING_PRINCESS_STILLPINE_CREDIT);
+ }
return true;
}
};
@@ -190,11 +190,10 @@ public:
void MovementInform(uint32 type, uint32 id)
{
- if (id == 1)
+ if (type == POINT_MOTION_TYPE && id == 1)
{
- DoScriptText(SAY_DIRECTION, me);
+ DoScriptText(SAY_DIRECTION, me);
me->ForcedDespawn();
- return;
}
}
};
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index 3111361a46e..e4640b766f6 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -74,7 +74,7 @@ enum Spells
SPELL_ARCANE_BREATH = 56272,
SPELL_ARCANE_STORM = 57459,
SPELL_BERSEKER = 60670,
-
+
SPELL_VORTEX_1 = 56237, // seems that frezze object animation
SPELL_VORTEX_2 = 55873, // visual effect
SPELL_VORTEX_3 = 56105, // this spell must handle all the script - casted by the boss and to himself
@@ -292,7 +292,7 @@ public:
{
if (!instance)
return;
-
+
SetPhase(PHASE_THREE, true);
// this despawns Hover Disks
@@ -313,7 +313,7 @@ public:
}
if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_PLATFORM)))
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED); // In sniffs it has this flag, but i don't know how is applied.
+ go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED); // In sniffs it has this flag, but i don't know how is applied.
// pos sniffed
me->GetMotionMaster()->MoveIdle();
@@ -340,8 +340,8 @@ public:
events.ScheduleEvent(EVENT_YELL_2, 0, 0, _phase);
events.ScheduleEvent(EVENT_YELL_3, 8*IN_MILLISECONDS, 0, _phase);
events.ScheduleEvent(EVENT_YELL_4, 16*IN_MILLISECONDS, 0, _phase);
- events.ScheduleEvent(EVENT_SURGE_POWER_PHASE_3, (7, 16)*IN_MILLISECONDS, 0, _phase);
- events.ScheduleEvent(EVENT_STATIC_FIELD, (20, 30)*IN_MILLISECONDS, 0, _phase);
+ events.ScheduleEvent(EVENT_SURGE_POWER_PHASE_3, urand(7, 16)*IN_MILLISECONDS, 0, _phase);
+ events.ScheduleEvent(EVENT_STATIC_FIELD, urand(20, 30)*IN_MILLISECONDS, 0, _phase);
break;
default:
break;
@@ -400,7 +400,7 @@ public:
// not sure about the distance | I think it is better check this here than in the UpdateAI function...
if (who->GetDistance(me) <= 2.5f)
who->CastSpell(me, SPELL_POWER_SPARK_MALYGOS, true);
-
+
}
}
@@ -457,7 +457,7 @@ public:
me->GetMotionMaster()->MoveIdle();
me->GetMotionMaster()->MovePoint(MOVE_DEEP_BREATH_ROTATION, MalygosPhaseTwoWaypoints[0]);
-
+
Creature* summon = me->SummonCreature(NPC_HOVER_DISK_CASTER, HoverDiskWaypoints[MAX_HOVER_DISK_WAYPOINTS-1]);
if (summon && summon->IsAIEnabled)
summon->AI()->DoAction(ACTION_HOVER_DISK_START_WP_2);
@@ -474,7 +474,7 @@ public:
}
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(uint32 const diff)
{
if (!UpdateVictim())
return;
@@ -571,11 +571,11 @@ public:
break;
case EVENT_SURGE_POWER_PHASE_3:
DoCast(GetTargetPhaseThree(), SPELL_SURGE_POWER_PHASE_3);
- events.ScheduleEvent(EVENT_SURGE_POWER_PHASE_3, (7, 16)*IN_MILLISECONDS, 0, PHASE_THREE);
+ events.ScheduleEvent(EVENT_SURGE_POWER_PHASE_3, urand(7, 16)*IN_MILLISECONDS, 0, PHASE_THREE);
break;
case EVENT_STATIC_FIELD:
DoCast(GetTargetPhaseThree(), SPELL_STATIC_FIELD);
- events.ScheduleEvent(EVENT_STATIC_FIELD, (20, 30)*IN_MILLISECONDS, 0, PHASE_THREE);
+ events.ScheduleEvent(EVENT_STATIC_FIELD, urand(20, 30)*IN_MILLISECONDS, 0, PHASE_THREE);
break;
default:
break;
@@ -588,7 +588,7 @@ public:
Unit* GetTargetPhaseThree()
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
-
+
// we are a drake
if (target->GetVehicleKit())
return target;
@@ -599,8 +599,8 @@ public:
if (Unit* base = target->GetVehicleBase())
return base;
}
-
- // is a player falling from a vehicle?
+
+ // is a player falling from a vehicle?
return NULL;
}
@@ -632,7 +632,7 @@ public:
class spell_malygos_vortex_dummy_SpellScript : public SpellScript
{
PrepareSpellScript(spell_malygos_vortex_dummy_SpellScript)
-
+
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
@@ -730,7 +730,7 @@ public:
{
npc_portal_eoeAI(Creature* creature) : ScriptedAI(creature)
{
- instance = creature->GetInstanceScript();
+ instance = creature->GetInstanceScript();
}
void Reset()
@@ -738,7 +738,7 @@ public:
summonTimer = urand(5, 7)*IN_MILLISECONDS;
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(uint32 const diff)
{
if (!me->HasAura(SPELL_PORTAL_VISUAL_CLOSED) &&
!me->HasAura(SPELL_PORTAL_OPENED))
@@ -770,7 +770,7 @@ public:
{
summon->SetInCombatWithZone();
}
-
+
private:
uint32 summonTimer;
InstanceScript* instance;
@@ -794,7 +794,7 @@ public:
{
instance = creature->GetInstanceScript();
- MoveToMalygos();
+ MoveToMalygos();
}
void EnterEvadeMode()
@@ -812,8 +812,8 @@ public:
me->GetMotionMaster()->MoveFollow(malygos, 0.0f, 0.0f);
}
}
-
- void UpdateAI(const uint32 diff)
+
+ void UpdateAI(uint32 const /*diff*/)
{
if (!instance)
return;
@@ -864,8 +864,8 @@ public:
struct npc_hover_diskAI : public npc_escortAI
{
- npc_hover_diskAI(Creature* creature) : npc_escortAI(creature)
- {
+ npc_hover_diskAI(Creature* creature) : npc_escortAI(creature)
+ {
if (me->GetEntry() == NPC_HOVER_DISK_CASTER)
me->SetReactState(REACT_PASSIVE);
else
@@ -874,7 +874,7 @@ public:
instance = creature->GetInstanceScript();
}
- void PassengerBoarded(Unit* unit, int8 seat, bool apply)
+ void PassengerBoarded(Unit* unit, int8 /*seat*/, bool apply)
{
if (apply)
{
@@ -919,7 +919,7 @@ public:
// we dont evade
}
- void DoAction(const int32 action)
+ void DoAction(int32 const action)
{
if (me->GetEntry() != NPC_HOVER_DISK_CASTER)
return;
@@ -952,9 +952,8 @@ public:
// we dont do melee damage!
}
- void WaypointReached(uint32 i)
+ void WaypointReached(uint32 /*i*/)
{
-
}
private:
@@ -988,7 +987,7 @@ public:
DoCast(me, SPELL_ARCANE_OVERLOAD, false);
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(uint32 const /*diff*/)
{
// we dont do melee damage!
}
@@ -1087,7 +1086,7 @@ public:
events.ScheduleEvent(EVENT_YELL_1, 0);
}
- void UpdateAI(const uint32 diff)
+ void UpdateAI(uint32 const /*diff*/)
{
while (uint32 eventId = events.ExecuteEvent())
{
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp
index d3e31eebbf1..8b3f700c67d 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp
@@ -286,7 +286,7 @@ class go_razorscale_harpoon : public GameObjectScript
public:
go_razorscale_harpoon() : GameObjectScript("go_razorscale_harpoon") {}
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* /*player*/, GameObject* go)
{
InstanceScript* instance = go->GetInstanceScript();
if (Creature* razorscale = ObjectAccessor::GetCreature(*go, instance ? instance->GetData64(TYPE_RAZORSCALE) : 0))
@@ -360,7 +360,7 @@ class boss_razorscale : public CreatureScript
void MovementInform(uint32 type, uint32 id)
{
- if (id == 1)
+ if (type == POINT_MOTION_TYPE && id == 1)
{
phase = PHASE_GROUND;
events.SetPhase(PHASE_GROUND);
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp
index da8b2b491b5..5df55d19d3d 100644
--- a/src/server/scripts/Outland/nagrand.cpp
+++ b/src/server/scripts/Outland/nagrand.cpp
@@ -893,7 +893,7 @@ public:
};
};
-enum corki
+enum CorkiData
{
// first quest
QUEST_HELP = 9923,
@@ -990,10 +990,10 @@ public:
else
Say_Timer -= diff;
}
-
+
void MovementInform(uint32 type, uint32 id)
{
- if (id == 1)
+ if (type == POINT_MOTION_TYPE && id == 1)
{
Say_Timer = 5000;
ReleasedFromCage = true;