Core/Logging: Try to simplify configuration of loggers and appenders
Changed multiple lines to a simple format: - Logger.name=Type,LogLevel,Flags,AppenderList - Appender.name=Type,LogLevel,Flags,optional1,optional2 * Type = File: optional1 = File name, optiona2 = Mode * Type = Console: optional1 = Colors Created a default set of loggers and appenders. - Root logger defaults to Error, that means you will see nothing on console by default (not even loading) - You need to add the loggers to Loggers options if you want to enable them, otherwise Root logger will be used for all types Restored outSQLDriver (LOG_FILTER_SQL_DRIVER), outSQLDev (LOG_FILTER_SQL_DEV), outArena (LOG_FILTER_ARENA) and outChar (LOG_FILTER_CHARACTER) functionality by creating new types (LOG_FILTER_CHARACTER is a rename of LOG_FILTER_DELETE. Note: You need to update your config file... again (yeah sorry... trying to make it simpler)
This commit is contained in:
@@ -87,7 +87,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint8 type, std::string teamName, uin
|
||||
// Add captain as member
|
||||
AddMember(CaptainGuid);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "New ArenaTeam created [Id: %u] [Type: %u] [Captain low GUID: %u]", GetId(), GetType(), captainLowGuid);
|
||||
sLog->outInfo(LOG_FILTER_ARENAS, "New ArenaTeam created [Id: %u] [Type: %u] [Captain low GUID: %u]", GetId(), GetType(), captainLowGuid);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid)
|
||||
// Check if player is already in a similar arena team
|
||||
if ((player && player->GetArenaTeamId(GetSlot())) || Player::GetArenaTeamIdFromDB(playerGuid, GetType()) != 0)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Arena: Player %s (guid: %u) already has an arena team of type %u", playerName.c_str(), GUID_LOPART(playerGuid), GetType());
|
||||
sLog->outDebug(LOG_FILTER_ARENAS, "Arena: Player %s (guid: %u) already has an arena team of type %u", playerName.c_str(), GUID_LOPART(playerGuid), GetType());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid)
|
||||
player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 1);
|
||||
}
|
||||
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player: %s [GUID: %u] joined arena team type: %u [Id: %u].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId());
|
||||
sLog->outInfo(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] joined arena team type: %u [Id: %u].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -251,7 +251,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
|
||||
if (newMember.Name.empty())
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "ArenaTeam %u has member with empty name - probably player %u doesn't exist, deleting him from memberlist!", arenaTeamId, GUID_LOPART(newMember.Guid));
|
||||
this->DelMember(newMember.Guid, true);
|
||||
DelMember(newMember.Guid, true);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
|
||||
if (Empty() || !captainPresentInTeam)
|
||||
{
|
||||
// Arena team is empty or captain is not in team, delete from db
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "ArenaTeam %u does not have any members or its captain is not in team, disbanding it...", TeamId);
|
||||
sLog->outDebug(LOG_FILTER_ARENAS, "ArenaTeam %u does not have any members or its captain is not in team, disbanding it...", TeamId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ void ArenaTeam::SetCaptain(uint64 guid)
|
||||
newCaptain->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 0);
|
||||
char const* oldCaptainName = oldCaptain ? oldCaptain->GetName() : "";
|
||||
uint32 oldCaptainLowGuid = oldCaptain ? oldCaptain->GetGUIDLow() : 0;
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u] [Type: %u].",
|
||||
sLog->outInfo(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u] [Type: %u].",
|
||||
oldCaptainName, oldCaptainLowGuid, newCaptain->GetName(), newCaptain->GetGUIDLow(), GetId(), GetType());
|
||||
}
|
||||
}
|
||||
@@ -321,7 +321,7 @@ void ArenaTeam::DelMember(uint64 guid, bool cleanDb)
|
||||
// delete all info regarding this team
|
||||
for (uint32 i = 0; i < ARENA_TEAM_END; ++i)
|
||||
player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());
|
||||
sLog->outInfo(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());
|
||||
}
|
||||
|
||||
// Only used for single member deletion, for arena team disband we use a single query for more efficiency
|
||||
@@ -346,7 +346,7 @@ void ArenaTeam::Disband(WorldSession* session)
|
||||
BroadcastEvent(ERR_ARENA_TEAM_DISBANDED_S, 0, 2, session->GetPlayerName(), GetName(), "");
|
||||
|
||||
if (Player* player = session->GetPlayer())
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());
|
||||
sLog->outInfo(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());
|
||||
}
|
||||
|
||||
// Update database
|
||||
@@ -507,7 +507,7 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCoun
|
||||
data << str1 << str2 << str3;
|
||||
break;
|
||||
default:
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
|
||||
sLog->outError(LOG_FILTER_ARENAS, "Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -529,7 +529,7 @@ uint8 ArenaTeam::GetSlotByType(uint32 type)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "FATAL: Unknown arena team type %u for some arena team", type);
|
||||
sLog->outError(LOG_FILTER_ARENAS, "FATAL: Unknown arena team type %u for some arena team", type);
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
|
||||
@@ -1228,7 +1228,7 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount)
|
||||
}
|
||||
|
||||
// item can't be added
|
||||
sLog->outError(LOG_FILTER_PLAYER, "STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id, getRace(), getClass(), msg);
|
||||
sLog->outError(LOG_FILTER_PLAYER_ITEMS, "STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id, getRace(), getClass(), msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1534,7 +1534,7 @@ void Player::Update(uint32 p_time)
|
||||
{
|
||||
//sLog->outFatal(LOG_FILTER_PLAYER, "Player has m_pad %u during update!", m_pad);
|
||||
//if (m_spellModTakingSpell)
|
||||
sLog->outFatal(LOG_FILTER_PLAYER, "Player has m_spellModTakingSpell %u during update!", m_spellModTakingSpell->m_spellInfo->Id);
|
||||
sLog->outFatal(LOG_FILTER_SPELLS_AURAS, "Player has m_spellModTakingSpell %u during update!", m_spellModTakingSpell->m_spellInfo->Id);
|
||||
m_spellModTakingSpell = NULL;
|
||||
}
|
||||
|
||||
@@ -1731,7 +1731,7 @@ void Player::Update(uint32 p_time)
|
||||
{
|
||||
// m_nextSave reseted in SaveToDB call
|
||||
SaveToDB();
|
||||
sLog->outInfo(LOG_FILTER_PLAYER, "Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_PLAYER, "Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow());
|
||||
}
|
||||
else
|
||||
m_nextSave -= p_time;
|
||||
@@ -1879,12 +1879,12 @@ bool Player::BuildEnumData(PreparedQueryResult result, WorldPacket* data)
|
||||
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(plrRace, plrClass);
|
||||
if (!info)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player %u has incorrect race/class pair. Don't build enum.", guid);
|
||||
sLog->outError(LOG_FILTER_PLAYER_LOADING, "Player %u has incorrect race/class pair. Don't build enum.", guid);
|
||||
return false;
|
||||
}
|
||||
else if (!IsValidGender(gender))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player (%u) has incorrect gender (%hu), don't build enum.", guid, gender);
|
||||
sLog->outError(LOG_FILTER_PLAYER_LOADING, "Player (%u) has incorrect gender (%hu), don't build enum.", guid, gender);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2066,14 +2066,14 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
{
|
||||
if (!MapManager::IsValidMapCoord(mapid, x, y, z, orientation))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "TeleportTo: invalid map (%d) or invalid coordinates (X: %f, Y: %f, Z: %f, O: %f) given when teleporting player (GUID: %u, name: %s, map: %d, X: %f, Y: %f, Z: %f, O: %f).",
|
||||
sLog->outError(LOG_FILTER_MAPS, "TeleportTo: invalid map (%d) or invalid coordinates (X: %f, Y: %f, Z: %f, O: %f) given when teleporting player (GUID: %u, name: %s, map: %d, X: %f, Y: %f, Z: %f, O: %f).",
|
||||
mapid, x, y, z, orientation, GetGUIDLow(), GetName(), GetMapId(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, mapid, this))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player (GUID: %u, name: %s) tried to enter a forbidden map %u", GetGUIDLow(), GetName(), mapid);
|
||||
sLog->outError(LOG_FILTER_MAPS, "Player (GUID: %u, name: %s) tried to enter a forbidden map %u", GetGUIDLow(), GetName(), mapid);
|
||||
SendTransferAborted(mapid, TRANSFER_ABORT_MAP_NOT_ALLOWED);
|
||||
return false;
|
||||
}
|
||||
@@ -2426,7 +2426,7 @@ void Player::RemoveFromWorld()
|
||||
{
|
||||
if (WorldObject* viewpoint = GetViewpoint())
|
||||
{
|
||||
sLog->outFatal(LOG_FILTER_PLAYER, "Player %s has viewpoint %u %u when removed from world", GetName(), viewpoint->GetEntry(), viewpoint->GetTypeId());
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player %s has viewpoint %u %u when removed from world", GetName(), viewpoint->GetEntry(), viewpoint->GetTypeId());
|
||||
SetViewpoint(viewpoint, false);
|
||||
}
|
||||
}
|
||||
@@ -3355,7 +3355,7 @@ void Player::SendInitialSpells()
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
|
||||
sLog->outInfo(LOG_FILTER_PLAYER, "CHARACTER: Sent Initial Spells");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CHARACTER: Sent Initial Spells");
|
||||
}
|
||||
|
||||
void Player::RemoveMail(uint32 id)
|
||||
@@ -3436,7 +3436,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning)
|
||||
// do character spell book cleanup (all characters)
|
||||
if (!IsInWorld() && !learning) // spell load case
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId);
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId);
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_SPELL);
|
||||
|
||||
@@ -3445,7 +3445,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning)
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
else
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -3455,7 +3455,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning)
|
||||
// do character spell book cleanup (all characters)
|
||||
if (!IsInWorld() && !learning) // spell load case
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player::addTalent: Broken spell #%u learning not allowed, deleting for all characters in `character_talent`.", spellId);
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "Player::addTalent: Broken spell #%u learning not allowed, deleting for all characters in `character_talent`.", spellId);
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_SPELL);
|
||||
|
||||
@@ -3464,7 +3464,7 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning)
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
else
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player::addTalent: Broken spell #%u learning not allowed.", spellId);
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "Player::addTalent: Broken spell #%u learning not allowed.", spellId);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -3509,7 +3509,7 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
|
||||
// do character spell book cleanup (all characters)
|
||||
if (!IsInWorld() && !learning) // spell load case
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId);
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId);
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_SPELL);
|
||||
|
||||
@@ -3518,7 +3518,7 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
else
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -3528,7 +3528,7 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
|
||||
// do character spell book cleanup (all characters)
|
||||
if (!IsInWorld() && !learning) // spell load case
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Broken spell #%u learning not allowed, deleting for all characters in `character_spell`.", spellId);
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Broken spell #%u learning not allowed, deleting for all characters in `character_spell`.", spellId);
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_SPELL);
|
||||
|
||||
@@ -3537,7 +3537,7 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
else
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player::addSpell: Broken spell #%u learning not allowed.", spellId);
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Broken spell #%u learning not allowed.", spellId);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -4291,7 +4291,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result)
|
||||
|
||||
if (!sSpellMgr->GetSpellInfo(spell_id))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player %u has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUIDLow(), spell_id);
|
||||
sLog->outError(LOG_FILTER_PLAYER_LOADING, "Player %u has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUIDLow(), spell_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -5003,7 +5003,7 @@ void Player::DeleteOldCharacters(uint32 keepDays)
|
||||
|
||||
if (result)
|
||||
{
|
||||
sLog->outInfo(LOG_FILTER_PLAYER, "Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete", result->GetRowCount());
|
||||
sLog->outDebug(LOG_FILTER_PLAYER, "Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete", result->GetRowCount());
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
@@ -5418,7 +5418,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
|
||||
DurabilityCostsEntry const* dcost = sDurabilityCostsStore.LookupEntry(ditemProto->ItemLevel);
|
||||
if (!dcost)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
|
||||
sLog->outError(LOG_FILTER_PLAYER_ITEMS, "RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
|
||||
return TotalCost;
|
||||
}
|
||||
|
||||
@@ -5426,7 +5426,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
|
||||
DurabilityQualityEntry const* dQualitymodEntry = sDurabilityQualityStore.LookupEntry(dQualitymodEntryId);
|
||||
if (!dQualitymodEntry)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
|
||||
sLog->outError(LOG_FILTER_PLAYER_ITEMS, "RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
|
||||
return TotalCost;
|
||||
}
|
||||
|
||||
@@ -5442,7 +5442,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
|
||||
{
|
||||
if (GetGuildId() == 0)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_PLAYER, "You are not member of a guild");
|
||||
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "You are not member of a guild");
|
||||
return TotalCost;
|
||||
}
|
||||
|
||||
@@ -5457,7 +5457,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
|
||||
}
|
||||
else if (!HasEnoughMoney(costs))
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_PLAYER, "You do not have enough money");
|
||||
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "You do not have enough money");
|
||||
return TotalCost;
|
||||
}
|
||||
else
|
||||
@@ -5665,7 +5665,7 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa
|
||||
{
|
||||
if (modGroup >= BASEMOD_END || modType >= MOD_END)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "ERROR in HandleBaseModValue(): non existed BaseModGroup of wrong BaseModType!");
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "ERROR in HandleBaseModValue(): non existed BaseModGroup of wrong BaseModType!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5696,7 +5696,7 @@ float Player::GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const
|
||||
{
|
||||
if (modGroup >= BASEMOD_END || modType > MOD_END)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "trial to access non existed BaseModGroup or wrong BaseModType!");
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "trial to access non existed BaseModGroup or wrong BaseModType!");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@@ -5710,7 +5710,7 @@ float Player::GetTotalBaseModValue(BaseModGroup modGroup) const
|
||||
{
|
||||
if (modGroup >= BASEMOD_END)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "wrong BaseModGroup in GetTotalBaseModValue()!");
|
||||
sLog->outError(LOG_FILTER_SPELLS_AURAS, "wrong BaseModGroup in GetTotalBaseModValue()!");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@@ -6432,7 +6432,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
|
||||
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(id);
|
||||
if (!pSkill)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Skill not found in SkillLineStore: skill #%u", id);
|
||||
sLog->outError(LOG_FILTER_PLAYER_SKILLS, "Skill not found in SkillLineStore: skill #%u", id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6592,8 +6592,6 @@ int16 Player::GetSkillTempBonusValue(uint32 skill) const
|
||||
|
||||
void Player::SendActionButtons(uint32 state) const
|
||||
{
|
||||
sLog->outInfo(LOG_FILTER_PLAYER, "Sending Action Buttons for '%u' spec '%u'", GetGUIDLow(), m_activeSpec);
|
||||
|
||||
WorldPacket data(SMSG_ACTION_BUTTONS, 1+(MAX_ACTION_BUTTONS*4));
|
||||
data << uint8(state);
|
||||
/*
|
||||
@@ -6615,20 +6613,20 @@ void Player::SendActionButtons(uint32 state) const
|
||||
}
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
sLog->outInfo(LOG_FILTER_PLAYER, "Action Buttons for '%u' spec '%u' Sent", GetGUIDLow(), m_activeSpec);
|
||||
sLog->outInfo(LOG_FILTER_NETWORKIO, "SMSG_ACTION_BUTTONS sent '%u' spec '%u' Sent", GetGUIDLow(), m_activeSpec);
|
||||
}
|
||||
|
||||
bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
|
||||
{
|
||||
if (button >= MAX_ACTION_BUTTONS)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Action %u not added into button %u for player %s: button must be < %u", action, button, GetName(), MAX_ACTION_BUTTONS);
|
||||
sLog->outError(LOG_FILTER_PLAYER_LOADING, "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(LOG_FILTER_PLAYER, "Action %u not added into button %u for player %s: action must be < %u", action, button, GetName(), MAX_ACTION_BUTTON_ACTION_VALUE);
|
||||
sLog->outError(LOG_FILTER_PLAYER_LOADING, "Action %u not added into button %u for player %s: action must be < %u", action, button, GetName(), MAX_ACTION_BUTTON_ACTION_VALUE);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -6637,7 +6635,7 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
|
||||
case ACTION_BUTTON_SPELL:
|
||||
if (!sSpellMgr->GetSpellInfo(action))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Spell action %u not added into button %u for player %s: spell not exist", action, button, GetName());
|
||||
sLog->outError(LOG_FILTER_PLAYER_LOADING, "Spell action %u not added into button %u for player %s: spell not exist", action, button, GetName());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -6650,7 +6648,7 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
|
||||
case ACTION_BUTTON_ITEM:
|
||||
if (!sObjectMgr->GetItemTemplate(action))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Item action %u not added into button %u for player %s: item not exist", action, button, GetName());
|
||||
sLog->outError(LOG_FILTER_PLAYER_LOADING, "Item action %u not added into button %u for player %s: item not exist", action, button, GetName());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -6672,7 +6670,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->outInfo(LOG_FILTER_PLAYER, "Player '%u' Added Action '%u' (type %u) to Button '%u'", GetGUIDLow(), action, type, button);
|
||||
sLog->outInfo(LOG_FILTER_PLAYER_LOADING, "Player '%u' Added Action '%u' (type %u) to Button '%u'", GetGUIDLow(), action, type, button);
|
||||
return &ab;
|
||||
}
|
||||
|
||||
@@ -6687,7 +6685,7 @@ void Player::removeActionButton(uint8 button)
|
||||
else
|
||||
buttonItr->second.uState = ACTIONBUTTON_DELETED; // saved, will deleted at next save
|
||||
|
||||
sLog->outInfo(LOG_FILTER_PLAYER, "Action Button '%u' Removed from Player '%u'", button, GetGUIDLow());
|
||||
sLog->outInfo(LOG_FILTER_PLAYER_LOADING, "Action Button '%u' Removed from Player '%u'", button, GetGUIDLow());
|
||||
}
|
||||
|
||||
ActionButton const* Player::GetActionButton(uint8 button)
|
||||
@@ -7698,7 +7696,7 @@ void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply)
|
||||
if (item->IsBroken())
|
||||
return;
|
||||
|
||||
sLog->outInfo(LOG_FILTER_PLAYER, "applying mods for item %u ", item->GetGUIDLow());
|
||||
sLog->outInfo(LOG_FILTER_PLAYER_ITEMS, "applying mods for item %u ", item->GetGUIDLow());
|
||||
|
||||
uint8 attacktype = Player::GetAttackBySlot(slot);
|
||||
|
||||
@@ -8290,7 +8288,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "WORLD: unknown Item spellid %i", spellData.SpellId);
|
||||
sLog->outError(LOG_FILTER_PLAYER_ITEMS, "WORLD: unknown Item spellid %i", spellData.SpellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -8359,7 +8357,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_PLAYER, "Player::CastItemCombatSpell(GUID: %u, name: %s, enchant: %i): unknown spell %i is casted, ignoring...",
|
||||
sLog->outError(LOG_FILTER_PLAYER_ITEMS, "Player::CastItemCombatSpell(GUID: %u, name: %s, enchant: %i): unknown spell %i is casted, ignoring...",
|
||||
GetGUIDLow(), GetName(), pEnchant->ID, pEnchant->spellid[s]);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -658,8 +658,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
|
||||
SendPacket(&data);
|
||||
|
||||
std::string IP_str = GetRemoteAddress();
|
||||
sLog->outInfo(LOG_FILTER_NETWORKIO, "Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
|
||||
sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
|
||||
sScriptMgr->OnPlayerCreate(&newChar);
|
||||
sWorld->AddCharacterNameData(newChar.GetGUIDLow(), std::string(newChar.GetName()), newChar.getGender(), newChar.getRace(), newChar.getClass());
|
||||
|
||||
@@ -716,15 +715,15 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
|
||||
std::string IP_str = GetRemoteAddress();
|
||||
sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
|
||||
sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
|
||||
sScriptMgr->OnPlayerDelete(guid);
|
||||
sWorld->DeleteCharaceterNameData(GUID_LOPART(guid));
|
||||
|
||||
if (sLog->ShouldLog(LOG_FILTER_PLAYER_DELETE, LOG_LEVEL_INFO)) // optimize GetPlayerDump call
|
||||
if (sLog->ShouldLog(LOG_FILTER_CHARACTER, LOG_LEVEL_DEBUG)) // optimize GetPlayerDump call
|
||||
{
|
||||
std::string dump;
|
||||
if (PlayerDumpWriter().GetDump(GUID_LOPART(guid), dump))
|
||||
sLog->outInfo(LOG_FILTER_PLAYER_DELETE, dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str());
|
||||
sLog->outDebug(LOG_FILTER_CHARACTER, dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str());
|
||||
}
|
||||
|
||||
Player::DeleteFromDB(guid, GetAccountId());
|
||||
@@ -1002,7 +1001,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
|
||||
SendNotification(LANG_GM_ON);
|
||||
|
||||
std::string IP_str = GetRemoteAddress();
|
||||
sLog->outInfo(LOG_FILTER_PLAYER_LOADING, "Account: %d (IP: %s) Login Character:[%s] (GUID: %u) Level: %d",
|
||||
sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Login Character:[%s] (GUID: %u) Level: %d",
|
||||
GetAccountId(), IP_str.c_str(), pCurrChar->GetName(), pCurrChar->GetGUIDLow(), pCurrChar->getLevel());
|
||||
|
||||
if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STATE_STUNNED))
|
||||
@@ -1179,7 +1178,7 @@ void WorldSession::HandleChangePlayerNameOpcodeCallBack(PreparedQueryResult resu
|
||||
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s) Character:[%s] (guid:%u) Changed name to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldName.c_str(), guidLow, newName.c_str());
|
||||
sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Character:[%s] (guid:%u) Changed name to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldName.c_str(), guidLow, newName.c_str());
|
||||
|
||||
WorldPacket data(SMSG_CHAR_RENAME, 1+8+(newName.size()+1));
|
||||
data << uint8(RESPONSE_SUCCESS);
|
||||
@@ -1446,7 +1445,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
||||
if (result)
|
||||
{
|
||||
std::string oldname = result->Fetch()[0].GetString();
|
||||
sLog->outDebug(LOG_FILTER_PLAYER, "Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), GUID_LOPART(guid), newName.c_str());
|
||||
sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), GUID_LOPART(guid), newName.c_str());
|
||||
}
|
||||
|
||||
Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair);
|
||||
|
||||
@@ -534,7 +534,7 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||
// e.g if he got disconnected during a transfer to another map
|
||||
// calls to GetMap in this case may cause crashes
|
||||
_player->CleanupsBeforeDelete();
|
||||
sLog->outInfo(LOG_FILTER_PLAYER_LOADING, "Account: %d (IP: %s) Logout Character:[%s] (GUID: %u) Level: %d", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName(), _player->GetGUIDLow(), _player->getLevel());
|
||||
sLog->outInfo(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Logout Character:[%s] (GUID: %u) Level: %d", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName(), _player->GetGUIDLow(), _player->getLevel());
|
||||
if (Map* _map = _player->FindMap())
|
||||
_map->RemovePlayerFromMap(_player, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user