Core: Warning fixes

This commit is contained in:
Shauren
2011-05-07 19:08:50 +02:00
parent b82ae5ad0d
commit 7905200eba
16 changed files with 44 additions and 28 deletions
@@ -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;
@@ -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);
+1 -1
View File
@@ -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);
+1
View File
@@ -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; }
+3 -1
View File
@@ -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();
+1 -1
View File
@@ -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:
+7 -5
View File
@@ -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
+4 -4
View File
@@ -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()
+1 -1
View File
@@ -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; }