Core: Fix compile without PCH and fix some warnings

This commit is contained in:
Spp
2011-08-03 11:23:08 +02:00
parent 8572d5d0e9
commit e7327e7e94
30 changed files with 51 additions and 43 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ class ArenaTeam
uint32 GetType() const { return Type; }
uint8 GetSlot() const { return GetSlotByType(GetType()); }
static uint8 GetSlotByType(uint32 type);
const uint64 GetCaptain() const { return CaptainGuid; }
uint64 GetCaptain() const { return CaptainGuid; }
std::string GetName() const { return TeamName; }
const ArenaTeamStats& GetStats() const { return Stats; }
+1 -1
View File
@@ -64,7 +64,7 @@ class Corpse : public WorldObject, public GridObject<Corpse>
void DeleteBonesFromWorld();
void DeleteFromDB(SQLTransaction& trans);
uint64 const GetOwnerGUID() const { return GetUInt64Value(CORPSE_FIELD_OWNER); }
uint64 GetOwnerGUID() const { return GetUInt64Value(CORPSE_FIELD_OWNER); }
time_t const& GetGhostTime() const { return m_time; }
void ResetGhostTime() { m_time = time(NULL); }
@@ -34,7 +34,7 @@ class TempSummon : public Creature
void SetTempSummonType(TempSummonType type);
void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) {}
Unit* GetSummoner() const;
uint64 const GetSummonerGUID() { return m_summonerGUID; }
uint64 GetSummonerGUID() { return m_summonerGUID; }
TempSummonType const& GetSummonType() { return m_type; }
const SummonPropertiesEntry * const m_Properties;
+1 -1
View File
@@ -235,7 +235,7 @@ class Item : public Object
ItemTemplate const* GetTemplate() const;
uint64 const GetOwnerGUID() const { return GetUInt64Value(ITEM_FIELD_OWNER); }
uint64 GetOwnerGUID() const { return GetUInt64Value(ITEM_FIELD_OWNER); }
void SetOwnerGUID(uint64 guid) { SetUInt64Value(ITEM_FIELD_OWNER, guid); }
Player* GetOwner()const;
+5 -5
View File
@@ -149,7 +149,7 @@ class Object
ClearUpdateMask(true);
}
const uint64 GetGUID() const { return GetUInt64Value(0); }
uint64 GetGUID() const { return GetUInt64Value(0); }
uint32 GetGUIDLow() const { return GUID_LOPART(GetUInt64Value(0)); }
uint32 GetGUIDMid() const { return GUID_ENPART(GetUInt64Value(0)); }
uint32 GetGUIDHigh() const { return GUID_HIPART(GetUInt64Value(0)); }
@@ -169,25 +169,25 @@ class Object
virtual void DestroyForPlayer(Player *target, bool anim = false) const;
const int32& GetInt32Value(uint16 index) const
int32 GetInt32Value(uint16 index) const
{
ASSERT(index < m_valuesCount || PrintIndexError(index , false));
return m_int32Values[ index ];
}
const uint32 GetUInt32Value(uint16 index) const
uint32 GetUInt32Value(uint16 index) const
{
ASSERT(index < m_valuesCount || PrintIndexError(index , false));
return m_uint32Values[ index ];
}
const uint64 GetUInt64Value(uint16 index) const
uint64 GetUInt64Value(uint16 index) const
{
ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , false));
return *((uint64*)&(m_uint32Values[ index ]));
}
const float& GetFloatValue(uint16 index) const
float GetFloatValue(uint16 index) const
{
ASSERT(index < m_valuesCount || PrintIndexError(index , false));
return m_floatValues[ index ];
+1 -1
View File
@@ -215,7 +215,7 @@ class Pet : public Guardian
uint32 m_usedTalentCount;
const uint64 GetAuraUpdateMaskForRaid() const { return m_auraRaidUpdateMask; }
uint64 GetAuraUpdateMaskForRaid() const { return m_auraRaidUpdateMask; }
void SetAuraUpdateMaskForRaid(uint8 slot) { m_auraRaidUpdateMask |= (uint64(1) << slot); }
void ResetAuraUpdateMaskForRaid() { m_auraRaidUpdateMask = 0; }
+4 -4
View File
@@ -1555,13 +1555,13 @@ class Player : public Unit, public GridObject<Player>
return m_RewardedQuests.find(quest_id) != m_RewardedQuests.end();
}
const uint64 GetSelection() const { return m_curSelection; }
uint64 GetSelection() const { return m_curSelection; }
Unit *GetSelectedUnit() const;
Player *GetSelectedPlayer() const;
void SetSelection(const uint64 guid) { m_curSelection = guid; SetUInt64Value(UNIT_FIELD_TARGET, guid); }
uint8 GetComboPoints() { return m_comboPoints; }
const uint64 GetComboTarget() const { return m_comboTarget; }
uint64 GetComboTarget() const { return m_comboTarget; }
void AddComboPoints(Unit* target, int8 count, Spell* spell = NULL);
void GainSpellComboPoints(int8 count);
@@ -1892,7 +1892,7 @@ class Player : public Unit, public GridObject<Player>
void UpdateManaRegen();
void UpdateRuneRegen(RuneType rune);
const uint64 GetLootGUID() const { return m_lootGuid; }
uint64 GetLootGUID() const { return m_lootGuid; }
void SetLootGUID(const uint64 guid) { m_lootGuid = guid; }
void RemovedInsignia(Player* looterPlr);
@@ -2397,7 +2397,7 @@ class Player : public Unit, public GridObject<Player>
uint8 GetSubGroup() const { return m_group.getSubGroup(); }
uint32 GetGroupUpdateFlag() const { return m_groupUpdateMask; }
void SetGroupUpdateFlag(uint32 flag) { m_groupUpdateMask |= flag; }
const uint64 GetAuraUpdateMaskForRaid() const { return m_auraRaidUpdateMask; }
uint64 GetAuraUpdateMaskForRaid() const { return m_auraRaidUpdateMask; }
void SetAuraUpdateMaskForRaid(uint8 slot) { m_auraRaidUpdateMask |= (uint64(1) << slot); }
Player* GetNextRandomRaidMember(float radius);
PartyResult CanUninviteFromGroup() const;
+2 -1
View File
@@ -8052,10 +8052,11 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
{
if (plr->getClass() != CLASS_DEATH_KNIGHT)
return false;
RuneType rune = ToPlayer()->GetLastUsedRune();
AuraEffect* aurEff = triggeredByAura->GetEffect(EFFECT_0);
if (!aurEff)
return false;
// Reset amplitude - set death rune remove timer to 30s
aurEff->ResetPeriodic(true);
uint32 runesLeft;
+1 -1
View File
@@ -99,7 +99,7 @@ class NGrid
return i_cells[x][y];
}
const uint32 GetGridId(void) const { return i_gridId; }
uint32 GetGridId(void) const { return i_gridId; }
void SetGridId(const uint32 id) const { i_gridId = id; }
grid_state_t GetGridState(void) const { return i_cellstate; }
void SetGridState(grid_state_t s) { i_cellstate = s; }
+3 -3
View File
@@ -1812,12 +1812,12 @@ bool Group::IsCreated() const
return GetMembersCount() > 0;
}
const uint64 Group::GetLeaderGUID() const
uint64 Group::GetLeaderGUID() const
{
return m_leaderGuid;
}
const uint64 Group::GetGUID() const
uint64 Group::GetGUID() const
{
return m_guid;
}
@@ -1837,7 +1837,7 @@ LootMethod Group::GetLootMethod() const
return m_lootMethod;
}
const uint64 Group::GetLooterGuid() const
uint64 Group::GetLooterGuid() const
{
return m_looterGuid;
}
+3 -3
View File
@@ -206,12 +206,12 @@ class Group
bool isRaidGroup() const;
bool isBGGroup() const;
bool IsCreated() const;
const uint64 GetLeaderGUID() const;
const uint64 GetGUID() const;
uint64 GetLeaderGUID() const;
uint64 GetGUID() const;
uint32 GetLowGUID() const;
const char * GetLeaderName() const;
LootMethod GetLootMethod() const;
const uint64 GetLooterGuid() const;
uint64 GetLooterGuid() const;
ItemQualities GetLootThreshold() const;
uint32 GetDbStoreId() { return m_dbStoreId; };
+2 -2
View File
@@ -270,7 +270,7 @@ private:
void SaveToDB(SQLTransaction& trans) const;
void WritePacket(WorldPacket& data) const;
const uint64 GetGUID() const { return m_guid; }
uint64 GetGUID() const { return m_guid; }
std::string GetName() const { return m_name; }
uint32 GetAccountId() const { return m_accountId; }
uint8 GetRankId() const { return m_rankId; }
@@ -590,7 +590,7 @@ public:
// Getters
uint32 GetId() const { return m_id; }
const uint64 GetLeaderGUID() const { return m_leaderGuid; }
uint64 GetLeaderGUID() const { return m_leaderGuid; }
const std::string& GetName() const { return m_name; }
const std::string& GetMOTD() const { return m_motd; }
const std::string& GetInfo() const { return m_info; }
+1 -1
View File
@@ -99,7 +99,7 @@ class Aura
uint32 GetId() const{ return GetSpellInfo()->Id; }
uint64 GetCastItemGUID() const { return m_castItemGuid; }
uint64 const GetCasterGUID() const { return m_casterGuid; }
uint64 GetCasterGUID() const { return m_casterGuid; }
Unit* GetCaster() const;
WorldObject * GetOwner() const { return m_owner; }
Unit* GetUnitOwner() const { ASSERT(GetType() == UNIT_AURA_TYPE); return (Unit*)m_owner; }
+2 -2
View File
@@ -2376,7 +2376,7 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
break;
default:
sLog->outError("SPELL (caster[type: %u; guidlow: %u], spell: %u): unhandled spell target (%u)",
m_caster->GetTypeId(), m_caster->GetGUIDLow(), m_spellInfo->Id, cur);
m_caster->GetTypeId(), m_caster->GetGUIDLow(), m_spellInfo->Id, cur.GetTarget());
break;
}
break;
@@ -5758,7 +5758,7 @@ bool Spell::CanAutoCast(Unit* target)
return false; //target invalid
}
SpellCastResult Spell::CheckRange(bool strict)
SpellCastResult Spell::CheckRange(bool /*strict*/)
{
Unit* target = m_targets.GetUnitTarget();
float max_range = m_caster->GetSpellMaxRangeForTarget(target, m_spellInfo);
+1 -1
View File
@@ -281,7 +281,7 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), NULL, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
void Spell::EffectEnvirinmentalDMG(SpellEffIndex effIndex)
void Spell::EffectEnvirinmentalDMG(SpellEffIndex /*effIndex*/)
{
if (!unitTarget || !unitTarget->isAlive())
return;
+4 -2
View File
@@ -514,7 +514,8 @@ uint32 SpellMgr::GetLastSpellInChain(uint32 spell_id) const
uint32 SpellMgr::GetNextSpellInChain(uint32 spell_id) const
{
if (SpellChainNode const* node = GetSpellChainNode(spell_id))
return node->next ? node->next->Id : NULL;
if (node->next)
return node->next->Id;
return 0;
}
@@ -522,7 +523,8 @@ uint32 SpellMgr::GetNextSpellInChain(uint32 spell_id) const
uint32 SpellMgr::GetPrevSpellInChain(uint32 spell_id) const
{
if (SpellChainNode const* node = GetSpellChainNode(spell_id))
return node->prev ? node->prev->Id : NULL;
if (node->prev)
return node->prev->Id;
return 0;
}
+1 -1
View File
@@ -713,7 +713,7 @@ uint32 AuraScript::GetId() const
return m_aura->GetId();
}
uint64 const AuraScript::GetCasterGUID() const
uint64 AuraScript::GetCasterGUID() const
{
return m_aura->GetCasterGUID();
}
+1 -1
View File
@@ -585,7 +585,7 @@ class AuraScript : public _SpellScript
uint32 GetId() const;
// returns guid of object which casted the aura (m_originalCaster of the Spell class)
uint64 const GetCasterGUID() const;
uint64 GetCasterGUID() const;
// returns unit which casted the aura or NULL if not avalible (caster logged out for example)
Unit* GetCaster() const;
// returns object on which aura was casted, target for non-area auras, area aura source for area auras
+2 -2
View File
@@ -94,7 +94,7 @@ public:
std::string GetPlayerName() const { return _playerName; }
std::string GetMessage() const { return _message; }
Player* GetAssignedPlayer() const { return ObjectAccessor::FindPlayer(_assignedTo); }
const uint64 GetAssignedToGUID() const { return _assignedTo; }
uint64 GetAssignedToGUID() const { return _assignedTo; }
std::string GetAssignedToName() const
{
std::string name;
@@ -104,7 +104,7 @@ public:
return name;
}
const uint64 GetLastModifiedTime() const { return _lastModifiedTime; }
uint64 GetLastModifiedTime() const { return _lastModifiedTime; }
GMTicketEscalationStatus GetEscalatedStatus() const { return _escalatedStatus; }
void SetEscalatedStatus(GMTicketEscalationStatus escalatedStatus) { _escalatedStatus = escalatedStatus; }
+2 -2
View File
@@ -2502,7 +2502,7 @@ void World::SendServerMessage(ServerMessageType type, const char *text, Player*
void World::UpdateSessions(uint32 diff)
{
///- Add new sessions
WorldSession* sess;
WorldSession* sess = NULL;
while (addSessQueue.next(sess))
AddSession_ (sess);
@@ -2533,7 +2533,7 @@ void World::ProcessCliCommands()
{
CliCommandHolder::Print* zprint = NULL;
void* callbackArg = NULL;
CliCommandHolder* command;
CliCommandHolder* command = NULL;
while (cliCmdQueue.next(command))
{
sLog->outDetail("CLI command under processing...");