diff options
Diffstat (limited to 'src')
16 files changed, 44 insertions, 28 deletions
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 9876bb05607..c66679c0e7d 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -85,7 +85,7 @@ void BattlegroundIC::SendTransportInit(Player* player) player->GetSession()->SendPacket(&packet); } -void BattlegroundIC::DoAction(uint32 action, uint64 var) +void BattlegroundIC::DoAction(uint32 action, uint64 const& var) { if (action != ACTION_TELEPORT_PLAYER_TO_TRANSPORT) return; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index 282ec5f531a..d2cf410d3d4 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -888,7 +888,7 @@ class BattlegroundIC : public Battleground void FillInitialWorldStates(WorldPacket& data); - virtual void DoAction(uint32 action, uint64 var); + void DoAction(uint32 action, uint64 const& var); virtual void HandlePlayerResurrect(Player* player); diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index 216ce95ad9c..dd845c1c70d 100755 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -49,7 +49,7 @@ class ChatHandler WorldSession * GetSession() { return m_session; } explicit ChatHandler(WorldSession* session) : m_session(session) {} explicit ChatHandler(Player* player) : m_session(player->GetSession()) {} - ~ChatHandler() {} + virtual ~ChatHandler() {} static void FillMessageData(WorldPacket *data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit *speaker); diff --git a/src/server/game/Chat/ChatLink.h b/src/server/game/Chat/ChatLink.h index 8ee9171f744..2d9e95d8d33 100644 --- a/src/server/game/Chat/ChatLink.h +++ b/src/server/game/Chat/ChatLink.h @@ -37,6 +37,7 @@ class ChatLink { public: ChatLink() : _color(0), _startPos(0), _endPos(0) { } + virtual ~ChatLink() { } void SetColor(uint32 color) { _color = color; } // This will allow to extract the whole link string from the message, if necessary. void SetBounds(std::istringstream::pos_type startPos, std::istringstream::pos_type endPos) { _startPos = startPos; _endPos = endPos; } diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h index 362217b1575..f069dd04cf0 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.h +++ b/src/server/game/OutdoorPvP/OutdoorPvP.h @@ -93,6 +93,8 @@ class OPvPCapturePoint OPvPCapturePoint(OutdoorPvP * pvp); + virtual ~OPvPCapturePoint() {} + virtual void FillInitialWorldStates(WorldPacket & /*data*/) {} // send world state update to all players present @@ -196,7 +198,7 @@ class OutdoorPvP : public ZoneScript OutdoorPvP(); // dtor - ~OutdoorPvP(); + virtual ~OutdoorPvP(); // deletes all gos/creatures spawned by the pvp void DeleteSpawns(); diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 4064c8b08f6..28d21ae0645 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -238,7 +238,7 @@ class ServerScript : public ScriptObject virtual void OnUnknownPacketReceive(WorldSocket* /*socket*/, WorldPacket& /*packet*/) { } }; -class WorldScript : public ScriptObject, public UpdatableScript<void> +class WorldScript : public ScriptObject { protected: diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp index 40e5e64af1a..ef5a3b8184f 100755 --- a/src/server/game/Scripting/ScriptSystem.cpp +++ b/src/server/game/Scripting/ScriptSystem.cpp @@ -21,16 +21,18 @@ #include "ObjectMgr.h" #include "DatabaseEnv.h" +ScriptPointVector const SystemMgr::_empty; + void SystemMgr::LoadVersion() { - //Get Version information - QueryResult Result = WorldDatabase.Query("SELECT script_version FROM version LIMIT 1"); + // Get Version information + QueryResult result = WorldDatabase.Query("SELECT script_version FROM version LIMIT 1"); - if (Result) + if (result) { - Field* pFields = Result->Fetch(); + Field* fields = result->Fetch(); - sLog->outString("TSCR: Database version is: %s", pFields[0].GetCString()); + sLog->outString("TSCR: Database version is: %s", fields[0].GetCString()); sLog->outString(); } else diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h index 1fb84977e5d..a17033dc920 100644 --- a/src/server/game/Scripting/ScriptSystem.h +++ b/src/server/game/Scripting/ScriptSystem.h @@ -82,20 +82,20 @@ class SystemMgr ScriptPointVector const& GetPointMoveList(uint32 creatureEntry) const { - static ScriptPointVector empty; - PointMoveMap::const_iterator itr = m_mPointMoveMap.find(creatureEntry); if (itr == m_mPointMoveMap.end()) - return empty; + return _empty; return itr->second; } protected: - TextDataMap m_mTextDataMap; //additional data for text strings PointMoveMap m_mPointMoveMap; //coordinates for waypoints + + private: + static ScriptPointVector const _empty; }; #define sScriptSystemMgr ACE_Singleton<SystemMgr, ACE_Null_Mutex>::instance() diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index ca49faae982..09faf50ef67 100755 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -86,7 +86,7 @@ class Aura static Aura * Create(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount = NULL, Item * castItem = NULL, uint64 casterGUID = 0); explicit Aura(SpellEntry const* spellproto, WorldObject * owner, Unit * caster, Item * castItem, uint64 casterGUID); void _InitEffects(uint8 effMask, Unit * caster, int32 *baseAmount); - ~Aura(); + virtual ~Aura(); SpellEntry const* GetSpellProto() const { return m_spellProto; } uint32 GetId() const{ return GetSpellProto()->Id; } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index f20b7e1c7bb..daf306a6032 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -531,7 +531,7 @@ public: }; -#define ESSENCE_REMOVE 0 +#define ESSENCE_REMOVE 0 #define ESSENCE_APPLY 1 class mob_essence_of_twin : public CreatureScript @@ -545,14 +545,19 @@ class mob_essence_of_twin : public CreatureScript uint32 GetData(uint32 data) { - uint32 spellReturned; + uint32 spellReturned = 0; switch (me->GetEntry()) { case NPC_LIGHT_ESSENCE: spellReturned = data == ESSENCE_REMOVE? SPELL_DARK_ESSENCE_HELPER : SPELL_LIGHT_ESSENCE_HELPER; + break; case NPC_DARK_ESSENCE: spellReturned = data == ESSENCE_REMOVE? SPELL_LIGHT_ESSENCE_HELPER : SPELL_DARK_ESSENCE_HELPER; + break; + default: + break; } + return spellReturned; } }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 3b803121296..2f533719696 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -1178,7 +1178,7 @@ class spell_deathbringer_blood_nova_targeting : public SpellScriptLoader { // select one random target, with preference of ranged targets uint32 targetsAtRange = 0; - uint32 const minTargets = GetCaster()->GetMap()->GetSpawnMode() & 1 ? 10 : 4; + uint32 const minTargets = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 10 : 4); unitList.sort(Trinity::ObjectDistanceOrderPred(GetCaster(), false)); // get target count at range diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp index 4cbbe46956b..a16b2120aef 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp @@ -386,7 +386,7 @@ class spell_festergut_gastric_bloat : public SpellScriptLoader { PrepareSpellScript(spell_festergut_gastric_bloat_SpellScript); - bool Validate(SpellEntry const* spell) + bool Validate(SpellEntry const* /*spell*/) { if (!sSpellStore.LookupEntry(SPELL_GASTRIC_EXPLOSION)) return false; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index e39eb7d775d..0e5c9bea4db 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -499,7 +499,7 @@ class boss_professor_putricide : public CreatureScript return _phase; case DATA_ABOMINATION: summons.RemoveNotExisting(); - return summons.HasEntry(NPC_MUTATED_ABOMINATION_10) || summons.HasEntry(NPC_MUTATED_ABOMINATION_25); + return uint32(summons.HasEntry(NPC_MUTATED_ABOMINATION_10) || summons.HasEntry(NPC_MUTATED_ABOMINATION_25)); default: break; } diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index c2a9978d1d3..8c03731e130 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -30,7 +30,7 @@ public: struct instance_eye_of_eternity_InstanceMapScript : public InstanceScript { - instance_eye_of_eternity_InstanceMapScript(Map* map) : InstanceScript(map) + instance_eye_of_eternity_InstanceMapScript(Map* map) : InstanceScript(map) { SetBossNumber(MAX_ENCOUNTER); @@ -67,7 +67,8 @@ public: if (GameObject* platform = instance->GetGameObject(platformGUID)) platform->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED); - } else if (state == DONE) + } + else if (state == DONE) { if (Creature* malygos = instance->GetCreature(malygosGUID)) malygos->SummonCreature(NPC_ALEXSTRASZA, 829.0679f, 1244.77f, 279.7453f, 2.32f); @@ -79,7 +80,7 @@ public: platform->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED); if (GameObject* chest = instance->GetGameObject(chestGUID)) - chest->SetRespawnTime(chest->GetRespawnDelay()); + chest->SetRespawnTime(7*DAY); } } return true; @@ -150,6 +151,11 @@ public: } } + // eliminate compile warning + void ProcessEvent(Unit* /*unit*/, uint32 /*eventId*/) + { + } + void VortexHandling() { if (Creature* malygos = instance->GetCreature(malygosGUID)) diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp index d6f582e7b37..94316e29f0d 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp @@ -309,7 +309,7 @@ class boss_flame_leviathan : public CreatureScript } // TODO: effect 0 and effect 1 may be on different target - void SpellHitTarget(Unit* target, SpellEntry* const spell) + void SpellHitTarget(Unit* target, SpellEntry const* spell) { if (spell->Id == SPELL_PURSUED) AttackStart(target); @@ -336,7 +336,7 @@ class boss_flame_leviathan : public CreatureScript } } - void SpellHit(Unit* /*caster*/, SpellEntry* const spell) + void SpellHit(Unit* /*caster*/, SpellEntry const* spell) { if (spell->Id == SPELL_START_THE_ENGINE) vehicle->InstallAllAccessories(false); @@ -671,7 +671,7 @@ class boss_flame_leviathan_defense_cannon : public CreatureScript NapalmTimer -= diff; } - bool CanAIAttack(Unit* const who) const + bool CanAIAttack(Unit const* who) const { if (who->GetTypeId() != TYPEID_PLAYER || !who->GetVehicle() || who->GetVehicleBase()->GetEntry() == NPC_SEAT) return false; @@ -700,7 +700,7 @@ class boss_flame_leviathan_defense_turret : public CreatureScript damage = 0; } - bool CanAIAttack(Unit* const who) const + bool CanAIAttack(Unit const* who) const { if (who->GetTypeId() != TYPEID_PLAYER || !who->GetVehicle() || who->GetVehicleBase()->GetEntry() != NPC_SEAT) return false; diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h index 2bee0eaf3a4..03846c47ecd 100755 --- a/src/server/shared/Database/MySQLConnection.h +++ b/src/server/shared/Database/MySQLConnection.h @@ -80,7 +80,7 @@ class MySQLConnection public: MySQLConnection(MySQLConnectionInfo& connInfo); //! Constructor for synchronous connections. MySQLConnection(ACE_Activation_Queue* queue, MySQLConnectionInfo& connInfo); //! Constructor for asynchronous connections. - ~MySQLConnection(); + virtual ~MySQLConnection(); virtual bool Open(); void Close(); |
