aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities
diff options
context:
space:
mode:
authorShauren <none@none>2010-12-23 23:25:44 +0100
committerShauren <none@none>2010-12-23 23:25:44 +0100
commit928443d8993869dfbf3adceabe4ba0b3cfe0edef (patch)
treeb30f1385e6f2dd8d95357590593aa2988b094593 /src/server/game/Entities
parent95daf7998fc3b772fdcd70087c12db80bd5a031a (diff)
Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG-- branch : trunk
Diffstat (limited to 'src/server/game/Entities')
-rwxr-xr-xsrc/server/game/Entities/Corpse/Corpse.cpp12
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.cpp138
-rwxr-xr-xsrc/server/game/Entities/Creature/CreatureGroups.cpp28
-rwxr-xr-xsrc/server/game/Entities/Creature/CreatureGroups.h4
-rwxr-xr-xsrc/server/game/Entities/Creature/GossipDef.cpp26
-rwxr-xr-xsrc/server/game/Entities/Creature/TemporarySummon.cpp4
-rwxr-xr-xsrc/server/game/Entities/DynamicObject/DynamicObject.cpp8
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp34
-rwxr-xr-xsrc/server/game/Entities/Item/Container/Bag.cpp2
-rwxr-xr-xsrc/server/game/Entities/Item/Item.cpp18
-rwxr-xr-xsrc/server/game/Entities/Item/ItemEnchantmentMgr.cpp10
-rwxr-xr-xsrc/server/game/Entities/Object/Object.cpp114
-rwxr-xr-xsrc/server/game/Entities/Object/Updates/UpdateData.cpp12
-rwxr-xr-xsrc/server/game/Entities/Pet/Pet.cpp44
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp846
-rwxr-xr-xsrc/server/game/Entities/Player/SocialMgr.cpp10
-rwxr-xr-xsrc/server/game/Entities/Transport/Transport.cpp58
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp298
-rwxr-xr-xsrc/server/game/Entities/Vehicle/Vehicle.cpp18
19 files changed, 842 insertions, 842 deletions
diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp
index 29a2b83e32d..4d08ab073f8 100755
--- a/src/server/game/Entities/Corpse/Corpse.cpp
+++ b/src/server/game/Entities/Corpse/Corpse.cpp
@@ -52,7 +52,7 @@ void Corpse::AddToWorld()
{
///- Register the corpse for guid lookup
if (!IsInWorld())
- sObjectAccessor.AddObject(this);
+ sObjectAccessor->AddObject(this);
Object::AddToWorld();
}
@@ -61,7 +61,7 @@ void Corpse::RemoveFromWorld()
{
///- Remove the corpse from the accessor
if (IsInWorld())
- sObjectAccessor.RemoveObject(this);
+ sObjectAccessor->RemoveObject(this);
Object::RemoveFromWorld();
}
@@ -81,7 +81,7 @@ bool Corpse::Create(uint32 guidlow, Player *owner)
if (!IsPositionValid())
{
- sLog.outError("Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
+ sLog->outError("Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
guidlow, owner->GetName(), owner->GetPositionX(), owner->GetPositionY());
return false;
}
@@ -140,7 +140,7 @@ void Corpse::DeleteBonesFromWorld()
if (!corpse)
{
- sLog.outError("Bones %u not found in world.", GetGUIDLow());
+ sLog->outError("Bones %u not found in world.", GetGUIDLow());
return;
}
@@ -183,7 +183,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
if (m_type >= MAX_CORPSE_TYPE)
{
- sLog.outError("Corpse (guidlow %d, owner %d) have wrong corpse type, not load.",GetGUIDLow(),GUID_LOPART(GetOwnerGUID()));
+ sLog->outError("Corpse (guidlow %d, owner %d) have wrong corpse type, not load.",GetGUIDLow(),GUID_LOPART(GetOwnerGUID()));
return false;
}
@@ -201,7 +201,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
if (!IsPositionValid())
{
- sLog.outError("Corpse (guidlow %d, owner %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
+ sLog->outError("Corpse (guidlow %d, owner %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUIDLow(), GUID_LOPART(GetOwnerGUID()), GetPositionX(), GetPositionY());
return false;
}
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 6d4a5443344..f2347e0882f 100755
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -158,7 +158,7 @@ m_formation(NULL)
DisableReputationGain = false;
//m_unit_movement_flags = MONSTER_MOVE_WALK;
- m_SightDistance = sWorld.getFloatConfig(CONFIG_SIGHT_MONSTER);
+ m_SightDistance = sWorld->getFloatConfig(CONFIG_SIGHT_MONSTER);
m_CombatDistance = 0;//MELEE_RANGE;
ResetLootMode(); // restore default loot mode
@@ -173,7 +173,7 @@ Creature::~Creature()
i_AI = NULL;
//if (m_uint32Values)
- // sLog.outError("Deconstruct Creature Entry = %u", GetEntry());
+ // sLog->outError("Deconstruct Creature Entry = %u", GetEntry());
}
void Creature::AddToWorld()
@@ -183,7 +183,7 @@ void Creature::AddToWorld()
{
if (m_zoneScript)
m_zoneScript->OnCreatureCreate(this);
- sObjectAccessor.AddObject(this);
+ sObjectAccessor->AddObject(this);
Unit::AddToWorld();
SearchFormation();
AIM_Initialize();
@@ -199,9 +199,9 @@ void Creature::RemoveFromWorld()
if (m_zoneScript)
m_zoneScript->OnCreatureRemove(this);
if (m_formation)
- formation_mgr.RemoveCreatureFromGroup(m_formation, this);
+ sFormationMgr->RemoveCreatureFromGroup(m_formation, this);
Unit::RemoveFromWorld();
- sObjectAccessor.RemoveObject(this);
+ sObjectAccessor->RemoveObject(this);
}
}
@@ -226,7 +226,7 @@ void Creature::SearchFormation()
CreatureGroupInfoType::iterator frmdata = CreatureGroupMap.find(lowguid);
if (frmdata != CreatureGroupMap.end())
- formation_mgr.AddCreatureToGroup(frmdata->second->leaderGUID, this);
+ sFormationMgr->AddCreatureToGroup(frmdata->second->leaderGUID, this);
}
void Creature::RemoveCorpse(bool setSpawnTime)
@@ -260,7 +260,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data
CreatureInfo const *normalInfo = ObjectMgr::GetCreatureTemplate(Entry);
if (!normalInfo)
{
- sLog.outErrorDb("Creature::InitEntry creature entry %u does not exist.", Entry);
+ sLog->outErrorDb("Creature::InitEntry creature entry %u does not exist.", Entry);
return false;
}
@@ -279,7 +279,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data
if (!cinfo)
{
// maybe check such things already at startup
- sLog.outErrorDb("Creature::UpdateEntry creature difficulty %u entry %u does not exist.", diff + 1, actualEntry);
+ sLog->outErrorDb("Creature::UpdateEntry creature difficulty %u entry %u does not exist.", diff + 1, actualEntry);
return false;
}
}
@@ -298,7 +298,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data
// Cancel load if no model defined
if (!(cinfo->GetFirstValidModelId()))
{
- sLog.outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ",Entry);
+ sLog->outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ",Entry);
return false;
}
@@ -306,7 +306,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 /*team*/, const CreatureData *data
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(display_id);
if (!minfo) // Cancel load if no model defined
{
- sLog.outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ",Entry);
+ sLog->outErrorDb("Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ",Entry);
return false;
}
@@ -449,11 +449,11 @@ void Creature::Update(uint32 diff)
{
case JUST_ALIVED:
// Don't must be called, see Creature::setDeathState JUST_ALIVED -> ALIVE promoting.
- sLog.outError("Creature (GUID: %u Entry: %u) in wrong state: JUST_ALIVED (4)",GetGUIDLow(),GetEntry());
+ sLog->outError("Creature (GUID: %u Entry: %u) in wrong state: JUST_ALIVED (4)",GetGUIDLow(),GetEntry());
break;
case JUST_DIED:
// Don't must be called, see Creature::setDeathState JUST_DIED -> CORPSE promoting.
- sLog.outError("Creature (GUID: %u Entry: %u) in wrong state: JUST_DEAD (1)",GetGUIDLow(),GetEntry());
+ sLog->outError("Creature (GUID: %u Entry: %u) in wrong state: JUST_DEAD (1)",GetGUIDLow(),GetEntry());
break;
case DEAD:
{
@@ -500,7 +500,7 @@ void Creature::Update(uint32 diff)
else if (m_corpseRemoveTime <= time(NULL))
{
RemoveCorpse(false);
- sLog.outStaticDebug("Removing corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY));
+ sLog->outStaticDebug("Removing corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY));
}
else
{
@@ -517,7 +517,7 @@ void Creature::Update(uint32 diff)
if (m_corpseRemoveTime <= time(NULL))
{
RemoveCorpse(false);
- sLog.outStaticDebug("Removing alive corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY));
+ sLog->outStaticDebug("Removing alive corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY));
}
}
@@ -611,7 +611,7 @@ void Creature::RegenerateMana()
{
if (!IsUnderLastManaUseEffect())
{
- float ManaIncreaseRate = sWorld.getRate(RATE_POWER_MANA);
+ float ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA);
float Spirit = GetStat(STAT_SPIRIT);
addvalue = uint32((Spirit / 5.0f + 17.0f) * ManaIncreaseRate);
@@ -647,7 +647,7 @@ void Creature::RegenerateHealth()
// Not only pet, but any controlled creature
if (GetCharmerOrOwnerGUID())
{
- float HealthIncreaseRate = sWorld.getRate(RATE_HEALTH);
+ float HealthIncreaseRate = sWorld->getRate(RATE_HEALTH);
float Spirit = GetStat(STAT_SPIRIT);
if (GetPower(POWER_MANA) > 0)
@@ -676,7 +676,7 @@ void Creature::DoFleeToGetAssistance()
if (HasAuraType(SPELL_AURA_PREVENTS_FLEEING))
return;
- float radius = sWorld.getFloatConfig(CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS);
+ float radius = sWorld->getFloatConfig(CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS);
if (radius >0)
{
Creature* pCreature = NULL;
@@ -696,7 +696,7 @@ void Creature::DoFleeToGetAssistance()
UpdateSpeed(MOVE_RUN, false);
if (!pCreature)
- //SetFeared(true, getVictim()->GetGUID(), 0 ,sWorld.getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY));
+ //SetFeared(true, getVictim()->GetGUID(), 0 ,sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY));
//TODO: use 31365
SetControlled(true, UNIT_STAT_FLEEING);
else
@@ -709,7 +709,7 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
// make sure nothing can change the AI during AI update
if (m_AI_locked)
{
- sLog.outDebug("AIM_Initialize: failed to init, locked.");
+ sLog->outDebug("AIM_Initialize: failed to init, locked.");
return false;
}
@@ -748,7 +748,7 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry,
CreatureInfo const *cinfo = ObjectMgr::GetCreatureTemplate(Entry);
if (!cinfo)
{
- sLog.outErrorDb("Creature entry %u does not exist.", Entry);
+ sLog->outErrorDb("Creature entry %u does not exist.", Entry);
return false;
}
@@ -756,7 +756,7 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry,
if (!IsPositionValid())
{
- sLog.outError("Creature (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",guidlow,Entry,x,y);
+ sLog->outError("Creature (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",guidlow,Entry,x,y);
return false;
}
@@ -768,19 +768,19 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry,
switch (GetCreatureInfo()->rank)
{
case CREATURE_ELITE_RARE:
- m_corpseDelay = sWorld.getIntConfig(CONFIG_CORPSE_DECAY_RARE);
+ m_corpseDelay = sWorld->getIntConfig(CONFIG_CORPSE_DECAY_RARE);
break;
case CREATURE_ELITE_ELITE:
- m_corpseDelay = sWorld.getIntConfig(CONFIG_CORPSE_DECAY_ELITE);
+ m_corpseDelay = sWorld->getIntConfig(CONFIG_CORPSE_DECAY_ELITE);
break;
case CREATURE_ELITE_RAREELITE:
- m_corpseDelay = sWorld.getIntConfig(CONFIG_CORPSE_DECAY_RAREELITE);
+ m_corpseDelay = sWorld->getIntConfig(CONFIG_CORPSE_DECAY_RAREELITE);
break;
case CREATURE_ELITE_WORLDBOSS:
- m_corpseDelay = sWorld.getIntConfig(CONFIG_CORPSE_DECAY_WORLDBOSS);
+ m_corpseDelay = sWorld->getIntConfig(CONFIG_CORPSE_DECAY_WORLDBOSS);
break;
default:
- m_corpseDelay = sWorld.getIntConfig(CONFIG_CORPSE_DECAY_NORMAL);
+ m_corpseDelay = sWorld->getIntConfig(CONFIG_CORPSE_DECAY_NORMAL);
break;
}
LoadCreaturesAddon();
@@ -836,7 +836,7 @@ bool Creature::isCanTrainingOf(Player* pPlayer, bool msg) const
if ((!trainer_spells || trainer_spells->spellList.empty()) && GetCreatureInfo()->trainer_type != TRAINER_TYPE_PETS)
{
- sLog.outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_TRAINER but have empty trainer spell list.",
+ sLog->outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_TRAINER but have empty trainer spell list.",
GetGUIDLow(),GetEntry());
return false;
}
@@ -1037,7 +1037,7 @@ void Creature::SaveToDB()
CreatureData const *data = sObjectMgr->GetCreatureData(m_DBTableGuid);
if (!data)
{
- sLog.outError("Creature::SaveToDB failed, cannot get creature data!");
+ sLog->outError("Creature::SaveToDB failed, cannot get creature data!");
return;
}
@@ -1186,17 +1186,17 @@ float Creature::_GetHealthMod(int32 Rank)
switch (Rank) // define rates for each elite rank
{
case CREATURE_ELITE_NORMAL:
- return sWorld.getRate(RATE_CREATURE_NORMAL_HP);
+ return sWorld->getRate(RATE_CREATURE_NORMAL_HP);
case CREATURE_ELITE_ELITE:
- return sWorld.getRate(RATE_CREATURE_ELITE_ELITE_HP);
+ return sWorld->getRate(RATE_CREATURE_ELITE_ELITE_HP);
case CREATURE_ELITE_RAREELITE:
- return sWorld.getRate(RATE_CREATURE_ELITE_RAREELITE_HP);
+ return sWorld->getRate(RATE_CREATURE_ELITE_RAREELITE_HP);
case CREATURE_ELITE_WORLDBOSS:
- return sWorld.getRate(RATE_CREATURE_ELITE_WORLDBOSS_HP);
+ return sWorld->getRate(RATE_CREATURE_ELITE_WORLDBOSS_HP);
case CREATURE_ELITE_RARE:
- return sWorld.getRate(RATE_CREATURE_ELITE_RARE_HP);
+ return sWorld->getRate(RATE_CREATURE_ELITE_RARE_HP);
default:
- return sWorld.getRate(RATE_CREATURE_ELITE_ELITE_HP);
+ return sWorld->getRate(RATE_CREATURE_ELITE_ELITE_HP);
}
}
@@ -1205,17 +1205,17 @@ float Creature::_GetDamageMod(int32 Rank)
switch (Rank) // define rates for each elite rank
{
case CREATURE_ELITE_NORMAL:
- return sWorld.getRate(RATE_CREATURE_NORMAL_DAMAGE);
+ return sWorld->getRate(RATE_CREATURE_NORMAL_DAMAGE);
case CREATURE_ELITE_ELITE:
- return sWorld.getRate(RATE_CREATURE_ELITE_ELITE_DAMAGE);
+ return sWorld->getRate(RATE_CREATURE_ELITE_ELITE_DAMAGE);
case CREATURE_ELITE_RAREELITE:
- return sWorld.getRate(RATE_CREATURE_ELITE_RAREELITE_DAMAGE);
+ return sWorld->getRate(RATE_CREATURE_ELITE_RAREELITE_DAMAGE);
case CREATURE_ELITE_WORLDBOSS:
- return sWorld.getRate(RATE_CREATURE_ELITE_WORLDBOSS_DAMAGE);
+ return sWorld->getRate(RATE_CREATURE_ELITE_WORLDBOSS_DAMAGE);
case CREATURE_ELITE_RARE:
- return sWorld.getRate(RATE_CREATURE_ELITE_RARE_DAMAGE);
+ return sWorld->getRate(RATE_CREATURE_ELITE_RARE_DAMAGE);
default:
- return sWorld.getRate(RATE_CREATURE_ELITE_ELITE_DAMAGE);
+ return sWorld->getRate(RATE_CREATURE_ELITE_ELITE_DAMAGE);
}
}
@@ -1224,17 +1224,17 @@ float Creature::GetSpellDamageMod(int32 Rank)
switch (Rank) // define rates for each elite rank
{
case CREATURE_ELITE_NORMAL:
- return sWorld.getRate(RATE_CREATURE_NORMAL_SPELLDAMAGE);
+ return sWorld->getRate(RATE_CREATURE_NORMAL_SPELLDAMAGE);
case CREATURE_ELITE_ELITE:
- return sWorld.getRate(RATE_CREATURE_ELITE_ELITE_SPELLDAMAGE);
+ return sWorld->getRate(RATE_CREATURE_ELITE_ELITE_SPELLDAMAGE);
case CREATURE_ELITE_RAREELITE:
- return sWorld.getRate(RATE_CREATURE_ELITE_RAREELITE_SPELLDAMAGE);
+ return sWorld->getRate(RATE_CREATURE_ELITE_RAREELITE_SPELLDAMAGE);
case CREATURE_ELITE_WORLDBOSS:
- return sWorld.getRate(RATE_CREATURE_ELITE_WORLDBOSS_SPELLDAMAGE);
+ return sWorld->getRate(RATE_CREATURE_ELITE_WORLDBOSS_SPELLDAMAGE);
case CREATURE_ELITE_RARE:
- return sWorld.getRate(RATE_CREATURE_ELITE_RARE_SPELLDAMAGE);
+ return sWorld->getRate(RATE_CREATURE_ELITE_RARE_SPELLDAMAGE);
default:
- return sWorld.getRate(RATE_CREATURE_ELITE_ELITE_SPELLDAMAGE);
+ return sWorld->getRate(RATE_CREATURE_ELITE_ELITE_SPELLDAMAGE);
}
}
@@ -1251,7 +1251,7 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint3
CreatureInfo const *cinfo = ObjectMgr::GetCreatureTemplate(Entry);
if (!cinfo)
{
- sLog.outErrorDb("Creature entry %u does not exist.", Entry);
+ sLog->outErrorDb("Creature entry %u does not exist.", Entry);
return false;
}
@@ -1277,7 +1277,7 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
if (!data)
{
- sLog.outErrorDb("Creature (GUID: %u) not found in table `creature`, can't load. ",guid);
+ sLog->outErrorDb("Creature (GUID: %u) not found in table `creature`, can't load. ",guid);
return false;
}
@@ -1392,7 +1392,7 @@ void Creature::DeleteFromDB()
{
if (!m_DBTableGuid)
{
- sLog.outDebug("Trying to delete not saved creature!");
+ sLog->outDebug("Trying to delete not saved creature!");
return;
}
@@ -1436,7 +1436,7 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
if (who->isInCombat())
if (Unit *victim = who->getAttackerForHelper())
- if (IsWithinDistInMap(victim, sWorld.getFloatConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS)))
+ if (IsWithinDistInMap(victim, sWorld->getFloatConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS)))
force = true;
if (!force && (IsNeutralToAll() || !IsWithinDistInMap(who, GetAttackDistance(who) + m_CombatDistance)))
@@ -1451,7 +1451,7 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
float Creature::GetAttackDistance(Unit const* pl) const
{
- float aggroRate = sWorld.getRate(RATE_CREATURE_AGGRO);
+ float aggroRate = sWorld->getRate(RATE_CREATURE_AGGRO);
if (aggroRate == 0)
return 0.0f;
@@ -1471,7 +1471,7 @@ float Creature::GetAttackDistance(Unit const* pl) const
// radius grow if playlevel < creaturelevel
RetDistance -= (float)leveldif;
- if (creaturelevel+5 <= sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (creaturelevel+5 <= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
// detect range auras
RetDistance += GetTotalAuraModifier(SPELL_AURA_MOD_DETECT_RANGE);
@@ -1495,7 +1495,7 @@ void Creature::setDeathState(DeathState s)
m_respawnTime = time(NULL) + m_respawnDelay + m_corpseDelay;
// always save boss respawn time at death to prevent crash cheating
- if (sWorld.getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY) || isWorldBoss())
+ if (sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY) || isWorldBoss())
SaveRespawnTime();
}
Unit::setDeathState(s);
@@ -1589,7 +1589,7 @@ void Creature::Respawn(bool force)
if (m_DBTableGuid)
sObjectMgr->RemoveCreatureRespawnTime(m_DBTableGuid, GetInstanceId());
- sLog.outStaticDebug("Respawning...");
+ sLog->outStaticDebug("Respawning...");
m_respawnTime = 0;
lootForPickPocketed = false;
lootForBody = false;
@@ -1687,7 +1687,7 @@ SpellEntry const *Creature::reachWithSpellAttack(Unit *pVictim)
SpellEntry const *spellInfo = sSpellStore.LookupEntry(m_spells[i]);
if (!spellInfo)
{
- sLog.outError("WORLD: unknown spell id %i", m_spells[i]);
+ sLog->outError("WORLD: unknown spell id %i", m_spells[i]);
continue;
}
@@ -1737,7 +1737,7 @@ SpellEntry const *Creature::reachWithSpellCure(Unit *pVictim)
SpellEntry const *spellInfo = sSpellStore.LookupEntry(m_spells[i]);
if (!spellInfo)
{
- sLog.outError("WORLD: unknown spell id %i", m_spells[i]);
+ sLog->outError("WORLD: unknown spell id %i", m_spells[i]);
continue;
}
@@ -1809,7 +1809,7 @@ Unit* Creature::SelectNearestTargetInAttackDistance(float dist) const
Unit *target = NULL;
if (dist > ATTACK_DISTANCE)
- sLog.outError("Creature (GUID: %u Entry: %u) SelectNearestTargetInAttackDistance called with dist > ATTACK_DISTANCE. Extra distance ignored.",GetGUIDLow(),GetEntry());
+ sLog->outError("Creature (GUID: %u Entry: %u) SelectNearestTargetInAttackDistance called with dist > ATTACK_DISTANCE. Extra distance ignored.",GetGUIDLow(),GetEntry());
{
Trinity::NearestHostileUnitInAttackDistanceCheck u_check(this, dist);
@@ -1834,7 +1834,7 @@ void Creature::SendAIReaction(AiReaction reactionType)
((WorldObject*)this)->SendMessageToSet(&data, true);
- sLog.outDebug("WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType);
+ sLog->outDebug("WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType);
}
void Creature::CallAssistance()
@@ -1843,7 +1843,7 @@ void Creature::CallAssistance()
{
SetNoCallAssistance(true);
- float radius = sWorld.getFloatConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS);
+ float radius = sWorld->getFloatConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS);
if (radius > 0)
{
@@ -1872,7 +1872,7 @@ void Creature::CallAssistance()
e->AddAssistant((*assistList.begin())->GetGUID());
assistList.pop_front();
}
- m_Events.AddEvent(e, m_Events.CalculateTime(sWorld.getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY)));
+ m_Events.AddEvent(e, m_Events.CalculateTime(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY)));
}
}
}
@@ -1992,7 +1992,7 @@ bool Creature::canCreatureAttack(Unit const *pVictim, bool force) const
return true;
//Use AttackDistance in distance check if threat radius is lower. This prevents creature bounce in and out of combat every update tick.
- float dist = std::max(GetAttackDistance(pVictim), sWorld.getFloatConfig(CONFIG_THREAT_RADIUS)) + m_CombatDistance;
+ float dist = std::max(GetAttackDistance(pVictim), sWorld->getFloatConfig(CONFIG_THREAT_RADIUS)) + m_CombatDistance;
if (Unit *unit = GetCharmerOrOwner())
return pVictim->IsWithinDist(unit, dist);
@@ -2065,7 +2065,7 @@ bool Creature::LoadCreaturesAddon(bool reload)
SpellEntry const *AdditionalSpellInfo = sSpellStore.LookupEntry(cAura->spell_id);
if (!AdditionalSpellInfo)
{
- sLog.outErrorDb("Creature (GUID: %u Entry: %u) has wrong spell %u defined in `auras` field.",GetGUIDLow(),GetEntry(),cAura->spell_id);
+ sLog->outErrorDb("Creature (GUID: %u Entry: %u) has wrong spell %u defined in `auras` field.",GetGUIDLow(),GetEntry(),cAura->spell_id);
continue;
}
@@ -2073,13 +2073,13 @@ bool Creature::LoadCreaturesAddon(bool reload)
if (HasAura(cAura->spell_id))
{
if (!reload)
- sLog.outErrorDb("Creature (GUID: %u Entry: %u) has duplicate aura (spell %u) in `auras` field.",GetGUIDLow(),GetEntry(),cAura->spell_id);
+ sLog->outErrorDb("Creature (GUID: %u Entry: %u) has duplicate aura (spell %u) in `auras` field.",GetGUIDLow(),GetEntry(),cAura->spell_id);
continue;
}
AddAura(AdditionalSpellInfo, cAura->effectMask, this);
- sLog.outDebug("Spell: %u with AuraEffectMask %u added to creature (GUID: %u Entry: %u)", cAura->spell_id, cAura->effectMask,GetGUIDLow(),GetEntry());
+ sLog->outDebug("Spell: %u with AuraEffectMask %u added to creature (GUID: %u Entry: %u)", cAura->spell_id, cAura->effectMask,GetGUIDLow(),GetEntry());
}
}
return true;
@@ -2092,14 +2092,14 @@ void Creature::SendZoneUnderAttackMessage(Player* attacker)
WorldPacket data(SMSG_ZONE_UNDER_ATTACK,4);
data << (uint32)GetAreaId();
- sWorld.SendGlobalMessage(&data,NULL,(enemy_team == ALLIANCE ? HORDE : ALLIANCE));
+ sWorld->SendGlobalMessage(&data,NULL,(enemy_team == ALLIANCE ? HORDE : ALLIANCE));
}
void Creature::SetInCombatWithZone()
{
if (!CanHaveThreatList())
{
- sLog.outError("Creature entry %u call SetInCombatWithZone but creature cannot have threat list.", GetEntry());
+ sLog->outError("Creature entry %u call SetInCombatWithZone but creature cannot have threat list.", GetEntry());
return;
}
@@ -2107,7 +2107,7 @@ void Creature::SetInCombatWithZone()
if (!pMap->IsDungeon())
{
- sLog.outError("Creature entry %u call SetInCombatWithZone for map (id: %u) that isn't an instance.", GetEntry(), pMap->GetId());
+ sLog->outError("Creature entry %u call SetInCombatWithZone for map (id: %u) that isn't an instance.", GetEntry(), pMap->GetId());
return;
}
@@ -2238,7 +2238,7 @@ void Creature::AllLootRemovedFromCorpse()
float decayRate;
CreatureInfo const *cinfo = GetCreatureInfo();
- decayRate = sWorld.getRate(RATE_CORPSE_DECAY_LOOTED);
+ decayRate = sWorld->getRate(RATE_CORPSE_DECAY_LOOTED);
uint32 diff = uint32((m_corpseRemoveTime - now) * decayRate);
m_respawnTime -= diff;
@@ -2256,7 +2256,7 @@ uint8 Creature::getLevelForTarget(WorldObject const* target) const
if (!isWorldBoss() || !target->ToUnit())
return Unit::getLevelForTarget(target);
- uint16 level = target->ToUnit()->getLevel() + sWorld.getIntConfig(CONFIG_WORLD_BOSS_LEVEL_DIFF);
+ uint16 level = target->ToUnit()->getLevel() + sWorld->getIntConfig(CONFIG_WORLD_BOSS_LEVEL_DIFF);
if (level < 1)
return 1;
if (level > 255)
diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp
index 349dc09409f..c03fc0381e5 100755
--- a/src/server/game/Entities/Creature/CreatureGroups.cpp
+++ b/src/server/game/Entities/Creature/CreatureGroups.cpp
@@ -37,13 +37,13 @@ void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature *member)
//Add member to an existing group
if (itr != map->CreatureGroupHolder.end())
{
- sLog.outDebug("Group found: %u, inserting creature GUID: %u, Group InstanceID %u", groupId, member->GetGUIDLow(), member->GetInstanceId());
+ sLog->outDebug("Group found: %u, inserting creature GUID: %u, Group InstanceID %u", groupId, member->GetGUIDLow(), member->GetInstanceId());
itr->second->AddMember(member);
}
//Create new group
else
{
- sLog.outDebug("Group not found: %u. Creating new group.", groupId);
+ sLog->outDebug("Group not found: %u. Creating new group.", groupId);
CreatureGroup* group = new CreatureGroup(groupId);
map->CreatureGroupHolder[groupId] = group;
group->AddMember(member);
@@ -52,7 +52,7 @@ void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature *member)
void CreatureGroupManager::RemoveCreatureFromGroup(CreatureGroup *group, Creature *member)
{
- sLog.outDebug("Deleting member pointer to GUID: %u from group %u", group->GetId(), member->GetDBTableGUIDLow());
+ sLog->outDebug("Deleting member pointer to GUID: %u from group %u", group->GetId(), member->GetDBTableGUIDLow());
group->RemoveMember(member);
if (group->isEmpty())
@@ -61,7 +61,7 @@ void CreatureGroupManager::RemoveCreatureFromGroup(CreatureGroup *group, Creatur
if (!map)
return;
- sLog.outDebug("Deleting group with InstanceID %u", member->GetInstanceId());
+ sLog->outDebug("Deleting group with InstanceID %u", member->GetInstanceId());
map->CreatureGroupHolder.erase(group->GetId());
delete group;
}
@@ -80,8 +80,8 @@ void CreatureGroupManager::LoadCreatureFormations()
if (!result)
{
- sLog.outErrorDb(">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!");
- sLog.outString();
+ sLog->outErrorDb(">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!");
+ sLog->outString();
return;
}
@@ -129,14 +129,14 @@ void CreatureGroupManager::LoadCreatureFormations()
{
if (guidSet.find(group_member->leaderGUID) == guidSet.end())
{
- sLog.outErrorDb("creature_formations table leader guid %u incorrect (not exist)", group_member->leaderGUID);
+ sLog->outErrorDb("creature_formations table leader guid %u incorrect (not exist)", group_member->leaderGUID);
delete group_member;
continue;
}
if (guidSet.find(memberGUID) == guidSet.end())
{
- sLog.outErrorDb("creature_formations table member guid %u incorrect (not exist)", memberGUID);
+ sLog->outErrorDb("creature_formations table member guid %u incorrect (not exist)", memberGUID);
delete group_member;
continue;
}
@@ -147,18 +147,18 @@ void CreatureGroupManager::LoadCreatureFormations()
}
while (result->NextRow()) ;
- sLog.outString(">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog.outString();
+ sLog->outString(">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString();
}
void CreatureGroup::AddMember(Creature *member)
{
- sLog.outDebug("CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow());
+ sLog->outDebug("CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow());
//Check if it is a leader
if (member->GetDBTableGUIDLow() == m_groupID)
{
- sLog.outDebug("Unit GUID: %u is formation leader. Adding group.", member->GetGUIDLow());
+ sLog->outDebug("Unit GUID: %u is formation leader. Adding group.", member->GetGUIDLow());
m_leader = member;
}
@@ -187,7 +187,7 @@ void CreatureGroup::MemberAttackStart(Creature *member, Unit *target)
for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
if (m_leader) // avoid crash if leader was killed and reset.
- sLog.outDebug("GROUP ATTACK: group instance id %u calls member instid %u", m_leader->GetInstanceId(), member->GetInstanceId());
+ sLog->outDebug("GROUP ATTACK: group instance id %u calls member instid %u", m_leader->GetInstanceId(), member->GetInstanceId());
//Skip one check
if (itr->first == member)
@@ -214,7 +214,7 @@ void CreatureGroup::FormationReset(bool dismiss)
itr->first->GetMotionMaster()->Initialize();
else
itr->first->GetMotionMaster()->MoveIdle(MOTION_SLOT_IDLE);
- sLog.outDebug("Set %s movement for member GUID: %u", dismiss ? "default" : "idle", itr->first->GetGUIDLow());
+ sLog->outDebug("Set %s movement for member GUID: %u", dismiss ? "default" : "idle", itr->first->GetGUIDLow());
}
}
m_Formed = !dismiss;
diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h
index 167a2820e52..ff313cf76b1 100755
--- a/src/server/game/Entities/Creature/CreatureGroups.h
+++ b/src/server/game/Entities/Creature/CreatureGroups.h
@@ -40,7 +40,7 @@ class CreatureGroupManager
void LoadCreatureFormations();
};
-#define formation_mgr (*ACE_Singleton<CreatureGroupManager, ACE_Null_Mutex>::instance())
+#define sFormationMgr ACE_Singleton<CreatureGroupManager, ACE_Null_Mutex>::instance()
typedef UNORDERED_MAP<uint32/*memberDBGUID*/, FormationInfo*> CreatureGroupInfoType;
@@ -59,7 +59,7 @@ class CreatureGroup
public:
//Group cannot be created empty
explicit CreatureGroup(uint32 id) : m_leader(NULL), m_groupID(id), m_Formed(false) {}
- ~CreatureGroup() { sLog.outDebug("Destroying group"); }
+ ~CreatureGroup() { sLog->outDebug("Destroying group"); }
Creature* getLeader() const { return m_leader; }
uint32 GetId() const { return m_groupID; }
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index e1463580495..2d07e0b1fe9 100755
--- a/src/server/game/Entities/Creature/GossipDef.cpp
+++ b/src/server/game/Entities/Creature/GossipDef.cpp
@@ -198,7 +198,7 @@ void PlayerMenu::SendPointOfInterest(float X, float Y, uint32 Icon, uint32 Flags
data << locName;
pSession->SendPacket(&data);
- //sLog.outDebug("WORLD: Sent SMSG_GOSSIP_POI");
+ //sLog->outDebug("WORLD: Sent SMSG_GOSSIP_POI");
}
void PlayerMenu::SendPointOfInterest(uint32 poi_id)
@@ -206,7 +206,7 @@ void PlayerMenu::SendPointOfInterest(uint32 poi_id)
PointOfInterest const* poi = sObjectMgr->GetPointOfInterest(poi_id);
if (!poi)
{
- sLog.outErrorDb("Request to send non-existing POI (Id: %u), ignored.",poi_id);
+ sLog->outErrorDb("Request to send non-existing POI (Id: %u), ignored.",poi_id);
return;
}
@@ -226,7 +226,7 @@ void PlayerMenu::SendPointOfInterest(uint32 poi_id)
data << icon_name;
pSession->SendPacket(&data);
- //sLog.outDebug("WORLD: Sent SMSG_GOSSIP_POI");
+ //sLog->outDebug("WORLD: Sent SMSG_GOSSIP_POI");
}
void PlayerMenu::SendTalking(uint32 textID)
@@ -297,7 +297,7 @@ void PlayerMenu::SendTalking(uint32 textID)
}
pSession->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE ");
+ sLog->outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE ");
}
void PlayerMenu::SendTalking(char const * title, char const * text)
@@ -320,7 +320,7 @@ void PlayerMenu::SendTalking(char const * title, char const * text)
pSession->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE ");
+ sLog->outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE ");
}
/*********************************************************/
@@ -406,7 +406,7 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title
data.put<uint8>(count_pos, count);
pSession->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID));
+ sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID));
}
void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, uint64 npcGUID)
@@ -416,7 +416,7 @@ void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, uint64 npcGUID)
data << uint8(questStatus);
pSession->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus);
+ sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus);
}
void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID, bool ActivateAccept)
@@ -497,7 +497,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID,
}
data << uint32(pQuest->GetRewOrReqMoney());
- data << uint32(pQuest->XPValue(pSession->GetPlayer())*sWorld.getRate(RATE_XP_QUEST));
+ data << uint32(pQuest->XPValue(pSession->GetPlayer())*sWorld->getRate(RATE_XP_QUEST));
}
// rewarded honor points. Multiply with 10 to satisfy client
@@ -527,7 +527,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID,
}
pSession->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
+ sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
}
void PlayerMenu::SendQuestQueryResponse(Quest const *pQuest)
@@ -667,7 +667,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const *pQuest)
data << ObjectiveText[iI];
pSession->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId());
+ sLog->outDebug("WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId());
}
void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID, bool EnableNext)
@@ -741,7 +741,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID,
}
data << uint32(pQuest->GetRewOrReqMoney());
- data << uint32(pQuest->XPValue(pSession->GetPlayer())*sWorld.getRate(RATE_XP_QUEST));
+ data << uint32(pQuest->XPValue(pSession->GetPlayer())*sWorld->getRate(RATE_XP_QUEST));
// rewarded honor points. Multiply with 10 to satisfy client
data << 10 * Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorMultiplier());
@@ -764,7 +764,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID,
data << uint32(pQuest->RewRepValue[i]);
pSession->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
+ sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
}
void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID, bool Completable, bool CloseOnCancel)
@@ -844,5 +844,5 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID,
data << uint32(0x10);
pSession->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
+ sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
}
diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp
index af15bcd50b7..50184673051 100755
--- a/src/server/game/Entities/Creature/TemporarySummon.cpp
+++ b/src/server/game/Entities/Creature/TemporarySummon.cpp
@@ -159,7 +159,7 @@ void TempSummon::Update(uint32 diff)
}
default:
UnSummon();
- sLog.outError("Temporary summoned creature (entry: %u) have unknown type %u of ",GetEntry(),m_type);
+ sLog->outError("Temporary summoned creature (entry: %u) have unknown type %u of ",GetEntry(),m_type);
break;
}
}
@@ -253,7 +253,7 @@ void TempSummon::RemoveFromWorld()
owner->m_SummonSlot[slot] = 0;
//if (GetOwnerGUID())
- // sLog.outError("Unit %u has owner guid when removed from world", GetEntry());
+ // sLog->outError("Unit %u has owner guid when removed from world", GetEntry());
Creature::RemoveFromWorld();
}
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
index f0e3f191bfe..8d7f30dbdd6 100755
--- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
@@ -45,7 +45,7 @@ void DynamicObject::AddToWorld()
///- Register the dynamicObject for guid lookup
if (!IsInWorld())
{
- sObjectAccessor.AddObject(this);
+ sObjectAccessor->AddObject(this);
WorldObject::AddToWorld();
}
}
@@ -64,11 +64,11 @@ void DynamicObject::RemoveFromWorld()
}
else
{
- sLog.outCrash("DynamicObject::RemoveFromWorld cannot find viewpoint owner");
+ sLog->outCrash("DynamicObject::RemoveFromWorld cannot find viewpoint owner");
}
}
WorldObject::RemoveFromWorld();
- sObjectAccessor.RemoveObject(this);
+ sObjectAccessor->RemoveObject(this);
}
}
@@ -78,7 +78,7 @@ bool DynamicObject::Create(uint32 guidlow, Unit *caster, uint32 spellId, const P
Relocate(pos);
if (!IsPositionValid())
{
- sLog.outError("DynamicObject (spell %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",spellId,GetPositionX(),GetPositionY());
+ sLog->outError("DynamicObject (spell %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",spellId,GetPositionX(),GetPositionY());
return false;
}
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 554c165513b..503d017281f 100755
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -112,7 +112,7 @@ void GameObject::CleanupsBeforeDelete(bool /*finalCleanup*/)
else if (IS_PET_GUID(owner_guid))
ownerType = "pet";
- sLog.outError("Delete GameObject (GUID: %u Entry: %u SpellId %u LinkedGO %u) that lost references to owner (GUID %u Type '%s') GO list. Crash possible later.",
+ sLog->outError("Delete GameObject (GUID: %u Entry: %u SpellId %u LinkedGO %u) that lost references to owner (GUID %u Type '%s') GO list. Crash possible later.",
GetGUIDLow(), GetGOInfo()->id, m_spellId, GetGOInfo()->GetLinkedGameObjectEntry(), GUID_LOPART(owner_guid), ownerType);
}
}
@@ -127,7 +127,7 @@ void GameObject::AddToWorld()
if (m_zoneScript)
m_zoneScript->OnGameObjectCreate(this);
- sObjectAccessor.AddObject(this);
+ sObjectAccessor->AddObject(this);
WorldObject::AddToWorld();
}
}
@@ -146,10 +146,10 @@ void GameObject::RemoveFromWorld()
if (Unit * owner = GetOwner())
owner->RemoveGameObject(this,false);
else
- sLog.outError("Delete GameObject (GUID: %u Entry: %u) that have references in not found creature %u GO list. Crash possible later.",GetGUIDLow(),GetGOInfo()->id,GUID_LOPART(owner_guid));
+ sLog->outError("Delete GameObject (GUID: %u Entry: %u) that have references in not found creature %u GO list. Crash possible later.",GetGUIDLow(),GetGOInfo()->id,GUID_LOPART(owner_guid));
}
WorldObject::RemoveFromWorld();
- sObjectAccessor.RemoveObject(this);
+ sObjectAccessor->RemoveObject(this);
}
}
@@ -161,7 +161,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
Relocate(x,y,z,ang);
if (!IsPositionValid())
{
- sLog.outError("Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",guidlow,name_id,x,y);
+ sLog->outError("Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",guidlow,name_id,x,y);
return false;
}
@@ -178,7 +178,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
GameObjectInfo const* goinfo = ObjectMgr::GetGameObjectInfo(name_id);
if (!goinfo)
{
- sLog.outErrorDb("Gameobject (GUID: %u Entry: %u) not created: it have not exist entry in `gameobject_template`. Map: %u (X: %f Y: %f Z: %f) ang: %f rotation0: %f rotation1: %f rotation2: %f rotation3: %f",guidlow, name_id, map->GetId(), x, y, z, ang, rotation0, rotation1, rotation2, rotation3);
+ sLog->outErrorDb("Gameobject (GUID: %u Entry: %u) not created: it have not exist entry in `gameobject_template`. Map: %u (X: %f Y: %f Z: %f) ang: %f rotation0: %f rotation1: %f rotation2: %f rotation3: %f",guidlow, name_id, map->GetId(), x, y, z, ang, rotation0, rotation1, rotation2, rotation3);
return false;
}
@@ -188,7 +188,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
if (goinfo->type >= MAX_GAMEOBJECT_TYPE)
{
- sLog.outErrorDb("Gameobject (GUID: %u Entry: %u) not created: it have not exist GO type '%u' in `gameobject_template`. It's will crash client if created.",guidlow,name_id,goinfo->type);
+ sLog->outErrorDb("Gameobject (GUID: %u Entry: %u) not created: it have not exist GO type '%u' in `gameobject_template`. It's will crash client if created.",guidlow,name_id,goinfo->type);
return false;
}
@@ -257,7 +257,7 @@ void GameObject::Update(uint32 diff)
if(!AI())
{
if (!AIM_Initialize())
- sLog.outError("Could not initialize GameObjectAI");
+ sLog->outError("Could not initialize GameObjectAI");
} else
AI()->UpdateAI(diff);
@@ -560,7 +560,7 @@ void GameObject::Update(uint32 diff)
m_respawnTime = time(NULL) + m_respawnDelayTime;
// if option not set then object will be saved at grid unload
- if (sWorld.getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
+ if (sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
SaveRespawnTime();
UpdateObjectVisibility();
@@ -627,7 +627,7 @@ void GameObject::SaveToDB()
GameObjectData const *data = sObjectMgr->GetGOData(m_DBTableGuid);
if (!data)
{
- sLog.outError("GameObject::SaveToDB failed, cannot get gameobject data!");
+ sLog->outError("GameObject::SaveToDB failed, cannot get gameobject data!");
return;
}
@@ -696,7 +696,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
if (!data)
{
- sLog.outErrorDb("Gameobject (GUID: %u) not found in table `gameobject`, can't load. ",guid);
+ sLog->outErrorDb("Gameobject (GUID: %u) not found in table `gameobject`, can't load. ",guid);
return false;
}
@@ -1161,7 +1161,7 @@ void GameObject::Use(Unit* user)
if (info->goober.eventId)
{
- sLog.outDebug("Goober ScriptStart id %u for GO entry %u (GUID %u).", info->goober.eventId, GetEntry(), GetDBTableGUIDLow());
+ sLog->outDebug("Goober ScriptStart id %u for GO entry %u (GUID %u).", info->goober.eventId, GetEntry(), GetDBTableGUIDLow());
GetMap()->ScriptsStart(sEventScripts, info->goober.eventId, player, this);
EventInform(info->goober.eventId);
}
@@ -1245,7 +1245,7 @@ void GameObject::Use(Unit* user)
//provide error, no fishable zone or area should be 0
if (!zone_skill)
- sLog.outErrorDb("Fishable areaId %u are not properly defined in `skill_fishing_base_level`.",subzone);
+ sLog->outErrorDb("Fishable areaId %u are not properly defined in `skill_fishing_base_level`.",subzone);
int32 skill = player->GetSkillValue(SKILL_FISHING);
@@ -1261,7 +1261,7 @@ void GameObject::Use(Unit* user)
int32 roll = irand(1,100);
- sLog.outStaticDebug("Fishing check (skill: %i zone min skill: %i chance %i roll: %i",skill,zone_skill,chance,roll);
+ sLog->outStaticDebug("Fishing check (skill: %i zone min skill: %i chance %i roll: %i",skill,zone_skill,chance,roll);
// but you will likely cause junk in areas that require a high fishing skill (not yet implemented)
if (chance >= roll)
@@ -1548,7 +1548,7 @@ void GameObject::Use(Unit* user)
return;
}
default:
- sLog.outDebug("Unknown Object Type %u", GetGoType());
+ sLog->outDebug("Unknown Object Type %u", GetGoType());
break;
}
@@ -1559,9 +1559,9 @@ void GameObject::Use(Unit* user)
if (!spellInfo)
{
if (user->GetTypeId() != TYPEID_PLAYER || !sOutdoorPvPMgr->HandleCustomSpell((Player*)user,spellId,this))
- sLog.outError("WORLD: unknown spell id %u at use action for gameobject (Entry: %u GoType: %u)", spellId,GetEntry(),GetGoType());
+ sLog->outError("WORLD: unknown spell id %u at use action for gameobject (Entry: %u GoType: %u)", spellId,GetEntry(),GetGoType());
else
- sLog.outDebug("WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId);
+ sLog->outDebug("WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId);
return;
}
diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp
index 635f6294c9f..94f1a91311e 100755
--- a/src/server/game/Entities/Item/Container/Bag.cpp
+++ b/src/server/game/Entities/Item/Container/Bag.cpp
@@ -41,7 +41,7 @@ Bag::~Bag()
{
if (item->IsInWorld())
{
- sLog.outCrash("Item %u (slot %u, bag slot %u) in bag %u (slot %u, bag slot %u, m_bagslot %u) is to be deleted but is still in world.",
+ sLog->outCrash("Item %u (slot %u, bag slot %u) in bag %u (slot %u, bag slot %u, m_bagslot %u) is to be deleted but is still in world.",
item->GetEntry(), (uint32)item->GetSlot(), (uint32)item->GetBagSlot(),
GetEntry(), (uint32)GetSlot(), (uint32)GetBagSlot(), (uint32)i);
item->RemoveFromWorld();
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index ee4b8a7885e..ff9f8fd2174 100755
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -37,7 +37,7 @@ void AddItemsSetItem(Player*player,Item *item)
if (!set)
{
- sLog.outErrorDb("Item set %u for item (id %u) not found, mods not applied.",setid,proto->ItemId);
+ sLog->outErrorDb("Item set %u for item (id %u) not found, mods not applied.",setid,proto->ItemId);
return;
}
@@ -98,7 +98,7 @@ void AddItemsSetItem(Player*player,Item *item)
SpellEntry const *spellInfo = sSpellStore.LookupEntry(set->spells[x]);
if (!spellInfo)
{
- sLog.outError("WORLD: unknown spell id %u in items set %u effects", set->spells[x],setid);
+ sLog->outError("WORLD: unknown spell id %u in items set %u effects", set->spells[x],setid);
break;
}
@@ -119,7 +119,7 @@ void RemoveItemsSetItem(Player*player,ItemPrototype const *proto)
if (!set)
{
- sLog.outErrorDb("Item set #%u for item #%u not found, mods not removed.",setid,proto->ItemId);
+ sLog->outErrorDb("Item set #%u for item #%u not found, mods not removed.",setid,proto->ItemId);
return;
}
@@ -286,7 +286,7 @@ void Item::UpdateDuration(Player* owner, uint32 diff)
if (!GetUInt32Value(ITEM_FIELD_DURATION))
return;
- sLog.outDebug("Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)",GetEntry(),GetUInt32Value(ITEM_FIELD_DURATION),diff);
+ sLog->outDebug("Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)",GetEntry(),GetUInt32Value(ITEM_FIELD_DURATION),diff);
if (GetUInt32Value(ITEM_FIELD_DURATION) <= diff)
{
@@ -566,7 +566,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id)
// item can have not null only one from field values
if ((itemProto->RandomProperty) && (itemProto->RandomSuffix))
{
- sLog.outErrorDb("Item template %u have RandomProperty == %u and RandomSuffix == %u, but must have one from field =0",itemProto->ItemId,itemProto->RandomProperty,itemProto->RandomSuffix);
+ sLog->outErrorDb("Item template %u have RandomProperty == %u and RandomSuffix == %u, but must have one from field =0",itemProto->ItemId,itemProto->RandomProperty,itemProto->RandomSuffix);
return 0;
}
@@ -577,7 +577,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id)
ItemRandomPropertiesEntry const *random_id = sItemRandomPropertiesStore.LookupEntry(randomPropId);
if (!random_id)
{
- sLog.outErrorDb("Enchantment id #%u used but it doesn't have records in 'ItemRandomProperties.dbc'",randomPropId);
+ sLog->outErrorDb("Enchantment id #%u used but it doesn't have records in 'ItemRandomProperties.dbc'",randomPropId);
return 0;
}
@@ -590,7 +590,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id)
ItemRandomSuffixEntry const *random_id = sItemRandomSuffixStore.LookupEntry(randomPropId);
if (!random_id)
{
- sLog.outErrorDb("Enchantment id #%u used but it doesn't have records in sItemRandomSuffixStore.",randomPropId);
+ sLog->outErrorDb("Enchantment id #%u used but it doesn't have records in sItemRandomSuffixStore.",randomPropId);
return 0;
}
@@ -680,7 +680,7 @@ void Item::AddToUpdateQueueOf(Player *player)
if (player->GetGUID() != GetOwnerGUID())
{
- sLog.outDebug("Item::AddToUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow());
+ sLog->outDebug("Item::AddToUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow());
return;
}
@@ -700,7 +700,7 @@ void Item::RemoveFromUpdateQueueOf(Player *player)
if (player->GetGUID() != GetOwnerGUID())
{
- sLog.outDebug("Item::RemoveFromUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow());
+ sLog->outDebug("Item::RemoveFromUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow());
return;
}
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
index fb815e63f8a..b21dec552c9 100755
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
@@ -69,13 +69,13 @@ void LoadRandomEnchantmentsTable()
++count;
} while (result->NextRow());
- sLog.outString(">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog.outString();
+ sLog->outString(">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString();
}
else
{
- sLog.outErrorDb(">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty.");
- sLog.outString();
+ sLog->outErrorDb(">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty.");
+ sLog->outString();
}
}
@@ -90,7 +90,7 @@ uint32 GetItemEnchantMod(int32 entry)
EnchantmentStore::const_iterator tab = RandomItemEnch.find(entry);
if (tab == RandomItemEnch.end())
{
- sLog.outErrorDb("Item RandomProperty / RandomSuffix id #%u used in `item_template` but it does not have records in `item_enchantment_template` table.",entry);
+ sLog->outErrorDb("Item RandomProperty / RandomSuffix id #%u used in `item_template` but it does not have records in `item_enchantment_template` table.",entry);
return 0;
}
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 6e75114b003..c184142d23b 100755
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -86,7 +86,7 @@ WorldObject::~WorldObject()
{
if (GetTypeId() == TYPEID_CORPSE)
{
- sLog.outCrash("Object::~Object Corpse guid="UI64FMTD", type=%d, entry=%u deleted but still in map!!", GetGUID(), ((Corpse*)this)->GetType(), GetEntry());
+ sLog->outCrash("Object::~Object Corpse guid="UI64FMTD", type=%d, entry=%u deleted but still in map!!", GetGUID(), ((Corpse*)this)->GetType(), GetEntry());
ASSERT(false);
}
ResetMap();
@@ -97,18 +97,18 @@ Object::~Object()
{
if (IsInWorld())
{
- sLog.outCrash("Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry());
+ sLog->outCrash("Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry());
if (isType(TYPEMASK_ITEM))
- sLog.outCrash("Item slot %u", ((Item*)this)->GetSlot());
+ sLog->outCrash("Item slot %u", ((Item*)this)->GetSlot());
ASSERT(false);
RemoveFromWorld();
}
if (m_objectUpdated)
{
- sLog.outCrash("Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry());
+ sLog->outCrash("Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry());
ASSERT(false);
- sObjectAccessor.RemoveUpdateObject(this);
+ sObjectAccessor->RemoveUpdateObject(this);
}
delete [] m_uint32Values;
@@ -211,7 +211,7 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) c
}
}
- //sLog.outDebug("BuildCreateUpdate: update-type: %u, object-type: %u got flags: %X, flags2: %X", updatetype, m_objectTypeId, flags, flags2);
+ //sLog->outDebug("BuildCreateUpdate: update-type: %u, object-type: %u got flags: %X, flags2: %X", updatetype, m_objectTypeId, flags, flags2);
ByteBuffer buf(500);
buf << (uint8)updatetype;
@@ -635,7 +635,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
// FG: pretend that OTHER players in own group are friendly ("blue")
else if (index == UNIT_FIELD_BYTES_2 || index == UNIT_FIELD_FACTIONTEMPLATE)
{
- if (((Unit*)this)->IsControlledByPlayer() && target != this && sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP) && ((Unit*)this)->IsInRaidWith(target))
+ if (((Unit*)this)->IsControlledByPlayer() && target != this && sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP) && ((Unit*)this)->IsInRaidWith(target))
{
FactionTemplateEntry const *ft1, *ft2;
ft1 = ((Unit*)this)->getFactionTemplateEntry();
@@ -741,7 +741,7 @@ void Object::ClearUpdateMask(bool remove)
if (m_objectUpdated)
{
if (remove)
- sObjectAccessor.RemoveUpdateObject(this);
+ sObjectAccessor->RemoveUpdateObject(this);
m_objectUpdated = false;
}
}
@@ -824,7 +824,7 @@ void Object::SetInt32Value(uint16 index, int32 value)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -843,7 +843,7 @@ void Object::SetUInt32Value(uint16 index, uint32 value)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -869,7 +869,7 @@ void Object::SetUInt64Value(uint16 index, const uint64 &value)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -888,7 +888,7 @@ bool Object::AddUInt64Value(uint16 index, const uint64 &value)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -909,7 +909,7 @@ bool Object::RemoveUInt64Value(uint16 index, const uint64 &value)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -930,7 +930,7 @@ void Object::SetFloatValue(uint16 index, float value)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -943,7 +943,7 @@ void Object::SetByteValue(uint16 index, uint8 offset, uint8 value)
if (offset > 4)
{
- sLog.outError("Object::SetByteValue: wrong offset %u", offset);
+ sLog->outError("Object::SetByteValue: wrong offset %u", offset);
return;
}
@@ -956,7 +956,7 @@ void Object::SetByteValue(uint16 index, uint8 offset, uint8 value)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -969,7 +969,7 @@ void Object::SetUInt16Value(uint16 index, uint8 offset, uint16 value)
if (offset > 2)
{
- sLog.outError("Object::SetUInt16Value: wrong offset %u", offset);
+ sLog->outError("Object::SetUInt16Value: wrong offset %u", offset);
return;
}
@@ -982,7 +982,7 @@ void Object::SetUInt16Value(uint16 index, uint8 offset, uint16 value)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1051,7 +1051,7 @@ void Object::SetFlag(uint16 index, uint32 newFlag)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1074,7 +1074,7 @@ void Object::RemoveFlag(uint16 index, uint32 oldFlag)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1087,7 +1087,7 @@ void Object::SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
if (offset > 4)
{
- sLog.outError("Object::SetByteFlag: wrong offset %u", offset);
+ sLog->outError("Object::SetByteFlag: wrong offset %u", offset);
return;
}
@@ -1099,7 +1099,7 @@ void Object::SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1112,7 +1112,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag)
if (offset > 4)
{
- sLog.outError("Object::RemoveByteFlag: wrong offset %u", offset);
+ sLog->outError("Object::RemoveByteFlag: wrong offset %u", offset);
return;
}
@@ -1124,7 +1124,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1133,7 +1133,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag)
bool Object::PrintIndexError(uint32 index, bool set) const
{
- sLog.outError("Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u",(set ? "set value to" : "get value from"),index,m_valuesCount,GetTypeId(),m_objectType);
+ sLog->outError("Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u",(set ? "set value to" : "get value from"),index,m_valuesCount,GetTypeId(),m_objectType);
// ASSERT must fail after function call
return false;
@@ -1188,34 +1188,34 @@ ByteBuffer & operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const &
void MovementInfo::OutDebug()
{
- sLog.outString("MOVEMENT INFO");
- sLog.outString("guid " UI64FMTD, guid);
- sLog.outString("flags %u", flags);
- sLog.outString("flags2 %u", flags2);
- sLog.outString("time %u current time " UI64FMTD "", flags2, uint64(::time(NULL)));
- sLog.outString("position: `%s`", pos.ToString().c_str());
+ sLog->outString("MOVEMENT INFO");
+ sLog->outString("guid " UI64FMTD, guid);
+ sLog->outString("flags %u", flags);
+ sLog->outString("flags2 %u", flags2);
+ sLog->outString("time %u current time " UI64FMTD "", flags2, uint64(::time(NULL)));
+ sLog->outString("position: `%s`", pos.ToString().c_str());
if (flags & MOVEMENTFLAG_ONTRANSPORT)
{
- sLog.outString("TRANSPORT:");
- sLog.outString("guid: " UI64FMTD, t_guid);
- sLog.outString("position: `%s`", t_pos.ToString().c_str());
- sLog.outString("seat: %i", t_seat);
- sLog.outString("time: %u", t_time);
+ sLog->outString("TRANSPORT:");
+ sLog->outString("guid: " UI64FMTD, t_guid);
+ sLog->outString("position: `%s`", t_pos.ToString().c_str());
+ sLog->outString("seat: %i", t_seat);
+ sLog->outString("time: %u", t_time);
if (flags2 & MOVEMENTFLAG2_INTERPOLATED_MOVEMENT)
- sLog.outString("time2: %u", t_time2);
+ sLog->outString("time2: %u", t_time2);
}
if ((flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING)) || (flags2 & MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING))
{
- sLog.outString("pitch: %f", pitch);
+ sLog->outString("pitch: %f", pitch);
}
- sLog.outString("fallTime: %u", fallTime);
+ sLog->outString("fallTime: %u", fallTime);
if (flags & MOVEMENTFLAG_JUMPING)
{
- sLog.outString("j_zspeed: %f j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", j_zspeed, j_sinAngle, j_cosAngle, j_xyspeed);
+ sLog->outString("j_zspeed: %f j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", j_zspeed, j_sinAngle, j_cosAngle, j_xyspeed);
}
if (flags & MOVEMENTFLAG_SPLINE_ELEVATION)
{
- sLog.outString("splineElevation: %f", splineElevation);
+ sLog->outString("splineElevation: %f", splineElevation);
}
}
@@ -1582,21 +1582,21 @@ void WorldObject::MonsterSay(const char* text, uint32 language, uint64 TargetGui
{
WorldPacket data(SMSG_MESSAGECHAT, 200);
BuildMonsterChat(&data,CHAT_MSG_MONSTER_SAY,text,language,GetName(),TargetGuid);
- SendMessageToSetInRange(&data,sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_SAY),true);
+ SendMessageToSetInRange(&data,sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY),true);
}
void WorldObject::MonsterYell(const char* text, uint32 language, uint64 TargetGuid)
{
WorldPacket data(SMSG_MESSAGECHAT, 200);
BuildMonsterChat(&data,CHAT_MSG_MONSTER_YELL,text,language,GetName(),TargetGuid);
- SendMessageToSetInRange(&data,sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_YELL),true);
+ SendMessageToSetInRange(&data,sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_YELL),true);
}
void WorldObject::MonsterTextEmote(const char* text, uint64 TargetGuid, bool IsBossEmote)
{
WorldPacket data(SMSG_MESSAGECHAT, 200);
BuildMonsterChat(&data,IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE,text,LANG_UNIVERSAL,GetName(),TargetGuid);
- SendMessageToSetInRange(&data,sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),true);
+ SendMessageToSetInRange(&data,sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),true);
}
void WorldObject::MonsterWhisper(const char* text, uint64 receiver, bool IsBossWhisper)
@@ -1861,7 +1861,7 @@ void Object::ForceValuesUpdateAtIndex(uint32 i)
{
if (!m_objectUpdated)
{
- sObjectAccessor.AddUpdateObject(this);
+ sObjectAccessor->AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1901,9 +1901,9 @@ void WorldObject::MonsterSay(int32 textId, uint32 language, uint64 TargetGuid)
Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_SAY, textId,language,TargetGuid);
Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
- Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
+ Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
- cell.Visit(p, message, *GetMap(), *this, sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_SAY));
+ cell.Visit(p, message, *GetMap(), *this, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY));
}
void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid)
@@ -1916,9 +1916,9 @@ void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid)
Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid);
Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
- Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_YELL),say_do);
+ Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_YELL),say_do);
TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
- cell.Visit(p, message, *GetMap(), *this, sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_YELL));
+ cell.Visit(p, message, *GetMap(), *this, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_YELL));
}
void WorldObject::MonsterYellToZone(int32 textId, uint32 language, uint64 TargetGuid)
@@ -1944,9 +1944,9 @@ void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossE
Trinity::MonsterChatBuilder say_build(*this, IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE, textId,LANG_UNIVERSAL,TargetGuid);
Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
- Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),say_do);
+ Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),say_do);
TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
- cell.Visit(p, message, *GetMap(), *this, sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
+ cell.Visit(p, message, *GetMap(), *this, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
}
void WorldObject::MonsterWhisper(int32 textId, uint64 receiver, bool IsBossWhisper)
@@ -2017,7 +2017,7 @@ void WorldObject::SetMap(Map * map)
return;
if (m_currMap)
{
- sLog.outCrash("WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId());
+ sLog->outCrash("WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId());
ASSERT(false);
}
m_currMap = map;
@@ -2052,7 +2052,7 @@ void WorldObject::AddObjectToRemoveList()
Map* map = FindMap();
if (!map)
{
- sLog.outError("Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).",GetTypeId(),GetEntry(),GetGUIDLow(),GetMapId());
+ sLog->outError("Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).",GetTypeId(),GetEntry(),GetGUIDLow(),GetMapId());
return;
}
@@ -2188,7 +2188,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
pet->Relocate(x, y, z, ang);
if (!pet->IsPositionValid())
{
- sLog.outError("Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",pet->GetGUIDLow(),pet->GetEntry(),pet->GetPositionX(),pet->GetPositionY());
+ sLog->outError("Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",pet->GetGUIDLow(),pet->GetEntry(),pet->GetPositionX(),pet->GetPositionY());
delete pet;
return NULL;
}
@@ -2197,7 +2197,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
uint32 pet_number = sObjectMgr->GeneratePetNumber();
if (!pet->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number))
{
- sLog.outError("no such creature entry %u", entry);
+ sLog->outError("no such creature entry %u", entry);
delete pet;
return NULL;
}
@@ -2274,7 +2274,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
GameObjectInfo const* goinfo = ObjectMgr::GetGameObjectInfo(entry);
if (!goinfo)
{
- sLog.outErrorDb("Gameobject template %u not found in database!", entry);
+ sLog->outErrorDb("Gameobject template %u not found in database!", entry);
return NULL;
}
Map *map = GetMap();
@@ -2451,7 +2451,7 @@ void WorldObject::GetNearPoint(WorldObject const* /*searcher*/, float &x, float
/*
// if detection disabled, return first point
- if (!sWorld.getIntConfig(CONFIG_DETECT_POS_COLLISION))
+ if (!sWorld->getIntConfig(CONFIG_DETECT_POS_COLLISION))
{
UpdateGroundPositionZ(x,y,z); // update to LOS height if available
return;
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp
index d7a93ad1dce..41610502fc5 100755
--- a/src/server/game/Entities/Object/Updates/UpdateData.cpp
+++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp
@@ -54,10 +54,10 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
c_stream.opaque = (voidpf)0;
// default Z_BEST_SPEED (1)
- int z_res = deflateInit(&c_stream, sWorld.getIntConfig(CONFIG_COMPRESSION));
+ int z_res = deflateInit(&c_stream, sWorld->getIntConfig(CONFIG_COMPRESSION));
if (z_res != Z_OK)
{
- sLog.outError("Can't compress update packet (zlib: deflateInit) Error code: %i (%s)",z_res,zError(z_res));
+ sLog->outError("Can't compress update packet (zlib: deflateInit) Error code: %i (%s)",z_res,zError(z_res));
*dst_size = 0;
return;
}
@@ -70,14 +70,14 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
z_res = deflate(&c_stream, Z_NO_FLUSH);
if (z_res != Z_OK)
{
- sLog.outError("Can't compress update packet (zlib: deflate) Error code: %i (%s)",z_res,zError(z_res));
+ sLog->outError("Can't compress update packet (zlib: deflate) Error code: %i (%s)",z_res,zError(z_res));
*dst_size = 0;
return;
}
if (c_stream.avail_in != 0)
{
- sLog.outError("Can't compress update packet (zlib: deflate not greedy)");
+ sLog->outError("Can't compress update packet (zlib: deflate not greedy)");
*dst_size = 0;
return;
}
@@ -85,7 +85,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
z_res = deflate(&c_stream, Z_FINISH);
if (z_res != Z_STREAM_END)
{
- sLog.outError("Can't compress update packet (zlib: deflate should report Z_STREAM_END instead %i (%s)",z_res,zError(z_res));
+ sLog->outError("Can't compress update packet (zlib: deflate should report Z_STREAM_END instead %i (%s)",z_res,zError(z_res));
*dst_size = 0;
return;
}
@@ -93,7 +93,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
z_res = deflateEnd(&c_stream);
if (z_res != Z_OK)
{
- sLog.outError("Can't compress update packet (zlib: deflateEnd) Error code: %i (%s)",z_res,zError(z_res));
+ sLog->outError("Can't compress update packet (zlib: deflateEnd) Error code: %i (%s)",z_res,zError(z_res));
*dst_size = 0;
return;
}
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index aafe705f284..688893889bb 100755
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -73,7 +73,7 @@ void Pet::AddToWorld()
if (!IsInWorld())
{
///- Register the pet for guid lookup
- sObjectAccessor.AddObject(this);
+ sObjectAccessor->AddObject(this);
Unit::AddToWorld();
AIM_Initialize();
}
@@ -97,7 +97,7 @@ void Pet::RemoveFromWorld()
{
///- Don't call the function for Creature, normal mobs + totems go in a different storage
Unit::RemoveFromWorld();
- sObjectAccessor.RemoveObject(this);
+ sObjectAccessor->RemoveObject(this);
}
}
@@ -178,7 +178,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
if (!IsPositionValid())
{
- sLog.outError("Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
+ sLog->outError("Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
return false;
}
@@ -224,7 +224,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
break;
default:
if (!IsPetGhoul())
- sLog.outError("Pet have incorrect type (%u) for pet loading.", getPetType());
+ sLog->outError("Pet have incorrect type (%u) for pet loading.", getPetType());
break;
}
@@ -308,7 +308,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
CleanupActionBar(); // remove unknown spells from action bar after load
- sLog.outDebug("New Pet has guid %u", GetGUIDLow());
+ sLog->outDebug("New Pet has guid %u", GetGUIDLow());
owner->PetSpellInitialize();
@@ -518,7 +518,7 @@ void Pet::Update(uint32 diff)
{
if (owner->GetPetGUID() != GetGUID())
{
- sLog.outError("Pet %u is not pet of owner %s, removed", GetEntry(), m_owner->GetName());
+ sLog->outError("Pet %u is not pet of owner %s, removed", GetEntry(), m_owner->GetName());
Remove(getPetType() == HUNTER_PET?PET_SAVE_AS_DELETED:PET_SAVE_NOT_IN_SLOT);
return;
}
@@ -596,7 +596,7 @@ void Creature::Regenerate(Powers power)
case POWER_FOCUS:
{
// For hunter pets.
- addvalue = 24 * sWorld.getRate(RATE_POWER_FOCUS);
+ addvalue = 24 * sWorld->getRate(RATE_POWER_FOCUS);
break;
}
case POWER_ENERGY:
@@ -696,7 +696,7 @@ void Pet::GivePetXP(uint32 xp)
if (!isAlive())
return;
- uint8 maxlevel = std::min((uint8)sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL), GetOwner()->getLevel());
+ uint8 maxlevel = std::min((uint8)sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL), GetOwner()->getLevel());
uint8 petlevel = getLevel();
// If pet is detected to be at, or above(?) the players level, don't hand out XP
@@ -749,7 +749,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
if (!IsPositionValid())
{
- sLog.outError("Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
+ sLog->outError("Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
return false;
}
@@ -757,14 +757,14 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
CreatureInfo const *cinfo = GetCreatureInfo();
if (!cinfo)
{
- sLog.outError("CreateBaseAtCreature() failed, creatureInfo is missing!");
+ sLog->outError("CreateBaseAtCreature() failed, creatureInfo is missing!");
return false;
}
SetDisplayId(creature->GetDisplayId());
if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family))
- SetName(cFamily->Name[sWorld.GetDefaultDbcLocale()]);
+ SetName(cFamily->Name[sWorld->GetDefaultDbcLocale()]);
else
SetName(creature->GetNameForLocaleIdx(sObjectMgr->GetDBCLocaleIndex()));
@@ -777,7 +777,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureInfo const* cinfo, Unit * owner)
return false;
if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family))
- SetName(cFamily->Name[sWorld.GetDefaultDbcLocale()]);
+ SetName(cFamily->Name[sWorld->GetDefaultDbcLocale()]);
Relocate(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ(), owner->GetOrientation());
@@ -786,7 +786,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureInfo const* cinfo, Unit * owner)
bool Pet::CreateBaseAtTamed(CreatureInfo const * cinfo, Map * map, uint32 phaseMask)
{
- sLog.outDebug("Pet::CreateBaseForTamed");
+ sLog->outDebug("Pet::CreateBaseForTamed");
uint32 guid=sObjectMgr->GenerateLowGuid(HIGHGUID_PET);
uint32 pet_number = sObjectMgr->GeneratePetNumber();
if (!Create(guid, map, phaseMask, cinfo->Entry, pet_number))
@@ -832,7 +832,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
m_unitTypeMask |= UNIT_MASK_HUNTER_PET;
}
else
- sLog.outError("Unknown type pet %u is summoned by player class %u", GetEntry(), m_owner->getClass());
+ sLog->outError("Unknown type pet %u is summoned by player class %u", GetEntry(), m_owner->getClass());
}
uint32 creature_ID = (petType == HUNTER_PET) ? 1 : cinfo->Entry;
@@ -1112,7 +1112,7 @@ void Pet::_LoadSpellCooldowns()
if (!sSpellStore.LookupEntry(spell_id))
{
- sLog.outError("Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.",m_charmInfo->GetPetNumber(),spell_id);
+ sLog->outError("Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.",m_charmInfo->GetPetNumber(),spell_id);
continue;
}
@@ -1125,7 +1125,7 @@ void Pet::_LoadSpellCooldowns()
_AddCreatureSpellCooldown(spell_id,db_time);
- sLog.outDebug("Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime));
+ sLog->outDebug("Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime));
}
while (result->NextRow());
@@ -1201,7 +1201,7 @@ void Pet::_SaveSpells(SQLTransaction& trans)
void Pet::_LoadAuras(uint32 timediff)
{
- sLog.outDebug("Loading auras for pet %u",GetGUIDLow());
+ sLog->outDebug("Loading auras for pet %u",GetGUIDLow());
QueryResult result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_mask,recalculate_mask,stackcount,amount0,amount1,amount2,base_amount0,base_amount1,base_amount2,maxduration,remaintime,remaincharges FROM pet_aura WHERE guid = '%u'",m_charmInfo->GetPetNumber());
@@ -1230,7 +1230,7 @@ void Pet::_LoadAuras(uint32 timediff)
SpellEntry const* spellproto = sSpellStore.LookupEntry(spellid);
if (!spellproto)
{
- sLog.outError("Unknown aura (spellid %u), ignore.",spellid);
+ sLog->outError("Unknown aura (spellid %u), ignore.",spellid);
continue;
}
@@ -1261,7 +1261,7 @@ void Pet::_LoadAuras(uint32 timediff)
}
aura->SetLoadedState(maxduration,remaintime,remaincharges,stackcount,recalculatemask,&damage[0]);
aura->ApplyForTargets();
- sLog.outDetail("Added aura spellid %u, effectmask %u", spellproto->Id, effmask);
+ sLog->outDetail("Added aura spellid %u, effectmask %u", spellproto->Id, effmask);
}
}
while (result->NextRow());
@@ -1317,11 +1317,11 @@ bool Pet::addSpell(uint32 spell_id,ActiveStates active /*= ACT_DECIDE*/, PetSpel
// do pet spell book cleanup
if (state == PETSPELL_UNCHANGED) // spell load case
{
- sLog.outError("Pet::addSpell: Non-existed in SpellStore spell #%u request, deleting for all pets in `pet_spell`.",spell_id);
+ sLog->outError("Pet::addSpell: Non-existed in SpellStore spell #%u request, deleting for all pets in `pet_spell`.",spell_id);
CharacterDatabase.PExecute("DELETE FROM pet_spell WHERE spell = '%u'",spell_id);
}
else
- sLog.outError("Pet::addSpell: Non-existed in SpellStore spell #%u request.",spell_id);
+ sLog->outError("Pet::addSpell: Non-existed in SpellStore spell #%u request.",spell_id);
return false;
}
@@ -1770,7 +1770,7 @@ void Pet::InitTalentForLevel()
uint32 Pet::resetTalentsCost() const
{
- int64 days = int64(sWorld.GetGameTime() - m_resetTalentsTime)/DAY;
+ int64 days = int64(sWorld->GetGameTime() - m_resetTalentsTime)/DAY;
// The first time reset costs 10 silver; after 1 day cost is reset to 10 silver
if (m_resetTalentsCost < 10*SILVER || days > 0)
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index afdadc347be..4404ea15bc2 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -433,7 +433,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
m_areaUpdateId = 0;
- m_nextSave = sWorld.getIntConfig(CONFIG_INTERVAL_SAVE);
+ m_nextSave = sWorld->getIntConfig(CONFIG_INTERVAL_SAVE);
clearResurrectRequestData();
@@ -602,7 +602,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
m_ControlledByPlayer = true;
m_isWorldObject = true;
- sWorld.IncreasePlayerCount();
+ sWorld->IncreasePlayerCount();
m_ChampioningFaction = 0;
@@ -650,7 +650,7 @@ Player::~Player ()
delete m_declinedname;
delete m_runes;
- sWorld.DecreasePlayerCount();
+ sWorld->DecreasePlayerCount();
}
void Player::CleanupsBeforeDelete(bool finalCleanup)
@@ -680,7 +680,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(race, class_);
if (!info)
{
- sLog.outError("Player have incorrect race/class pair. Can't be loaded.");
+ sLog->outError("Player have incorrect race/class pair. Can't be loaded.");
return false;
}
@@ -692,7 +692,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(class_);
if (!cEntry)
{
- sLog.outError("Class %u not found in DBC (Wrong DBC files?)",class_);
+ sLog->outError("Class %u not found in DBC (Wrong DBC files?)",class_);
return false;
}
@@ -709,7 +709,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
SetUInt32Value(UNIT_FIELD_BYTES_0, (RaceClassGender | (powertype << 24)));
InitDisplayIds();
- if (sWorld.getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_PVP || sWorld.getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_RPPVP)
+ if (sWorld->getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_PVP || sWorld->getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_RPPVP)
{
SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP);
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
@@ -741,12 +741,12 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
// set starting level
uint32 start_level = getClass() != CLASS_DEATH_KNIGHT
- ? sWorld.getIntConfig(CONFIG_START_PLAYER_LEVEL)
- : sWorld.getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL);
+ ? sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL)
+ : sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL);
if (GetSession()->GetSecurity() >= SEC_MODERATOR)
{
- uint32 gm_level = sWorld.getIntConfig(CONFIG_START_GM_LEVEL);
+ uint32 gm_level = sWorld->getIntConfig(CONFIG_START_GM_LEVEL);
if (gm_level > start_level)
start_level = gm_level;
}
@@ -755,19 +755,19 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
InitRunes();
- SetUInt32Value(PLAYER_FIELD_COINAGE, sWorld.getIntConfig(CONFIG_START_PLAYER_MONEY));
- SetHonorPoints(sWorld.getIntConfig(CONFIG_START_HONOR_POINTS));
- SetArenaPoints(sWorld.getIntConfig(CONFIG_START_ARENA_POINTS));
+ SetUInt32Value(PLAYER_FIELD_COINAGE, sWorld->getIntConfig(CONFIG_START_PLAYER_MONEY));
+ SetHonorPoints(sWorld->getIntConfig(CONFIG_START_HONOR_POINTS));
+ SetArenaPoints(sWorld->getIntConfig(CONFIG_START_ARENA_POINTS));
// start with every map explored
- if (sWorld.getBoolConfig(CONFIG_START_ALL_EXPLORED))
+ if (sWorld->getBoolConfig(CONFIG_START_ALL_EXPLORED))
{
for (uint8 i=0; i<PLAYER_EXPLORED_ZONES_SIZE; i++)
SetFlag(PLAYER_EXPLORED_ZONES_1+i,0xFFFFFFFF);
}
//Reputations if "StartAllReputation" is enabled, -- TODO: Fix this in a better way
- if (sWorld.getBoolConfig(CONFIG_START_ALL_REP))
+ if (sWorld->getBoolConfig(CONFIG_START_ALL_REP))
{
GetReputationMgr().SetReputation(sFactionStore.LookupEntry(942),42999);
GetReputationMgr().SetReputation(sFactionStore.LookupEntry(935),42999);
@@ -938,7 +938,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount)
{
- sLog.outDebug("STORAGE: Creating initial item, itemId = %u, count = %u",titem_id, titem_amount);
+ sLog->outDebug("STORAGE: Creating initial item, itemId = %u, count = %u",titem_id, titem_amount);
// attempt equip by one
while (titem_amount > 0)
@@ -967,7 +967,7 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount)
}
// item can't be added
- sLog.outError("STORAGE: Can't equip or store initial item %u for race %u class %u , error msg = %u",titem_id,getRace(),getClass(),msg);
+ sLog->outError("STORAGE: Can't equip or store initial item %u for race %u class %u , error msg = %u",titem_id,getRace(),getClass(),msg);
return false;
}
@@ -1028,7 +1028,7 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
{
if (type == DAMAGE_FALL) // DealDamage not apply item durability loss at self damage
{
- sLog.outStaticDebug("We are fall to death, loosing 10 percents durability");
+ sLog->outStaticDebug("We are fall to death, loosing 10 percents durability");
DurabilityLossAll(0.10f,false);
// durability lost message
WorldPacket data2(SMSG_DURABILITY_DAMAGE_DEATH, 0);
@@ -1049,7 +1049,7 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
return MINUTE * IN_MILLISECONDS;
case BREATH_TIMER:
{
- if (!isAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) || GetSession()->GetSecurity() >= AccountTypes(sWorld.getIntConfig(CONFIG_DISABLE_BREATHING)))
+ if (!isAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) || GetSession()->GetSecurity() >= AccountTypes(sWorld->getIntConfig(CONFIG_DISABLE_BREATHING)))
return DISABLED_MIRROR_TIMER;
int32 UnderWaterTime = 3 * MINUTE * IN_MILLISECONDS;
AuraEffectList const& mModWaterBreathing = GetAuraEffectsByType(SPELL_AURA_MOD_WATER_BREATHING);
@@ -1271,9 +1271,9 @@ void Player::Update(uint32 p_time)
//ASSERT (!m_spellModTakingSpell);
if ( m_spellModTakingSpell)
{
- //sLog.outCrash("Player has m_pad %u during update!", m_pad);
+ //sLog->outCrash("Player has m_pad %u during update!", m_pad);
//if (m_spellModTakingSpell)
- sLog.outCrash("Player has m_spellModTakingSpell %u during update!", m_spellModTakingSpell->m_spellInfo->Id);
+ sLog->outCrash("Player has m_spellModTakingSpell %u during update!", m_spellModTakingSpell->m_spellInfo->Id);
m_spellModTakingSpell = NULL;
}
@@ -1408,7 +1408,7 @@ void Player::Update(uint32 p_time)
time_t time_inn = time(NULL)-GetTimeInnEnter();
if (time_inn >= 10) // freeze update
{
- float bubble = 0.125f*sWorld.getRate(RATE_REST_INGAME);
+ float bubble = 0.125f*sWorld->getRate(RATE_REST_INGAME);
// speed collect rest bonus (section/in hour)
SetRestBonus(GetRestBonus()+ time_inn*((float)GetUInt32Value(PLAYER_NEXT_LEVEL_XP)/72000)*bubble);
UpdateInnerTime(time(NULL));
@@ -1470,7 +1470,7 @@ void Player::Update(uint32 p_time)
{
// m_nextSave reseted in SaveToDB call
SaveToDB();
- sLog.outDetail("Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow());
+ sLog->outDetail("Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow());
}
else
m_nextSave -= p_time;
@@ -1536,7 +1536,7 @@ void Player::setDeathState(DeathState s)
{
if (!cur)
{
- sLog.outError("setDeathState: attempt to kill a dead player %s(%d)", GetName(), GetGUIDLow());
+ sLog->outError("setDeathState: attempt to kill a dead player %s(%d)", GetName(), GetGUIDLow());
return;
}
@@ -1598,7 +1598,7 @@ bool Player::BuildEnumData(QueryResult result, WorldPacket * p_data)
PlayerInfo const *info = sObjectMgr->GetPlayerInfo(pRace, pClass);
if (!info)
{
- sLog.outError("Player %u has incorrect race/class pair. Don't build enum.", guid);
+ sLog->outError("Player %u has incorrect race/class pair. Don't build enum.", guid);
return false;
}
@@ -1640,7 +1640,7 @@ bool Player::BuildEnumData(QueryResult result, WorldPacket * p_data)
char_flags |= CHARACTER_FLAG_RENAME;
if (fields[20].GetUInt32())
char_flags |= CHARACTER_FLAG_LOCKED_BY_BILLING;
- if (sWorld.getBoolConfig(CONFIG_DECLINED_NAMES_USED))
+ if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED))
{
if (!fields[21].GetString().empty())
char_flags |= CHARACTER_FLAG_DECLINED;
@@ -1808,7 +1808,7 @@ void Player::TeleportOutOfMap(Map *oldMap)
if (GetMap() == oldMap)
{
- sLog.outCrash("Cannot teleport player out of map!");
+ sLog->outCrash("Cannot teleport player out of map!");
ResetMap();
ASSERT(false);
}
@@ -1818,13 +1818,13 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
{
if (!MapManager::IsValidMapCoord(mapid, x, y, z, orientation))
{
- sLog.outError("TeleportTo: invalid map %d or absent instance template.", mapid);
+ sLog->outError("TeleportTo: invalid map %d or absent instance template.", mapid);
return false;
}
if ((GetSession()->GetSecurity() < SEC_GAMEMASTER) && sDisableMgr->IsDisabledFor(DISABLE_TYPE_MAP, mapid, this))
{
- sLog.outError("Player %s tried to enter a forbidden map %u", GetName(), mapid);
+ sLog->outError("Player %s tried to enter a forbidden map %u", GetName(), mapid);
SendTransferAborted(mapid, TRANSFER_ABORT_MAP_NOT_ALLOWED);
return false;
}
@@ -1842,7 +1842,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// client without expansion support
if (GetSession()->Expansion() < mEntry->Expansion())
{
- sLog.outDebug("Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid);
+ sLog->outDebug("Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid);
if (GetTransport())
{
@@ -1859,7 +1859,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
return false; // normal client can't teleport to this map...
}
else
- sLog.outDebug("Player %s is being teleported to map %u", GetName(), mapid);
+ sLog->outDebug("Player %s is being teleported to map %u", GetName(), mapid);
// reset movement flags at teleport, because player will continue move with these flags after teleport
SetUnitMovementFlags(0);
@@ -2162,7 +2162,7 @@ void Player::RemoveFromWorld()
{
if (WorldObject *viewpoint = GetViewpoint())
{
- sLog.outCrash("Player %s has viewpoint %u %u when removed from world", GetName(), viewpoint->GetEntry(), viewpoint->GetTypeId());
+ sLog->outCrash("Player %s has viewpoint %u %u when removed from world", GetName(), viewpoint->GetEntry(), viewpoint->GetTypeId());
SetViewpoint(viewpoint, false);
}
}
@@ -2223,10 +2223,10 @@ void Player::Regenerate(Powers power)
case POWER_MANA:
{
bool recentCast = IsUnderLastManaUseEffect();
- float ManaIncreaseRate = sWorld.getRate(RATE_POWER_MANA);
+ float ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA);
if (getLevel() < 15)
- ManaIncreaseRate = sWorld.getRate(RATE_POWER_MANA) * (2.066f - (getLevel() * 0.066f));
+ ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA) * (2.066f - (getLevel() * 0.066f));
if (recentCast) // Trinity Updates Mana in intervals of 2s, which is correct
addvalue += GetFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER) * ManaIncreaseRate * 0.001f * m_regenTimer;
@@ -2237,18 +2237,18 @@ void Player::Regenerate(Powers power)
{
if (!isInCombat() && !HasAuraType(SPELL_AURA_INTERRUPT_REGEN))
{
- float RageDecreaseRate = sWorld.getRate(RATE_POWER_RAGE_LOSS);
+ float RageDecreaseRate = sWorld->getRate(RATE_POWER_RAGE_LOSS);
addvalue += -20 * RageDecreaseRate; // 2 rage by tick (= 2 seconds => 1 rage/sec)
}
} break;
case POWER_ENERGY: // Regenerate energy (rogue)
- addvalue += 0.01f * m_regenTimer * sWorld.getRate(RATE_POWER_ENERGY);
+ addvalue += 0.01f * m_regenTimer * sWorld->getRate(RATE_POWER_ENERGY);
break;
case POWER_RUNIC_POWER:
{
if (!isInCombat() && !HasAuraType(SPELL_AURA_INTERRUPT_REGEN))
{
- float RunicPowerDecreaseRate = sWorld.getRate(RATE_POWER_RUNICPOWER_LOSS);
+ float RunicPowerDecreaseRate = sWorld->getRate(RATE_POWER_RUNICPOWER_LOSS);
addvalue += -30 * RunicPowerDecreaseRate; // 3 RunicPower by tick
}
} break;
@@ -2329,10 +2329,10 @@ void Player::RegenerateHealth()
if (curValue >= maxValue)
return;
- float HealthIncreaseRate = sWorld.getRate(RATE_HEALTH);
+ float HealthIncreaseRate = sWorld->getRate(RATE_HEALTH);
if (getLevel() < 15)
- HealthIncreaseRate = sWorld.getRate(RATE_HEALTH) * (2.066f - (getLevel() * 0.066f));
+ HealthIncreaseRate = sWorld->getRate(RATE_HEALTH) * (2.066f - (getLevel() * 0.066f));
float addvalue = 0.0f;
@@ -2475,7 +2475,7 @@ GameObject* Player::GetGameObjectIfCanInteractWith(uint64 guid, GameobjectTypes
if (go->IsWithinDistInMap(this, maxdist))
return go;
- sLog.outDebug("IsGameObjectOfTypeInRange: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal 10 is allowed)", go->GetGOInfo()->name,
+ sLog->outDebug("IsGameObjectOfTypeInRange: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal 10 is allowed)", go->GetGOInfo()->name,
go->GetGUIDLow(), GetName(), GetGUIDLow(), go->GetDistance(this));
}
}
@@ -2554,7 +2554,7 @@ void Player::SetGameMaster(bool on)
}
// restore FFA PvP Server state
- if (sWorld.IsFFAPvPRealm())
+ if (sWorld->IsFFAPvPRealm())
SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
// restore FFA PvP area state, remove not allowed for GM mounts
@@ -2588,7 +2588,7 @@ void Player::SetGMVisible(bool on)
bool Player::IsGroupVisibleFor(Player const* p) const
{
- switch(sWorld.getIntConfig(CONFIG_GROUP_VISIBILITY))
+ switch(sWorld->getIntConfig(CONFIG_GROUP_VISIBILITY))
{
default: return IsInSameGroupWith(p);
case 1: return IsInSameRaidWith(p);
@@ -2688,7 +2688,7 @@ void Player::GiveXP(uint32 xp, Unit *victim, float group_rate)
// Favored experience increase END
// XP to money conversion processed in Player::RewardQuest
- if (level >= sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (level >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
return;
uint32 bonus_xp = 0;
@@ -2706,11 +2706,11 @@ void Player::GiveXP(uint32 xp, Unit *victim, float group_rate)
uint32 nextLvlXP = GetUInt32Value(PLAYER_NEXT_LEVEL_XP);
uint32 newXP = curXP + xp + bonus_xp;
- while (newXP >= nextLvlXP && level < sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ while (newXP >= nextLvlXP && level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
newXP -= nextLvlXP;
- if (level < sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
GiveLevel(level + 1);
level = getLevel();
@@ -2777,7 +2777,7 @@ void Player::GiveLevel(uint8 level)
UpdateAllStats();
- if (sWorld.getBoolConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when leveling up
+ if (sWorld->getBoolConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when leveling up
UpdateSkillsToMaxSkillsForLevel();
// set current level health and mana/energy to maximum after applying all mods.
@@ -2821,7 +2821,7 @@ void Player::InitTalentForLevel()
}
else
{
- if (level < sWorld.getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL) || m_specsCount == 0)
+ if (level < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL) || m_specsCount == 0)
{
m_specsCount = 1;
m_activeSpec = 0;
@@ -2857,7 +2857,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
PlayerLevelInfo info;
sObjectMgr->GetPlayerLevelInfo(getRace(),getClass(),getLevel(),&info);
- SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
+ SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
SetUInt32Value(PLAYER_NEXT_LEVEL_XP, sObjectMgr->GetXPForLevel(getLevel()));
// reset before any aura state sources (health set/aura apply)
@@ -3072,7 +3072,7 @@ void Player::SendInitialSpells()
GetSession()->SendPacket(&data);
- sLog.outDetail("CHARACTER: Sent Initial Spells");
+ sLog->outDetail("CHARACTER: Sent Initial Spells");
}
void Player::RemoveMail(uint32 id)
@@ -3153,11 +3153,11 @@ bool Player::AddTalent(uint32 spell_id, uint8 spec, bool learning)
// do character spell book cleanup (all characters)
if (!IsInWorld() && !learning) // spell load case
{
- sLog.outError("Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.",spell_id);
+ sLog->outError("Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.",spell_id);
CharacterDatabase.PExecute("DELETE FROM character_talent WHERE spell = '%u'",spell_id);
}
else
- sLog.outError("Player::addSpell: Non-existed in SpellStore spell #%u request.",spell_id);
+ sLog->outError("Player::addSpell: Non-existed in SpellStore spell #%u request.",spell_id);
return false;
}
@@ -3167,11 +3167,11 @@ bool Player::AddTalent(uint32 spell_id, uint8 spec, bool learning)
// do character spell book cleanup (all characters)
if (!IsInWorld() && !learning) // spell load case
{
- sLog.outError("Player::addTalent: Broken spell #%u learning not allowed, deleting for all characters in `character_talent`.",spell_id);
+ sLog->outError("Player::addTalent: Broken spell #%u learning not allowed, deleting for all characters in `character_talent`.",spell_id);
CharacterDatabase.PExecute("DELETE FROM character_talent WHERE spell = '%u'",spell_id);
}
else
- sLog.outError("Player::addTalent: Broken spell #%u learning not allowed.",spell_id);
+ sLog->outError("Player::addTalent: Broken spell #%u learning not allowed.",spell_id);
return false;
}
@@ -3216,11 +3216,11 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
// do character spell book cleanup (all characters)
if (!IsInWorld() && !learning) // spell load case
{
- sLog.outError("Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.",spell_id);
+ sLog->outError("Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.",spell_id);
CharacterDatabase.PExecute("DELETE FROM character_spell WHERE spell = '%u'",spell_id);
}
else
- sLog.outError("Player::addSpell: Non-existed in SpellStore spell #%u request.",spell_id);
+ sLog->outError("Player::addSpell: Non-existed in SpellStore spell #%u request.",spell_id);
return false;
}
@@ -3230,11 +3230,11 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
// do character spell book cleanup (all characters)
if (!IsInWorld() && !learning) // spell load case
{
- sLog.outError("Player::addSpell: Broken spell #%u learning not allowed, deleting for all characters in `character_spell`.",spell_id);
+ sLog->outError("Player::addSpell: Broken spell #%u learning not allowed, deleting for all characters in `character_spell`.",spell_id);
CharacterDatabase.PExecute("DELETE FROM character_spell WHERE spell = '%u'",spell_id);
}
else
- sLog.outError("Player::addSpell: Broken spell #%u learning not allowed.",spell_id);
+ sLog->outError("Player::addSpell: Broken spell #%u learning not allowed.",spell_id);
return false;
}
@@ -3714,7 +3714,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
if (sSpellMgr->IsPrimaryProfessionFirstRankSpell(spell_id))
{
uint32 freeProfs = GetFreePrimaryProfessionPoints()+1;
- if (freeProfs <= sWorld.getIntConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL))
+ if (freeProfs <= sWorld->getIntConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL))
SetFreePrimaryProfessions(freeProfs);
}
@@ -3847,7 +3847,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
if (spell_id == 674 && m_canDualWield)
SetCanDualWield(false);
- if (sWorld.getBoolConfig(CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN))
+ if (sWorld->getBoolConfig(CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN))
AutoUnequipOffhandIfNeed();
// remove from spell book if not replaced by lesser rank
@@ -3989,7 +3989,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result)
if (!sSpellStore.LookupEntry(spell_id))
{
- sLog.outError("Player %u has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUIDLow(), spell_id);
+ sLog->outError("Player %u has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUIDLow(), spell_id);
continue;
}
@@ -3999,7 +3999,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result)
AddSpellCooldown(spell_id, item_id, db_time);
- sLog.outDebug("Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime));
+ sLog->outDebug("Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime));
}
while (result->NextRow());
}
@@ -4055,7 +4055,7 @@ uint32 Player::resetTalentsCost() const
return 10*GOLD;
else
{
- uint64 months = (sWorld.GetGameTime() - m_resetTalentsTime)/MONTH;
+ uint64 months = (sWorld->GetGameTime() - m_resetTalentsTime)/MONTH;
if (months > 0)
{
// This cost will be reduced by a rate of 5 gold per month
@@ -4093,7 +4093,7 @@ bool Player::resetTalents(bool no_cost)
uint32 cost = 0;
- if (!no_cost && !sWorld.getBoolConfig(CONFIG_NO_RESET_TALENT_COST))
+ if (!no_cost && !sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST))
{
cost = resetTalentsCost();
@@ -4464,8 +4464,8 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
if (accountId == 0)
updateRealmChars = false;
- uint32 charDelete_method = sWorld.getIntConfig(CONFIG_CHARDELETE_METHOD);
- uint32 charDelete_minLvl = sWorld.getIntConfig(CONFIG_CHARDELETE_MIN_LEVEL);
+ uint32 charDelete_method = sWorld->getIntConfig(CONFIG_CHARDELETE_METHOD);
+ uint32 charDelete_minLvl = sWorld->getIntConfig(CONFIG_CHARDELETE_MIN_LEVEL);
// if we want to finally delete the character or the character does not meet the level requirement,
// we set it to mode CHAR_DELETE_REMOVE
@@ -4476,7 +4476,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
// convert corpse to bones if exist (to prevent exiting Corpse in World without DB entry)
// bones will be deleted by corpse/bones deleting thread shortly
- sObjectAccessor.ConvertCorpseForPlayer(playerguid);
+ sObjectAccessor->ConvertCorpseForPlayer(playerguid);
if (uint32 guildId = GetGuildIdFromDB(playerguid))
if (Guild* pGuild = sObjectMgr->GetGuildById(guildId))
@@ -4595,7 +4595,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
{
do
{
- if (Player* pFriend = sObjectAccessor.FindPlayer(MAKE_NEW_GUID((*resultFriends)[0].GetUInt32(), 0, HIGHGUID_PLAYER)))
+ if (Player* pFriend = ObjectAccessor::FindPlayer(MAKE_NEW_GUID((*resultFriends)[0].GetUInt32(), 0, HIGHGUID_PLAYER)))
{
if (pFriend->IsInWorld())
{
@@ -4648,11 +4648,11 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
CharacterDatabase.PExecute("UPDATE characters SET deleteInfos_Name=name, deleteInfos_Account=account, deleteDate='" UI64FMTD "', name='', account=0 WHERE guid=%u", uint64(time(NULL)), guid);
break;
default:
- sLog.outError("Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
+ sLog->outError("Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
}
if (updateRealmChars)
- sWorld.UpdateRealmCharCount(accountId);
+ sWorld->UpdateRealmCharCount(accountId);
}
/**
@@ -4662,7 +4662,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
*/
void Player::DeleteOldCharacters()
{
- uint32 keepDays = sWorld.getIntConfig(CONFIG_CHARDELETE_KEEP_DAYS);
+ uint32 keepDays = sWorld->getIntConfig(CONFIG_CHARDELETE_KEEP_DAYS);
if (!keepDays)
return;
@@ -4678,12 +4678,12 @@ void Player::DeleteOldCharacters()
*/
void Player::DeleteOldCharacters(uint32 keepDays)
{
- sLog.outString("Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays);
+ sLog->outString("Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays);
QueryResult resultChars = CharacterDatabase.PQuery("SELECT guid, deleteInfos_Account FROM characters WHERE deleteDate IS NOT NULL AND deleteDate < '" UI64FMTD "'", uint64(time(NULL) - time_t(keepDays * DAY)));
if (resultChars)
{
- sLog.outString("Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete",resultChars->GetRowCount());
+ sLog->outString("Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete",resultChars->GetRowCount());
do
{
Field *charFields = resultChars->Fetch();
@@ -4702,7 +4702,7 @@ void Player::SetMovement(PlayerMovementType pType)
case MOVE_WATER_WALK: data.Initialize(SMSG_MOVE_WATER_WALK, GetPackGUID().size()+4); break;
case MOVE_LAND_WALK: data.Initialize(SMSG_MOVE_LAND_WALK, GetPackGUID().size()+4); break;
default:
- sLog.outError("Player::SetMovement: Unsupported move type (%d), data not sent to client.",pType);
+ sLog->outError("Player::SetMovement: Unsupported move type (%d), data not sent to client.",pType);
return;
}
data.append(GetPackGUID());
@@ -4731,7 +4731,7 @@ void Player::BuildPlayerRepop()
// the player cannot have a corpse already, only bones which are not returned by GetCorpse
if (GetCorpse())
{
- sLog.outError("BuildPlayerRepop: player %s(%d) already has a corpse", GetName(), GetGUIDLow());
+ sLog->outError("BuildPlayerRepop: player %s(%d) already has a corpse", GetName(), GetGUIDLow());
return;
}
@@ -4740,7 +4740,7 @@ void Player::BuildPlayerRepop()
Corpse *corpse = GetCorpse();
if (!corpse)
{
- sLog.outError("Error creating corpse for Player %s [%u]", GetName(), GetGUIDLow());
+ sLog->outError("Error creating corpse for Player %s [%u]", GetName(), GetGUIDLow());
return;
}
GetMap()->Add(corpse);
@@ -4817,7 +4817,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
//Characters from level 11-19 will suffer from one minute of sickness
//for each level they are above 10.
//Characters level 20 and up suffer from ten minutes of sickness.
- int32 startLevel = sWorld.getIntConfig(CONFIG_DEATH_SICKNESS_LEVEL);
+ int32 startLevel = sWorld->getIntConfig(CONFIG_DEATH_SICKNESS_LEVEL);
if (int32(getLevel()) >= startLevel)
{
@@ -4861,7 +4861,7 @@ bool Player::FallGround(uint8 FallMode)
// Below formula for falling damage is from Player::HandleFall
if (FallMode == 2 && z_diff >= 14.57f)
{
- uint32 damage = std::min(GetMaxHealth(), (uint32)((0.018f*z_diff-0.2426f)*GetMaxHealth()*sWorld.getRate(RATE_DAMAGE_FALL)));
+ uint32 damage = std::min(GetMaxHealth(), (uint32)((0.018f*z_diff-0.2426f)*GetMaxHealth()*sWorld->getRate(RATE_DAMAGE_FALL)));
if (damage > 0) EnvironmentalDamage(DAMAGE_FALL, damage);
}
else if (FallMode == 0)
@@ -4961,19 +4961,19 @@ void Player::CreateCorpse()
corpse->SaveToDB();
// register for player, but not show
- sObjectAccessor.AddCorpse(corpse);
+ sObjectAccessor->AddCorpse(corpse);
}
void Player::SpawnCorpseBones()
{
- if (sObjectAccessor.ConvertCorpseForPlayer(GetGUID()))
+ if (sObjectAccessor->ConvertCorpseForPlayer(GetGUID()))
if (!GetSession()->PlayerLogoutWithSave()) // at logout we will already store the player
SaveToDB(); // prevent loading as ghost without corpse
}
Corpse* Player::GetCorpse() const
{
- return sObjectAccessor.GetCorpseForPlayerGUID(GetGUID());
+ return sObjectAccessor->GetCorpseForPlayerGUID(GetGUID());
}
void Player::DurabilityLossAll(double percent, bool inventory)
@@ -5119,7 +5119,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
DurabilityCostsEntry const *dcost = sDurabilityCostsStore.LookupEntry(ditemProto->ItemLevel);
if (!dcost)
{
- sLog.outError("RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
+ sLog->outError("RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
return TotalCost;
}
@@ -5127,14 +5127,14 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
DurabilityQualityEntry const *dQualitymodEntry = sDurabilityQualityStore.LookupEntry(dQualitymodEntryId);
if (!dQualitymodEntry)
{
- sLog.outError("RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
+ sLog->outError("RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
return TotalCost;
}
uint32 dmultiplier = dcost->multiplier[ItemSubClassToDurabilityMultiplierId(ditemProto->Class,ditemProto->SubClass)];
uint32 costs = uint32(LostDurability*dmultiplier*double(dQualitymodEntry->quality_mod));
- costs = uint32(costs * discountMod * sWorld.getRate(RATE_REPAIRCOST));
+ costs = uint32(costs * discountMod * sWorld->getRate(RATE_REPAIRCOST));
if (costs == 0) //fix for ITEM_QUALITY_ARTIFACT
costs = 1;
@@ -5143,7 +5143,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
{
if (GetGuildId() == 0)
{
- sLog.outStaticDebug("You are not member of a guild");
+ sLog->outStaticDebug("You are not member of a guild");
return TotalCost;
}
@@ -5158,7 +5158,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
}
else if (!HasEnoughMoney(costs))
{
- sLog.outStaticDebug("You do not have enough money");
+ sLog->outStaticDebug("You do not have enough money");
return TotalCost;
}
else
@@ -5254,7 +5254,7 @@ void Player::CleanupChannels()
cMgr->LeftChannel(ch->GetName()); // deleted channel if empty
}
- sLog.outDebug("Player: channels cleaned up!");
+ sLog->outDebug("Player: channels cleaned up!");
}
void Player::UpdateLocalChannels(uint32 newZone)
@@ -5360,7 +5360,7 @@ void Player::LeaveLFGChannel()
void Player::UpdateDefense()
{
- uint32 defense_skill_gain = sWorld.getIntConfig(CONFIG_SKILL_GAIN_DEFENSE);
+ uint32 defense_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_DEFENSE);
if (UpdateSkill(SKILL_DEFENSE,defense_skill_gain))
{
@@ -5373,7 +5373,7 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa
{
if (modGroup >= BASEMOD_END || modType >= MOD_END)
{
- sLog.outError("ERROR in HandleBaseModValue(): non existed BaseModGroup of wrong BaseModType!");
+ sLog->outError("ERROR in HandleBaseModValue(): non existed BaseModGroup of wrong BaseModType!");
return;
}
@@ -5406,7 +5406,7 @@ float Player::GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const
{
if (modGroup >= BASEMOD_END || modType > MOD_END)
{
- sLog.outError("trial to access non existed BaseModGroup or wrong BaseModType!");
+ sLog->outError("trial to access non existed BaseModGroup or wrong BaseModType!");
return 0.0f;
}
@@ -5420,7 +5420,7 @@ float Player::GetTotalBaseModValue(BaseModGroup modGroup) const
{
if (modGroup >= BASEMOD_END)
{
- sLog.outError("wrong BaseModGroup in GetTotalBaseModValue()!");
+ sLog->outError("wrong BaseModGroup in GetTotalBaseModValue()!");
return 0.0f;
}
@@ -5776,17 +5776,17 @@ bool Player::UpdateSkill(uint32 skill_id, uint32 step)
inline int SkillGainChance(uint32 SkillValue, uint32 GrayLevel, uint32 GreenLevel, uint32 YellowLevel)
{
if (SkillValue >= GrayLevel)
- return sWorld.getIntConfig(CONFIG_SKILL_CHANCE_GREY)*10;
+ return sWorld->getIntConfig(CONFIG_SKILL_CHANCE_GREY)*10;
if (SkillValue >= GreenLevel)
- return sWorld.getIntConfig(CONFIG_SKILL_CHANCE_GREEN)*10;
+ return sWorld->getIntConfig(CONFIG_SKILL_CHANCE_GREEN)*10;
if (SkillValue >= YellowLevel)
- return sWorld.getIntConfig(CONFIG_SKILL_CHANCE_YELLOW)*10;
- return sWorld.getIntConfig(CONFIG_SKILL_CHANCE_ORANGE)*10;
+ return sWorld->getIntConfig(CONFIG_SKILL_CHANCE_YELLOW)*10;
+ return sWorld->getIntConfig(CONFIG_SKILL_CHANCE_ORANGE)*10;
}
bool Player::UpdateCraftSkill(uint32 spellid)
{
- sLog.outDebug("UpdateCraftSkill spellid %d", spellid);
+ sLog->outDebug("UpdateCraftSkill spellid %d", spellid);
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellid);
@@ -5804,7 +5804,7 @@ bool Player::UpdateCraftSkill(uint32 spellid)
learnSpell(discoveredSpell, false);
}
- uint32 craft_skill_gain = sWorld.getIntConfig(CONFIG_SKILL_GAIN_CRAFTING);
+ uint32 craft_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_CRAFTING);
return UpdateSkillPro(_spell_idx->second->skillId, SkillGainChance(SkillValue,
_spell_idx->second->max_value,
@@ -5818,9 +5818,9 @@ bool Player::UpdateCraftSkill(uint32 spellid)
bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLevel, uint32 Multiplicator)
{
- sLog.outDebug("UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)", SkillId, SkillValue, RedLevel);
+ sLog->outDebug("UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)", SkillId, SkillValue, RedLevel);
- uint32 gathering_skill_gain = sWorld.getIntConfig(CONFIG_SKILL_GAIN_GATHERING);
+ uint32 gathering_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_GATHERING);
// For skinning and Mining chance decrease with level. 1-74 - no decrease, 75-149 - 2 times, 225-299 - 8 times
switch (SkillId)
@@ -5831,28 +5831,28 @@ bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLeve
case SKILL_INSCRIPTION:
return UpdateSkillPro(SkillId, SkillGainChance(SkillValue, RedLevel+100, RedLevel+50, RedLevel+25)*Multiplicator,gathering_skill_gain);
case SKILL_SKINNING:
- if (sWorld.getIntConfig(CONFIG_SKILL_CHANCE_SKINNING_STEPS) == 0)
+ if (sWorld->getIntConfig(CONFIG_SKILL_CHANCE_SKINNING_STEPS) == 0)
return UpdateSkillPro(SkillId, SkillGainChance(SkillValue, RedLevel+100, RedLevel+50, RedLevel+25)*Multiplicator,gathering_skill_gain);
else
- return UpdateSkillPro(SkillId, (SkillGainChance(SkillValue, RedLevel+100, RedLevel+50, RedLevel+25)*Multiplicator) >> (SkillValue/sWorld.getIntConfig(CONFIG_SKILL_CHANCE_SKINNING_STEPS)), gathering_skill_gain);
+ return UpdateSkillPro(SkillId, (SkillGainChance(SkillValue, RedLevel+100, RedLevel+50, RedLevel+25)*Multiplicator) >> (SkillValue/sWorld->getIntConfig(CONFIG_SKILL_CHANCE_SKINNING_STEPS)), gathering_skill_gain);
case SKILL_MINING:
- if (sWorld.getIntConfig(CONFIG_SKILL_CHANCE_MINING_STEPS) == 0)
+ if (sWorld->getIntConfig(CONFIG_SKILL_CHANCE_MINING_STEPS) == 0)
return UpdateSkillPro(SkillId, SkillGainChance(SkillValue, RedLevel+100, RedLevel+50, RedLevel+25)*Multiplicator,gathering_skill_gain);
else
- return UpdateSkillPro(SkillId, (SkillGainChance(SkillValue, RedLevel+100, RedLevel+50, RedLevel+25)*Multiplicator) >> (SkillValue/sWorld.getIntConfig(CONFIG_SKILL_CHANCE_MINING_STEPS)),gathering_skill_gain);
+ return UpdateSkillPro(SkillId, (SkillGainChance(SkillValue, RedLevel+100, RedLevel+50, RedLevel+25)*Multiplicator) >> (SkillValue/sWorld->getIntConfig(CONFIG_SKILL_CHANCE_MINING_STEPS)),gathering_skill_gain);
}
return false;
}
bool Player::UpdateFishingSkill()
{
- sLog.outDebug("UpdateFishingSkill");
+ sLog->outDebug("UpdateFishingSkill");
uint32 SkillValue = GetPureSkillValue(SKILL_FISHING);
int32 chance = SkillValue < 75 ? 100 : 2500/(SkillValue-50);
- uint32 gathering_skill_gain = sWorld.getIntConfig(CONFIG_SKILL_GAIN_GATHERING);
+ uint32 gathering_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_GATHERING);
return UpdateSkillPro(SKILL_FISHING,chance*10,gathering_skill_gain);
}
@@ -5864,13 +5864,13 @@ static uint32 bonusSkillLevels[] = {75,150,225,300,375,450};
bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
{
- sLog.outDebug("UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance/10.0);
+ sLog->outDebug("UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance/10.0);
if (!SkillId)
return false;
if (Chance <= 0) // speedup in 0 chance case
{
- sLog.outDebug("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0);
+ sLog->outDebug("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0);
return false;
}
@@ -5908,11 +5908,11 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
}
UpdateSkillEnchantments(SkillId, SkillValue, new_value);
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL,SkillId);
- sLog.outDebug("Player::UpdateSkillPro Chance=%3.1f%% taken", Chance/10.0);
+ sLog->outDebug("Player::UpdateSkillPro Chance=%3.1f%% taken", Chance/10.0);
return true;
}
- sLog.outDebug("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0);
+ sLog->outDebug("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0);
return false;
}
@@ -5932,7 +5932,7 @@ void Player::UpdateWeaponSkill (WeaponAttackType attType)
if (pVictim && pVictim->GetTypeId() == TYPEID_UNIT && (pVictim->ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_SKILLGAIN))
return;
- uint32 weapon_skill_gain = sWorld.getIntConfig(CONFIG_SKILL_GAIN_WEAPON);
+ uint32 weapon_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_WEAPON);
switch(attType)
{
@@ -6017,10 +6017,10 @@ void Player::ModifySkillBonus(uint32 skillid,int32 val, bool talent)
void Player::UpdateSkillsForLevel()
{
- uint16 maxconfskill = sWorld.GetConfigMaxSkillValue();
+ uint16 maxconfskill = sWorld->GetConfigMaxSkillValue();
uint32 maxSkill = GetMaxSkillValueForLevel();
- bool alwaysMaxSkill = sWorld.getBoolConfig(CONFIG_ALWAYS_MAX_SKILL_FOR_LEVEL);
+ bool alwaysMaxSkill = sWorld->getBoolConfig(CONFIG_ALWAYS_MAX_SKILL_FOR_LEVEL);
for (SkillStatusMap::iterator itr = mSkillStatus.begin(); itr != mSkillStatus.end(); ++itr)
{
@@ -6148,7 +6148,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(id);
if (!pSkill)
{
- sLog.outError("Skill not found in SkillLineStore: skill #%u", id);
+ sLog->outError("Skill not found in SkillLineStore: skill #%u", id);
return;
}
@@ -6308,7 +6308,7 @@ int16 Player::GetSkillTempBonusValue(uint32 skill) const
void Player::SendActionButtons(uint32 state) const
{
- sLog.outDetail("Sending Action Buttons for '%u' spec '%u'", GetGUIDLow(), m_activeSpec);
+ sLog->outDetail("Sending Action Buttons for '%u' spec '%u'", GetGUIDLow(), m_activeSpec);
WorldPacket data(SMSG_ACTION_BUTTONS, 1+(MAX_ACTION_BUTTONS*4));
data << uint8(state);
@@ -6331,20 +6331,20 @@ void Player::SendActionButtons(uint32 state) const
}
GetSession()->SendPacket(&data);
- sLog.outDetail("Action Buttons for '%u' spec '%u' Sent", GetGUIDLow(), m_activeSpec);
+ sLog->outDetail("Action Buttons for '%u' spec '%u' Sent", GetGUIDLow(), m_activeSpec);
}
bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
{
if (button >= MAX_ACTION_BUTTONS)
{
- sLog.outError( "Action %u not added into button %u for player %s: button must be < %u", action, button, GetName(), MAX_ACTION_BUTTONS );
+ sLog->outError( "Action %u not added into button %u for player %s: button must be < %u", action, button, GetName(), MAX_ACTION_BUTTONS );
return false;
}
if (action >= MAX_ACTION_BUTTON_ACTION_VALUE)
{
- sLog.outError( "Action %u not added into button %u for player %s: action must be < %u", action, button, GetName(), MAX_ACTION_BUTTON_ACTION_VALUE );
+ sLog->outError( "Action %u not added into button %u for player %s: action must be < %u", action, button, GetName(), MAX_ACTION_BUTTON_ACTION_VALUE );
return false;
}
@@ -6353,20 +6353,20 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
case ACTION_BUTTON_SPELL:
if (!sSpellStore.LookupEntry(action))
{
- sLog.outError( "Spell action %u not added into button %u for player %s: spell not exist", action, button, GetName() );
+ sLog->outError( "Spell action %u not added into button %u for player %s: spell not exist", action, button, GetName() );
return false;
}
if (!HasSpell(action))
{
- sLog.outError( "Spell action %u not added into button %u for player %s: player don't known this spell", action, button, GetName() );
+ sLog->outError( "Spell action %u not added into button %u for player %s: player don't known this spell", action, button, GetName() );
return false;
}
break;
case ACTION_BUTTON_ITEM:
if (!ObjectMgr::GetItemPrototype(action))
{
- sLog.outError( "Item action %u not added into button %u for player %s: item not exist", action, button, GetName() );
+ sLog->outError( "Item action %u not added into button %u for player %s: item not exist", action, button, GetName() );
return false;
}
break;
@@ -6388,7 +6388,7 @@ ActionButton* Player::addActionButton(uint8 button, uint32 action, uint8 type)
// set data and update to CHANGED if not NEW
ab.SetActionAndType(action,ActionButtonType(type));
- sLog.outDetail("Player '%u' Added Action '%u' (type %u) to Button '%u'", GetGUIDLow(), action, type, button);
+ sLog->outDetail("Player '%u' Added Action '%u' (type %u) to Button '%u'", GetGUIDLow(), action, type, button);
return &ab;
}
@@ -6403,7 +6403,7 @@ void Player::removeActionButton(uint8 button)
else
buttonItr->second.uState = ACTIONBUTTON_DELETED; // saved, will deleted at next save
- sLog.outDetail("Action Button '%u' Removed from Player '%u'", button, GetGUIDLow());
+ sLog->outDetail("Action Button '%u' Removed from Player '%u'", button, GetGUIDLow());
}
ActionButton const* Player::GetActionButton(uint8 button)
@@ -6517,7 +6517,7 @@ void Player::CheckAreaExploreAndOutdoor()
bool isOutdoor;
uint16 areaFlag = GetBaseMap()->GetAreaFlag(GetPositionX(),GetPositionY(),GetPositionZ(), &isOutdoor);
- if (sWorld.getBoolConfig(CONFIG_VMAP_INDOOR_CHECK) && !isOutdoor)
+ if (sWorld->getBoolConfig(CONFIG_VMAP_INDOOR_CHECK) && !isOutdoor)
RemoveAurasWithAttribute(SPELL_ATTR0_OUTDOORS_ONLY);
if (areaFlag==0xffff)
@@ -6526,7 +6526,7 @@ void Player::CheckAreaExploreAndOutdoor()
if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
- sLog.outError("Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).",areaFlag,GetPositionX(),GetPositionY(),offset,offset, PLAYER_EXPLORED_ZONES_SIZE);
+ sLog->outError("Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).",areaFlag,GetPositionX(),GetPositionY(),offset,offset, PLAYER_EXPLORED_ZONES_SIZE);
return;
}
@@ -6542,12 +6542,12 @@ void Player::CheckAreaExploreAndOutdoor()
AreaTableEntry const *p = GetAreaEntryByAreaFlagAndMap(areaFlag,GetMapId());
if (!p)
{
- sLog.outError("PLAYER: Player %u discovered unknown area (x: %f y: %f map: %u", GetGUIDLow(), GetPositionX(),GetPositionY(),GetMapId());
+ sLog->outError("PLAYER: Player %u discovered unknown area (x: %f y: %f map: %u", GetGUIDLow(), GetPositionX(),GetPositionY(),GetMapId());
}
else if (p->area_level > 0)
{
uint32 area = p->ID;
- if (getLevel() >= sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
SendExplorationExperience(area,0);
}
@@ -6557,7 +6557,7 @@ void Player::CheckAreaExploreAndOutdoor()
uint32 XP = 0;
if (diff < -5)
{
- XP = uint32(sObjectMgr->GetBaseXP(getLevel()+5)*sWorld.getRate(RATE_XP_EXPLORE));
+ XP = uint32(sObjectMgr->GetBaseXP(getLevel()+5)*sWorld->getRate(RATE_XP_EXPLORE));
}
else if (diff > 5)
{
@@ -6567,17 +6567,17 @@ void Player::CheckAreaExploreAndOutdoor()
else if (exploration_percent < 0)
exploration_percent = 0;
- XP = uint32(sObjectMgr->GetBaseXP(p->area_level)*exploration_percent/100*sWorld.getRate(RATE_XP_EXPLORE));
+ XP = uint32(sObjectMgr->GetBaseXP(p->area_level)*exploration_percent/100*sWorld->getRate(RATE_XP_EXPLORE));
}
else
{
- XP = uint32(sObjectMgr->GetBaseXP(p->area_level)*sWorld.getRate(RATE_XP_EXPLORE));
+ XP = uint32(sObjectMgr->GetBaseXP(p->area_level)*sWorld->getRate(RATE_XP_EXPLORE));
}
GiveXP(XP, NULL);
SendExplorationExperience(area,XP);
}
- sLog.outDetail("PLAYER: Player %u discovered a new area: %u", GetGUIDLow(), area);
+ sLog->outDetail("PLAYER: Player %u discovered a new area: %u", GetGUIDLow(), area);
}
}
}
@@ -6587,7 +6587,7 @@ uint32 Player::TeamForRace(uint8 race)
ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(race);
if (!rEntry)
{
- sLog.outError("Race %u not found in DBC: wrong DBC files?",uint32(race));
+ sLog->outError("Race %u not found in DBC: wrong DBC files?",uint32(race));
return ALLIANCE;
}
@@ -6597,7 +6597,7 @@ uint32 Player::TeamForRace(uint8 race)
case 1: return HORDE;
}
- sLog.outError("Race %u have wrong teamid %u in DBC: wrong DBC files?",uint32(race),rEntry->TeamID);
+ sLog->outError("Race %u have wrong teamid %u in DBC: wrong DBC files?",uint32(race),rEntry->TeamID);
return ALLIANCE;
}
@@ -6606,7 +6606,7 @@ uint32 Player::getFactionForRace(uint8 race)
ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(race);
if (!rEntry)
{
- sLog.outError("Race %u not found in DBC: wrong DBC files?",uint32(race));
+ sLog->outError("Race %u not found in DBC: wrong DBC files?",uint32(race));
return 0;
}
@@ -6637,7 +6637,7 @@ int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, in
percent *= repRate;
}
- float rate = for_quest ? sWorld.getRate(RATE_REPUTATION_LOWLEVEL_QUEST) : sWorld.getRate(RATE_REPUTATION_LOWLEVEL_KILL);
+ float rate = for_quest ? sWorld->getRate(RATE_REPUTATION_LOWLEVEL_QUEST) : sWorld->getRate(RATE_REPUTATION_LOWLEVEL_KILL);
if (rate != 1.0f && creatureOrQuestLevel <= Trinity::XP::GetGrayLevel(getLevel()))
percent *= rate;
@@ -6710,7 +6710,7 @@ void Player::RewardReputation(Unit *pVictim, float rate)
donerep1 = int32(donerep1*(rate + favored_rep_mult));
if (recruitAFriend)
- donerep1 = int32(donerep1 * (1 + sWorld.getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
+ donerep1 = int32(donerep1 * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->repfaction1);
uint32 current_reputation_rank1 = GetReputationMgr().GetRank(factionEntry1);
@@ -6724,7 +6724,7 @@ void Player::RewardReputation(Unit *pVictim, float rate)
donerep2 = int32(donerep2*(rate + favored_rep_mult));
if (recruitAFriend)
- donerep2 = int32(donerep2 * (1 + sWorld.getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
+ donerep2 = int32(donerep2 * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->repfaction2);
uint32 current_reputation_rank2 = GetReputationMgr().GetRank(factionEntry2);
@@ -6748,7 +6748,7 @@ void Player::RewardReputation(Quest const *pQuest)
int32 rep = CalculateReputationGain(GetQuestLevel(pQuest), pQuest->RewRepValue[i]/100, pQuest->RewRepFaction[i], true, true);
if (recruitAFriend)
- rep = int32(rep * (1 + sWorld.getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
+ rep = int32(rep * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(pQuest->RewRepFaction[i]))
GetReputationMgr().ModifyReputation(factionEntry, rep);
@@ -6768,7 +6768,7 @@ void Player::RewardReputation(Quest const *pQuest)
repPoints = CalculateReputationGain(GetQuestLevel(pQuest), repPoints, pQuest->RewRepFaction[i], true);
if (recruitAFriend)
- repPoints = int32(repPoints * (1 + sWorld.getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
+ repPoints = int32(repPoints * (1 + sWorld->getRate(RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS)));
if (const FactionEntry* factionEntry = sFactionStore.LookupEntry(pQuest->RewRepFaction[i]))
GetReputationMgr().ModifyReputation(factionEntry, repPoints);
@@ -6854,7 +6854,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, int32 honor, bool pvpt
{
Player *pVictim = uVictim->ToPlayer();
- if (GetTeam() == pVictim->GetTeam() && !sWorld.IsFFAPvPRealm())
+ if (GetTeam() == pVictim->GetTeam() && !sWorld->IsFFAPvPRealm())
return false;
uint8 k_level = getLevel();
@@ -6916,7 +6916,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, int32 honor, bool pvpt
AddPctN(honor_f, GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HONOR_GAIN_PCT));
}
- honor_f *= sWorld.getRate(RATE_HONOR);
+ honor_f *= sWorld->getRate(RATE_HONOR);
// Back to int now
honor = int32(honor_f);
// honor - for show honor points in log
@@ -6944,7 +6944,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, int32 honor, bool pvpt
}
}
- if (sWorld.getBoolConfig(CONFIG_PVP_TOKEN_ENABLE) && pvptoken)
+ if (sWorld->getBoolConfig(CONFIG_PVP_TOKEN_ENABLE) && pvptoken)
{
if (!uVictim || uVictim == this || uVictim->HasAuraType(SPELL_AURA_NO_PVP_CREDIT))
return true;
@@ -6952,14 +6952,14 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, int32 honor, bool pvpt
if (uVictim->GetTypeId() == TYPEID_PLAYER)
{
// Check if allowed to receive it in current map
- uint8 MapType = sWorld.getIntConfig(CONFIG_PVP_TOKEN_MAP_TYPE);
+ uint8 MapType = sWorld->getIntConfig(CONFIG_PVP_TOKEN_MAP_TYPE);
if ((MapType == 1 && !InBattleground() && !HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
|| (MapType == 2 && !HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
|| (MapType == 3 && !InBattleground()))
return true;
- uint32 itemId = sWorld.getIntConfig(CONFIG_PVP_TOKEN_ID);
- int32 count = sWorld.getIntConfig(CONFIG_PVP_TOKEN_COUNT);
+ uint32 itemId = sWorld->getIntConfig(CONFIG_PVP_TOKEN_ID);
+ int32 count = sWorld->getIntConfig(CONFIG_PVP_TOKEN_COUNT);
if(AddItem(itemId, count))
ChatHandler(this).PSendSysMessage("You have been awarded a token for slaying another player.");
@@ -6973,26 +6973,26 @@ void Player::ModifyHonorPoints(int32 value)
{
if (value < 0)
{
- if (GetHonorPoints() > sWorld.getIntConfig(CONFIG_MAX_HONOR_POINTS))
- SetHonorPoints(sWorld.getIntConfig(CONFIG_MAX_HONOR_POINTS) + value);
+ if (GetHonorPoints() > sWorld->getIntConfig(CONFIG_MAX_HONOR_POINTS))
+ SetHonorPoints(sWorld->getIntConfig(CONFIG_MAX_HONOR_POINTS) + value);
else
SetHonorPoints(GetHonorPoints() > uint32(-value) ? GetHonorPoints() + value : 0);
}
else
- SetHonorPoints(GetHonorPoints() < sWorld.getIntConfig(CONFIG_MAX_HONOR_POINTS) - value ? GetHonorPoints() + value : sWorld.getIntConfig(CONFIG_MAX_HONOR_POINTS));
+ SetHonorPoints(GetHonorPoints() < sWorld->getIntConfig(CONFIG_MAX_HONOR_POINTS) - value ? GetHonorPoints() + value : sWorld->getIntConfig(CONFIG_MAX_HONOR_POINTS));
}
void Player::ModifyArenaPoints(int32 value)
{
if (value < 0)
{
- if (GetArenaPoints() > sWorld.getIntConfig(CONFIG_MAX_ARENA_POINTS))
- SetArenaPoints(sWorld.getIntConfig(CONFIG_MAX_ARENA_POINTS) + value);
+ if (GetArenaPoints() > sWorld->getIntConfig(CONFIG_MAX_ARENA_POINTS))
+ SetArenaPoints(sWorld->getIntConfig(CONFIG_MAX_ARENA_POINTS) + value);
else
SetArenaPoints(GetArenaPoints() > uint32(-value) ? GetArenaPoints() + value : 0);
}
else
- SetArenaPoints(GetArenaPoints() < sWorld.getIntConfig(CONFIG_MAX_ARENA_POINTS) - value ? GetArenaPoints() + value : sWorld.getIntConfig(CONFIG_MAX_ARENA_POINTS));
+ SetArenaPoints(GetArenaPoints() < sWorld->getIntConfig(CONFIG_MAX_ARENA_POINTS) - value ? GetArenaPoints() + value : sWorld->getIntConfig(CONFIG_MAX_ARENA_POINTS));
}
uint32 Player::GetGuildIdFromDB(uint64 guid)
@@ -7101,7 +7101,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
if (!zone)
return;
- if (sWorld.getBoolConfig(CONFIG_WEATHER))
+ if (sWorld->getBoolConfig(CONFIG_WEATHER))
{
Weather *wth = sWeatherMgr->FindWeather(zone->ID);
if (wth)
@@ -7121,14 +7121,14 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
switch (zone->team)
{
case AREATEAM_ALLY:
- pvpInfo.inHostileArea = GetTeam() != ALLIANCE && (sWorld.IsPvPRealm() || zone->flags & AREA_FLAG_CAPITAL);
+ pvpInfo.inHostileArea = GetTeam() != ALLIANCE && (sWorld->IsPvPRealm() || zone->flags & AREA_FLAG_CAPITAL);
break;
case AREATEAM_HORDE:
- pvpInfo.inHostileArea = GetTeam() != HORDE && (sWorld.IsPvPRealm() || zone->flags & AREA_FLAG_CAPITAL);
+ pvpInfo.inHostileArea = GetTeam() != HORDE && (sWorld->IsPvPRealm() || zone->flags & AREA_FLAG_CAPITAL);
break;
case AREATEAM_NONE:
// overwrite for battlegrounds, maybe batter some zone flags but current known not 100% fit to this
- pvpInfo.inHostileArea = sWorld.IsPvPRealm() || InBattleground() || zone->flags & AREA_FLAG_OUTDOOR_PVP;
+ pvpInfo.inHostileArea = sWorld->IsPvPRealm() || InBattleground() || zone->flags & AREA_FLAG_OUTDOOR_PVP;
break;
default: // 6 in fact
pvpInfo.inHostileArea = false;
@@ -7232,7 +7232,7 @@ void Player::CheckDuelDistance(time_t currTime)
bool Player::IsOutdoorPvPActive()
{
- return isAlive() && !HasInvisibilityAura() && !HasStealthAura() && (IsPvP() || sWorld.IsPvPRealm()) && !HasUnitMovementFlag(MOVEMENTFLAG_FLYING) && !isInFlight();
+ return isAlive() && !HasInvisibilityAura() && !HasStealthAura() && (IsPvP() || sWorld->IsPvPRealm()) && !HasUnitMovementFlag(MOVEMENTFLAG_FLYING) && !isInFlight();
}
void Player::DuelComplete(DuelCompleteType type)
@@ -7241,7 +7241,7 @@ void Player::DuelComplete(DuelCompleteType type)
if (!duel)
return;
- sLog.outDebug("Duel Complete %s %s", GetName(), duel->opponent->GetName());
+ sLog->outDebug("Duel Complete %s %s", GetName(), duel->opponent->GetName());
WorldPacket data(SMSG_DUEL_COMPLETE, (1));
data << (uint8)((type != DUEL_INTERUPTED) ? 1 : 0);
@@ -7332,7 +7332,7 @@ void Player::DuelComplete(DuelCompleteType type)
duel->opponent->ClearComboPoints();
// Honor points after duel (the winner) - ImpConfig
- if (uint32 amount = sWorld.getIntConfig(CONFIG_HONOR_AFTER_DUEL))
+ if (uint32 amount = sWorld->getIntConfig(CONFIG_HONOR_AFTER_DUEL))
duel->opponent->RewardHonor(NULL,1,amount);
//cleanups
@@ -7363,7 +7363,7 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply)
if (item->IsBroken())
return;
- sLog.outDetail("applying mods for item %u ",item->GetGUIDLow());
+ sLog->outDetail("applying mods for item %u ",item->GetGUIDLow());
uint8 attacktype = Player::GetAttackBySlot(slot);
@@ -7385,7 +7385,7 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply)
ApplyItemEquipSpell(item,apply);
ApplyEnchantment(item, apply);
- sLog.outDebug("_ApplyItemMods complete.");
+ sLog->outDebug("_ApplyItemMods complete.");
}
void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool apply, bool only_level_scale /*= false*/)
@@ -7667,7 +7667,7 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl
{
damage = apply ? minDamage : BASE_MINDAMAGE;
SetBaseWeaponDamage(attType, MINDAMAGE, damage);
- //sLog.outError("applying mindam: assigning %f to weapon mindamage, now is: %f", damage, GetWeaponDamageRange(attType, MINDAMAGE));
+ //sLog->outError("applying mindam: assigning %f to weapon mindamage, now is: %f", damage, GetWeaponDamageRange(attType, MINDAMAGE));
}
if (maxDamage > 0)
@@ -7820,7 +7820,7 @@ void Player::ApplyEquipSpell(SpellEntry const* spellInfo, Item* item, bool apply
return;
}
- sLog.outStaticDebug("WORLD: cast %s Equip spellId - %i", (item ? "item" : "itemset"), spellInfo->Id);
+ sLog->outStaticDebug("WORLD: cast %s Equip spellId - %i", (item ? "item" : "itemset"), spellInfo->Id);
CastSpell(this,spellInfo,true,item);
}
@@ -7926,7 +7926,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellData.SpellId);
if (!spellInfo)
{
- sLog.outError("WORLD: unknown Item spellid %i", spellData.SpellId);
+ sLog->outError("WORLD: unknown Item spellid %i", spellData.SpellId);
continue;
}
@@ -7993,7 +7993,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
SpellEntry const *spellInfo = sSpellStore.LookupEntry(pEnchant->spellid[s]);
if (!spellInfo)
{
- sLog.outError("Player::CastItemCombatSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
+ sLog->outError("Player::CastItemCombatSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
continue;
}
@@ -8037,7 +8037,7 @@ void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 c
SpellEntry const *spellInfo = sSpellStore.LookupEntry(learn_spell_id);
if (!spellInfo)
{
- sLog.outError("Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ",proto->ItemId, learn_spell_id);
+ sLog->outError("Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ",proto->ItemId, learn_spell_id);
SendEquipError(EQUIP_ERR_NONE,item,NULL);
return;
}
@@ -8069,7 +8069,7 @@ void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 c
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellData.SpellId);
if (!spellInfo)
{
- sLog.outError("Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring",proto->ItemId, spellData.SpellId);
+ sLog->outError("Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring",proto->ItemId, spellData.SpellId);
continue;
}
@@ -8097,7 +8097,7 @@ void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 c
SpellEntry const *spellInfo = sSpellStore.LookupEntry(pEnchant->spellid[s]);
if (!spellInfo)
{
- sLog.outError("Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
+ sLog->outError("Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
continue;
}
@@ -8114,7 +8114,7 @@ void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 c
void Player::_RemoveAllItemMods()
{
- sLog.outDebug("_RemoveAllItemMods start.");
+ sLog->outDebug("_RemoveAllItemMods start.");
for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
{
@@ -8157,12 +8157,12 @@ void Player::_RemoveAllItemMods()
}
}
- sLog.outDebug("_RemoveAllItemMods complete.");
+ sLog->outDebug("_RemoveAllItemMods complete.");
}
void Player::_ApplyAllItemMods()
{
- sLog.outDebug("_ApplyAllItemMods start.");
+ sLog->outDebug("_ApplyAllItemMods start.");
for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
{
@@ -8206,7 +8206,7 @@ void Player::_ApplyAllItemMods()
}
}
- sLog.outDebug("_ApplyAllItemMods complete.");
+ sLog->outDebug("_ApplyAllItemMods complete.");
}
void Player::_ApplyAllLevelScaleItemMods(bool apply)
@@ -8305,7 +8305,7 @@ void Player::RemovedInsignia(Player* looterPlr)
// We have to convert player corpse to bones, not to be able to resurrect there
// SpawnCorpseBones isn't handy, 'cos it saves player while he in BG
- Corpse *bones = sObjectAccessor.ConvertCorpseForPlayer(GetGUID(),true);
+ Corpse *bones = sObjectAccessor->ConvertCorpseForPlayer(GetGUID(),true);
if (!bones)
return;
@@ -8334,10 +8334,10 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
Loot *loot = 0;
PermissionTypes permission = ALL_PERMISSION;
- sLog.outDebug("Player::SendLoot");
+ sLog->outDebug("Player::SendLoot");
if (IS_GAMEOBJECT_GUID(guid))
{
- sLog.outDebug(" IS_GAMEOBJECT_GUID(guid)");
+ sLog->outDebug(" IS_GAMEOBJECT_GUID(guid)");
GameObject *go = GetMap()->GetGameObject(guid);
// not check distance for GO in case owned GO (fishing bobber case, for example)
@@ -8491,7 +8491,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
loot->FillLoot(1, LootTemplates_Creature, this, true);
// It may need a better formula
// Now it works like this: lvl10: ~6copper, lvl70: ~9silver
- bones->loot.gold = uint32(urand(50, 150) * 0.016f * pow(float(pLevel)/5.76f, 2.5f) * sWorld.getRate(RATE_DROP_MONEY));
+ bones->loot.gold = uint32(urand(50, 150) * 0.016f * pow(float(pLevel)/5.76f, 2.5f) * sWorld->getRate(RATE_DROP_MONEY));
}
if (bones->lootRecipient != this)
@@ -8529,7 +8529,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
// Generate extra money for pick pocket loot
const uint32 a = urand(0, creature->getLevel()/2);
const uint32 b = urand(0, getLevel()/2);
- loot->gold = uint32(10 * (a + b) * sWorld.getRate(RATE_DROP_MONEY));
+ loot->gold = uint32(10 * (a + b) * sWorld->getRate(RATE_DROP_MONEY));
}
}
else
@@ -8663,7 +8663,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
uint32 mapid = GetMapId();
OutdoorPvP * pvp = sOutdoorPvPMgr->GetOutdoorPvPToZoneId(zoneid);
- sLog.outDebug("Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid);
+ sLog->outDebug("Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid);
// may be exist better way to do this...
switch (zoneid)
@@ -8746,9 +8746,9 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
data << uint32(0x8d4) << uint32(0x0); // 5
data << uint32(0x8d3) << uint32(0x0); // 6
// 7 1 - Arena season in progress, 0 - end of season
- data << uint32(0xC77) << uint32(sWorld.getBoolConfig(CONFIG_ARENA_SEASON_IN_PROGRESS));
+ data << uint32(0xC77) << uint32(sWorld->getBoolConfig(CONFIG_ARENA_SEASON_IN_PROGRESS));
// 8 Arena season id
- data << uint32(0xF3D) << uint32(sWorld.getIntConfig(CONFIG_ARENA_SEASON_ID));
+ data << uint32(0xF3D) << uint32(sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID));
if (mapid == 530) // Outland
{
@@ -9256,7 +9256,7 @@ uint32 Player::GetXPRestBonus(uint32 xp)
SetRestBonus(GetRestBonus() - rested_bonus);
- sLog.outDetail("Player gain %u xp (+ %u Rested Bonus). Rested points=%f",xp+rested_bonus,rested_bonus,GetRestBonus());
+ sLog->outDetail("Player gain %u xp (+ %u Rested Bonus). Rested points=%f",xp+rested_bonus,rested_bonus,GetRestBonus());
return rested_bonus;
}
@@ -9271,7 +9271,7 @@ void Player::SendTalentWipeConfirm(uint64 guid)
{
WorldPacket data(MSG_TALENT_WIPE_CONFIRM, (8+4));
data << uint64(guid);
- uint32 cost = sWorld.getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : resetTalentsCost();
+ uint32 cost = sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : resetTalentsCost();
data << cost;
GetSession()->SendPacket(&data);
}
@@ -9288,7 +9288,7 @@ void Player::ResetPetTalents()
CharmInfo *charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- sLog.outError("Object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
+ sLog->outError("Object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}
pet->resetTalents();
@@ -10293,7 +10293,7 @@ uint8 Player::_CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, I
uint8 Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 entry, uint32 count, Item *pItem, bool swap, uint32* no_space_count) const
{
- sLog.outDebug("STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count);
+ sLog->outDebug("STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count);
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(entry);
if (!pProto)
@@ -10792,7 +10792,7 @@ uint8 Player::CanStoreItems(Item **pItems,int count) const
// no item
if (!pItem) continue;
- sLog.outDebug("STORAGE: CanStoreItems %i. item = %u, count = %u", k+1, pItem->GetEntry(), pItem->GetCount());
+ sLog->outDebug("STORAGE: CanStoreItems %i. item = %u, count = %u", k+1, pItem->GetEntry(), pItem->GetCount());
ItemPrototype const *pProto = pItem->GetProto();
// strange item
@@ -11002,7 +11002,7 @@ uint8 Player::CanEquipItem(uint8 slot, uint16 &dest, Item *pItem, bool swap, boo
dest = 0;
if (pItem)
{
- sLog.outDebug("STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount());
+ sLog->outDebug("STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount());
ItemPrototype const *pProto = pItem->GetProto();
if (pProto)
{
@@ -11153,7 +11153,7 @@ uint8 Player::CanUnequipItem(uint16 pos, bool swap) const
if (!pItem)
return EQUIP_ERR_OK;
- sLog.outDebug("STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount());
+ sLog->outDebug("STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount());
ItemPrototype const *pProto = pItem->GetProto();
if (!pProto)
@@ -11189,7 +11189,7 @@ uint8 Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *pI
uint32 count = pItem->GetCount();
- sLog.outDebug("STORAGE: CanBankItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), pItem->GetCount());
+ sLog->outDebug("STORAGE: CanBankItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), pItem->GetCount());
ItemPrototype const *pProto = pItem->GetProto();
if (!pProto)
return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_ITEM_NOT_FOUND;
@@ -11205,7 +11205,7 @@ uint8 Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *pI
uint8 pItemslot = pItem->GetSlot();
if (pItemslot >= CURRENCYTOKEN_SLOT_START && pItemslot < CURRENCYTOKEN_SLOT_END)
{
- sLog.outError("Possible hacking attempt: Player %s [guid: %u] tried to move token [guid: %u, entry: %u] out of the currency bag!",
+ sLog->outError("Possible hacking attempt: Player %s [guid: %u] tried to move token [guid: %u, entry: %u] out of the currency bag!",
GetName(), GetGUIDLow(), pItem->GetGUIDLow(), pProto->ItemId);
return EQUIP_ERR_ITEMS_CANT_BE_SWAPPED;
}
@@ -11377,7 +11377,7 @@ uint8 Player::CanUseItem(Item *pItem, bool not_loading) const
{
if (pItem)
{
- sLog.outDebug("STORAGE: CanUseItem item = %u", pItem->GetEntry());
+ sLog->outDebug("STORAGE: CanUseItem item = %u", pItem->GetEntry());
if (!isAlive() && not_loading)
return EQUIP_ERR_YOU_ARE_DEAD;
@@ -11465,7 +11465,7 @@ uint8 Player::CanUseItem(ItemPrototype const *pProto) const
uint8 Player::CanUseAmmo(uint32 item) const
{
- sLog.outDebug("STORAGE: CanUseAmmo item = %u", item);
+ sLog->outDebug("STORAGE: CanUseAmmo item = %u", item);
if (!isAlive())
return EQUIP_ERR_YOU_ARE_DEAD;
//if (isStunned())
@@ -11604,7 +11604,7 @@ Item* Player::_StoreItem(uint16 pos, Item *pItem, uint32 count, bool clone, bool
uint8 bag = pos >> 8;
uint8 slot = pos & 255;
- sLog.outDebug("STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u, guid = %u", bag, slot, pItem->GetEntry(), count, pItem->GetGUIDLow());
+ sLog->outDebug("STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u, guid = %u", bag, slot, pItem->GetEntry(), count, pItem->GetGUIDLow());
Item *pItem2 = GetItemByPos(bag, slot);
@@ -11746,7 +11746,7 @@ Item* Player::EquipItem(uint16 pos, Item *pItem, bool update)
SpellEntry const* spellProto = sSpellStore.LookupEntry(cooldownSpell);
if (!spellProto)
- sLog.outError("Weapon switch cooldown spell %u couldn't be found in Spell.dbc", cooldownSpell);
+ sLog->outError("Weapon switch cooldown spell %u couldn't be found in Spell.dbc", cooldownSpell);
else
{
m_weaponChangeTimer = spellProto->StartRecoveryTime;
@@ -11870,7 +11870,7 @@ void Player::VisualizeItem(uint8 slot, Item *pItem)
if (pItem->GetProto()->Bonding == BIND_WHEN_EQUIPED || pItem->GetProto()->Bonding == BIND_WHEN_PICKED_UP || pItem->GetProto()->Bonding == BIND_QUEST_ITEM)
pItem->SetBinding(true);
- sLog.outDebug("STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry());
+ sLog->outDebug("STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry());
m_items[slot] = pItem;
SetUInt64Value(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), pItem->GetGUID());
@@ -11895,7 +11895,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update)
Item *pItem = GetItemByPos(bag, slot);
if (pItem)
{
- sLog.outDebug("STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
+ sLog->outDebug("STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
RemoveEnchantmentDurations(pItem);
RemoveItemDurations(pItem);
@@ -12016,7 +12016,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
Item *pItem = GetItemByPos(bag, slot);
if (pItem)
{
- sLog.outDebug("STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
+ sLog->outDebug("STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
// Also remove all contained items if the item is a bag.
// This if() prevents item saving crashes if the condition for a bag to be empty before being destroyed was bypassed somehow.
if (pItem->IsBag() && !((Bag*)pItem)->IsEmpty())
@@ -12103,7 +12103,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check)
{
- sLog.outDebug("STORAGE: DestroyItemCount item = %u, count = %u", item, count);
+ sLog->outDebug("STORAGE: DestroyItemCount item = %u, count = %u", item, count);
uint32 remcount = 0;
// in inventory
@@ -12232,7 +12232,7 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
void Player::DestroyZoneLimitedItem(bool update, uint32 new_zone)
{
- sLog.outDebug("STORAGE: DestroyZoneLimitedItem in map %u and area %u", GetMapId(), new_zone);
+ sLog->outDebug("STORAGE: DestroyZoneLimitedItem in map %u and area %u", GetMapId(), new_zone);
// in inventory
for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
@@ -12264,7 +12264,7 @@ void Player::DestroyConjuredItems(bool update)
{
// used when entering arena
// destroys all conjured items
- sLog.outDebug("STORAGE: DestroyConjuredItems");
+ sLog->outDebug("STORAGE: DestroyConjuredItems");
// in inventory
for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
@@ -12327,7 +12327,7 @@ void Player::DestroyItemCount(Item* pItem, uint32 &count, bool update)
if (!pItem)
return;
- sLog.outDebug("STORAGE: DestroyItemCount item (GUID: %u, Entry: %u) count = %u", pItem->GetGUIDLow(),pItem->GetEntry(), count);
+ sLog->outDebug("STORAGE: DestroyItemCount item (GUID: %u, Entry: %u) count = %u", pItem->GetGUIDLow(),pItem->GetEntry(), count);
if (pItem->GetCount() <= count)
{
@@ -12382,7 +12382,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count)
return;
}
- sLog.outDebug("STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count);
+ sLog->outDebug("STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count);
Item *pNewItem = pSrcItem->CloneItem(count, this);
if (!pNewItem)
{
@@ -12467,7 +12467,7 @@ void Player::SwapItem(uint16 src, uint16 dst)
if (!pSrcItem)
return;
- sLog.outDebug("STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry());
+ sLog->outDebug("STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry());
if (!isAlive())
{
@@ -12837,7 +12837,7 @@ void Player::AddItemToBuyBackSlot(Item *pItem)
}
RemoveItemFromBuyBackSlot(slot, true);
- sLog.outDebug("STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot);
+ sLog->outDebug("STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot);
m_items[slot] = pItem;
time_t base = time(NULL);
@@ -12859,7 +12859,7 @@ void Player::AddItemToBuyBackSlot(Item *pItem)
Item* Player::GetItemFromBuyBackSlot(uint32 slot)
{
- sLog.outDebug("STORAGE: GetItemFromBuyBackSlot slot = %u", slot);
+ sLog->outDebug("STORAGE: GetItemFromBuyBackSlot slot = %u", slot);
if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END)
return m_items[slot];
return NULL;
@@ -12867,7 +12867,7 @@ Item* Player::GetItemFromBuyBackSlot(uint32 slot)
void Player::RemoveItemFromBuyBackSlot(uint32 slot, bool del)
{
- sLog.outDebug("STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot);
+ sLog->outDebug("STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot);
if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END)
{
Item *pItem = m_items[slot];
@@ -12893,7 +12893,7 @@ void Player::RemoveItemFromBuyBackSlot(uint32 slot, bool del)
void Player::SendEquipError(uint8 msg, Item* pItem, Item *pItem2, uint32 itemid)
{
- sLog.outDebug("WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)", msg);
+ sLog->outDebug("WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)", msg);
WorldPacket data(SMSG_INVENTORY_CHANGE_FAILURE, (msg == EQUIP_ERR_CANT_EQUIP_LEVEL_I ? 22 : 18));
data << uint8(msg);
@@ -12936,7 +12936,7 @@ void Player::SendEquipError(uint8 msg, Item* pItem, Item *pItem2, uint32 itemid)
void Player::SendBuyError(uint8 msg, Creature* pCreature, uint32 item, uint32 param)
{
- sLog.outDebug("WORLD: Sent SMSG_BUY_FAILED");
+ sLog->outDebug("WORLD: Sent SMSG_BUY_FAILED");
WorldPacket data(SMSG_BUY_FAILED, (8+4+4+1));
data << uint64(pCreature ? pCreature->GetGUID() : 0);
data << uint32(item);
@@ -12948,7 +12948,7 @@ void Player::SendBuyError(uint8 msg, Creature* pCreature, uint32 item, uint32 pa
void Player::SendSellError(uint8 msg, Creature* pCreature, uint64 guid, uint32 param)
{
- sLog.outDebug("WORLD: Sent SMSG_SELL_ITEM");
+ sLog->outDebug("WORLD: Sent SMSG_SELL_ITEM");
WorldPacket data(SMSG_SELL_ITEM,(8+8+(param?4:0)+1)); // last check 2.0.10
data << uint64(pCreature ? pCreature->GetGUID() : 0);
data << uint64(guid);
@@ -13022,7 +13022,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
if (m_itemDuration.empty())
return;
- sLog.outDebug("Player::UpdateItemDuration(%u,%u)", time, realtimeonly);
+ sLog->outDebug("Player::UpdateItemDuration(%u,%u)", time, realtimeonly);
for (ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end();)
{
@@ -13294,81 +13294,81 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
}
}
- sLog.outDebug("Adding %u to stat nb %u",enchant_amount,enchant_spell_id);
+ sLog->outDebug("Adding %u to stat nb %u",enchant_amount,enchant_spell_id);
switch (enchant_spell_id)
{
case ITEM_MOD_MANA:
- sLog.outDebug("+ %u MANA",enchant_amount);
+ sLog->outDebug("+ %u MANA",enchant_amount);
HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_HEALTH:
- sLog.outDebug("+ %u HEALTH",enchant_amount);
+ sLog->outDebug("+ %u HEALTH",enchant_amount);
HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_AGILITY:
- sLog.outDebug("+ %u AGILITY",enchant_amount);
+ sLog->outDebug("+ %u AGILITY",enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_AGILITY, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_AGILITY, (float)enchant_amount, apply);
break;
case ITEM_MOD_STRENGTH:
- sLog.outDebug("+ %u STRENGTH",enchant_amount);
+ sLog->outDebug("+ %u STRENGTH",enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_STRENGTH, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_STRENGTH, (float)enchant_amount, apply);
break;
case ITEM_MOD_INTELLECT:
- sLog.outDebug("+ %u INTELLECT",enchant_amount);
+ sLog->outDebug("+ %u INTELLECT",enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_INTELLECT, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_INTELLECT, (float)enchant_amount, apply);
break;
case ITEM_MOD_SPIRIT:
- sLog.outDebug("+ %u SPIRIT",enchant_amount);
+ sLog->outDebug("+ %u SPIRIT",enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_SPIRIT, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_SPIRIT, (float)enchant_amount, apply);
break;
case ITEM_MOD_STAMINA:
- sLog.outDebug("+ %u STAMINA",enchant_amount);
+ sLog->outDebug("+ %u STAMINA",enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_STAMINA, (float)enchant_amount, apply);
break;
case ITEM_MOD_DEFENSE_SKILL_RATING:
ApplyRatingMod(CR_DEFENSE_SKILL, enchant_amount, apply);
- sLog.outDebug("+ %u DEFENCE", enchant_amount);
+ sLog->outDebug("+ %u DEFENCE", enchant_amount);
break;
case ITEM_MOD_DODGE_RATING:
ApplyRatingMod(CR_DODGE, enchant_amount, apply);
- sLog.outDebug("+ %u DODGE", enchant_amount);
+ sLog->outDebug("+ %u DODGE", enchant_amount);
break;
case ITEM_MOD_PARRY_RATING:
ApplyRatingMod(CR_PARRY, enchant_amount, apply);
- sLog.outDebug("+ %u PARRY", enchant_amount);
+ sLog->outDebug("+ %u PARRY", enchant_amount);
break;
case ITEM_MOD_BLOCK_RATING:
ApplyRatingMod(CR_BLOCK, enchant_amount, apply);
- sLog.outDebug("+ %u SHIELD_BLOCK", enchant_amount);
+ sLog->outDebug("+ %u SHIELD_BLOCK", enchant_amount);
break;
case ITEM_MOD_HIT_MELEE_RATING:
ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply);
- sLog.outDebug("+ %u MELEE_HIT", enchant_amount);
+ sLog->outDebug("+ %u MELEE_HIT", enchant_amount);
break;
case ITEM_MOD_HIT_RANGED_RATING:
ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply);
- sLog.outDebug("+ %u RANGED_HIT", enchant_amount);
+ sLog->outDebug("+ %u RANGED_HIT", enchant_amount);
break;
case ITEM_MOD_HIT_SPELL_RATING:
ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply);
- sLog.outDebug("+ %u SPELL_HIT", enchant_amount);
+ sLog->outDebug("+ %u SPELL_HIT", enchant_amount);
break;
case ITEM_MOD_CRIT_MELEE_RATING:
ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply);
- sLog.outDebug("+ %u MELEE_CRIT", enchant_amount);
+ sLog->outDebug("+ %u MELEE_CRIT", enchant_amount);
break;
case ITEM_MOD_CRIT_RANGED_RATING:
ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply);
- sLog.outDebug("+ %u RANGED_CRIT", enchant_amount);
+ sLog->outDebug("+ %u RANGED_CRIT", enchant_amount);
break;
case ITEM_MOD_CRIT_SPELL_RATING:
ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply);
- sLog.outDebug("+ %u SPELL_CRIT", enchant_amount);
+ sLog->outDebug("+ %u SPELL_CRIT", enchant_amount);
break;
// Values from ITEM_STAT_MELEE_HA_RATING to ITEM_MOD_HASTE_RANGED_RATING are never used
// in Enchantments
@@ -13403,13 +13403,13 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply);
ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply);
ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply);
- sLog.outDebug("+ %u HIT", enchant_amount);
+ sLog->outDebug("+ %u HIT", enchant_amount);
break;
case ITEM_MOD_CRIT_RATING:
ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply);
ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply);
ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply);
- sLog.outDebug("+ %u CRITICAL", enchant_amount);
+ sLog->outDebug("+ %u CRITICAL", enchant_amount);
break;
// Values ITEM_MOD_HIT_TAKEN_RATING and ITEM_MOD_CRIT_TAKEN_RATING are never used in Enchantment
// case ITEM_MOD_HIT_TAKEN_RATING:
@@ -13426,54 +13426,54 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
ApplyRatingMod(CR_CRIT_TAKEN_MELEE, enchant_amount, apply);
ApplyRatingMod(CR_CRIT_TAKEN_RANGED, enchant_amount, apply);
ApplyRatingMod(CR_CRIT_TAKEN_SPELL, enchant_amount, apply);
- sLog.outDebug("+ %u RESILIENCE", enchant_amount);
+ sLog->outDebug("+ %u RESILIENCE", enchant_amount);
break;
case ITEM_MOD_HASTE_RATING:
ApplyRatingMod(CR_HASTE_MELEE, enchant_amount, apply);
ApplyRatingMod(CR_HASTE_RANGED, enchant_amount, apply);
ApplyRatingMod(CR_HASTE_SPELL, enchant_amount, apply);
- sLog.outDebug("+ %u HASTE", enchant_amount);
+ sLog->outDebug("+ %u HASTE", enchant_amount);
break;
case ITEM_MOD_EXPERTISE_RATING:
ApplyRatingMod(CR_EXPERTISE, enchant_amount, apply);
- sLog.outDebug("+ %u EXPERTISE", enchant_amount);
+ sLog->outDebug("+ %u EXPERTISE", enchant_amount);
break;
case ITEM_MOD_ATTACK_POWER:
HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(enchant_amount), apply);
HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
- sLog.outDebug("+ %u ATTACK_POWER", enchant_amount);
+ sLog->outDebug("+ %u ATTACK_POWER", enchant_amount);
break;
case ITEM_MOD_RANGED_ATTACK_POWER:
HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
- sLog.outDebug("+ %u RANGED_ATTACK_POWER", enchant_amount);
+ sLog->outDebug("+ %u RANGED_ATTACK_POWER", enchant_amount);
break;
// case ITEM_MOD_FERAL_ATTACK_POWER:
// ApplyFeralAPBonus(enchant_amount, apply);
-// sLog.outDebug("+ %u FERAL_ATTACK_POWER", enchant_amount);
+// sLog->outDebug("+ %u FERAL_ATTACK_POWER", enchant_amount);
// break;
case ITEM_MOD_MANA_REGENERATION:
ApplyManaRegenBonus(enchant_amount, apply);
- sLog.outDebug("+ %u MANA_REGENERATION", enchant_amount);
+ sLog->outDebug("+ %u MANA_REGENERATION", enchant_amount);
break;
case ITEM_MOD_ARMOR_PENETRATION_RATING:
ApplyRatingMod(CR_ARMOR_PENETRATION, enchant_amount, apply);
- sLog.outDebug("+ %u ARMOR PENETRATION", enchant_amount);
+ sLog->outDebug("+ %u ARMOR PENETRATION", enchant_amount);
break;
case ITEM_MOD_SPELL_POWER:
ApplySpellPowerBonus(enchant_amount, apply);
- sLog.outDebug("+ %u SPELL_POWER", enchant_amount);
+ sLog->outDebug("+ %u SPELL_POWER", enchant_amount);
break;
case ITEM_MOD_HEALTH_REGEN:
ApplyHealthRegenBonus(enchant_amount, apply);
- sLog.outDebug("+ %u HEALTH_REGENERATION", enchant_amount);
+ sLog->outDebug("+ %u HEALTH_REGENERATION", enchant_amount);
break;
case ITEM_MOD_SPELL_PENETRATION:
ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE, enchant_amount, apply);
- sLog.outDebug("+ %u SPELL_PENETRATION", enchant_amount);
+ sLog->outDebug("+ %u SPELL_PENETRATION", enchant_amount);
break;
case ITEM_MOD_BLOCK_VALUE:
HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(enchant_amount), apply);
- sLog.outDebug("+ %u BLOCK_VALUE", enchant_amount);
+ sLog->outDebug("+ %u BLOCK_VALUE", enchant_amount);
break;
case ITEM_MOD_SPELL_HEALING_DONE: // deprecated
case ITEM_MOD_SPELL_DAMAGE_DONE: // deprecated
@@ -13507,7 +13507,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
// nothing do..
break;
default:
- sLog.outError("Unknown item enchantment (id = %d) display type: %d", enchant_id, enchant_display_type);
+ sLog->outError("Unknown item enchantment (id = %d) display type: %d", enchant_id, enchant_display_type);
break;
} /*switch(enchant_display_type)*/
} /*for*/
@@ -13677,7 +13677,7 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId, bool showQue
VendorItemData const* vItems = pCreature->GetVendorItems();
if (!vItems || vItems->Empty())
{
- sLog.outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_VENDOR but have empty trading item list.", pCreature->GetGUIDLow(), pCreature->GetEntry());
+ sLog->outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_VENDOR but have empty trading item list.", pCreature->GetGUIDLow(), pCreature->GetEntry());
bCanTalk = false;
}
break;
@@ -13687,7 +13687,7 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId, bool showQue
bCanTalk = false;
break;
case GOSSIP_OPTION_LEARNDUALSPEC:
- if (!(GetSpecsCount() == 1 && pCreature->isCanTrainingAndResetTalentsOf(this) && !(getLevel() < sWorld.getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))))
+ if (!(GetSpecsCount() == 1 && pCreature->isCanTrainingAndResetTalentsOf(this) && !(getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))))
bCanTalk = false;
break;
case GOSSIP_OPTION_UNLEARNTALENTS:
@@ -13726,7 +13726,7 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId, bool showQue
bCanTalk = false;
break;
default:
- sLog.outErrorDb("Creature entry %u have unknown gossip option %u for menu %u", pCreature->GetEntry(), itr->second.option_id, itr->second.menu_id);
+ sLog->outErrorDb("Creature entry %u have unknown gossip option %u for menu %u", pCreature->GetEntry(), itr->second.option_id, itr->second.menu_id);
bCanTalk = false;
break;
}
@@ -13827,7 +13827,7 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me
{
if (gossipOptionId > GOSSIP_OPTION_QUESTGIVER)
{
- sLog.outError("Player guid %u request invalid gossip option for GameObject entry %u", GetGUIDLow(), pSource->GetEntry());
+ sLog->outError("Player guid %u request invalid gossip option for GameObject entry %u", GetGUIDLow(), pSource->GetEntry());
return;
}
}
@@ -13878,7 +13878,7 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me
GetSession()->SendTrainerList(guid);
break;
case GOSSIP_OPTION_LEARNDUALSPEC:
- if (GetSpecsCount() == 1 && !(getLevel() < sWorld.getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)))
+ if (GetSpecsCount() == 1 && !(getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)))
{
if (!HasEnoughMoney(10000000))
{
@@ -13939,7 +13939,7 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me
if (bgTypeId == BATTLEGROUND_TYPE_NONE)
{
- sLog.outError("a user (guid %u) requested battlegroundlist from a npc who is no battlemaster", GetGUIDLow());
+ sLog->outError("a user (guid %u) requested battlegroundlist from a npc who is no battlemaster", GetGUIDLow());
return;
}
@@ -14191,7 +14191,7 @@ bool Player::CanSeeStartQuest(Quest const *pQuest)
SatisfyQuestPrevChain(pQuest, false) && SatisfyQuestDay(pQuest, false) && SatisfyQuestWeek(pQuest, false) &&
!sDisableMgr->IsDisabledFor(DISABLE_TYPE_QUEST, pQuest->GetQuestId(), this))
{
- return getLevel() + sWorld.getIntConfig(CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF) >= pQuest->GetMinLevel();
+ return getLevel() + sWorld->getIntConfig(CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF) >= pQuest->GetMinLevel();
}
return false;
@@ -14568,7 +14568,7 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver,
QuestStatusData& q_status = mQuestStatus[quest_id];
// Not give XP in case already completed once repeatable quest
- uint32 XP = q_status.m_rewarded ? 0 : uint32(pQuest->XPValue(this)*sWorld.getRate(RATE_XP_QUEST));
+ uint32 XP = q_status.m_rewarded ? 0 : uint32(pQuest->XPValue(this)*sWorld->getRate(RATE_XP_QUEST));
// handle SPELL_AURA_MOD_XP_QUEST_PCT auras
Unit::AuraEffectList const& ModXPPctAuras = GetAuraEffectsByType(SPELL_AURA_MOD_XP_QUEST_PCT);
@@ -14576,10 +14576,10 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver,
AddPctN(XP, (*i)->GetAmount());
int32 moneyRew = 0;
- if (getLevel() < sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
GiveXP(XP, NULL);
else
- moneyRew = int32(pQuest->GetRewMoneyMaxLevel() * sWorld.getRate(RATE_DROP_MONEY));
+ moneyRew = int32(pQuest->GetRewMoneyMaxLevel() * sWorld->getRate(RATE_DROP_MONEY));
// Give player extra money if GetRewOrReqMoney > 0 and get ReqMoney if negative
if (pQuest->GetRewOrReqMoney())
@@ -14800,7 +14800,7 @@ bool Player::SatisfyQuestLog(bool msg)
{
WorldPacket data(SMSG_QUESTLOG_FULL, 0);
GetSession()->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUESTLOG_FULL");
+ sLog->outDebug("WORLD: Sent SMSG_QUESTLOG_FULL");
}
return false;
}
@@ -14956,7 +14956,7 @@ bool Player::SatisfyQuestConditions(Quest const* qInfo, bool msg)
{
if (msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- sLog.outDebug("Player::SatisfyQuestConditions: conditions not met for quest %u", qInfo->GetQuestId());
+ sLog->outDebug("Player::SatisfyQuestConditions: conditions not met for quest %u", qInfo->GetQuestId());
return false;
}
return true;
@@ -15750,19 +15750,19 @@ void Player::SendQuestComplete(uint32 quest_id)
WorldPacket data(SMSG_QUESTUPDATE_COMPLETE, 4);
data << uint32(quest_id);
GetSession()->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id);
+ sLog->outDebug("WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id);
}
}
void Player::SendQuestReward(Quest const *pQuest, uint32 XP, Object * questGiver)
{
uint32 questid = pQuest->GetQuestId();
- sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid);
+ sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid);
sGameEventMgr->HandleQuestComplete(questid);
WorldPacket data(SMSG_QUESTGIVER_QUEST_COMPLETE, (4+4+4+4+4));
data << uint32(questid);
- if (getLevel() < sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
data << uint32(XP);
data << uint32(pQuest->GetRewOrReqMoney());
@@ -15770,7 +15770,7 @@ void Player::SendQuestReward(Quest const *pQuest, uint32 XP, Object * questGiver
else
{
data << uint32(0);
- data << uint32(pQuest->GetRewOrReqMoney() + int32(pQuest->GetRewMoneyMaxLevel() * sWorld.getRate(RATE_DROP_MONEY)));
+ data << uint32(pQuest->GetRewOrReqMoney() + int32(pQuest->GetRewMoneyMaxLevel() * sWorld->getRate(RATE_DROP_MONEY)));
}
data << 10 * Trinity::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorMultiplier());
@@ -15790,7 +15790,7 @@ void Player::SendQuestFailed(uint32 quest_id)
data << uint32(quest_id);
data << uint32(0); // failed reason (4 for inventory is full)
GetSession()->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
+ sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
}
}
@@ -15801,7 +15801,7 @@ void Player::SendQuestTimerFailed(uint32 quest_id)
WorldPacket data(SMSG_QUESTUPDATE_FAILEDTIMER, 4);
data << uint32(quest_id);
GetSession()->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER");
+ sLog->outDebug("WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER");
}
}
@@ -15810,7 +15810,7 @@ void Player::SendCanTakeQuestResponse(uint32 msg)
WorldPacket data(SMSG_QUESTGIVER_QUEST_INVALID, 4);
data << uint32(msg);
GetSession()->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID");
+ sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID");
}
void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver)
@@ -15830,7 +15830,7 @@ void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver)
data << uint64(GetGUID());
pReceiver->GetSession()->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT");
+ sLog->outDebug("WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT");
}
}
@@ -15842,14 +15842,14 @@ void Player::SendPushToPartyResponse(Player *pPlayer, uint32 msg)
data << uint64(pPlayer->GetGUID());
data << uint8(msg); // valid values: 0-8
GetSession()->SendPacket(&data);
- sLog.outDebug("WORLD: Sent MSG_QUEST_PUSH_RESULT");
+ sLog->outDebug("WORLD: Sent MSG_QUEST_PUSH_RESULT");
}
}
void Player::SendQuestUpdateAddItem(Quest const* /*pQuest*/, uint32 /*item_idx*/, uint16 /*count*/)
{
WorldPacket data(SMSG_QUESTUPDATE_ADD_ITEM, 0);
- sLog.outDebug("WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM");
+ sLog->outDebug("WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM");
//data << pQuest->ReqItemId[item_idx];
//data << count;
GetSession()->SendPacket(&data);
@@ -15865,7 +15865,7 @@ void Player::SendQuestUpdateAddCreatureOrGo(Quest const* pQuest, uint64 guid, ui
entry = (-entry) | 0x80000000;
WorldPacket data(SMSG_QUESTUPDATE_ADD_KILL, (4*4+8));
- sLog.outDebug("WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL");
+ sLog->outDebug("WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL");
data << uint32(pQuest->GetQuestId());
data << uint32(entry);
data << uint32(old_count + add_count);
@@ -15917,7 +15917,7 @@ void Player::_LoadArenaTeamInfo(PreparedQueryResult result)
ArenaTeam* aTeam = sObjectMgr->GetArenaTeamById(arenateamid);
if (!aTeam)
{
- sLog.outError("Player::_LoadArenaTeamInfo: couldn't load arenateam %u", arenateamid);
+ sLog->outError("Player::_LoadArenaTeamInfo: couldn't load arenateam %u", arenateamid);
continue;
}
@@ -16083,7 +16083,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
if (!result)
{
- sLog.outError("Player (GUID: %u) not found in table `characters`, can't load. ",guid);
+ sLog->outError("Player (GUID: %u) not found in table `characters`, can't load. ",guid);
return false;
}
@@ -16095,13 +16095,13 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// player should be able to load/delete character only with correct account!
if (dbAccountId != GetSession()->GetAccountId())
{
- sLog.outError("Player (GUID: %u) loading from wrong account (is: %u, should be: %u)",guid,GetSession()->GetAccountId(),dbAccountId);
+ sLog->outError("Player (GUID: %u) loading from wrong account (is: %u, should be: %u)",guid,GetSession()->GetAccountId(),dbAccountId);
return false;
}
if (holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADBANNED))
{
- sLog.outError("Player (GUID: %u) is banned, can't load.", guid);
+ sLog->outError("Player (GUID: %u) is banned, can't load.", guid);
return false;
}
@@ -16167,7 +16167,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
m_items[slot] = NULL;
}
- sLog.outDebug("Load Basic value of player %s is: ", m_name.c_str());
+ sLog->outDebug("Load Basic value of player %s is: ", m_name.c_str());
outDebugValues();
//Need to call it to initialize m_team (m_team can be calculated from race)
@@ -16205,8 +16205,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
_LoadArenaStatsInfo(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADARENASTATS));
uint32 arena_currency = fields[39].GetUInt32();
- if (arena_currency > sWorld.getIntConfig(CONFIG_MAX_ARENA_POINTS))
- arena_currency = sWorld.getIntConfig(CONFIG_MAX_ARENA_POINTS);
+ if (arena_currency > sWorld->getIntConfig(CONFIG_MAX_ARENA_POINTS))
+ arena_currency = sWorld->getIntConfig(CONFIG_MAX_ARENA_POINTS);
SetArenaPoints(arena_currency);
@@ -16239,7 +16239,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
MapEntry const * mapEntry = sMapStore.LookupEntry(mapId);
if (!mapEntry || !IsPositionValid())
{
- sLog.outError("Player (guidlow %d) have invalid coordinates (MapId: %u X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",guid,mapId,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
+ sLog->outError("Player (guidlow %d) have invalid coordinates (MapId: %u X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",guid,mapId,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
RelocateToHomebind();
}
// Player was saved in Arena or Bg
@@ -16277,7 +16277,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
if (mapId == MAPID_INVALID) // Battleground Entry Point not found (???)
{
- sLog.outError("Player (guidlow %d) was in BG in database, but BG was not found, and entry point was invalid! Teleport to default race/class locations.",guid);
+ sLog->outError("Player (guidlow %d) was in BG in database, but BG was not found, and entry point was invalid! Teleport to default race/class locations.",guid);
RelocateToHomebind();
}
else
@@ -16299,7 +16299,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// transport size limited
m_movementInfo.t_pos.m_positionX > 250 || m_movementInfo.t_pos.m_positionY > 250 || m_movementInfo.t_pos.m_positionZ > 250)
{
- sLog.outError("Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to bind location.",
+ sLog->outError("Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to bind location.",
guid,GetPositionX()+m_movementInfo.t_pos.m_positionX,GetPositionY()+m_movementInfo.t_pos.m_positionY,
GetPositionZ()+m_movementInfo.t_pos.m_positionZ,GetOrientation()+m_movementInfo.t_pos.m_orientation);
@@ -16319,7 +16319,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
}
if (!m_transport)
{
- sLog.outError("Player (guidlow %d) have problems with transport guid (%u). Teleport to bind location.",
+ sLog->outError("Player (guidlow %d) have problems with transport guid (%u). Teleport to bind location.",
guid,transGUID);
RelocateToHomebind();
@@ -16346,12 +16346,12 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
if (!nodeEntry) // don't know taxi start node, to homebind
{
- sLog.outError("Character %u have wrong data in taxi destination list, teleport to homebind.",GetGUIDLow());
+ sLog->outError("Character %u have wrong data in taxi destination list, teleport to homebind.",GetGUIDLow());
RelocateToHomebind();
}
else // have start node, to it
{
- sLog.outError("Character %u have too short taxi destination list, teleport to original node.",GetGUIDLow());
+ sLog->outError("Character %u have too short taxi destination list, teleport to original node.",GetGUIDLow());
mapId = nodeEntry->map_id;
Relocate(nodeEntry->x, nodeEntry->y, nodeEntry->z,0.0f);
}
@@ -16380,7 +16380,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
{
if (GetSession()->Expansion() < mapEntry->Expansion())
{
- sLog.outDebug("Player %s using client without required expansion tried login at non accessible map %u", GetName(), mapId);
+ sLog->outDebug("Player %s using client without required expansion tried login at non accessible map %u", GetName(), mapId);
RelocateToHomebind();
}
@@ -16401,13 +16401,13 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
AreaTrigger const* at = sObjectMgr->GetGoBackTrigger(mapId);
if (at)
{
- sLog.outError("Player (guidlow %d) is teleported to gobacktrigger (Map: %u X: %f Y: %f Z: %f O: %f).",guid,mapId,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
+ sLog->outError("Player (guidlow %d) is teleported to gobacktrigger (Map: %u X: %f Y: %f Z: %f O: %f).",guid,mapId,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
Relocate(at->target_X, at->target_Y, at->target_Z, GetOrientation());
mapId = at->target_mapId;
}
else
{
- sLog.outError("Player (guidlow %d) is teleported to home (Map: %u X: %f Y: %f Z: %f O: %f).",guid,mapId,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
+ sLog->outError("Player (guidlow %d) is teleported to home (Map: %u X: %f Y: %f Z: %f O: %f).",guid,mapId,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
RelocateToHomebind();
}
@@ -16417,11 +16417,11 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
mapId = info->mapId;
Relocate(info->positionX,info->positionY,info->positionZ,0.0f);
- sLog.outError("Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
+ sLog->outError("Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
map = sMapMgr->CreateMap(mapId, this, 0);
if (!map)
{
- sLog.outError("Player (guidlow %d) has invalid default map coordinates (X: %f Y: %f Z: %f O: %f). or instance couldn't be created",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
+ sLog->outError("Player (guidlow %d) has invalid default map coordinates (X: %f Y: %f Z: %f O: %f). or instance couldn't be created",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
return false;
}
}
@@ -16435,7 +16435,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
Relocate(at->target_X, at->target_Y, at->target_Z, at->target_Orientation);
else
{
- sLog.outError("Player %s(GUID: %u) logged in to a reset instance (map: %u) and there is no area-trigger leading to this map. Thus he can't be ported back to the entrance. This _might_ be an exploit attempt.", GetName(), GetGUIDLow(), mapId);
+ sLog->outError("Player %s(GUID: %u) logged in to a reset instance (map: %u) and there is no area-trigger leading to this map. Thus he can't be ported back to the entrance. This _might_ be an exploit attempt.", GetName(), GetGUIDLow(), mapId);
RelocateToHomebind();
}
}
@@ -16485,7 +16485,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
m_stableSlots = fields[32].GetUInt8();
if (m_stableSlots > MAX_PET_STABLES)
{
- sLog.outError("Player can have not more %u stable slots, but have in DB %u",MAX_PET_STABLES,uint32(m_stableSlots));
+ sLog->outError("Player can have not more %u stable slots, but have in DB %u",MAX_PET_STABLES,uint32(m_stableSlots));
m_stableSlots = MAX_PET_STABLES;
}
@@ -16541,8 +16541,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
//speed collect rest bonus in offline, in logout, in tavern, city (section/in hour)
float bubble1 = 0.125f;
float bubble = fields[23].GetUInt32() > 0
- ? bubble1*sWorld.getRate(RATE_REST_OFFLINE_IN_TAVERN_OR_CITY)
- : bubble0*sWorld.getRate(RATE_REST_OFFLINE_IN_WILDERNESS);
+ ? bubble1*sWorld->getRate(RATE_REST_OFFLINE_IN_TAVERN_OR_CITY)
+ : bubble0*sWorld->getRate(RATE_REST_OFFLINE_IN_WILDERNESS);
SetRestBonus(GetRestBonus()+ time_diff*((float)GetUInt32Value(PLAYER_NEXT_LEVEL_XP)/72000)*bubble);
}
@@ -16563,7 +16563,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
if (m_specsCount > MAX_TALENT_SPECS || m_activeSpec > MAX_TALENT_SPEC || m_specsCount < MIN_TALENT_SPECS)
{
m_activeSpec = 0;
- sLog.outError("Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName(), GetGUIDLow(), m_specsCount, m_activeSpec);
+ sLog->outError("Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName(), GetGUIDLow(), m_specsCount, m_activeSpec);
}
_LoadTalents(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADTALENTS));
@@ -16634,13 +16634,13 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
SetPower(Powers(i),savedPower > GetMaxPower(Powers(i)) ? GetMaxPower(Powers(i)) : savedPower);
}
- sLog.outDebug("The value of player %s after load item and aura is: ", m_name.c_str());
+ sLog->outDebug("The value of player %s after load item and aura is: ", m_name.c_str());
outDebugValues();
// GM state
if (GetSession()->GetSecurity() > SEC_PLAYER)
{
- switch (sWorld.getIntConfig(CONFIG_GM_LOGIN_STATE))
+ switch (sWorld->getIntConfig(CONFIG_GM_LOGIN_STATE))
{
default:
case 0: break; // disable
@@ -16651,7 +16651,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
break;
}
- switch (sWorld.getIntConfig(CONFIG_GM_VISIBLE_STATE))
+ switch (sWorld->getIntConfig(CONFIG_GM_VISIBLE_STATE))
{
default:
case 0: SetGMVisible(false); break; // invisible
@@ -16662,7 +16662,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
break;
}
- /*switch(sWorld.getIntConfig(CONFIG_GM_ACCEPT_TICKETS))
+ /*switch(sWorld->getIntConfig(CONFIG_GM_ACCEPT_TICKETS))
{
default:
case 0: break; // disable
@@ -16673,7 +16673,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
break;
}*/
- switch (sWorld.getIntConfig(CONFIG_GM_CHAT))
+ switch (sWorld->getIntConfig(CONFIG_GM_CHAT))
{
default:
case 0: break; // disable
@@ -16684,7 +16684,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
break;
}
- switch (sWorld.getIntConfig(CONFIG_GM_WHISPERING_TO))
+ switch (sWorld->getIntConfig(CONFIG_GM_WHISPERING_TO))
{
default:
case 0: break; // disable
@@ -16767,7 +16767,7 @@ void Player::_LoadActions(PreparedQueryResult result)
ab->uState = ACTIONBUTTON_UNCHANGED;
else
{
- sLog.outError(" ...at loading, and will deleted in DB also");
+ sLog->outError(" ...at loading, and will deleted in DB also");
// Will deleted in DB at next save (it can create data until save but marked as deleted)
m_actionButtons[button].uState = ACTIONBUTTON_DELETED;
@@ -16778,7 +16778,7 @@ void Player::_LoadActions(PreparedQueryResult result)
void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
{
- sLog.outDebug("Loading auras for player %u",GetGUIDLow());
+ sLog->outDebug("Loading auras for player %u",GetGUIDLow());
//QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_mask,recalculate_mask,stackcount,amount0,amount1,amount2,base_amount0,base_amount1,base_amount2,maxduration,remaintime,remaincharges FROM character_aura WHERE guid = '%u'",GetGUIDLow());
@@ -16807,7 +16807,7 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
SpellEntry const* spellproto = sSpellStore.LookupEntry(spellid);
if (!spellproto)
{
- sLog.outError("Unknown aura (spellid %u), ignore.",spellid);
+ sLog->outError("Unknown aura (spellid %u), ignore.",spellid);
continue;
}
@@ -16838,7 +16838,7 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
}
aura->SetLoadedState(maxduration,remaintime,remaincharges,stackcount,recalculatemask,&damage[0]);
aura->ApplyForTargets();
- sLog.outDetail("Added aura spellid %u, effectmask %u", spellproto->Id, effmask);
+ sLog->outDetail("Added aura spellid %u, effectmask %u", spellproto->Id, effmask);
}
}
while (result->NextRow());
@@ -16864,13 +16864,13 @@ void Player::_LoadGlyphAuras()
continue;
}
else
- sLog.outError("Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->TypeFlags, gs->TypeFlags);
+ sLog->outError("Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->TypeFlags, gs->TypeFlags);
}
else
- sLog.outError("Player %s has not existing glyph slot entry %u on index %u", m_name.c_str(), GetGlyphSlot(i), i);
+ sLog->outError("Player %s has not existing glyph slot entry %u on index %u", m_name.c_str(), GetGlyphSlot(i), i);
}
else
- sLog.outError("Player %s has not existing glyph entry %u on index %u", m_name.c_str(), glyph, i);
+ sLog->outError("Player %s has not existing glyph entry %u on index %u", m_name.c_str(), glyph, i);
// On any error remove glyph
SetGlyph(i, 0);
@@ -16881,7 +16881,7 @@ void Player::_LoadGlyphAuras()
void Player::LoadCorpse()
{
if (isAlive())
- sObjectAccessor.ConvertCorpseForPlayer(GetGUID());
+ sObjectAccessor->ConvertCorpseForPlayer(GetGUID());
else
{
if (Corpse *corpse = GetCorpse())
@@ -16929,7 +16929,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff)
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE);
stmt->setUInt32(0, item_guid);
trans->Append(stmt);
- sLog.outError("Player::_LoadInventory: Player %s has an unknown item (id: #%u) in inventory, deleted.", GetName(),item_id);
+ sLog->outError("Player::_LoadInventory: Player %s has an unknown item (id: #%u) in inventory, deleted.", GetName(),item_id);
continue;
}
@@ -16937,7 +16937,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff)
if (!item->LoadFromDB(item_guid, GetGUID(), fields, item_id))
{
- sLog.outError("Player::_LoadInventory: Player %s has broken item (id: #%u) in inventory, deleted.", GetName(),item_id);
+ sLog->outError("Player::_LoadInventory: Player %s has broken item (id: #%u) in inventory, deleted.", GetName(),item_id);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVENTORY_ITEM);
stmt->setUInt32(0, item_guid);
trans->Append(stmt);
@@ -16972,7 +16972,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff)
{
if (item->GetPlayedTime() > (2*HOUR))
{
- sLog.outDebug("Item::LoadFromDB, Item GUID: %u: refund time expired, deleting refund data and removing refundable flag.", item->GetGUIDLow());
+ sLog->outDebug("Item::LoadFromDB, Item GUID: %u: refund time expired, deleting refund data and removing refundable flag.", item->GetGUIDLow());
trans->PAppend("DELETE FROM item_refund_instance WHERE item_guid = '%u'", item->GetGUIDLow());
item->RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE);
}
@@ -16984,7 +16984,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff)
PreparedQueryResult result2 = CharacterDatabase.Query(stmt);
if (!result2)
{
- sLog.outDebug("Item::LoadFromDB, Item GUID: %u has field flags & ITEM_FLAGS_REFUNDABLE but has no data in item_refund_instance, removing flag.", item->GetGUIDLow());
+ sLog->outDebug("Item::LoadFromDB, Item GUID: %u has field flags & ITEM_FLAGS_REFUNDABLE but has no data in item_refund_instance, removing flag.", item->GetGUIDLow());
item->RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE);
}
else
@@ -17004,7 +17004,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff)
PreparedQueryResult result2 = CharacterDatabase.Query(stmt);
if (!result2)
{
- sLog.outDebug("Item::LoadFromDB, Item GUID: %u has flag ITEM_FLAG_BOP_TRADEABLE but has no data in item_soulbound_trade_data, removing flag.", item->GetGUIDLow());
+ sLog->outDebug("Item::LoadFromDB, Item GUID: %u has flag ITEM_FLAG_BOP_TRADEABLE but has no data in item_soulbound_trade_data, removing flag.", item->GetGUIDLow());
item->RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE);
}
else
@@ -17073,7 +17073,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff)
itr->second->StoreItem(slot, item, true);
else
{
- sLog.outError("Player::_LoadInventory: Player %s has item (GUID: %u Entry: %u) can't be loaded to inventory (Bag GUID: %u Slot: %u) by reason %u.", GetName(),item_guid, item_id, bag_guid, slot, result);
+ sLog->outError("Player::_LoadInventory: Player %s has item (GUID: %u Entry: %u) can't be loaded to inventory (Bag GUID: %u Slot: %u) by reason %u.", GetName(),item_guid, item_id, bag_guid, slot, result);
success = false;
}
}
@@ -17086,7 +17086,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff)
item->SetState(ITEM_UNCHANGED, this);
else
{
- sLog.outError("Player::_LoadInventory: Player %s has item (GUID: %u Entry: %u) can't be loaded to inventory (Bag GUID: %u Slot: %u) by some reason, will send by mail.", GetName(),item_guid, item_id, bag_guid, slot);
+ sLog->outError("Player::_LoadInventory: Player %s has item (GUID: %u Entry: %u) can't be loaded to inventory (Bag GUID: %u Slot: %u) by some reason, will send by mail.", GetName(),item_guid, item_id, bag_guid, slot);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVENTORY_ITEM);
stmt->setUInt32(0, item_guid);
trans->Append(stmt);
@@ -17144,7 +17144,7 @@ void Player::_LoadMailedItems(Mail *mail)
if (!proto)
{
- sLog.outError("Player %u has unknown item_template (ProtoType) in mailed items(GUID: %u template: %u) in mail (%u), deleted.", GetGUIDLow(), item_guid_low, item_template,mail->messageID);
+ sLog->outError("Player %u has unknown item_template (ProtoType) in mailed items(GUID: %u template: %u) in mail (%u), deleted.", GetGUIDLow(), item_guid_low, item_template,mail->messageID);
trans->PAppend("DELETE FROM mail_items WHERE item_guid = '%u'", item_guid_low);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE);
stmt->setUInt32(0, item_guid_low);
@@ -17156,7 +17156,7 @@ void Player::_LoadMailedItems(Mail *mail)
if (!item->LoadFromDB(item_guid_low, MAKE_NEW_GUID(fields[13].GetUInt32(), 0, HIGHGUID_PLAYER), fields, item_template))
{
- sLog.outError("Player::_LoadMailedItems - Item in mail (%u) doesn't exist !!!! - item guid: %u, deleted from mail", mail->messageID, item_guid_low);
+ sLog->outError("Player::_LoadMailedItems - Item in mail (%u) doesn't exist !!!! - item guid: %u, deleted from mail", mail->messageID, item_guid_low);
CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid = '%u'", item_guid_low);
item->FSetState(ITEM_REMOVED);
item->SaveToDB(trans); // it also deletes item object !
@@ -17211,7 +17211,7 @@ void Player::_LoadMail()
if (m->mailTemplateId && !sMailTemplateStore.LookupEntry(m->mailTemplateId))
{
- sLog.outError("Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId);
+ sLog->outError("Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId);
m->mailTemplateId = 0;
}
@@ -17267,7 +17267,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
else
{
questStatusData.m_status = QUEST_STATUS_NONE;
- sLog.outError("Player %s have invalid quest %d status (%u), replaced by QUEST_STATUS_NONE(0).",GetName(),quest_id,qstatus);
+ sLog->outError("Player %s have invalid quest %d status (%u), replaced by QUEST_STATUS_NONE(0).",GetName(),quest_id,qstatus);
}
questStatusData.m_rewarded = (fields[2].GetUInt8() > 0);
@@ -17279,10 +17279,10 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
{
AddTimedQuest(quest_id);
- if (quest_time <= sWorld.GetGameTime())
+ if (quest_time <= sWorld->GetGameTime())
questStatusData.m_timer = 1;
else
- questStatusData.m_timer = uint32((quest_time - sWorld.GetGameTime()) * IN_MILLISECONDS);
+ questStatusData.m_timer = uint32((quest_time - sWorld->GetGameTime()) * IN_MILLISECONDS);
}
else
quest_time = 0;
@@ -17336,7 +17336,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
m_questRewardTalentCount += pQuest->GetBonusTalents();
}
- sLog.outDebug("Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow());
+ sLog->outDebug("Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow());
}
}
while (result->NextRow());
@@ -17375,7 +17375,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result)
if (quest_daily_idx >= PLAYER_MAX_DAILY_QUESTS) // max amount with exist data in query
{
- sLog.outError("Player (GUID: %u) have more 25 daily quest records in `charcter_queststatus_daily`",GetGUIDLow());
+ sLog->outError("Player (GUID: %u) have more 25 daily quest records in `charcter_queststatus_daily`",GetGUIDLow());
break;
}
@@ -17391,7 +17391,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result)
SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx, quest_id);
++quest_daily_idx;
- sLog.outDebug("Daily quest (%u) cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
+ sLog->outDebug("Daily quest (%u) cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
}
while (result->NextRow());
}
@@ -17413,7 +17413,7 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result)
continue;
m_weeklyquests.insert(quest_id);
- sLog.outDebug("Weekly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
+ sLog->outDebug("Weekly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
}
while (result->NextRow());
}
@@ -17479,14 +17479,14 @@ void Player::_LoadBoundInstances(PreparedQueryResult result)
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
if (!mapEntry || !mapEntry->IsDungeon())
{
- sLog.outError("_LoadBoundInstances: player %s(%d) has bind to not existed or not dungeon map %d", GetName(), GetGUIDLow(), mapId);
+ sLog->outError("_LoadBoundInstances: player %s(%d) has bind to not existed or not dungeon map %d", GetName(), GetGUIDLow(), mapId);
CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%d' AND instance = '%d'", GetGUIDLow(), instanceId);
continue;
}
if (difficulty >= MAX_DIFFICULTY)
{
- sLog.outError("_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId);
+ sLog->outError("_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId);
CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%d' AND instance = '%d'", GetGUIDLow(), instanceId);
continue;
}
@@ -17494,14 +17494,14 @@ void Player::_LoadBoundInstances(PreparedQueryResult result)
MapDifficulty const* mapDiff = GetMapDifficultyData(mapId,Difficulty(difficulty));
if (!mapDiff)
{
- sLog.outError("_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId);
+ sLog->outError("_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u", GetName(), GetGUIDLow(), difficulty, mapId);
CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%d' AND instance = '%d'", GetGUIDLow(), instanceId);
continue;
}
if (!perm && group)
{
- sLog.outError("_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d,%d,%d", GetName(), GetGUIDLow(), GUID_LOPART(group->GetGUID()), mapId, instanceId, difficulty);
+ sLog->outError("_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d,%d,%d", GetName(), GetGUIDLow(), GUID_LOPART(group->GetGUID()), mapId, instanceId, difficulty);
CharacterDatabase.PExecute("DELETE FROM character_instance WHERE guid = '%d' AND instance = '%d'", GetGUIDLow(), instanceId);
continue;
}
@@ -17585,7 +17585,7 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave *save, bool permanent, b
bind.save = save;
bind.perm = permanent;
if (!load)
- sLog.outDebug("Player::BindToInstance: %s(%d) is now bound to map %d, instance %d, difficulty %d", GetName(), GetGUIDLow(), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty());
+ sLog->outDebug("Player::BindToInstance: %s(%d) is now bound to map %d, instance %d, difficulty %d", GetName(), GetGUIDLow(), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty());
sScriptMgr->OnPlayerBindToInstance(this, save->GetDifficulty(), save->GetMapId(), permanent);
return &bind;
}
@@ -17725,7 +17725,7 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report
if (!mapEntry)
return false;
- if (!sWorld.getBoolConfig(CONFIG_INSTANCE_IGNORE_LEVEL))
+ if (!sWorld->getBoolConfig(CONFIG_INSTANCE_IGNORE_LEVEL))
{
if (ar->levelMin && getLevel() < ar->levelMin)
LevelMin = ar->levelMin;
@@ -17810,7 +17810,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
if (!info)
{
- sLog.outError("Player have incorrect race/class pair. Can't be loaded.");
+ sLog->outError("Player have incorrect race/class pair. Can't be loaded.");
return false;
}
@@ -17848,7 +17848,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
GetGUIDLow(), m_homebindMapId, m_homebindAreaId, m_homebindX, m_homebindY, m_homebindZ);
}
- sLog.outStaticDebug("Setting player home position - mapid: %u, areaid: %u, X: %f, Y: %f, Z: %f",
+ sLog->outStaticDebug("Setting player home position - mapid: %u, areaid: %u, X: %f, Y: %f, Z: %f",
m_homebindMapId, m_homebindAreaId, m_homebindX, m_homebindY, m_homebindZ);
return true;
@@ -17861,7 +17861,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
void Player::SaveToDB()
{
// delay auto save at any saves (manual, in code, or autosave)
- m_nextSave = sWorld.getIntConfig(CONFIG_INTERVAL_SAVE);
+ m_nextSave = sWorld->getIntConfig(CONFIG_INTERVAL_SAVE);
//lets allow only players in world to be saved
if (IsBeingTeleportedFar())
@@ -17873,7 +17873,7 @@ void Player::SaveToDB()
// first save/honor gain after midnight will also update the player's honor fields
UpdateHonorFields();
- sLog.outDebug("The value of player %s at save: ", m_name.c_str());
+ sLog->outDebug("The value of player %s at save: ", m_name.c_str());
outDebugValues();
std::string sql_name = m_name;
@@ -18041,7 +18041,7 @@ void Player::SaveToDB()
// check if stats should only be saved on logout
// save stats can be out of transaction
- if (m_session->isLogingOut() || !sWorld.getBoolConfig(CONFIG_STATS_SAVE_ONLY_ON_LOGOUT))
+ if (m_session->isLogingOut() || !sWorld->getBoolConfig(CONFIG_STATS_SAVE_ONLY_ON_LOGOUT))
_SaveStats(trans);
CharacterDatabase.CommitTransaction(trans);
@@ -18184,7 +18184,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
}
else
{
- sLog.outError("Can't find item guid %u but is in refundable storage for player %u ! Removing.", *itr, GetGUIDLow());
+ sLog->outError("Can't find item guid %u but is in refundable storage for player %u ! Removing.", *itr, GetGUIDLow());
m_refundableItems.erase(itr);
}
}
@@ -18215,7 +18215,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
uint32 bagTestGUID = 0;
if (Item* test2 = GetItemByPos(INVENTORY_SLOT_BAG_0, item->GetBagSlot()))
bagTestGUID = test2->GetGUIDLow();
- sLog.outError("Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u (state %d) are incorrect, the player doesn't have an item at that position!", lowGuid, GetName(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), (int32)item->GetState());
+ sLog->outError("Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u (state %d) are incorrect, the player doesn't have an item at that position!", lowGuid, GetName(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), (int32)item->GetState());
// according to the test that was just performed nothing should be in this slot, delete
trans->PAppend("DELETE FROM character_inventory WHERE bag=%u AND slot=%u AND guid=%u", bagTestGUID, item->GetSlot(), lowGuid);
// also THIS item should be somewhere else, cheat attempt
@@ -18226,7 +18226,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
}
else if (test != item)
{
- sLog.outError("Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u are incorrect, the item with guid %u is there instead!", lowGuid, GetName(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow());
+ sLog->outError("Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u are incorrect, the item with guid %u is there instead!", lowGuid, GetName(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow());
// save all changes to the item...
if (item->GetState() != ITEM_NEW) // only for existing items, no dupes
item->SaveToDB(trans);
@@ -18324,11 +18324,11 @@ void Player::_SaveQuestStatus(SQLTransaction& trans)
case QUEST_NEW :
trans->PAppend("INSERT INTO character_queststatus (guid,quest,status,rewarded,explored,timer,mobcount1,mobcount2,mobcount3,mobcount4,itemcount1,itemcount2,itemcount3,itemcount4) "
"VALUES ('%u', '%u', '%u', '%u', '%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u')",
- GetGUIDLow(), i->first, i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILLISECONDS+ sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3]);
+ GetGUIDLow(), i->first, i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILLISECONDS+ sWorld->GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3]);
break;
case QUEST_CHANGED :
trans->PAppend("UPDATE character_queststatus SET status = '%u',rewarded = '%u',explored = '%u',timer = '" UI64FMTD "',mobcount1 = '%u',mobcount2 = '%u',mobcount3 = '%u',mobcount4 = '%u',itemcount1 = '%u',itemcount2 = '%u',itemcount3 = '%u',itemcount4 = '%u' WHERE guid = '%u' AND quest = '%u' ",
- i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILLISECONDS + sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3], GetGUIDLow(), i->first);
+ i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILLISECONDS + sWorld->GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3], GetGUIDLow(), i->first);
break;
case QUEST_UNCHANGED:
break;
@@ -18451,7 +18451,7 @@ void Player::_SaveSpells(SQLTransaction& trans)
void Player::_SaveStats(SQLTransaction& trans)
{
// check if stat saving is enabled and if char level is high enough
- if (!sWorld.getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE) || getLevel() < sWorld.getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE))
+ if (!sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE) || getLevel() < sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE))
return;
trans->PAppend("DELETE FROM character_stats WHERE guid = '%u'", GetGUIDLow());
@@ -18482,21 +18482,21 @@ void Player::_SaveStats(SQLTransaction& trans)
void Player::outDebugValues() const
{
- if (!sLog.IsOutDebug()) // optimize disabled debug output
+ if (!sLog->IsOutDebug()) // optimize disabled debug output
return;
- sLog.outDebug("HP is: \t\t\t%u\t\tMP is: \t\t\t%u",GetMaxHealth(), GetMaxPower(POWER_MANA));
- sLog.outDebug("AGILITY is: \t\t%f\t\tSTRENGTH is: \t\t%f",GetStat(STAT_AGILITY), GetStat(STAT_STRENGTH));
- sLog.outDebug("INTELLECT is: \t\t%f\t\tSPIRIT is: \t\t%f",GetStat(STAT_INTELLECT), GetStat(STAT_SPIRIT));
- sLog.outDebug("STAMINA is: \t\t%f",GetStat(STAT_STAMINA));
- sLog.outDebug("Armor is: \t\t%u\t\tBlock is: \t\t%f",GetArmor(), GetFloatValue(PLAYER_BLOCK_PERCENTAGE));
- sLog.outDebug("HolyRes is: \t\t%u\t\tFireRes is: \t\t%u",GetResistance(SPELL_SCHOOL_HOLY), GetResistance(SPELL_SCHOOL_FIRE));
- sLog.outDebug("NatureRes is: \t\t%u\t\tFrostRes is: \t\t%u",GetResistance(SPELL_SCHOOL_NATURE), GetResistance(SPELL_SCHOOL_FROST));
- sLog.outDebug("ShadowRes is: \t\t%u\t\tArcaneRes is: \t\t%u",GetResistance(SPELL_SCHOOL_SHADOW), GetResistance(SPELL_SCHOOL_ARCANE));
- sLog.outDebug("MIN_DAMAGE is: \t\t%f\tMAX_DAMAGE is: \t\t%f",GetFloatValue(UNIT_FIELD_MINDAMAGE), GetFloatValue(UNIT_FIELD_MAXDAMAGE));
- sLog.outDebug("MIN_OFFHAND_DAMAGE is: \t%f\tMAX_OFFHAND_DAMAGE is: \t%f",GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE), GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE));
- sLog.outDebug("MIN_RANGED_DAMAGE is: \t%f\tMAX_RANGED_DAMAGE is: \t%f",GetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE), GetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE));
- sLog.outDebug("ATTACK_TIME is: \t%u\t\tRANGE_ATTACK_TIME is: \t%u",GetAttackTime(BASE_ATTACK), GetAttackTime(RANGED_ATTACK));
+ sLog->outDebug("HP is: \t\t\t%u\t\tMP is: \t\t\t%u",GetMaxHealth(), GetMaxPower(POWER_MANA));
+ sLog->outDebug("AGILITY is: \t\t%f\t\tSTRENGTH is: \t\t%f",GetStat(STAT_AGILITY), GetStat(STAT_STRENGTH));
+ sLog->outDebug("INTELLECT is: \t\t%f\t\tSPIRIT is: \t\t%f",GetStat(STAT_INTELLECT), GetStat(STAT_SPIRIT));
+ sLog->outDebug("STAMINA is: \t\t%f",GetStat(STAT_STAMINA));
+ sLog->outDebug("Armor is: \t\t%u\t\tBlock is: \t\t%f",GetArmor(), GetFloatValue(PLAYER_BLOCK_PERCENTAGE));
+ sLog->outDebug("HolyRes is: \t\t%u\t\tFireRes is: \t\t%u",GetResistance(SPELL_SCHOOL_HOLY), GetResistance(SPELL_SCHOOL_FIRE));
+ sLog->outDebug("NatureRes is: \t\t%u\t\tFrostRes is: \t\t%u",GetResistance(SPELL_SCHOOL_NATURE), GetResistance(SPELL_SCHOOL_FROST));
+ sLog->outDebug("ShadowRes is: \t\t%u\t\tArcaneRes is: \t\t%u",GetResistance(SPELL_SCHOOL_SHADOW), GetResistance(SPELL_SCHOOL_ARCANE));
+ sLog->outDebug("MIN_DAMAGE is: \t\t%f\tMAX_DAMAGE is: \t\t%f",GetFloatValue(UNIT_FIELD_MINDAMAGE), GetFloatValue(UNIT_FIELD_MAXDAMAGE));
+ sLog->outDebug("MIN_OFFHAND_DAMAGE is: \t%f\tMAX_OFFHAND_DAMAGE is: \t%f",GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE), GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE));
+ sLog->outDebug("MIN_RANGED_DAMAGE is: \t%f\tMAX_RANGED_DAMAGE is: \t%f",GetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE), GetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE));
+ sLog->outDebug("ATTACK_TIME is: \t%u\t\tRANGE_ATTACK_TIME is: \t%u",GetAttackTime(BASE_ATTACK), GetAttackTime(RANGED_ATTACK));
}
/*********************************************************/
@@ -18512,7 +18512,7 @@ void Player::UpdateSpeakTime()
time_t current = time (NULL);
if (m_speakTime > current)
{
- uint32 max_count = sWorld.getIntConfig(CONFIG_CHATFLOOD_MESSAGE_COUNT);
+ uint32 max_count = sWorld->getIntConfig(CONFIG_CHATFLOOD_MESSAGE_COUNT);
if (!max_count)
return;
@@ -18520,7 +18520,7 @@ void Player::UpdateSpeakTime()
if (m_speakCount >= max_count)
{
// prevent overwrite mute time, if message send just before mutes set, for example.
- time_t new_mute = current + sWorld.getIntConfig(CONFIG_CHATFLOOD_MUTE_TIME);
+ time_t new_mute = current + sWorld->getIntConfig(CONFIG_CHATFLOOD_MUTE_TIME);
if (GetSession()->m_muteTime < new_mute)
GetSession()->m_muteTime = new_mute;
@@ -18530,7 +18530,7 @@ void Player::UpdateSpeakTime()
else
m_speakCount = 0;
- m_speakTime = current + sWorld.getIntConfig(CONFIG_CHATFLOOD_MESSAGE_DELAY);
+ m_speakTime = current + sWorld->getIntConfig(CONFIG_CHATFLOOD_MESSAGE_DELAY);
}
bool Player::CanSpeak() const
@@ -18555,7 +18555,7 @@ void Player::SavePositionInDB(uint32 mapid, float x,float y,float z,float o,uint
<< "',position_z='"<<z<<"',orientation='"<<o<<"',map='"<<mapid
<< "',zone='"<<zone<<"',trans_x='0',trans_y='0',trans_z='0',"
<< "transguid='0',taxi_path='' WHERE guid='"<< GUID_LOPART(guid) <<"'";
- sLog.outDebug("%s", ss.str().c_str());
+ sLog->outDebug("%s", ss.str().c_str());
CharacterDatabase.Execute(ss.str().c_str());
}
@@ -18785,7 +18785,7 @@ Pet* Player::GetPet() const
return pet;
//there may be a guardian in slot
- //sLog.outError("Player::GetPet: Pet %u not exist.",GUID_LOPART(pet_guid));
+ //sLog->outError("Player::GetPet: Pet %u not exist.",GUID_LOPART(pet_guid));
//const_cast<Player*>(this)->SetPetGUID(0);
}
@@ -18799,7 +18799,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
if (pet)
{
- sLog.outDebug("RemovePet %u, %u, %u", pet->GetEntry(), mode, returnreagent);
+ sLog->outDebug("RemovePet %u, %u, %u", pet->GetEntry(), mode, returnreagent);
if (pet->m_removed)
return;
@@ -18887,10 +18887,10 @@ void Player::StopCastingCharm()
if (GetCharmGUID())
{
- sLog.outCrash("Player %s (GUID: " UI64FMTD " is not able to uncharm unit (GUID: " UI64FMTD " Entry: %u, Type: %u)", GetName(), GetGUID(), GetCharmGUID(), charm->GetEntry(), charm->GetTypeId());
+ sLog->outCrash("Player %s (GUID: " UI64FMTD " is not able to uncharm unit (GUID: " UI64FMTD " Entry: %u, Type: %u)", GetName(), GetGUID(), GetCharmGUID(), charm->GetEntry(), charm->GetTypeId());
if (charm->GetCharmerGUID())
{
- sLog.outCrash("Charmed unit has charmer guid " UI64FMTD, charm->GetCharmerGUID());
+ sLog->outCrash("Charmed unit has charmer guid " UI64FMTD, charm->GetCharmerGUID());
ASSERT(false);
}
else
@@ -18917,7 +18917,7 @@ void Player::Say(const std::string& text, const uint32 language)
WorldPacket data(SMSG_MESSAGECHAT, 200);
BuildPlayerChat(&data, CHAT_MSG_SAY, _text, language);
- SendMessageToSetInRange(&data, sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_SAY), true);
+ SendMessageToSetInRange(&data, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY), true);
}
void Player::Yell(const std::string& text, const uint32 language)
@@ -18927,7 +18927,7 @@ void Player::Yell(const std::string& text, const uint32 language)
WorldPacket data(SMSG_MESSAGECHAT, 200);
BuildPlayerChat(&data, CHAT_MSG_YELL, _text, language);
- SendMessageToSetInRange(&data, sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_YELL), true);
+ SendMessageToSetInRange(&data, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_YELL), true);
}
void Player::TextEmote(const std::string& text)
@@ -18937,7 +18937,7 @@ void Player::TextEmote(const std::string& text)
WorldPacket data(SMSG_MESSAGECHAT, 200);
BuildPlayerChat(&data, CHAT_MSG_EMOTE, _text, LANG_UNIVERSAL);
- SendMessageToSetInRange(&data, sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE), true, !sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT));
+ SendMessageToSetInRange(&data, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE), true, !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT));
}
void Player::Whisper(const std::string& text, uint32 language, uint64 receiver)
@@ -18991,7 +18991,7 @@ void Player::PetSpellInitialize()
if (!pet)
return;
- sLog.outDebug("Pet Spells Groups");
+ sLog->outDebug("Pet Spells Groups");
CharmInfo *charmInfo = pet->GetCharmInfo();
@@ -19065,7 +19065,7 @@ void Player::PossessSpellInitialize()
if (!charmInfo)
{
- sLog.outError("Player::PossessSpellInitialize(): charm ("UI64FMTD") has no charminfo!", charm->GetGUID());
+ sLog->outError("Player::PossessSpellInitialize(): charm ("UI64FMTD") has no charminfo!", charm->GetGUID());
return;
}
@@ -19112,7 +19112,7 @@ void Player::VehicleSpellInitialize()
ConditionList conditions = sConditionMgr->GetConditionsForVehicleSpell(veh->ToCreature()->GetEntry(), spellId);
if (!sConditionMgr->IsPlayerMeetToConditions(this, conditions))
{
- sLog.outDebug("VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", veh->ToCreature()->GetEntry(), spellId);
+ sLog->outDebug("VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", veh->ToCreature()->GetEntry(), spellId);
continue;
}
if (IsPassiveSpell(spellId))
@@ -19141,7 +19141,7 @@ void Player::CharmSpellInitialize()
CharmInfo *charmInfo = charm->GetCharmInfo();
if (!charmInfo)
{
- sLog.outError("Player::CharmSpellInitialize(): the player's charm ("UI64FMTD") has no charminfo!", charm->GetGUID());
+ sLog->outError("Player::CharmSpellInitialize(): the player's charm ("UI64FMTD") has no charminfo!", charm->GetGUID());
return;
}
@@ -19211,7 +19211,7 @@ bool Player::IsAffectedBySpellmod(SpellEntry const *spellInfo, SpellModifier *mo
void Player::AddSpellMod(SpellModifier* mod, bool apply)
{
- sLog.outDebug("Player::AddSpellMod %d", mod->spellId);
+ sLog->outDebug("Player::AddSpellMod %d", mod->spellId);
uint16 Opcode = (mod->type == SPELLMOD_FLAT) ? SMSG_SET_FLAT_SPELL_MODIFIER : SMSG_SET_PCT_SPELL_MODIFIER;
int i = 0;
@@ -19424,7 +19424,7 @@ void Player::LeaveAllArenaTeams(uint64 guid)
void Player::SetRestBonus (float rest_bonus_new)
{
// Prevent resting on max level
- if (getLevel() >= sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
rest_bonus_new = 0;
if (rest_bonus_new < 0)
@@ -19636,7 +19636,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
// prevent stealth flight
//RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TALK);
- if (sWorld.getBoolConfig(CONFIG_INSTANT_TAXI))
+ if (sWorld->getBoolConfig(CONFIG_INSTANT_TAXI))
{
TaxiNodesEntry const* lastnode = sTaxiNodesStore.LookupEntry(nodes[nodes.size()-1]);
m_taxi.ClearTaxiDestinations();
@@ -19648,7 +19648,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
data << uint32(ERR_TAXIOK);
GetSession()->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_ACTIVATETAXIREPLY");
+ sLog->outDebug("WORLD: Sent SMSG_ACTIVATETAXIREPLY");
GetSession()->SendDoFlight(mount_display_id, sourcepath);
}
return true;
@@ -19683,7 +19683,7 @@ void Player::ContinueTaxiFlight()
if (!sourceNode)
return;
- sLog.outDebug("WORLD: Restart character %u taxi flight", GetGUIDLow());
+ sLog->outDebug("WORLD: Restart character %u taxi flight", GetGUIDLow());
uint32 mountDisplayId = sObjectMgr->GetTaxiMountDisplayId(sourceNode, GetTeam(),true);
uint32 path = m_taxi.GetCurrentTaxiPath();
@@ -19818,7 +19818,7 @@ void Player::InitDisplayIds()
PlayerInfo const *info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
if (!info)
{
- sLog.outError("Player %u has incorrect race/class pair. Can't init display ids.", GetGUIDLow());
+ sLog->outError("Player %u has incorrect race/class pair. Can't init display ids.", GetGUIDLow());
return;
}
@@ -19834,7 +19834,7 @@ void Player::InitDisplayIds()
SetNativeDisplayId(info->displayId_m);
break;
default:
- sLog.outError("Invalid gender %u for player",gender);
+ sLog->outError("Invalid gender %u for player",gender);
return;
}
}
@@ -19924,7 +19924,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
Creature *pCreature = GetNPCIfCanInteractWith(vendorguid,UNIT_NPC_FLAG_VENDOR);
if (!pCreature)
{
- sLog.outDebug("WORLD: BuyItemFromVendor - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)));
+ sLog->outDebug("WORLD: BuyItemFromVendor - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)));
SendBuyError(BUY_ERR_DISTANCE_TOO_FAR, NULL, item, 0);
return false;
}
@@ -19971,7 +19971,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost);
if (!iece)
{
- sLog.outError("Item %u have wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost);
+ sLog->outError("Item %u have wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost);
return false;
}
@@ -20099,7 +20099,7 @@ void Player::UpdateHomebindTime(uint32 time)
data << uint32(m_HomebindTimer);
data << uint32(1);
GetSession()->SendPacket(&data);
- sLog.outDebug("PLAYER: Player '%s' (GUID: %u) will be teleported to homebind in 60 seconds", GetName(),GetGUIDLow());
+ sLog->outDebug("PLAYER: Player '%s' (GUID: %u) will be teleported to homebind in 60 seconds", GetName(),GetGUIDLow());
}
}
@@ -20107,7 +20107,7 @@ void Player::UpdatePvPState(bool onlyFFA)
{
// TODO: should we always synchronize UNIT_FIELD_BYTES_2, 1 of controller and controlled?
if (!pvpInfo.inNoPvPArea && !isGameMaster()
- && (pvpInfo.inFFAPvPArea || sWorld.IsFFAPvPRealm()))
+ && (pvpInfo.inFFAPvPArea || sWorld->IsFFAPvPRealm()))
{
if (!HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
{
@@ -20371,7 +20371,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
}
}
- sLog.outDebug("Checking Condition %u, there are %u Meta Gems, %u Red Gems, %u Yellow Gems and %u Blue Gems, Activate:%s", enchantmentcondition, curcount[0], curcount[1], curcount[2], curcount[3], activate ? "yes" : "no");
+ sLog->outDebug("Checking Condition %u, there are %u Meta Gems, %u Red Gems, %u Yellow Gems and %u Blue Gems, Activate:%s", enchantmentcondition, curcount[0], curcount[1], curcount[2], curcount[3], activate ? "yes" : "no");
return activate;
}
@@ -20487,7 +20487,7 @@ void Player::SetBattlegroundEntryPoint()
return;
}
else
- sLog.outError("SetBattlegroundEntryPoint: Dungeon map %u has no linked graveyard, setting home location as entry point.", GetMapId());
+ sLog->outError("SetBattlegroundEntryPoint: Dungeon map %u has no linked graveyard, setting home location as entry point.", GetMapId());
}
// If new entry point is not BG or arena set it
else if (!GetMap()->IsBattlegroundOrArena())
@@ -20508,7 +20508,7 @@ void Player::LeaveBattleground(bool teleportToEntryPoint)
bg->RemovePlayerAtLeave(GetGUID(), teleportToEntryPoint, true);
// call after remove to be sure that player resurrected for correct cast
- if (bg->isBattleground() && !isGameMaster() && sWorld.getBoolConfig(CONFIG_BATTLEGROUND_CAST_DESERTER))
+ if (bg->isBattleground() && !isGameMaster() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_CAST_DESERTER))
{
if (bg->GetStatus() == STATUS_IN_PROGRESS || bg->GetStatus() == STATUS_WAIT_JOIN)
{
@@ -20689,8 +20689,8 @@ void Player::UpdateVisibilityOf(WorldObject* target)
m_clientGUIDs.erase(target->GetGUID());
#ifdef TRINITY_DEBUG
- if ((sLog.getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0)
- sLog.outDebug("Object %u (Type: %u) out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target));
+ if ((sLog->getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0)
+ sLog->outDebug("Object %u (Type: %u) out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target));
#endif
}
}
@@ -20705,8 +20705,8 @@ void Player::UpdateVisibilityOf(WorldObject* target)
m_clientGUIDs.insert(target->GetGUID());
#ifdef TRINITY_DEBUG
- if ((sLog.getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0)
- sLog.outDebug("Object %u (Type: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target));
+ if ((sLog->getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0)
+ sLog->outDebug("Object %u (Type: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target));
#endif
// target aura duration for caster show only if target exist at caster client
@@ -20764,8 +20764,8 @@ void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& vi
m_clientGUIDs.erase(target->GetGUID());
#ifdef TRINITY_DEBUG
- if ((sLog.getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0)
- sLog.outDebug("Object %u (Type: %u, Entry: %u) is out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target));
+ if ((sLog->getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0)
+ sLog->outDebug("Object %u (Type: %u, Entry: %u) is out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target));
#endif
}
}
@@ -20780,8 +20780,8 @@ void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& vi
UpdateVisibilityOf_helper(m_clientGUIDs,target,visibleNow);
#ifdef TRINITY_DEBUG
- if ((sLog.getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0)
- sLog.outDebug("Object %u (Type: %u, Entry: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target));
+ if ((sLog->getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0)
+ sLog->outDebug("Object %u (Type: %u, Entry: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target));
#endif
}
}
@@ -20814,7 +20814,7 @@ void Player::UpdateVisibilityForPlayer()
void Player::InitPrimaryProfessions()
{
- SetFreePrimaryProfessions(sWorld.getIntConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL));
+ SetFreePrimaryProfessions(sWorld->getIntConfig(CONFIG_MAX_PRIMARY_TRADE_SKILL));
}
void Player::ModifyMoney(int32 d)
@@ -20994,7 +20994,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
SendEquipmentSetList();
data.Initialize(SMSG_LOGIN_SETTIMESPEED, 4 + 4 + 4);
- data << uint32(secsToTimeBitFields(sWorld.GetGameTime()));
+ data << uint32(secsToTimeBitFields(sWorld->GetGameTime()));
data << (float)0.01666667f; // game speed
data << uint32(0); // added in 3.1.2
GetSession()->SendPacket(&data);
@@ -21213,7 +21213,7 @@ void Player::learnDefaultSpells()
for (PlayerCreateInfoSpells::const_iterator itr = info->spell.begin(); itr != info->spell.end(); ++itr)
{
uint32 tspell = *itr;
- sLog.outDebug("PLAYER (Class: %u Race: %u): Adding initial spell, id = %u",uint32(getClass()),uint32(getRace()), tspell);
+ sLog->outDebug("PLAYER (Class: %u Race: %u): Adding initial spell, id = %u",uint32(getClass()),uint32(getRace()), tspell);
if (!IsInWorld()) // will send in INITIAL_SPELLS in list anyway at map add
addSpell(tspell,true,true,true,false);
else // but send in normal spell in game learn case
@@ -21719,7 +21719,7 @@ bool Player::HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item cons
break;
}
default:
- sLog.outError("HasItemFitToSpellReqirements: Not handled spell requirement for item class %u",spellInfo->EquippedItemClass);
+ sLog->outError("HasItemFitToSpellReqirements: Not handled spell requirement for item class %u",spellInfo->EquippedItemClass);
break;
}
@@ -21797,7 +21797,7 @@ uint32 Player::GetResurrectionSpellId()
case 27239: spell_id = 27240; break; // rank 6
case 47883: spell_id = 47882; break; // rank 7
default:
- sLog.outError("Unhandled spell %u: S.Resurrection",(*itr)->GetId());
+ sLog->outError("Unhandled spell %u: S.Resurrection",(*itr)->GetId());
continue;
}
@@ -21841,7 +21841,7 @@ bool Player::isHonorOrXPTarget(Unit* pVictim)
bool Player::GetsRecruitAFriendBonus(bool forXP)
{
bool recruitAFriend = false;
- if (getLevel() <= sWorld.getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL) || !forXP)
+ if (getLevel() <= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL) || !forXP)
{
if (Group *group = this->GetGroup())
{
@@ -21857,12 +21857,12 @@ bool Player::GetsRecruitAFriendBonus(bool forXP)
if (forXP)
{
// level must be allowed to get RaF bonus
- if (pGroupGuy->getLevel() > sWorld.getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL))
+ if (pGroupGuy->getLevel() > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL))
continue;
// level difference must be small enough to get RaF bonus, UNLESS we are lower level
if (pGroupGuy->getLevel() < getLevel())
- if (uint8(getLevel() - pGroupGuy->getLevel()) > sWorld.getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE))
+ if (uint8(getLevel() - pGroupGuy->getLevel()) > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE))
continue;
}
@@ -22025,7 +22025,7 @@ bool Player::IsAtGroupRewardDistance(WorldObject const* pRewardSource) const
if (player->GetMapId() != pRewardSource->GetMapId() || player->GetInstanceId() != pRewardSource->GetInstanceId())
return false;
- return pRewardSource->GetDistance(player) <= sWorld.getFloatConfig(CONFIG_GROUP_XP_DISTANCE);
+ return pRewardSource->GetDistance(player) <= sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE);
}
bool Player::IsAtRecruitAFriendDistance(WorldObject const* pOther) const
@@ -22039,7 +22039,7 @@ bool Player::IsAtRecruitAFriendDistance(WorldObject const* pOther) const
if (player->GetMapId() != pOther->GetMapId() || player->GetInstanceId() != pOther->GetInstanceId())
return false;
- return pOther->GetDistance(player) <= sWorld.getFloatConfig(CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE);
+ return pOther->GetDistance(player) <= sWorld->getFloatConfig(CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE);
}
uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const
@@ -22144,10 +22144,10 @@ uint32 Player::GetCorpseReclaimDelay(bool pvp) const
{
if (pvp)
{
- if (!sWorld.getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP))
+ if (!sWorld->getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP))
return copseReclaimDelay[0];
}
- else if (!sWorld.getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE))
+ else if (!sWorld->getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE))
return 0;
time_t now = time(NULL);
@@ -22161,8 +22161,8 @@ void Player::UpdateCorpseReclaimDelay()
{
bool pvp = m_ExtraFlags & PLAYER_EXTRA_PVP_DEATH;
- if ((pvp && !sWorld.getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP)) ||
- (!pvp && !sWorld.getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE)))
+ if ((pvp && !sWorld->getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP)) ||
+ (!pvp && !sWorld->getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE)))
return;
time_t now = time(NULL);
@@ -22198,8 +22198,8 @@ void Player::SendCorpseReclaimDelay(bool load)
return;
uint64 count;
- if ((pvp && sWorld.getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP)) ||
- (!pvp && sWorld.getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE)))
+ if ((pvp && sWorld->getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP)) ||
+ (!pvp && sWorld->getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE)))
{
count = (m_deathExpireTime-corpse->GetGhostTime())/DEATH_EXPIRE_STEP;
if (count >= MAX_DEATH_COUNT)
@@ -22430,11 +22430,11 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
{
if (apply)
{
- sLog.outDebug("Player::CreateViewpoint: Player %s create seer %u (TypeId: %u).", GetName(), target->GetEntry(), target->GetTypeId());
+ sLog->outDebug("Player::CreateViewpoint: Player %s create seer %u (TypeId: %u).", GetName(), target->GetEntry(), target->GetTypeId());
if (!AddUInt64Value(PLAYER_FARSIGHT, target->GetGUID()))
{
- sLog.outCrash("Player::CreateViewpoint: Player %s cannot add new viewpoint!", GetName());
+ sLog->outCrash("Player::CreateViewpoint: Player %s cannot add new viewpoint!", GetName());
return;
}
@@ -22446,11 +22446,11 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
}
else
{
- sLog.outDebug("Player::CreateViewpoint: Player %s remove seer", GetName());
+ sLog->outDebug("Player::CreateViewpoint: Player %s remove seer", GetName());
if (!RemoveUInt64Value(PLAYER_FARSIGHT, target->GetGUID()))
{
- sLog.outCrash("Player::CreateViewpoint: Player %s cannot remove current viewpoint!", GetName());
+ sLog->outCrash("Player::CreateViewpoint: Player %s cannot remove current viewpoint!", GetName());
return;
}
@@ -22693,7 +22693,7 @@ bool Player::HasGlobalCooldown(SpellEntry const *spellInfo) const
return false;
std::map<uint32, uint32>::const_iterator itr = m_globalCooldowns.find(spellInfo->StartRecoveryCategory);
- return itr != m_globalCooldowns.end() && (itr->second > sWorld.GetUpdateTime());
+ return itr != m_globalCooldowns.end() && (itr->second > sWorld->GetUpdateTime());
}
void Player::RemoveGlobalCooldown(SpellEntry const *spellInfo)
@@ -22918,7 +22918,7 @@ uint32 Player::CalculateTalentsPoints() const
uint32 base_talent = getLevel() < 10 ? 0 : getLevel()-9;
if (getClass() != CLASS_DEATH_KNIGHT || GetMapId() != 609)
- return uint32(base_talent * sWorld.getRate(RATE_TALENT));
+ return uint32(base_talent * sWorld->getRate(RATE_TALENT));
uint32 talentPointsForLevel = getLevel() < 56 ? 0 : getLevel() - 55;
talentPointsForLevel += m_questRewardTalentCount;
@@ -22926,7 +22926,7 @@ uint32 Player::CalculateTalentsPoints() const
if (talentPointsForLevel > base_talent)
talentPointsForLevel = base_talent;
- return uint32(talentPointsForLevel * sWorld.getRate(RATE_TALENT));
+ return uint32(talentPointsForLevel * sWorld->getRate(RATE_TALENT));
}
bool Player::IsKnowHowFlyIn(uint32 mapid, uint32 zone) const
@@ -22962,7 +22962,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(skill);
if (!pSkill)
{
- sLog.outError("Character %u has skill %u that does not exist.", GetGUIDLow(), skill);
+ sLog->outError("Character %u has skill %u that does not exist.", GetGUIDLow(), skill);
continue;
}
@@ -22980,7 +22980,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
}
if (value == 0)
{
- sLog.outError("Character %u has skill %u with value 0. Will be deleted.", GetGUIDLow(), skill);
+ sLog->outError("Character %u has skill %u with value 0. Will be deleted.", GetGUIDLow(), skill);
CharacterDatabase.PExecute("DELETE FROM character_skills WHERE guid = '%u' AND skill = '%u' ", GetGUIDLow(), skill);
continue;
}
@@ -23002,7 +23002,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
if (count >= PLAYER_MAX_SKILLS) // client limit
{
- sLog.outError("Character %u has more than %u skills.", GetGUIDLow(), PLAYER_MAX_SKILLS);
+ sLog->outError("Character %u has more than %u skills.", GetGUIDLow(), PLAYER_MAX_SKILLS);
break;
}
}
@@ -23019,7 +23019,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
// special settings
if (getClass() == CLASS_DEATH_KNIGHT)
{
- uint8 base_level = std::min(getLevel(),uint8(sWorld.getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL)));
+ uint8 base_level = std::min(getLevel(),uint8(sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL)));
if (base_level < 1)
base_level = 1;
uint16 base_skill = (base_level-1)*5; // 270 at starting level 55
@@ -23131,7 +23131,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
{
// calculate total z distance of the fall
float z_diff = m_lastFallZ - movementInfo.pos.GetPositionZ();
- //sLog.outDebug("zDiff = %f", z_diff);
+ //sLog->outDebug("zDiff = %f", z_diff);
//Players with low fall distance, Feather Fall or physical immunity (charges used) are ignored
// 14.57 can be calculated by resolving damageperc formula below to 0
@@ -23146,7 +23146,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
if (damageperc > 0)
{
- uint32 damage = (uint32)(damageperc * GetMaxHealth()*sWorld.getRate(RATE_DAMAGE_FALL));
+ uint32 damage = (uint32)(damageperc * GetMaxHealth()*sWorld->getRate(RATE_DAMAGE_FALL));
float height = movementInfo.pos.m_positionZ;
UpdateGroundPositionZ(movementInfo.pos.m_positionX,movementInfo.pos.m_positionY,height);
@@ -23170,7 +23170,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
}
//Z given by moveinfo, LastZ, FallTime, WaterZ, MapZ, Damage, Safefall reduction
- sLog.outStaticDebug("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d" , movementInfo.pos.GetPositionZ(), height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall);
+ sLog->outStaticDebug("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d" , movementInfo.pos.GetPositionZ(), height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall);
}
}
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_LANDING); // No fly zone - Parachute
@@ -23284,7 +23284,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
uint32 spellid = talentInfo->RankID[talentRank];
if (spellid == 0)
{
- sLog.outError("Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
+ sLog->outError("Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
return;
}
@@ -23296,7 +23296,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
learnSpell(spellid, false);
AddTalent(spellid, m_activeSpec, true);
- sLog.outDetail("TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, m_activeSpec);
+ sLog->outDetail("TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, m_activeSpec);
// update free talent points
SetFreeTalentPoints(CurTalentPoints - (talentRank - curtalent_maxrank + 1));
@@ -23421,7 +23421,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
uint32 spellid = talentInfo->RankID[talentRank];
if (spellid == 0)
{
- sLog.outError("Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
+ sLog->outError("Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
return;
}
@@ -23431,7 +23431,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
// learn! (other talent ranks will unlearned at learning)
pet->learnSpell(spellid);
- sLog.outDetail("PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
+ sLog->outDetail("PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
// update free talent points
pet->SetFreeTalentPoints(CurTalentPoints - (talentRank - curtalent_maxrank + 1));
@@ -23732,7 +23732,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
if (!found) // something wrong...
{
- sLog.outError("Player %s tried to save equipment set "UI64FMTD" (index %u), but that equipment set not found!", GetName(), eqset.Guid, index);
+ sLog->outError("Player %s tried to save equipment set "UI64FMTD" (index %u), but that equipment set not found!", GetName(), eqset.Guid, index);
return;
}
}
@@ -24176,13 +24176,13 @@ void Player::SendRefundInfo(Item *item)
if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE))
{
- sLog.outDebug("Item refund: item not refundable!");
+ sLog->outDebug("Item refund: item not refundable!");
return;
}
if (GetGUIDLow() != item->GetRefundRecipient()) // Formerly refundable item got traded
{
- sLog.outDebug("Item refund: item was traded!");
+ sLog->outDebug("Item refund: item was traded!");
item->SetNotRefundable(this);
return;
}
@@ -24190,7 +24190,7 @@ void Player::SendRefundInfo(Item *item)
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(item->GetPaidExtendedCost());
if (!iece)
{
- sLog.outDebug("Item refund: cannot find extendedcost data.");
+ sLog->outDebug("Item refund: cannot find extendedcost data.");
return;
}
@@ -24236,7 +24236,7 @@ void Player::RefundItem(Item *item)
{
if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE))
{
- sLog.outDebug("Item refund: item not refundable!");
+ sLog->outDebug("Item refund: item not refundable!");
return;
}
@@ -24252,7 +24252,7 @@ void Player::RefundItem(Item *item)
if (GetGUIDLow() != item->GetRefundRecipient()) // Formerly refundable item got traded
{
- sLog.outDebug("Item refund: item was traded!");
+ sLog->outDebug("Item refund: item was traded!");
item->SetNotRefundable(this);
return;
}
@@ -24260,7 +24260,7 @@ void Player::RefundItem(Item *item)
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(item->GetPaidExtendedCost());
if (!iece)
{
- sLog.outDebug("Item refund: cannot find extendedcost data.");
+ sLog->outDebug("Item refund: cannot find extendedcost data.");
return;
}
diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp
index 5bd02968759..d2639294390 100755
--- a/src/server/game/Entities/Player/SocialMgr.cpp
+++ b/src/server/game/Entities/Player/SocialMgr.cpp
@@ -144,7 +144,7 @@ void PlayerSocial::SendSocialList(Player* plr)
}
plr->GetSession()->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_CONTACT_LIST");
+ sLog->outDebug("WORLD: Sent SMSG_CONTACT_LIST");
}
bool PlayerSocial::HasFriend(uint32 friend_guid)
@@ -187,8 +187,8 @@ void SocialMgr::GetFriendInfo(Player *player, uint32 friendGUID, FriendInfo &fri
uint32 team = player->GetTeam();
AccountTypes security = player->GetSession()->GetSecurity();
- bool allowTwoSideWhoList = sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
- AccountTypes gmLevelInWhoList = AccountTypes (sWorld.getIntConfig(CONFIG_GM_LEVEL_IN_WHO_LIST));
+ bool allowTwoSideWhoList = sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
+ AccountTypes gmLevelInWhoList = AccountTypes (sWorld->getIntConfig(CONFIG_GM_LEVEL_IN_WHO_LIST));
PlayerSocialMap::iterator itr = player->GetSocial()->m_playerSocialMap.find(friendGUID);
if (itr != player->GetSocial()->m_playerSocialMap.end())
@@ -263,8 +263,8 @@ void SocialMgr::BroadcastToFriendListers(Player *player, WorldPacket *packet)
uint32 team = player->GetTeam();
AccountTypes security = player->GetSession()->GetSecurity();
uint32 guid = player->GetGUIDLow();
- AccountTypes gmLevelInWhoList = AccountTypes(sWorld.getIntConfig(CONFIG_GM_LEVEL_IN_WHO_LIST));
- bool allowTwoSideWhoList = sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
+ AccountTypes gmLevelInWhoList = AccountTypes(sWorld->getIntConfig(CONFIG_GM_LEVEL_IN_WHO_LIST));
+ bool allowTwoSideWhoList = sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
for (SocialMap::const_iterator itr = m_socialMap.begin(); itr != m_socialMap.end(); ++itr)
{
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 421a931005f..744e7ed59bb 100755
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -35,8 +35,8 @@ void MapManager::LoadTransports()
if (!result)
{
- sLog.outString(">> Loaded 0 transports. DB table `transports` is empty!");
- sLog.outString();
+ sLog->outString(">> Loaded 0 transports. DB table `transports` is empty!");
+ sLog->outString();
return;
}
@@ -58,26 +58,26 @@ void MapManager::LoadTransports()
if (!goinfo)
{
- sLog.outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template missing", entry, name.c_str());
+ sLog->outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template missing", entry, name.c_str());
delete t;
continue;
}
if (goinfo->type != GAMEOBJECT_TYPE_MO_TRANSPORT)
{
- sLog.outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template type wrong", entry, name.c_str());
+ sLog->outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template type wrong", entry, name.c_str());
delete t;
continue;
}
- // sLog.outString("Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name);
+ // sLog->outString("Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name);
std::set<uint32> mapsUsed;
if (!t->GenerateWaypoints(goinfo->moTransport.taxiPathId, mapsUsed))
// skip transports with empty waypoints list
{
- sLog.outErrorDb("Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.",goinfo->moTransport.taxiPathId);
+ sLog->outErrorDb("Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.",goinfo->moTransport.taxiPathId);
delete t;
continue;
}
@@ -119,13 +119,13 @@ void MapManager::LoadTransports()
uint32 guid = fields[0].GetUInt32();
uint32 entry = fields[1].GetUInt32();
std::string name = fields[2].GetString();
- sLog.outErrorDb("Transport %u '%s' have record (GUID: %u) in `gameobject`. Transports DON'T must have any records in `gameobject` or its behavior will be unpredictable/bugged.",entry,name.c_str(),guid);
+ sLog->outErrorDb("Transport %u '%s' have record (GUID: %u) in `gameobject`. Transports DON'T must have any records in `gameobject` or its behavior will be unpredictable/bugged.",entry,name.c_str(),guid);
}
while (result->NextRow());
}
- sLog.outString(">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog.outString();
+ sLog->outString(">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString();
}
void MapManager::LoadTransportNPCs()
@@ -137,8 +137,8 @@ void MapManager::LoadTransportNPCs()
if (!result)
{
- sLog.outString(">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!");
- sLog.outString();
+ sLog->outString(">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!");
+ sLog->outString();
return;
}
@@ -169,8 +169,8 @@ void MapManager::LoadTransportNPCs()
}
while (result->NextRow());
- sLog.outString(">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- sLog.outString();
+ sLog->outString(">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ sLog->outString();
}
Transport::Transport(uint32 period, uint32 script) : GameObject(), m_period(period), ScriptId(script)
@@ -196,7 +196,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa
if (!IsPositionValid())
{
- sLog.outError("Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
+ sLog->outError("Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
guidlow,x,y);
return false;
}
@@ -207,7 +207,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa
if (!goinfo)
{
- sLog.outErrorDb("Transport not created: entry in `gameobject_template` not found, guidlow: %u map: %u (X: %f Y: %f Z: %f) ang: %f",guidlow, mapid, x, y, z, ang);
+ sLog->outErrorDb("Transport not created: entry in `gameobject_template` not found, guidlow: %u map: %u (X: %f Y: %f Z: %f) ang: %f",guidlow, mapid, x, y, z, ang);
return false;
}
@@ -354,7 +354,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
}
// for (int i = 0; i < keyFrames.size(); ++i) {
- // sLog.outString("%f, %f, %f, %f, %f, %f, %f", keyFrames[i].x, keyFrames[i].y, keyFrames[i].distUntilStop, keyFrames[i].distSinceStop, keyFrames[i].distFromPrev, keyFrames[i].tFrom, keyFrames[i].tTo);
+ // sLog->outString("%f, %f, %f, %f, %f, %f, %f", keyFrames[i].x, keyFrames[i].y, keyFrames[i].distUntilStop, keyFrames[i].distSinceStop, keyFrames[i].distFromPrev, keyFrames[i].tFrom, keyFrames[i].tTo);
// }
// Now we're completely set up; we can move along the length of each waypoint at 100 ms intervals
@@ -398,7 +398,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
cM = keyFrames[i].node->mapid;
}
- // sLog.outString("T: %d, D: %f, x: %f, y: %f, z: %f", t, d, newX, newY, newZ);
+ // sLog->outString("T: %d, D: %f, x: %f, y: %f, z: %f", t, d, newX, newY, newZ);
WayPoint pos(keyFrames[i].node->mapid, newX, newY, newZ, teleport, 0);
if (teleport)
m_WayPoints[t] = pos;
@@ -447,7 +447,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
WayPoint pos(keyFrames[i + 1].node->mapid, keyFrames[i + 1].node->x, keyFrames[i + 1].node->y, keyFrames[i + 1].node->z, teleport,
0, keyFrames[i + 1].node->arrivalEventID, keyFrames[i + 1].node->departureEventID);
- // sLog.outString("T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport);
+ // sLog->outString("T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport);
/*
if (keyFrames[i+1].delay > 5)
pos.delayed = true;
@@ -456,12 +456,12 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
m_WayPoints[t] = pos;
t += keyFrames[i + 1].node->delay * 1000;
- // sLog.outString("------");
+ // sLog->outString("------");
}
uint32 timer = t;
- // sLog.outDetail(" Generated %lu waypoints, total time %u.", (unsigned long)m_WayPoints.size(), timer);
+ // sLog->outDetail(" Generated %lu waypoints, total time %u.", (unsigned long)m_WayPoints.size(), timer);
m_curr = m_WayPoints.begin();
m_next = GetNextWayPoint();
@@ -520,7 +520,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
bool Transport::AddPassenger(Player* passenger)
{
if (m_passengers.insert(passenger).second)
- sLog.outDetail("Player %s boarded transport %s.", passenger->GetName(), GetName());
+ sLog->outDetail("Player %s boarded transport %s.", passenger->GetName(), GetName());
sScriptMgr->OnAddPassenger(this, passenger);
return true;
@@ -529,7 +529,7 @@ bool Transport::AddPassenger(Player* passenger)
bool Transport::RemovePassenger(Player* passenger)
{
if (m_passengers.erase(passenger))
- sLog.outDetail("Player %s removed from transport %s.", passenger->GetName(), GetName());
+ sLog->outDetail("Player %s removed from transport %s.", passenger->GetName(), GetName());
sScriptMgr->OnRemovePassenger(this, passenger);
return true;
@@ -540,7 +540,7 @@ void Transport::Update(uint32 p_diff)
if(!AI())
{
if (!AIM_Initialize())
- sLog.outError("Could not initialize GameObjectAI for Transport");
+ sLog->outError("Could not initialize GameObjectAI for Transport");
} else
AI()->UpdateAI(p_diff);
@@ -572,11 +572,11 @@ void Transport::Update(uint32 p_diff)
m_nextNodeTime = m_curr->first;
- if (m_curr == m_WayPoints.begin() && (sLog.getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0)
- sLog.outDetail(" ************ BEGIN ************** %s", m_name.c_str());
+ if (m_curr == m_WayPoints.begin() && (sLog->getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0)
+ sLog->outDetail(" ************ BEGIN ************** %s", m_name.c_str());
- if ((sLog.getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0)
- sLog.outDetail("%s moved to %d %f %f %f %d", m_name.c_str(), m_curr->second.id, m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid);
+ if ((sLog->getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0)
+ sLog->outDetail("%s moved to %d %f %f %f %d", m_name.c_str(), m_curr->second.id, m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid);
}
sScriptMgr->OnTransportUpdate(this, p_diff);
@@ -619,7 +619,7 @@ void Transport::DoEventIfAny(WayPointMap::value_type const& node, bool departure
{
if (uint32 eventid = departure ? node.second.departureEventID : node.second.arrivalEventID)
{
- sLog.outDebug("Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.first, GetName());
+ sLog->outDebug("Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.first, GetName());
GetMap()->ScriptsStart(sEventScripts, eventid, this, this);
EventInform(eventid);
}
@@ -668,7 +668,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y,
if(!pCreature->IsPositionValid())
{
- sLog.outError("Creature (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY());
+ sLog->outError("Creature (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY());
delete pCreature;
return 0;
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 003b06a0b67..63aaa6b0669 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -476,9 +476,9 @@ void Unit::GetRandomContactPoint(const Unit* obj, float &x, float &y, float &z,
float combat_reach = GetCombatReach();
if (combat_reach < 0.1) // sometimes bugged for players
{
- //sLog.outError("Unit %u (Type: %u) has invalid combat_reach %f",GetGUIDLow(),GetTypeId(),combat_reach);
+ //sLog->outError("Unit %u (Type: %u) has invalid combat_reach %f",GetGUIDLow(),GetTypeId(),combat_reach);
//if (GetTypeId() == TYPEID_UNIT)
- // sLog.outError("Creature entry %u has invalid combat_reach", this->ToCreature()->GetEntry());
+ // sLog->outError("Creature entry %u has invalid combat_reach", this->ToCreature()->GetEntry());
combat_reach = DEFAULT_COMBAT_REACH;
}
uint32 attacker_number = getAttackers().size();
@@ -618,10 +618,10 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
return 0;
}
- sLog.outStaticDebug("DealDamageStart");
+ sLog->outStaticDebug("DealDamageStart");
uint32 health = pVictim->GetHealth();
- sLog.outDetail("deal dmg:%d to health:%d ",damage,health);
+ sLog->outDetail("deal dmg:%d to health:%d ",damage,health);
// duel ends when player has 1 or less hp
bool duel_hasEnded = false;
@@ -660,7 +660,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
if (health <= damage)
{
- sLog.outStaticDebug("DealDamage: victim just died");
+ sLog->outStaticDebug("DealDamage: victim just died");
if (pVictim->GetTypeId() == TYPEID_PLAYER)
{
@@ -675,7 +675,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
}
else
{
- sLog.outStaticDebug("DealDamageAlive");
+ sLog->outStaticDebug("DealDamageAlive");
if (pVictim->GetTypeId() == TYPEID_PLAYER)
pVictim->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED, damage);
@@ -695,7 +695,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
else // victim is a player
{
// random durability for items (HIT TAKEN)
- if (roll_chance_f(sWorld.getRate(RATE_DURABILITY_LOSS_DAMAGE)))
+ if (roll_chance_f(sWorld->getRate(RATE_DURABILITY_LOSS_DAMAGE)))
{
EquipmentSlots slot = EquipmentSlots(urand(0,EQUIPMENT_SLOT_END-1));
pVictim->ToPlayer()->DurabilityPointLossForEquipSlot(slot);
@@ -712,7 +712,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
if (GetTypeId() == TYPEID_PLAYER)
{
// random durability for items (HIT DONE)
- if (roll_chance_f(sWorld.getRate(RATE_DURABILITY_LOSS_DAMAGE)))
+ if (roll_chance_f(sWorld->getRate(RATE_DURABILITY_LOSS_DAMAGE)))
{
EquipmentSlots slot = EquipmentSlots(urand(0,EQUIPMENT_SLOT_END-1));
this->ToPlayer()->DurabilityPointLossForEquipSlot(slot);
@@ -768,7 +768,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
}
}
- sLog.outStaticDebug("DealDamageEnd returned %d damage", damage);
+ sLog->outStaticDebug("DealDamageEnd returned %d damage", damage);
return damage;
}
@@ -786,7 +786,7 @@ void Unit::CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castIte
if (!spellInfo)
{
- sLog.outError("CastSpell: unknown spell id %i by caster: %s %u)", spellId,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ sLog->outError("CastSpell: unknown spell id %i by caster: %s %u)", spellId,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
@@ -797,7 +797,7 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I
{
if (!spellInfo)
{
- sLog.outError("CastSpell: unknown spell by caster: %s %u)", (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ sLog->outError("CastSpell: unknown spell by caster: %s %u)", (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
@@ -809,7 +809,7 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I
targets.setUnitTarget(Victim);
if (castItem)
- sLog.outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id);
+ sLog->outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id);
if (!originalCaster && triggeredByAura)
originalCaster = triggeredByAura->GetCasterGUID();
@@ -844,7 +844,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit*
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo)
{
- sLog.outError("CastSpell: unknown spell id %i by caster: %s %u)", spellId,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ sLog->outError("CastSpell: unknown spell id %i by caster: %s %u)", spellId,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
@@ -858,7 +858,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit*
if (castItem)
{
- sLog.outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id);
+ sLog->outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id);
spell->m_CastItem = castItem;
}
@@ -875,12 +875,12 @@ void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered,
if (!spellInfo)
{
- sLog.outError("CastSpell(x,y,z): unknown spell id %i by caster: %s %u)", spellId,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ sLog->outError("CastSpell(x,y,z): unknown spell id %i by caster: %s %u)", spellId,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
if (castItem)
- sLog.outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id);
+ sLog->outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id);
if (!originalCaster && triggeredByAura)
originalCaster = triggeredByAura->GetCasterGUID();
@@ -905,18 +905,18 @@ void Unit::CastSpell(GameObject *go, uint32 spellId, bool triggered, Item *castI
if (!spellInfo)
{
- sLog.outError("CastSpell(x,y,z): unknown spell id %i by caster: %s %u)", spellId,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ sLog->outError("CastSpell(x,y,z): unknown spell id %i by caster: %s %u)", spellId,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
if (!(spellInfo->Targets & (TARGET_FLAG_OBJECT | TARGET_FLAG_OBJECT_CASTER)))
{
- sLog.outError("CastSpell: spell id %i by caster: %s %u) is not gameobject spell", spellId,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ sLog->outError("CastSpell: spell id %i by caster: %s %u) is not gameobject spell", spellId,(GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
if (castItem)
- sLog.outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id);
+ sLog->outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id);
if (!originalCaster && triggeredByAura)
originalCaster = triggeredByAura->GetCasterGUID();
@@ -1067,7 +1067,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
SpellEntry const *spellProto = sSpellStore.LookupEntry(damageInfo->SpellID);
if (spellProto == NULL)
{
- sLog.outDebug("Unit::DealSpellDamage have wrong damageInfo->SpellID: %u", damageInfo->SpellID);
+ sLog->outDebug("Unit::DealSpellDamage have wrong damageInfo->SpellID: %u", damageInfo->SpellID);
return;
}
@@ -1806,7 +1806,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
);
break;
default:
- sLog.outError("Unit::CalcAbsorbResist: unknown Reflective Shield spell %d", aurEff->GetId());
+ sLog->outError("Unit::CalcAbsorbResist: unknown Reflective Shield spell %d", aurEff->GetId());
break;
}
}
@@ -2274,10 +2274,10 @@ void Unit::AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType, bool ex
DealMeleeDamage(&damageInfo,true);
if (GetTypeId() == TYPEID_PLAYER)
- sLog.outStaticDebug("AttackerStateUpdate: (Player) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
+ sLog->outStaticDebug("AttackerStateUpdate: (Player) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
GetGUIDLow(), pVictim->GetGUIDLow(), pVictim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
else
- sLog.outStaticDebug("AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
+ sLog->outStaticDebug("AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
GetGUIDLow(), pVictim->GetGUIDLow(), pVictim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
}
@@ -2309,7 +2309,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit *pVictim, WeaponAttackT
float parry_chance = pVictim->GetUnitParryChance();
// Useful if want to specify crit & miss chances for melee, else it could be removed
- sLog.outStaticDebug("MELEE OUTCOME: miss %f crit %f dodge %f parry %f block %f", miss_chance,crit_chance,dodge_chance,parry_chance,block_chance);
+ sLog->outStaticDebug("MELEE OUTCOME: miss %f crit %f dodge %f parry %f block %f", miss_chance,crit_chance,dodge_chance,parry_chance,block_chance);
return RollMeleeOutcomeAgainst(pVictim, attType, int32(crit_chance*100), int32(miss_chance*100), int32(dodge_chance*100),int32(parry_chance*100),int32(block_chance*100));
}
@@ -2330,22 +2330,22 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
int32 sum = 0, tmp = 0;
int32 roll = urand (0, 10000);
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: skill bonus of %d for attacker", skillBonus);
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: rolled %d, miss %d, dodge %d, parry %d, block %d, crit %d",
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: skill bonus of %d for attacker", skillBonus);
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: rolled %d, miss %d, dodge %d, parry %d, block %d, crit %d",
roll, miss_chance, dodge_chance, parry_chance, block_chance, crit_chance);
tmp = miss_chance;
if (tmp > 0 && roll < (sum += tmp))
{
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: MISS");
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: MISS");
return MELEE_HIT_MISS;
}
// always crit against a sitting target (except 0 crit chance)
if (pVictim->GetTypeId() == TYPEID_PLAYER && crit_chance > 0 && !pVictim->IsStandState())
{
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: CRIT (sitting victim)");
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT (sitting victim)");
return MELEE_HIT_CRIT;
}
@@ -2354,7 +2354,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
// only players can't dodge if attacker is behind
if (pVictim->GetTypeId() == TYPEID_PLAYER && !pVictim->HasInArc(M_PI,this) && !pVictim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: attack came from behind and victim was a player.");
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: attack came from behind and victim was a player.");
}
else
{
@@ -2373,7 +2373,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
&& ((tmp -= skillBonus) > 0)
&& roll < (sum += tmp))
{
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum-tmp, sum);
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum-tmp, sum);
return MELEE_HIT_DODGE;
}
}
@@ -2382,7 +2382,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
// check if attack comes from behind, nobody can parry or block if attacker is behind
if (!pVictim->HasInArc(M_PI, this) && !pVictim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: attack came from behind.");
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: attack came from behind.");
else
{
// Reduce parry chance by attacker expertise rating
@@ -2398,7 +2398,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
&& (tmp2 -= skillBonus) > 0
&& roll < (sum += tmp2))
{
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum);
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum);
return MELEE_HIT_PARRY;
}
}
@@ -2410,7 +2410,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
&& (tmp -= skillBonus) > 0
&& roll < (sum += tmp))
{
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: BLOCK <%d, %d)", sum-tmp, sum);
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: BLOCK <%d, %d)", sum-tmp, sum);
return MELEE_HIT_BLOCK;
}
}
@@ -2421,9 +2421,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
if (tmp > 0 && roll < (sum += tmp))
{
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum-tmp, sum);
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum-tmp, sum);
if (GetTypeId() == TYPEID_UNIT && (this->ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRIT))
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: CRIT DISABLED)");
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRIT DISABLED)");
else
return MELEE_HIT_CRIT;
}
@@ -2443,7 +2443,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
tmp = tmp > 4000 ? 4000 : tmp;
if (roll < (sum += tmp))
{
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum-4000, sum);
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum-4000, sum);
return MELEE_HIT_GLANCING;
}
}
@@ -2467,13 +2467,13 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
tmp = tmp * 200 - 1500;
if (roll < (sum += tmp))
{
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: CRUSHING <%d, %d)", sum-tmp, sum);
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: CRUSHING <%d, %d)", sum-tmp, sum);
return MELEE_HIT_CRUSHING;
}
}
}
- sLog.outStaticDebug ("RollMeleeOutcomeAgainst: NORMAL");
+ sLog->outStaticDebug ("RollMeleeOutcomeAgainst: NORMAL");
return MELEE_HIT_NORMAL;
}
@@ -2539,7 +2539,7 @@ void Unit::SendMeleeAttackStart(Unit* pVictim)
data << uint64(pVictim->GetGUID());
SendMessageToSet(&data, true);
- sLog.outStaticDebug("WORLD: Sent SMSG_ATTACKSTART");
+ sLog->outStaticDebug("WORLD: Sent SMSG_ATTACKSTART");
}
void Unit::SendMeleeAttackStop(Unit* victim)
@@ -2552,7 +2552,7 @@ void Unit::SendMeleeAttackStop(Unit* victim)
data.append(victim->GetPackGUID()); // can be 0x00...
data << uint32(0); // can be 0x1
SendMessageToSet(&data, true);
- sLog.outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"),victim->GetGUIDLow());
+ sLog->outDetail("%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"),victim->GetGUIDLow());
}
bool Unit::isSpellBlocked(Unit *pVictim, SpellEntry const * /*spellProto*/, WeaponAttackType attackType)
@@ -2706,7 +2706,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
case MELEE_HIT_BLOCK: canBlock = false; break;
case MELEE_HIT_PARRY: canParry = false; break;
default:
- sLog.outStaticDebug("Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT have unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue());
+ sLog->outStaticDebug("Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT have unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue());
break;
}
}
@@ -3281,7 +3281,7 @@ void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool wi
{
ASSERT(spellType < CURRENT_MAX_SPELL);
- //sLog.outDebug("Interrupt spell for unit %u.", GetEntry());
+ //sLog->outDebug("Interrupt spell for unit %u.", GetEntry());
Spell *spell = m_currentSpells[spellType];
if (spell
&& (withDelayed || spell->getState() != SPELL_STATE_DELAYED)
@@ -3572,7 +3572,7 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMo
ASSERT(aurApp->GetTarget() == this);
aurApp->SetRemoveMode(removeMode);
Aura * aura = aurApp->GetBase();
- sLog.outDebug("Aura %u now is remove mode %d", aura->GetId(), removeMode);
+ sLog->outDebug("Aura %u now is remove mode %d", aura->GetId(), removeMode);
// dead loop is killing the server probably
ASSERT(m_removedAurasCount < 0xFFFFFFFF);
@@ -3975,7 +3975,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
triggeredSpellId = 64694;
break;
default:
- sLog.outError("Aura::HandleAuraSpecificMods: Unknown rank of Lava Flows (%d) found", aurEff->GetId());
+ sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Lava Flows (%d) found", aurEff->GetId());
}
}
if (triggeredSpellId)
@@ -4335,7 +4335,7 @@ void Unit::DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime)
// update for out of range group members (on 1 slot use)
aura->SetNeedClientUpdateForTargets();
- sLog.outDebug("Aura %u partially interrupted on unit %u, new duration: %u ms",aura->GetId() , GetGUIDLow(), aura->GetDuration());
+ sLog->outDebug("Aura %u partially interrupted on unit %u, new duration: %u ms",aura->GetId() , GetGUIDLow(), aura->GetDuration());
}
}
}
@@ -5052,7 +5052,7 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo)
data << float(pInfo->multiplier); // gain multiplier
break;
default:
- sLog.outError("Unit::SendPeriodicAuraLog: unknown aura %u", uint32(aura->GetAuraType()));
+ sLog->outError("Unit::SendPeriodicAuraLog: unknown aura %u", uint32(aura->GetAuraType()));
return;
}
@@ -5085,7 +5085,7 @@ void Unit::SendSpellDamageImmune(Unit * target, uint32 spellId)
void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo)
{
- sLog.outDebug("WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
+ sLog->outDebug("WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
uint32 count = 1;
size_t maxsize = 4+5+5+4+4+1+4+4+4+4+4+1+4+4+4+4+4*12;
@@ -5202,7 +5202,7 @@ bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
if (!triggerEntry)
{
- sLog.outError("Unit::HandleHasteAuraProc: Spell %u have not existed triggered spell %u",hasteSpell->Id,triggered_spell_id);
+ sLog->outError("Unit::HandleHasteAuraProc: Spell %u have not existed triggered spell %u",hasteSpell->Id,triggered_spell_id);
return false;
}
@@ -5264,7 +5264,7 @@ bool Unit::HandleSpellCritChanceAuraProc(Unit *pVictim, uint32 /*damage*/, AuraE
if (!triggerEntry)
{
- sLog.outError("Unit::HandleHasteAuraProc: Spell %u have not existed triggered spell %u",triggeredByAuraSpell->Id,triggered_spell_id);
+ sLog->outError("Unit::HandleHasteAuraProc: Spell %u have not existed triggered spell %u",triggeredByAuraSpell->Id,triggered_spell_id);
return false;
}
@@ -5327,7 +5327,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
// return damage % to attacker but < 50% own total health
basepoints0 = int32(std::min(CalculatePctN(damage, triggerAmount), CountPctFromMaxHealth(50)));
- sLog.outDebug("DEBUG LINE: Data about Eye for an Eye ID %u, damage taken %u, unit max health %u, damage done %u", dummySpell->Id, damage, GetMaxHealth(), basepoints0);
+ sLog->outDebug("DEBUG LINE: Data about Eye for an Eye ID %u, damage taken %u, unit max health %u, damage done %u", dummySpell->Id, damage, GetMaxHealth(), basepoints0);
triggered_spell_id = 25997;
@@ -5885,7 +5885,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
case 31571: triggered_spell_id = 57529; break;
case 31572: triggered_spell_id = 57531; break;
default:
- sLog.outError("Unit::HandleDummyAuraProc: non handled spell id: %u",dummySpell->Id);
+ sLog->outError("Unit::HandleDummyAuraProc: non handled spell id: %u",dummySpell->Id);
return false;
}
break;
@@ -5966,7 +5966,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
case 12847: basepoints0 = int32(0.16f*damage); break;
case 12848: basepoints0 = int32(0.20f*damage); break;
default:
- sLog.outError("Unit::HandleDummyAuraProc: non handled spell id: %u (IG)",dummySpell->Id);
+ sLog->outError("Unit::HandleDummyAuraProc: non handled spell id: %u (IG)",dummySpell->Id);
return false;
}
@@ -6045,7 +6045,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
case 29834: triggered_spell_id=29841; break;
case 42770: triggered_spell_id=42771; break;
default:
- sLog.outError("Unit::HandleDummyAuraProc: non handled spell id: %u (SW)",dummySpell->Id);
+ sLog->outError("Unit::HandleDummyAuraProc: non handled spell id: %u (SW)",dummySpell->Id);
return false;
}
@@ -7215,7 +7215,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
case 3787:spellId = 58804; break; // 8 Rank
default:
{
- sLog.outError("Unit::HandleDummyAuraProc: non handled item enchantment (rank?) %u for spell id: %u (Windfury)",
+ sLog->outError("Unit::HandleDummyAuraProc: non handled item enchantment (rank?) %u for spell id: %u (Windfury)",
castItem->GetEnchantmentId(EnchantmentSlot(TEMP_ENCHANTMENT_SLOT)),dummySpell->Id);
return false;
}
@@ -7224,7 +7224,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
SpellEntry const* windfurySpellEntry = sSpellStore.LookupEntry(spellId);
if (!windfurySpellEntry)
{
- sLog.outError("Unit::HandleDummyAuraProc: non existed spell id: %u (Windfury)",spellId);
+ sLog->outError("Unit::HandleDummyAuraProc: non existed spell id: %u (Windfury)",spellId);
return false;
}
@@ -7543,7 +7543,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
case 49270: spellId = 49268; break; // Rank 7
case 49271: spellId = 49269; break; // Rank 8
default:
- sLog.outError("Unit::HandleDummyAuraProc: non handled spell id: %u (LO)", procSpell->Id);
+ sLog->outError("Unit::HandleDummyAuraProc: non handled spell id: %u (LO)", procSpell->Id);
return false;
}
@@ -7872,7 +7872,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
SpellEntry const* triggerEntry = sSpellStore.LookupEntry(triggered_spell_id);
if (!triggerEntry)
{
- sLog.outError("Unit::HandleDummyAuraProc: Spell %u have not existed triggered spell %u",dummySpell->Id,triggered_spell_id);
+ sLog->outError("Unit::HandleDummyAuraProc: Spell %u have not existed triggered spell %u",dummySpell->Id,triggered_spell_id);
return false;
}
@@ -7934,7 +7934,7 @@ bool Unit::HandleObsModEnergyAuraProc(Unit *pVictim, uint32 /*damage*/, AuraEffe
// Try handle unknown trigger spells
if (!triggerEntry)
{
- sLog.outError("Unit::HandleObsModEnergyAuraProc: Spell %u have not existed triggered spell %u",dummySpell->Id,triggered_spell_id);
+ sLog->outError("Unit::HandleObsModEnergyAuraProc: Spell %u have not existed triggered spell %u",dummySpell->Id,triggered_spell_id);
return false;
}
@@ -7991,7 +7991,7 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 /*damage*/, Aur
if (!triggerEntry)
{
- sLog.outError("Unit::HandleModDamagePctTakenAuraProc: Spell %u have not existed triggered spell %u",dummySpell->Id,triggered_spell_id);
+ sLog->outError("Unit::HandleModDamagePctTakenAuraProc: Spell %u have not existed triggered spell %u",dummySpell->Id,triggered_spell_id);
return false;
}
@@ -8284,7 +8284,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
trigger_spell_id = 31643;
break;
default:
- sLog.outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed",auraSpellInfo->Id);
+ sLog->outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed",auraSpellInfo->Id);
return false;
}
}
@@ -8350,7 +8350,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
case 27815: trigger_spell_id = 27817; break;
case 27816: trigger_spell_id = 27818; break;
default:
- sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id);
+ sLog->outError("Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id);
return false;
}
basepoints0 = CalculatePctN(int32(damage), triggerAmount) / 3;
@@ -8401,7 +8401,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
trigger_spell_id = 63468;
break;
default:
- sLog.outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots",auraSpellInfo->Id);
+ sLog->outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots",auraSpellInfo->Id);
return false;
}
SpellEntry const *TriggerPS = sSpellStore.LookupEntry(trigger_spell_id);
@@ -8526,14 +8526,14 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
case 48820: originalSpellId = 48824; break;
case 48821: originalSpellId = 48825; break;
default:
- sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in HShock",procSpell->Id);
+ sLog->outError("Unit::HandleProcTriggerSpell: Spell %u not handled in HShock",procSpell->Id);
return false;
}
}
SpellEntry const *originalSpell = sSpellStore.LookupEntry(originalSpellId);
if (!originalSpell)
{
- sLog.outError("Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu",originalSpellId);
+ sLog->outError("Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu",originalSpellId);
return false;
}
// percent stored in effect 1 (class scripts) base points
@@ -8640,7 +8640,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
if (triggerEntry == NULL)
{
// Not cast unknown spell
- // sLog.outError("Unit::HandleProcTriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",auraSpellInfo->Id,triggeredByAura->GetEffIndex());
+ // sLog->outError("Unit::HandleProcTriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",auraSpellInfo->Id,triggeredByAura->GetEffIndex());
return false;
}
@@ -9115,7 +9115,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 /*damage*/, A
if (!triggerEntry)
{
- sLog.outError("Unit::HandleOverrideClassScriptAuraProc: Spell %u triggering for class script id %u",triggered_spell_id,scriptId);
+ sLog->outError("Unit::HandleOverrideClassScriptAuraProc: Spell %u triggering for class script id %u",triggered_spell_id,scriptId);
return false;
}
@@ -9183,11 +9183,11 @@ FactionTemplateEntry const* Unit::getFactionTemplateEntry() const
if (GetGUID() != guid)
{
if (const Player *player = ToPlayer())
- sLog.outError("Player %s has invalid faction (faction template id) #%u", player->GetName(), getFaction());
+ sLog->outError("Player %s has invalid faction (faction template id) #%u", player->GetName(), getFaction());
else if (const Creature *creature = ToCreature())
- sLog.outError("Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureInfo()->Entry, getFaction());
+ sLog->outError("Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureInfo()->Entry, getFaction());
else
- sLog.outError("Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName(), uint32(GetTypeId()), getFaction());
+ sLog->outError("Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName(), uint32(GetTypeId()), getFaction());
guid = GetGUID();
}
@@ -9628,7 +9628,7 @@ void Unit::RemoveAllAttackers()
AttackerSet::iterator iter = m_attackers.begin();
if (!(*iter)->AttackStop())
{
- sLog.outError("WORLD: Unit has an attacker that isn't attacking it!");
+ sLog->outError("WORLD: Unit has an attacker that isn't attacking it!");
m_attackers.erase(iter);
}
}
@@ -9758,7 +9758,7 @@ Minion *Unit::GetFirstMinion() const
if (pet->HasUnitTypeMask(UNIT_MASK_MINION))
return (Minion*)pet;
- sLog.outError("Unit::GetFirstMinion: Minion %u not exist.",GUID_LOPART(pet_guid));
+ sLog->outError("Unit::GetFirstMinion: Minion %u not exist.",GUID_LOPART(pet_guid));
const_cast<Unit*>(this)->SetMinionGUID(0);
}
@@ -9773,7 +9773,7 @@ Guardian* Unit::GetGuardianPet() const
if (pet->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
return (Guardian*)pet;
- sLog.outCrash("Unit::GetGuardianPet: Guardian " UI64FMTD " not exist.", pet_guid);
+ sLog->outCrash("Unit::GetGuardianPet: Guardian " UI64FMTD " not exist.", pet_guid);
const_cast<Unit*>(this)->SetPetGUID(0);
}
@@ -9787,7 +9787,7 @@ Unit* Unit::GetCharm() const
if (Unit* pet = ObjectAccessor::GetUnit(*this, charm_guid))
return pet;
- sLog.outError("Unit::GetCharm: Charmed creature %u not exist.",GUID_LOPART(charm_guid));
+ sLog->outError("Unit::GetCharm: Charmed creature %u not exist.",GUID_LOPART(charm_guid));
const_cast<Unit*>(this)->SetUInt64Value(UNIT_FIELD_CHARM, 0);
}
@@ -9796,13 +9796,13 @@ Unit* Unit::GetCharm() const
void Unit::SetMinion(Minion *minion, bool apply)
{
- sLog.outDebug("SetMinion %u for %u, apply %u", minion->GetEntry(), GetEntry(), apply);
+ sLog->outDebug("SetMinion %u for %u, apply %u", minion->GetEntry(), GetEntry(), apply);
if (apply)
{
if (!minion->AddUInt64Value(UNIT_FIELD_SUMMONEDBY, GetGUID()))
{
- sLog.outCrash("SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
+ sLog->outCrash("SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
return;
}
@@ -9873,7 +9873,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
{
if (minion->GetOwnerGUID() != GetGUID())
{
- sLog.outCrash("SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
+ sLog->outCrash("SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
return;
}
@@ -9985,7 +9985,7 @@ void Unit::SetCharm(Unit* charm, bool apply)
if (GetTypeId() == TYPEID_PLAYER)
{
if (!AddUInt64Value(UNIT_FIELD_CHARM, charm->GetGUID()))
- sLog.outCrash("Player %s is trying to charm unit %u, but it already has a charmed unit " UI64FMTD "", GetName(), charm->GetEntry(), GetCharmGUID());
+ sLog->outCrash("Player %s is trying to charm unit %u, but it already has a charmed unit " UI64FMTD "", GetName(), charm->GetEntry(), GetCharmGUID());
charm->m_ControlledByPlayer = true;
// TODO: maybe we can use this flag to check if controlled by player
@@ -9998,7 +9998,7 @@ void Unit::SetCharm(Unit* charm, bool apply)
charm->SetByteValue(UNIT_FIELD_BYTES_2, 1, GetByteValue(UNIT_FIELD_BYTES_2, 1));
if (!charm->AddUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID()))
- sLog.outCrash("Unit %u is being charmed, but it already has a charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
+ sLog->outCrash("Unit %u is being charmed, but it already has a charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
if (charm->HasUnitMovementFlag(MOVEMENTFLAG_WALKING))
{
@@ -10013,11 +10013,11 @@ void Unit::SetCharm(Unit* charm, bool apply)
if (GetTypeId() == TYPEID_PLAYER)
{
if (!RemoveUInt64Value(UNIT_FIELD_CHARM, charm->GetGUID()))
- sLog.outCrash("Player %s is trying to uncharm unit %u, but it has another charmed unit " UI64FMTD "", GetName(), charm->GetEntry(), GetCharmGUID());
+ sLog->outCrash("Player %s is trying to uncharm unit %u, but it has another charmed unit " UI64FMTD "", GetName(), charm->GetEntry(), GetCharmGUID());
}
if (!charm->RemoveUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID()))
- sLog.outCrash("Unit %u is being uncharmed, but it has another charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
+ sLog->outCrash("Unit %u is being uncharmed, but it has another charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
if (charm->GetTypeId() == TYPEID_PLAYER)
{
@@ -10148,14 +10148,14 @@ void Unit::RemoveAllControlled()
else if (target->GetOwnerGUID() == GetGUID() && target->isSummon())
target->ToTempSummon()->UnSummon();
else
- sLog.outError("Unit %u is trying to release unit %u which is neither charmed nor owned by it", GetEntry(), target->GetEntry());
+ sLog->outError("Unit %u is trying to release unit %u which is neither charmed nor owned by it", GetEntry(), target->GetEntry());
}
if (GetPetGUID())
- sLog.outCrash("Unit %u is not able to release its pet " UI64FMTD, GetEntry(), GetPetGUID());
+ sLog->outCrash("Unit %u is not able to release its pet " UI64FMTD, GetEntry(), GetPetGUID());
if (GetMinionGUID())
- sLog.outCrash("Unit %u is not able to release its minion " UI64FMTD, GetEntry(), GetMinionGUID());
+ sLog->outCrash("Unit %u is not able to release its minion " UI64FMTD, GetEntry(), GetMinionGUID());
if (GetCharmGUID())
- sLog.outCrash("Unit %u is not able to release its charm " UI64FMTD, GetEntry(), GetCharmGUID());
+ sLog->outCrash("Unit %u is not able to release its charm " UI64FMTD, GetEntry(), GetCharmGUID());
}
Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
@@ -11798,7 +11798,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att
AuraEffect* eff0 = (*i)->GetBase()->GetEffect(0);
if (!eff0 || (*i)->GetEffIndex() != 1)
{
- sLog.outError("Spell structure of DD (%u) changed.",(*i)->GetId());
+ sLog->outError("Spell structure of DD (%u) changed.",(*i)->GetId());
continue;
}
@@ -12372,7 +12372,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
break;
}
default:
- sLog.outError("Unit::UpdateSpeed: Unsupported move type (%d)", mtype);
+ sLog->outError("Unit::UpdateSpeed: Unsupported move type (%d)", mtype);
return;
}
@@ -12479,7 +12479,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
data.Initialize(MSG_MOVE_SET_PITCH_RATE, 8+4+2+4+4+4+4+4+4+4);
break;
default:
- sLog.outError("Unit::SetSpeed: Unsupported move type (%d), data not sent to client.",mtype);
+ sLog->outError("Unit::SetSpeed: Unsupported move type (%d), data not sent to client.",mtype);
return;
}
@@ -12538,7 +12538,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
data.Initialize(SMSG_FORCE_PITCH_RATE_CHANGE, 16);
break;
default:
- sLog.outError("Unit::SetSpeed: Unsupported move type (%d), data not sent to client.",mtype);
+ sLog->outError("Unit::SetSpeed: Unsupported move type (%d), data not sent to client.",mtype);
return;
}
data.append(GetPackGUID());
@@ -13214,7 +13214,7 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f
{
if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
{
- sLog.outError("ERROR in HandleStatModifier(): non existed UnitMods or wrong UnitModifierType!");
+ sLog->outError("ERROR in HandleStatModifier(): non existed UnitMods or wrong UnitModifierType!");
return false;
}
@@ -13279,7 +13279,7 @@ float Unit::GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) co
{
if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
{
- sLog.outError("trial to access non existed modifier value from UnitMods!");
+ sLog->outError("trial to access non existed modifier value from UnitMods!");
return 0.0f;
}
@@ -13309,7 +13309,7 @@ float Unit::GetTotalAuraModValue(UnitMods unitMod) const
{
if (unitMod >= UNIT_MOD_END)
{
- sLog.outError("trial to access non existed UnitMods in GetTotalAuraModValue()!");
+ sLog->outError("trial to access non existed UnitMods in GetTotalAuraModValue()!");
return 0.0f;
}
@@ -13638,7 +13638,7 @@ void Unit::RemoveFromWorld()
if (GetCharmerGUID())
{
- sLog.outCrash("Unit %u has charmer guid when removed from world", GetEntry());
+ sLog->outCrash("Unit %u has charmer guid when removed from world", GetEntry());
ASSERT(false);
}
@@ -13646,7 +13646,7 @@ void Unit::RemoveFromWorld()
{
if (owner->m_Controlled.find(this) != owner->m_Controlled.end())
{
- sLog.outCrash("Unit %u is in controlled list of %u when removed from world", GetEntry(), owner->GetEntry());
+ sLog->outCrash("Unit %u is in controlled list of %u when removed from world", GetEntry(), owner->GetEntry());
ASSERT(false);
}
}
@@ -14232,7 +14232,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
bool handled = false;
if (HandleAuraProc(pTarget, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled))
{
- sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), Id);
+ sLog->outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), Id);
takeCharges = true;
}
@@ -14249,7 +14249,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
{
case SPELL_AURA_PROC_TRIGGER_SPELL:
{
- sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ sLog->outDebug("ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
// Don`t drop charge or add cooldown for not started trigger
if (HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
@@ -14257,7 +14257,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
}
case SPELL_AURA_PROC_TRIGGER_DAMAGE:
{
- sLog.outDebug("ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount() , spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ sLog->outDebug("ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount() , spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, spellInfo->SchoolMask);
uint32 damage = SpellDamageBonus(pTarget, spellInfo, triggeredByAura->GetAmount(), SPELL_DIRECT_DAMAGE);
CalculateSpellDamageTaken(&damageInfo, damage, spellInfo);
@@ -14270,38 +14270,38 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
case SPELL_AURA_MANA_SHIELD:
case SPELL_AURA_DUMMY:
{
- sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleDummyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
break;
}
case SPELL_AURA_OBS_MOD_POWER:
- sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleObsModEnergyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
break;
case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN:
- sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleModDamagePctTakenAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
break;
case SPELL_AURA_MOD_MELEE_HASTE:
{
- sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s haste aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s haste aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleHasteAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
break;
}
case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS:
{
- sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleOverrideClassScriptAuraProc(pTarget, damage, triggeredByAura, procSpell, cooldown))
takeCharges = true;
break;
}
case SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE:
{
- sLog.outDebug("ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
+ sLog->outDebug("ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
(isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId());
HandleAuraRaidProcFromChargeWithValue(triggeredByAura);
@@ -14310,7 +14310,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
}
case SPELL_AURA_RAID_PROC_FROM_CHARGE:
{
- sLog.outDebug("ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
+ sLog->outDebug("ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
(isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId());
HandleAuraRaidProcFromCharge(triggeredByAura);
@@ -14319,7 +14319,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
}
case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE:
{
- sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ sLog->outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
@@ -14359,7 +14359,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
takeCharges = true;
break;
case SPELL_AURA_MOD_SPELL_CRIT_CHANCE:
- sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s spell crit chance aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s spell crit chance aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (procSpell && HandleSpellCritChanceAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
break;
@@ -14938,7 +14938,7 @@ bool Unit::InitTamedPet(Pet * pet, uint8 level, uint32 spell_id)
if (!pet->InitStatsForLevel(level))
{
- sLog.outError("Pet::InitStatsForLevel() failed for creature (Entry: %u)!",pet->GetEntry());
+ sLog->outError("Pet::InitStatsForLevel() failed for creature (Entry: %u)!",pet->GetEntry());
return false;
}
@@ -15062,7 +15062,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue(AuraEffect *triggeredByAura)
//Currently only Prayer of Mending
if (!(spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && spellProto->SpellFamilyFlags[1] & 0x20))
{
- sLog.outDebug("Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id);
+ sLog->outDebug("Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id);
return false;
}
@@ -15119,7 +15119,7 @@ bool Unit::HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura)
damageSpellId = 43594;
break;
default:
- sLog.outError("Unit::HandleAuraRaidProcFromCharge, received not handled spell: %u", spellProto->Id);
+ sLog->outError("Unit::HandleAuraRaidProcFromCharge, received not handled spell: %u", spellProto->Id);
return false;
}
@@ -15292,7 +15292,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
if (!SpiritOfRedemption)
{
- sLog.outStaticDebug("SET JUST_DIED");
+ sLog->outStaticDebug("SET JUST_DIED");
pVictim->setDeathState(JUST_DIED);
}
@@ -15305,10 +15305,10 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
pVictim->ToPlayer()->SetPvPDeath(player != NULL);
// only if not player and not controlled by player pet. And not at BG
- if ((durabilityLoss && !player && !pVictim->ToPlayer()->InBattleground()) || (player && sWorld.getBoolConfig(CONFIG_DURABILITY_LOSS_IN_PVP)))
+ if ((durabilityLoss && !player && !pVictim->ToPlayer()->InBattleground()) || (player && sWorld->getBoolConfig(CONFIG_DURABILITY_LOSS_IN_PVP)))
{
- sLog.outStaticDebug("We are dead, losing %f percent durability", sWorld.getRate(RATE_DURABILITY_LOSS_ON_DEATH));
- pVictim->ToPlayer()->DurabilityLossAll(sWorld.getRate(RATE_DURABILITY_LOSS_ON_DEATH),false);
+ sLog->outStaticDebug("We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
+ pVictim->ToPlayer()->DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH),false);
// durability lost message
WorldPacket data(SMSG_DURABILITY_DAMAGE_DEATH, 0);
pVictim->ToPlayer()->GetSession()->SendPacket(&data);
@@ -15327,7 +15327,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
}
else // creature died
{
- sLog.outStaticDebug("DealDamageNotPlayer");
+ sLog->outStaticDebug("DealDamageNotPlayer");
if (!creature->isPet())
{
@@ -15593,7 +15593,7 @@ void Unit::SetFeared(bool apply)
caster = ObjectAccessor::GetUnit(*this, fearAuras.front()->GetCasterGUID());
if (!caster)
caster = getAttackerForHelper();
- GetMotionMaster()->MoveFleeing(caster, fearAuras.empty() ? sWorld.getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY) : 0); // caster == NULL processed in MoveFleeing
+ GetMotionMaster()->MoveFleeing(caster, fearAuras.empty() ? sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY) : 0); // caster == NULL processed in MoveFleeing
}
else
{
@@ -15644,11 +15644,11 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type)
ASSERT(type != CHARM_TYPE_POSSESS || charmer->GetTypeId() == TYPEID_PLAYER);
ASSERT((type == CHARM_TYPE_VEHICLE) == IsVehicle());
- sLog.outDebug("SetCharmedBy: charmer %u (GUID %u), charmed %u (GUID %u), type %u.", charmer->GetEntry(), charmer->GetGUIDLow(), GetEntry(), GetGUIDLow(), uint32(type));
+ sLog->outDebug("SetCharmedBy: charmer %u (GUID %u), charmed %u (GUID %u), type %u.", charmer->GetEntry(), charmer->GetGUIDLow(), GetEntry(), GetGUIDLow(), uint32(type));
if (this == charmer)
{
- sLog.outCrash("Unit::SetCharmedBy: Unit %u (GUID %u) is trying to charm itself!", GetEntry(), GetGUIDLow());
+ sLog->outCrash("Unit::SetCharmedBy: Unit %u (GUID %u) is trying to charm itself!", GetEntry(), GetGUIDLow());
return false;
}
@@ -15657,14 +15657,14 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type)
if (GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->GetTransport())
{
- sLog.outCrash("Unit::SetCharmedBy: Player on transport is trying to charm %u (GUID %u)", GetEntry(), GetGUIDLow());
+ sLog->outCrash("Unit::SetCharmedBy: Player on transport is trying to charm %u (GUID %u)", GetEntry(), GetGUIDLow());
return false;
}
// Already charmed
if (GetCharmerGUID())
{
- sLog.outCrash("Unit::SetCharmedBy: %u (GUID %u) has already been charmed but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow());
+ sLog->outCrash("Unit::SetCharmedBy: %u (GUID %u) has already been charmed but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow());
return false;
}
@@ -15689,7 +15689,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type)
// StopCastingCharm may remove a possessed pet?
if (!IsInWorld())
{
- sLog.outCrash("Unit::SetCharmedBy: %u (GUID %u) is not in world but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow());
+ sLog->outCrash("Unit::SetCharmedBy: %u (GUID %u) is not in world but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow());
return false;
}
@@ -15776,7 +15776,7 @@ void Unit::RemoveCharmedBy(Unit *charmer)
charmer = GetCharmer();
if (charmer != GetCharmer()) // one aura overrides another?
{
-// sLog.outCrash("Unit::RemoveCharmedBy: this: " UI64FMTD " true charmer: " UI64FMTD " false charmer: " UI64FMTD,
+// sLog->outCrash("Unit::RemoveCharmedBy: this: " UI64FMTD " true charmer: " UI64FMTD " false charmer: " UI64FMTD,
// GetGUID(), GetCharmerGUID(), charmer->GetGUID());
// ASSERT(false);
return;
@@ -15852,7 +15852,7 @@ void Unit::RemoveCharmedBy(Unit *charmer)
if (GetCharmInfo())
GetCharmInfo()->SetPetNumber(0, true);
else
- sLog.outError("Aura::HandleModCharm: target="UI64FMTD" with typeid=%d has a charm aura but no charm info!", GetGUID(), GetTypeId());
+ sLog->outError("Aura::HandleModCharm: target="UI64FMTD" with typeid=%d has a charm aura but no charm info!", GetGUID(), GetTypeId());
}
}
break;
@@ -16676,14 +16676,14 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId)
{
if (seatId >= 0)
{
- sLog.outDebug("EnterVehicle: %u leave vehicle %u seat %d and enter %d.", GetEntry(), m_vehicle->GetBase()->GetEntry(), GetTransSeat(), seatId);
+ sLog->outDebug("EnterVehicle: %u leave vehicle %u seat %d and enter %d.", GetEntry(), m_vehicle->GetBase()->GetEntry(), GetTransSeat(), seatId);
ChangeSeat(seatId);
}
return;
}
else
{
- sLog.outDebug("EnterVehicle: %u exit %u and enter %u.", GetEntry(), m_vehicle->GetBase()->GetEntry(), vehicle->GetBase()->GetEntry());
+ sLog->outDebug("EnterVehicle: %u exit %u and enter %u.", GetEntry(), m_vehicle->GetBase()->GetEntry(), vehicle->GetBase()->GetEntry());
ExitVehicle();
}
}
@@ -16762,7 +16762,7 @@ void Unit::ExitVehicle()
if (!m_vehicle)
return;
- //sLog.outError("exit vehicle");
+ //sLog->outError("exit vehicle");
m_vehicle->RemovePassenger(this);
@@ -16833,7 +16833,7 @@ void Unit::BuildMovementPacket(ByteBuffer *data) const
data->append(GetTransport()->GetPackGUID());
else
{
- sLog.outError("Unit %u does not have transport!", GetEntry());
+ sLog->outError("Unit %u does not have transport!", GetEntry());
*data << (uint8)0;
}
*data << float (GetTransOffsetX());
@@ -16896,7 +16896,7 @@ bool Unit::SetPosition(float x, float y, float z, float orientation, bool telepo
// prevent crash when a bad coord is sent by the client
if (!Trinity::IsValidMapCoord(x,y,z,orientation))
{
- sLog.outDebug("Unit::SetPosition(%f, %f, %f) .. bad coordinates!",x,y,z);
+ sLog->outDebug("Unit::SetPosition(%f, %f, %f) .. bad coordinates!",x,y,z);
return false;
}
@@ -16929,7 +16929,7 @@ void Unit::SendThreatListUpdate()
{
if (uint32 count = getThreatManager().getThreatList().size())
{
- //sLog.outDebug("WORLD: Send SMSG_THREAT_UPDATE Message");
+ //sLog->outDebug("WORLD: Send SMSG_THREAT_UPDATE Message");
WorldPacket data(SMSG_THREAT_UPDATE, 8 + count * 8);
data.append(GetPackGUID());
data << uint32(count);
@@ -16947,7 +16947,7 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
{
if (uint32 count = getThreatManager().getThreatList().size())
{
- sLog.outDebug("WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message");
+ sLog->outDebug("WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message");
WorldPacket data(SMSG_HIGHEST_THREAT_UPDATE, 8 + 8 + count * 8);
data.append(GetPackGUID());
data.appendPackGUID(pHostileReference->getUnitGuid());
@@ -16964,7 +16964,7 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
void Unit::SendClearThreatListOpcode()
{
- sLog.outDebug("WORLD: Send SMSG_THREAT_CLEAR Message");
+ sLog->outDebug("WORLD: Send SMSG_THREAT_CLEAR Message");
WorldPacket data(SMSG_THREAT_CLEAR, 8);
data.append(GetPackGUID());
SendMessageToSet(&data, false);
@@ -16972,7 +16972,7 @@ void Unit::SendClearThreatListOpcode()
void Unit::SendRemoveFromThreatListOpcode(HostileReference* pHostileReference)
{
- sLog.outDebug("WORLD: Send SMSG_THREAT_REMOVE Message");
+ sLog->outDebug("WORLD: Send SMSG_THREAT_REMOVE Message");
WorldPacket data(SMSG_THREAT_REMOVE, 8 + 8);
data.append(GetPackGUID());
data.appendPackGUID(pHostileReference->getUnitGuid());
@@ -17005,7 +17005,7 @@ void Unit::RewardRage(uint32 damage, uint32 weaponSpeedHitFactor, bool attacker)
addRage *= 2.0f;
}
- addRage *= sWorld.getRate(RATE_POWER_RAGE_INCOME);
+ addRage *= sWorld->getRate(RATE_POWER_RAGE_INCOME);
ModifyPower(POWER_RAGE, uint32(addRage * 10));
}
@@ -17046,39 +17046,39 @@ void Unit::StopAttackFaction(uint32 faction_id)
void Unit::OutDebugInfo() const
{
- sLog.outError("Unit::OutDebugInfo");
- sLog.outString("GUID "UI64FMTD", entry %u, type %u, name %s", GetGUID(), GetEntry(), (uint32)GetTypeId(), GetName());
- sLog.outString("OwnerGUID "UI64FMTD", MinionGUID "UI64FMTD", CharmerGUID "UI64FMTD", CharmedGUID "UI64FMTD, GetOwnerGUID(), GetMinionGUID(), GetCharmerGUID(), GetCharmGUID());
- sLog.outString("In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask);
+ sLog->outError("Unit::OutDebugInfo");
+ sLog->outString("GUID "UI64FMTD", entry %u, type %u, name %s", GetGUID(), GetEntry(), (uint32)GetTypeId(), GetName());
+ sLog->outString("OwnerGUID "UI64FMTD", MinionGUID "UI64FMTD", CharmerGUID "UI64FMTD", CharmedGUID "UI64FMTD, GetOwnerGUID(), GetMinionGUID(), GetCharmerGUID(), GetCharmGUID());
+ sLog->outString("In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask);
if (IsInWorld())
- sLog.outString("Mapid %u", GetMapId());
+ sLog->outString("Mapid %u", GetMapId());
- sLog.outStringInLine("Summon Slot: ");
+ sLog->outStringInLine("Summon Slot: ");
for (uint32 i = 0; i < MAX_SUMMON_SLOT; ++i)
- sLog.outStringInLine(UI64FMTD", ", m_SummonSlot[i]);
- sLog.outString();
+ sLog->outStringInLine(UI64FMTD", ", m_SummonSlot[i]);
+ sLog->outString();
- sLog.outStringInLine("Controlled List: ");
+ sLog->outStringInLine("Controlled List: ");
for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
- sLog.outStringInLine(UI64FMTD", ", (*itr)->GetGUID());
- sLog.outString();
+ sLog->outStringInLine(UI64FMTD", ", (*itr)->GetGUID());
+ sLog->outString();
- sLog.outStringInLine("Aura List: ");
+ sLog->outStringInLine("Aura List: ");
for (AuraApplicationMap::const_iterator itr = m_appliedAuras.begin(); itr != m_appliedAuras.end(); ++itr)
- sLog.outStringInLine("%u, ", itr->first);
- sLog.outString();
+ sLog->outStringInLine("%u, ", itr->first);
+ sLog->outString();
if (IsVehicle())
{
- sLog.outStringInLine("Passenger List: ");
+ sLog->outStringInLine("Passenger List: ");
for (SeatMap::iterator itr = GetVehicleKit()->m_Seats.begin(); itr != GetVehicleKit()->m_Seats.end(); ++itr)
if (Unit *passenger = itr->second.passenger)
- sLog.outStringInLine(UI64FMTD", ", passenger->GetGUID());
- sLog.outString();
+ sLog->outStringInLine(UI64FMTD", ", passenger->GetGUID());
+ sLog->outString();
}
if (GetVehicle())
- sLog.outString("On vehicle %u.", GetVehicleBase()->GetEntry());
+ sLog->outString("On vehicle %u.", GetVehicleBase()->GetEntry());
}
uint32 Unit::GetRemainingDotDamage(uint64 caster, uint32 spellId, uint8 effectIndex) const
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index 06e9ca5cbf5..b9912eec152 100755
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -129,7 +129,7 @@ void Vehicle::InstallAllAccessories(uint32 entry)
void Vehicle::Uninstall()
{
- sLog.outDebug("Vehicle::Uninstall %u", me->GetEntry());
+ sLog->outDebug("Vehicle::Uninstall %u", me->GetEntry());
for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
if (Unit *passenger = itr->second.passenger)
if (passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY))
@@ -143,7 +143,7 @@ void Vehicle::Uninstall()
void Vehicle::Die()
{
- sLog.outDebug("Vehicle::Die %u", me->GetEntry());
+ sLog->outDebug("Vehicle::Die %u", me->GetEntry());
for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
if (Unit *passenger = itr->second.passenger)
if (passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY))
@@ -157,7 +157,7 @@ void Vehicle::Die()
void Vehicle::Reset()
{
- sLog.outDebug("Vehicle::Reset");
+ sLog->outDebug("Vehicle::Reset");
if (me->GetTypeId() == TYPEID_PLAYER)
{
if (m_usableSeatNum)
@@ -176,18 +176,18 @@ void Vehicle::Reset()
void Vehicle::RemoveAllPassengers()
{
- sLog.outDebug("Vehicle::RemoveAllPassengers");
+ sLog->outDebug("Vehicle::RemoveAllPassengers");
for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
if (Unit *passenger = itr->second.passenger)
{
if (passenger->IsVehicle())
passenger->GetVehicleKit()->RemoveAllPassengers();
if (passenger->GetVehicle() != this)
- sLog.outCrash("Vehicle %u has invalid passenger %u.", me->GetEntry(), passenger->GetEntry());
+ sLog->outCrash("Vehicle %u has invalid passenger %u.", me->GetEntry(), passenger->GetEntry());
passenger->ExitVehicle();
if (itr->second.passenger)
{
- sLog.outCrash("Vehicle %u cannot remove passenger %u. %u is still on vehicle.", me->GetEntry(), passenger->GetEntry(), itr->second.passenger->GetEntry());
+ sLog->outCrash("Vehicle %u cannot remove passenger %u. %u is still on vehicle.", me->GetEntry(), passenger->GetEntry(), itr->second.passenger->GetEntry());
itr->second.passenger = NULL;
}
@@ -294,7 +294,7 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatId)
ASSERT(!seat->second.passenger);
}
- sLog.outDebug("Unit %s enter vehicle entry %u id %u dbguid %u seat %d", unit->GetName(), me->GetEntry(), m_vehicleInfo->m_ID, me->GetGUIDLow(), (int32)seat->first);
+ sLog->outDebug("Unit %s enter vehicle entry %u id %u dbguid %u seat %d", unit->GetName(), me->GetEntry(), m_vehicleInfo->m_ID, me->GetGUIDLow(), (int32)seat->first);
seat->second.passenger = unit;
if (seat->second.seatInfo->IsUsable())
@@ -377,7 +377,7 @@ void Vehicle::RemovePassenger(Unit *unit)
ASSERT(seat != m_Seats.end());
- sLog.outDebug("Unit %s exit vehicle entry %u id %u dbguid %u seat %d", unit->GetName(), me->GetEntry(), m_vehicleInfo->m_ID, me->GetGUIDLow(), (int32)seat->first);
+ sLog->outDebug("Unit %s exit vehicle entry %u id %u dbguid %u seat %d", unit->GetName(), me->GetEntry(), m_vehicleInfo->m_ID, me->GetGUIDLow(), (int32)seat->first);
seat->second.passenger = NULL;
if (seat->second.seatInfo->IsUsable())
@@ -439,7 +439,7 @@ void Vehicle::RelocatePassengers(float x, float y, float z, float ang)
void Vehicle::Dismiss()
{
- sLog.outDebug("Vehicle::Dismiss %u", me->GetEntry());
+ sLog->outDebug("Vehicle::Dismiss %u", me->GetEntry());
Uninstall();
me->SendObjectDeSpawnAnim(me->GetGUID());
me->CombatStop();