aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-06-21 18:06:38 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-06-21 18:06:38 +0200
commita0fad6faa91bcf97d89626d38f9b3e575365d056 (patch)
tree4392d4a258ac146377fa0899027a8ec7bdb45bec /src
parent1a24c846c99b688688e70689998c0016d16de265 (diff)
Core: Fix warnings and some cleanup
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp80
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp6
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp13
4 files changed, 46 insertions, 55 deletions
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index a4572f43563..53d7e4c707a 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -812,7 +812,7 @@ public:
struct npc_nexus_drake_hatchlingAI : public FollowerAI //The spell who makes the npc follow the player is missing, also we can use FollowerAI!
{
- npc_nexus_drake_hatchlingAI(Creature* creature) : FollowerAI(creature)
+ npc_nexus_drake_hatchlingAI(Creature* creature) : FollowerAI(creature)
{
HarpoonerGUID = 0;
}
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index a3d75a07943..0c85d4bf733 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -156,14 +156,6 @@ public:
me->DespawnOrUnsummon(10000);
}
}
-
- void UpdateAI(uint32 diff)
- {
- if (!UpdateVictim())
- return;
-
- DoMeleeAttackIfReady();
- }
};
CreatureAI* GetAI(Creature* creature) const
@@ -1699,8 +1691,8 @@ class spell_random_ingredient : public SpellScriptLoader
if (Creature* finklestein = GetClosestCreatureWithEntry(player, NPC_FINKLESTEIN, 25.0f))
{
- finklestein->CastSpell(player, FetchIngredients[ingredient] [0], true, NULL);
- finklestein->AI()->Talk(FetchIngredients[ingredient] [3], player->GetGUID());
+ finklestein->CastSpell(player, FetchIngredients[ingredient][0], true, NULL);
+ finklestein->AI()->Talk(FetchIngredients[ingredient][3], player->GetGUID());
}
}
}
@@ -1737,14 +1729,14 @@ class spell_pot_check : public SpellScriptLoader
!sSpellMgr->GetSpellInfo(SPELL_FETCH_PUTRID_PIRATE_PERSPIRATION) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_ICECROWN_BOTTLED_WATER) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_WASPS_WINGS) ||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_PRISMATIC_MOJO) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_RAPTOR_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_AMBERSEED) ||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_SHRUNKEN_DRAGONS_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_CHILLED_SERPENT_MUCUS) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_CRYSTALLIZED_HOGSNOT) ||
- !sSpellMgr->GetSpellInfo(SPELL_FETCH_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_FROZEN_SPIDER_ICHOR) ||
+ !sSpellMgr->GetSpellInfo(SPELL_FETCH_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_FROZEN_SPIDER_ICHOR) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_KNOTROOT) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_PICKLED_EAGLE_EGG) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_SPECKLED_GUANO) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_WITHERED_BATWING) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_SEASONED_SLIDER_CIDER) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_PULVERIZED_GARGOYLE_TEETH) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_MUDDY_MIRE_MAGGOT) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_SPIKY_SPIDER_EGG) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_HAIRY_HERRING_HEAD) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_PUTRID_PIRATE_PERSPIRATION) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_ICECROWN_BOTTLED_WATER) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_WASPS_WINGS) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_PRISMATIC_MOJO) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_RAPTOR_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_AMBERSEED) ||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_SHRUNKEN_DRAGONS_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_CHILLED_SERPENT_MUCUS) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_CRYSTALLIZED_HOGSNOT) ||
- !sSpellMgr->GetSpellInfo(SPELL_HAVE_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_FROZEN_SPIDER_ICHOR))
+ !sSpellMgr->GetSpellInfo(SPELL_HAVE_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_FROZEN_SPIDER_ICHOR))
return false;
return true;
}
@@ -1755,14 +1747,14 @@ class spell_pot_check : public SpellScriptLoader
{
for (uint8 i = 0; i < 21; ++i)
{
- if(player->HasAura(FetchIngredients[i] [0]))
+ if (player->HasAura(FetchIngredients[i][0]))
{
player->CastSpell(player, SPELL_THROW_INGREDIENT);
- player->RemoveAura(FetchIngredients[i] [0]);
- if(player->HasAura(FetchIngredients[i] [1]))
+ player->RemoveAura(FetchIngredients[i][0]);
+ if (player->HasAura(FetchIngredients[i][1]))
{
- player->RemoveAura(FetchIngredients[i] [1]);
- player->DestroyItemCount(FetchIngredients[i] [2], 1, true);
+ player->RemoveAura(FetchIngredients[i][1]);
+ player->DestroyItemCount(FetchIngredients[i][2], 1, true);
if (i < 15)
{
if (Creature* finklestein = GetClosestCreatureWithEntry(player, NPC_FINKLESTEIN, 25.0f))
@@ -1794,8 +1786,8 @@ class spell_pot_check : public SpellScriptLoader
void RemoveItems(Player* player)
{
for (uint8 i = 0; i < 21; ++i)
- if (player->HasItemCount(FetchIngredients[i] [2], 1, true))
- player->DestroyItemCount(FetchIngredients[i] [2], 1, true);
+ if (player->HasItemCount(FetchIngredients[i][2], 1, true))
+ player->DestroyItemCount(FetchIngredients[i][2], 1, true);
}
void Register()
@@ -1824,14 +1816,14 @@ class spell_fetch_ingredient_aura : public SpellScriptLoader
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
+ Unit* target = GetTarget();
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
- if (Unit* target = GetTarget())
- if (target->HasAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF))
- if (Creature* finklestein = GetClosestCreatureWithEntry(target, NPC_FINKLESTEIN, 100.0f))
- {
- target->RemoveAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF);
- finklestein->AI()->Talk(SAY_RUINED, target->GetGUID());
- }
+ if (target->HasAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF))
+ if (Creature* finklestein = GetClosestCreatureWithEntry(target, NPC_FINKLESTEIN, 100.0f))
+ {
+ target->RemoveAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF);
+ finklestein->AI()->Talk(SAY_RUINED, target->GetGUID());
+ }
}
void Register()
@@ -1848,22 +1840,22 @@ class spell_fetch_ingredient_aura : public SpellScriptLoader
void AddSC_zuldrak()
{
- new npc_drakuru_shackles;
- new npc_captured_rageclaw;
- new npc_gurgthock;
- new npc_orinoko_tuskbreaker;
- new npc_korrak_bloodrager;
- new npc_yggdras;
- new npc_stinkbeard;
- new npc_released_offspring_harkoa;
- new npc_crusade_recruit;
- new npc_elemental_lord;
- new npc_fiend_elemental;
- new go_scourge_enclosure;
- new npc_alchemist_finklestein;
- new go_finklesteins_cauldron;
- new spell_random_ingredient_aura;
- new spell_random_ingredient;
- new spell_pot_check;
- new spell_fetch_ingredient_aura;
+ new npc_drakuru_shackles();
+ new npc_captured_rageclaw();
+ new npc_gurgthock();
+ new npc_orinoko_tuskbreaker();
+ new npc_korrak_bloodrager();
+ new npc_yggdras();
+ new npc_stinkbeard();
+ new npc_released_offspring_harkoa();
+ new npc_crusade_recruit();
+ new npc_elemental_lord();
+ new npc_fiend_elemental();
+ new go_scourge_enclosure();
+ new npc_alchemist_finklestein();
+ new go_finklesteins_cauldron();
+ new spell_random_ingredient_aura();
+ new spell_random_ingredient();
+ new spell_pot_check();
+ new spell_fetch_ingredient_aura();
}
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
index b96418097f3..4f1d93aa04e 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
@@ -71,10 +71,10 @@ public:
events.ScheduleEvent(EVENT_RESONANCE, 5000);
events.ScheduleEvent(EVENT_MAGNETIC_PULL, urand(15000, 30000));
if (IsHeroic())
- {
+ {
events.ScheduleEvent(EVENT_THUNDERING_STORM, 15000);
events.ScheduleEvent(EVENT_SONIC_SHOCK, 10000);
- }
+ }
//database should have `RegenHealth`=0 to prevent regen
uint32 hp = me->CountPctFromMaxHealth(40);
@@ -160,7 +160,7 @@ public:
DoCast(target, SPELL_THUNDERING_STORM, true);
events.ScheduleEvent(EVENT_THUNDERING_STORM, 15000);
break;
- }
+ }
case EVENT_SONIC_SHOCK:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20, false))
if (target->IsAlive())
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 009a1afd9bb..25a969c788e 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -3602,14 +3602,13 @@ class spell_gen_whisper_gulch_yogg_saron_whisper : public SpellScriptLoader
};
enum SpectatorCheerTrigger
-
{
EMOTE_ONE_SHOT_CHEER = 4,
EMOTE_ONE_SHOT_EXCLAMATION = 5,
EMOTE_ONE_SHOT_APPLAUD = 21
};
-uint8 const EmoteArray [3] = { EMOTE_ONE_SHOT_CHEER, EMOTE_ONE_SHOT_EXCLAMATION, EMOTE_ONE_SHOT_APPLAUD };
+uint8 const EmoteArray[3] = { EMOTE_ONE_SHOT_CHEER, EMOTE_ONE_SHOT_EXCLAMATION, EMOTE_ONE_SHOT_APPLAUD };
class spell_gen_spectator_cheer_trigger : public SpellScriptLoader
{
@@ -3620,10 +3619,9 @@ class spell_gen_spectator_cheer_trigger : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_spectator_cheer_trigger_SpellScript)
- void HandleDummy(SpellEffIndex /* effIndex */)
+ void HandleDummy(SpellEffIndex /*effIndex*/)
{
- if (Unit* caster = GetCaster())
- caster->HandleEmoteCommand(EmoteArray [urand(0,2)]);
+ GetCaster()->HandleEmoteCommand(EmoteArray[urand(0, 2)]);
}
void Register()
@@ -3638,6 +3636,7 @@ class spell_gen_spectator_cheer_trigger : public SpellScriptLoader
}
};
+
enum VendorBarkTrigger
{
@@ -3755,6 +3754,6 @@ void AddSC_generic_spell_scripts()
new spell_gen_aura_service_uniform();
new spell_gen_orc_disguise();
new spell_gen_whisper_gulch_yogg_saron_whisper();
- new spell_gen_spectator_cheer_trigger;
- new spell_gen_vendor_bark_trigger;
+ new spell_gen_spectator_cheer_trigger();
+ new spell_gen_vendor_bark_trigger();
}