Fix compile without pch

This commit is contained in:
Spp
2012-10-16 09:35:15 +02:00
parent 7cc1b999a6
commit 14dab1f893
27 changed files with 39 additions and 33 deletions

View File

@@ -1423,7 +1423,6 @@ void AchievementMgr<T>::UpdateAchievementCriteria(AchievementCriteriaTypes type,
case ACHIEVEMENT_CRITERIA_TYPE_UNK148:
case ACHIEVEMENT_CRITERIA_TYPE_UNK149:
case ACHIEVEMENT_CRITERIA_TYPE_UNK150:
case ACHIEVEMENT_CRITERIA_TYPE_TOTAL:
break; // Not implemented yet :(
}
@@ -3356,5 +3355,5 @@ AchievementEntry const* AchievementGlobalMgr::GetAchievement(uint32 achievementI
AchievementCriteriaEntry const* AchievementGlobalMgr::GetAchievementCriteria(uint32 criteriaId) const
{
return sAchievementCriteriaStore.LookupEntry(criteriaId);
return sAchievementMgr->GetAchievementCriteria(criteriaId);
}

View File

@@ -427,7 +427,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
// *******************************************************
void BattlefieldWG::DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 /*incrementNumber*/)
{
AchievementEntry const* achievementEntry = sAchievementStore.LookupEntry(achievement);
AchievementEntry const* achievementEntry = sAchievementMgr->GetAchievement(achievement);
if (!achievementEntry)
return;

View File

@@ -335,7 +335,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
return false;
}
// Validate achievement
_achievement = sAchievementStore.LookupEntry(achievementId);
_achievement = sAchievementMgr->GetAchievement(achievementId);
if (!_achievement)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid achivement id %u in |achievement command", iss.str().c_str(), achievementId);

View File

@@ -698,7 +698,7 @@ ConditionList ConditionMgr::GetConditionsForPhaseDefinition(uint32 zone, uint32
if (i != (*itr).second.end())
{
cond = (*i).second;
sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForPhaseDefinition: found conditions for zone %u entry %u spell %u", zone, entry);
sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForPhaseDefinition: found conditions for zone %u entry %u", zone, entry);
}
}
@@ -1595,7 +1595,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_ACHIEVEMENT:
{
AchievementEntry const* achievement = sAchievementStore.LookupEntry(cond->ConditionValue1);
AchievementEntry const* achievement = sAchievementMgr->GetAchievement(cond->ConditionValue1);
if (!achievement)
{
sLog->outError(LOG_FILTER_SQL, "Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1);

View File

@@ -19,7 +19,6 @@
#ifndef TRINITY_CONDITIONMGR_H
#define TRINITY_CONDITIONMGR_H
#include "LootMgr.h"
#include <ace/Singleton.h>
class Player;

View File

@@ -171,7 +171,7 @@ void LoadDisables()
sLog->outError(LOG_FILTER_SQL, "Disable flags specified for outdoor PvP %u, useless data.", entry);
break;
case DISABLE_TYPE_ACHIEVEMENT_CRITERIA:
if (!sAchievementCriteriaStore.LookupEntry(entry))
if (!sAchievementMgr->GetAchievementCriteria(entry))
{
sLog->outError(LOG_FILTER_SQL, "Achievement Criteria entry %u from `disables` doesn't exist in dbc, skipped.", entry);
continue;

View File

@@ -5920,7 +5920,7 @@ void ObjectMgr::LoadAccessRequirements()
if (ar.achievement)
{
if (!sAchievementStore.LookupEntry(ar.achievement))
if (!sAchievementMgr->GetAchievement(ar.achievement))
{
sLog->outError(LOG_FILTER_SQL, "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar.achievement, mapid, difficulty);
ar.achievement = 0;
@@ -8487,9 +8487,9 @@ void ObjectMgr::LoadFactionChangeAchievements()
uint32 alliance = fields[0].GetUInt32();
uint32 horde = fields[1].GetUInt32();
if (!sAchievementStore.LookupEntry(alliance))
if (!sAchievementMgr->GetAchievement(alliance))
sLog->outError(LOG_FILTER_SQL, "Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", alliance);
else if (!sAchievementStore.LookupEntry(horde))
else if (!sAchievementMgr->GetAchievement(horde))
sLog->outError(LOG_FILTER_SQL, "Achievement %u referenced in `player_factionchange_achievement` does not exist, pair skipped!", horde);
else
FactionChange_Achievements[alliance] = horde;

View File

@@ -547,7 +547,7 @@ void GuildMgr::LoadGuildRewards()
continue;
}
if (reward.AchievementId != 0 && (!sAchievementStore.LookupEntry(reward.AchievementId)))
if (reward.AchievementId != 0 && (!sAchievementMgr->GetAchievement(reward.AchievementId)))
{
sLog->outError(LOG_FILTER_SERVER_LOADING, "Guild rewards constains not existing achievement entry %u", reward.AchievementId);
continue;

View File

@@ -286,7 +286,10 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
AH->deposit = deposit;
AH->auctionHouseEntry = auctionHouseEntry;
sLog->outInfo(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(), AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
sLog->outInfo(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) "
"to auctioneer %u with count %u with initial bid " UI64FMTD " with buyout " UI64FMTD " and with time %u (in sec) in auctionhouse %u",
_player->GetName(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(),
AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
sAuctionMgr->AddAItem(item);
auctionHouse->AddAuction(AH);
@@ -332,7 +335,10 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
AH->deposit = deposit;
AH->auctionHouseEntry = auctionHouseEntry;
sLog->outInfo(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
sLog->outInfo(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to "
"auctioneer %u with count %u with initial bid " UI64FMTD " with buyout " UI64FMTD " and with time %u (in sec) in auctionhouse %u",
_player->GetName(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(),
newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
sAuctionMgr->AddAItem(newItem);
auctionHouse->AddAuction(AH);

View File

@@ -571,7 +571,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
}
}
void WorldSession::HandleBattlefieldLeaveOpcode(WorldPacket& recvData)
void WorldSession::HandleBattlefieldLeaveOpcode(WorldPacket& /*recvData*/)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_LEAVE Message");

View File

@@ -1476,7 +1476,7 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
// Read data
uint32 count = recvData.ReadBits(22);
if (count < EQUIPMENT_SLOT_START || count >= EQUIPMENT_SLOT_END)
if (count >= EQUIPMENT_SLOT_END)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) sent a wrong count (%u) when transmogrifying items.", player->GetGUIDLow(), player->GetName(), count);
recvData.rfinish();
@@ -1548,7 +1548,7 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
for (uint8 i = 0; i < count; ++i)
{
// slot of the transmogrified item
if (slots[i] < EQUIPMENT_SLOT_START || slots[i] >= EQUIPMENT_SLOT_END)
if (slots[i] >= EQUIPMENT_SLOT_END)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify an item (lowguid: %u) with a wrong slot (%u) when transmogrifying items.", player->GetGUIDLow(), player->GetName(), GUID_LOPART(itemGuids[i]), slots[i]);
return;

View File

@@ -99,7 +99,6 @@ enum LootSlotType
class Player;
class LootStore;
class ConditionMgr;
struct LootStoreItem
{

View File

@@ -17,6 +17,7 @@
#include "PhaseMgr.h"
#include "Chat.h"
#include "ObjectMgr.h"
//////////////////////////////////////////////////////////////////
// Updating

View File

@@ -21,6 +21,7 @@
#include "SharedDefines.h"
#include "SpellAuras.h"
#include "SpellAuraEffects.h"
#include "ConditionMgr.h"
class ObjectMgr;
class Player;
@@ -85,7 +86,7 @@ typedef UNORDERED_MAP<uint32 /*spellId*/, PhaseInfo> PhaseInfoContainer;
struct PhaseData
{
PhaseData(Player* _player) : player(_player), _PhasemaskThroughDefinitions(0), _PhasemaskThroughAuras(0), _CustomPhasemask(0) {}
PhaseData(Player* _player) : _PhasemaskThroughDefinitions(0), _PhasemaskThroughAuras(0), _CustomPhasemask(0), player(_player) {}
uint32 _PhasemaskThroughDefinitions;
uint32 _PhasemaskThroughAuras;

View File

@@ -317,7 +317,7 @@ SpellImplicitTargetInfo::StaticData SpellImplicitTargetInfo::_data[TOTAL_SPELL_
{TARGET_OBJECT_TYPE_DEST, TARGET_REFERENCE_TYPE_NONE, TARGET_SELECT_CATEGORY_NYI, TARGET_CHECK_DEFAULT, TARGET_DIR_NONE}, // 110 TARGET_DEST_UNK_110
};
SpellEffectInfo::SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex, SpellEffectEntry const* _effect)
SpellEffectInfo::SpellEffectInfo(SpellEntry const* /*spellEntry*/, SpellInfo const* spellInfo, uint8 effIndex, SpellEffectEntry const* _effect)
{
SpellScalingEntry const* scaling = spellInfo->GetSpellScaling();

View File

@@ -586,7 +586,7 @@ class AuraScript : public _SpellScript
uint8 _currentScriptState;
bool _defaultActionPrevented;
ScriptStateStore(uint8 currentScriptState, AuraApplication const* auraApplication, bool defaultActionPrevented)
: _currentScriptState(currentScriptState), _auraApplication(auraApplication), _defaultActionPrevented(defaultActionPrevented)
: _auraApplication(auraApplication), _currentScriptState(currentScriptState), _defaultActionPrevented(defaultActionPrevented)
{}
};
typedef std::stack<ScriptStateStore> ScriptStateStack;

View File

@@ -22,6 +22,7 @@
#include "Database/DatabaseEnv.h"
#include "SpellMgr.h"
#include "DBCStores.h"
#include "AchievementMgr.h"
void CharacterDatabaseCleaner::CleanDatabase()
{
@@ -108,7 +109,7 @@ void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table
bool CharacterDatabaseCleaner::AchievementProgressCheck(uint32 criteria)
{
return sAchievementCriteriaStore.LookupEntry(criteria);
return sAchievementMgr->GetAchievementCriteria(criteria);
}
void CharacterDatabaseCleaner::CleanCharacterAchievementProgress()

View File

@@ -67,7 +67,7 @@ public:
return false;
}
if (AchievementEntry const* achievementEntry = sAchievementStore.LookupEntry(achievementId))
if (AchievementEntry const* achievementEntry = sAchievementMgr->GetAchievement(achievementId))
target->CompletedAchievement(achievementEntry);
return true;

View File

@@ -1345,7 +1345,7 @@ public:
return true;
}
static bool HandleDebugPhaseCommand(ChatHandler* handler, char const* args)
static bool HandleDebugPhaseCommand(ChatHandler* handler, char const* /*args*/)
{
Unit* unit = handler->getSelectedUnit();
Player* player = handler->GetSession()->GetPlayer();

View File

@@ -137,7 +137,7 @@ public:
}
case DISABLE_TYPE_ACHIEVEMENT_CRITERIA:
{
if (!sAchievementCriteriaStore.LookupEntry(entry))
if (!sAchievementMgr->GetAchievementCriteria(entry))
{
handler->PSendSysMessage(LANG_COMMAND_NO_ACHIEVEMENT_CRITERIA_FOUND);
handler->SetSentErrorMessage(true);

View File

@@ -941,7 +941,7 @@ public:
{
wpCreature->SetDisplayId(target->GetDisplayId());
wpCreature->SetObjectScale(0.5f);
wpCreature->SetLevel(point > STRONG_MAX_LEVEL ? STRONG_MAX_LEVEL : point);
wpCreature->SetLevel(std::min<uint32>(point, STRONG_MAX_LEVEL));
}
}
while (result->NextRow());

View File

@@ -317,7 +317,7 @@ public:
eventTimer = 3000;
if (Creature* naralex = instance->instance->GetCreature(instance->GetData64(DATA_NARALEX)))
{
AchievementEntry const* AchievWC = sAchievementStore.LookupEntry(ACHIEVEMENT_WAILING_CAVERNS);
AchievementEntry const* AchievWC = sAchievementMgr->GetAchievement(ACHIEVEMENT_WAILING_CAVERNS);
if (AchievWC)
{
Map* map = me->GetMap();

View File

@@ -695,7 +695,7 @@ class npc_halion_controller : public CreatureScript
halion->AI()->Talk(SAY_INTRO);
break;
case EVENT_TWILIGHT_MENDING:
if (Creature* halion = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_HALION)))
if (ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_HALION)))
if (Creature* twilightHalion = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_TWILIGHT_HALION)))
twilightHalion->CastSpell((Unit*)NULL, SPELL_TWILIGHT_MENDING, true);
break;
@@ -1114,7 +1114,7 @@ class npc_combustion_consumption : public CreatureScript
struct npc_combustion_consumptionAI : public Scripted_NoMovementAI
{
npc_combustion_consumptionAI(Creature* creature) : Scripted_NoMovementAI(creature),
_summonerGuid(0), _instance(creature->GetInstanceScript())
_instance(creature->GetInstanceScript()), _summonerGuid(0)
{
switch (me->GetEntry())
{

View File

@@ -154,7 +154,7 @@ public:
CheckPlayersFrostResist();
if (CanTheHundredClub)
{
AchievementEntry const* AchievTheHundredClub = sAchievementStore.LookupEntry(ACHIEVEMENT_THE_HUNDRED_CLUB);
AchievementEntry const* AchievTheHundredClub = sAchievementMgr->GetAchievement(ACHIEVEMENT_THE_HUNDRED_CLUB);
if (AchievTheHundredClub)
{
if (map && map->IsDungeon())

View File

@@ -232,7 +232,7 @@ public:
{
npc_verdisa_beglaristrasz_eternosAI(Creature* creature) : ScriptedAI(creature) { }
void MovementInform(uint32 type, uint32 id)
void MovementInform(uint32 /*type*/, uint32 id)
{
// When Belgaristraz finish his moving say grateful text
if (me->GetEntry() == NPC_BELGARISTRASZ)

View File

@@ -153,7 +153,7 @@ public:
if (IsHeroic() && GolemsShattered < 5)
{
AchievementEntry const* AchievShatterResistant = sAchievementStore.LookupEntry(ACHIEVEMENT_SHATTER_RESISTANT);
AchievementEntry const* AchievShatterResistant = sAchievementMgr->GetAchievement(ACHIEVEMENT_SHATTER_RESISTANT);
if (AchievShatterResistant)
{
Map* map = me->GetMap();

View File

@@ -2115,7 +2115,7 @@ class npc_shadowfiend : public CreatureScript
{
npc_shadowfiendAI(Creature* creature) : PetAI(creature) {}
void JustDied(Unit* killer)
void JustDied(Unit* /*killer*/)
{
if (me->isSummon())
if (Unit* owner = me->ToTempSummon()->GetSummoner())