diff options
| author | Machiavelli <machiavelli.trinity@gmail.com> | 2011-02-20 20:16:34 +0100 |
|---|---|---|
| committer | Machiavelli <machiavelli.trinity@gmail.com> | 2011-02-20 20:16:34 +0100 |
| commit | e07e20ffcaf6911d4dd47e0895fbdc52c5a52f05 (patch) | |
| tree | fcc0c8865a387c67b925df174e22f49820a985a0 /src/server/game/Entities | |
| parent | 45db1591a4959ca9d58fc40ea2294936bcf4bd10 (diff) | |
Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf.
Diffstat (limited to 'src/server/game/Entities')
| -rwxr-xr-x | src/server/game/Entities/Creature/Creature.cpp | 8 | ||||
| -rwxr-xr-x | src/server/game/Entities/Creature/CreatureGroups.cpp | 16 | ||||
| -rwxr-xr-x | src/server/game/Entities/Creature/CreatureGroups.h | 2 | ||||
| -rwxr-xr-x | src/server/game/Entities/Creature/GossipDef.cpp | 20 | ||||
| -rwxr-xr-x | src/server/game/Entities/GameObject/GameObject.cpp | 6 | ||||
| -rwxr-xr-x | src/server/game/Entities/Item/Item.cpp | 6 | ||||
| -rwxr-xr-x | src/server/game/Entities/Pet/Pet.cpp | 8 | ||||
| -rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 276 | ||||
| -rwxr-xr-x | src/server/game/Entities/Player/SocialMgr.cpp | 2 | ||||
| -rwxr-xr-x | src/server/game/Entities/Transport/Transport.cpp | 9 | ||||
| -rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 58 | ||||
| -rwxr-xr-x | src/server/game/Entities/Vehicle/Vehicle.cpp | 16 |
12 files changed, 209 insertions, 218 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 9a21f57f120..0fd48f47ae6 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -708,7 +708,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(LOG_FILTER_TSCR, "AIM_Initialize: failed to init, locked."); return false; } @@ -1389,7 +1389,7 @@ void Creature::DeleteFromDB() { if (!m_DBTableGuid) { - sLog->outDebug("Trying to delete not saved creature!"); + sLog->outError("Trying to delete not saved creature! LowGUID: %u, Entry: %u", GetGUIDLow(), GetEntry()); return; } @@ -1853,7 +1853,7 @@ void Creature::SendAIReaction(AiReaction reactionType) ((WorldObject*)this)->SendMessageToSet(&data, true); - sLog->outDebug("WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType); } void Creature::CallAssistance() @@ -2106,7 +2106,7 @@ bool Creature::LoadCreaturesAddon(bool reload) } 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(LOG_FILTER_UNITS, "Spell: %u with AuraEffectMask %u added to creature (GUID: %u Entry: %u)", cAura->spell_id, cAura->effectMask,GetGUIDLow(),GetEntry()); } } return true; diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index 63f3be8d430..4dd9ce885f9 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(LOG_FILTER_UNITS, "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(LOG_FILTER_UNITS, "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(LOG_FILTER_UNITS, "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(LOG_FILTER_UNITS, "Deleting group with InstanceID %u", member->GetInstanceId()); map->CreatureGroupHolder.erase(group->GetId()); delete group; } @@ -153,12 +153,12 @@ void CreatureGroupManager::LoadCreatureFormations() void CreatureGroup::AddMember(Creature *member) { - sLog->outDebug("CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_UNITS, "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(LOG_FILTER_UNITS, "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(LOG_FILTER_UNITS, "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(LOG_FILTER_UNITS, "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 ff35ee05ed1..5f1863f83c3 100755 --- a/src/server/game/Entities/Creature/CreatureGroups.h +++ b/src/server/game/Entities/Creature/CreatureGroups.h @@ -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(LOG_FILTER_UNITS, "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 5dd0b9a5347..4a801f5607c 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(LOG_FILTER_PACKETIO, "WORLD: Sent SMSG_GOSSIP_POI"); } void PlayerMenu::SendPointOfInterest(uint32 poi_id) @@ -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(LOG_FILTER_PACKETIO, "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(LOG_FILTER_NETWORKIO, "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(LOG_FILTER_NETWORKIO, "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(LOG_FILTER_NETWORKIO, "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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus); } void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID, bool ActivateAccept) @@ -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(LOG_FILTER_NETWORKIO, "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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId()); } void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID, bool EnableNext) @@ -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(LOG_FILTER_NETWORKIO, "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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId()); } diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 667b2400d62..88ae3306371 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1183,7 +1183,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(LOG_FILTER_MAPSCRIPTS, "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); } @@ -1569,7 +1569,7 @@ void GameObject::Use(Unit* user) return; } default: - sLog->outDebug("Unknown Object Type %u", GetGoType()); + sLog->outError("Unknown Object Type %u", GetGoType()); break; } @@ -1582,7 +1582,7 @@ void GameObject::Use(Unit* user) 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()); else - sLog->outDebug("WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId); + sLog->outDebug(LOG_FILTER_OUTDOORPVP, "WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId); return; } diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index f1366a43b86..aad234141d6 100755 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -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(LOG_FILTER_PLAYER_ITEMS, "Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)",GetEntry(),GetUInt32Value(ITEM_FIELD_DURATION),diff); if (GetUInt32Value(ITEM_FIELD_DURATION) <= diff) { @@ -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(LOG_FILTER_PLAYER_ITEMS, "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(LOG_FILTER_PLAYER_ITEMS, "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/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index fb67cb5fb0f..f1183d48c9c 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -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(LOG_FILTER_PETS, "New Pet has guid %u", GetGUIDLow()); owner->PetSpellInitialize(); @@ -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(LOG_FILTER_PETS, "Pet::CreateBaseForTamed"); uint32 guid=sObjectMgr->GenerateLowGuid(HIGHGUID_PET); uint32 pet_number = sObjectMgr->GeneratePetNumber(); if (!Create(guid, map, phaseMask, cinfo->Entry, pet_number)) @@ -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(LOG_FILTER_PETS, "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(LOG_FILTER_PETS, "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()); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index e49c4d4e9ff..d3d38ffa4aa 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -943,7 +943,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: Creating initial item, itemId = %u, count = %u",titem_id, titem_amount); // attempt equip by one while (titem_amount > 0) @@ -1871,7 +1871,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(LOG_FILTER_MAPS, "Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid); if (GetTransport()) { @@ -1888,7 +1888,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(LOG_FILTER_MAPS, "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); @@ -2504,7 +2504,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(LOG_FILTER_MAPS, "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)); } } @@ -4028,7 +4028,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(LOG_FILTER_PLAYER_LOADING, "Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime)); } while (result->NextRow()); } @@ -5290,7 +5290,7 @@ void Player::CleanupChannels() cMgr->LeftChannel(ch->GetName()); // deleted channel if empty } - sLog->outDebug("Player: channels cleaned up!"); + sLog->outDebug(LOG_FILTER_CHATSYS, "Player: channels cleaned up!"); } void Player::UpdateLocalChannels(uint32 newZone) @@ -5822,7 +5822,7 @@ inline int SkillGainChance(uint32 SkillValue, uint32 GrayLevel, uint32 GreenLeve bool Player::UpdateCraftSkill(uint32 spellid) { - sLog->outDebug("UpdateCraftSkill spellid %d", spellid); + sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "UpdateCraftSkill spellid %d", spellid); SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellid); @@ -5854,7 +5854,7 @@ 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(LOG_FILTER_PLAYER_SKILLS, "UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)", SkillId, SkillValue, RedLevel); uint32 gathering_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_GATHERING); @@ -5882,7 +5882,7 @@ bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLeve bool Player::UpdateFishingSkill() { - sLog->outDebug("UpdateFishingSkill"); + sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "UpdateFishingSkill"); uint32 SkillValue = GetPureSkillValue(SKILL_FISHING); @@ -5900,13 +5900,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(LOG_FILTER_PLAYER_SKILLS, "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(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0); return false; } @@ -5944,11 +5944,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(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% taken", Chance/10.0); return true; } - sLog->outDebug("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0); + sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0); return false; } @@ -7265,7 +7265,7 @@ void Player::DuelComplete(DuelCompleteType type) if (!duel) return; - sLog->outDebug("Duel Complete %s %s", GetName(), duel->opponent->GetName()); + sLog->outDebug(LOG_FILTER_UNITS, "Duel Complete %s %s", GetName(), duel->opponent->GetName()); WorldPacket data(SMSG_DUEL_COMPLETE, (1)); data << (uint8)((type != DUEL_INTERUPTED) ? 1 : 0); @@ -7405,7 +7405,7 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply) ApplyItemEquipSpell(item,apply); ApplyEnchantment(item, apply); - sLog->outDebug("_ApplyItemMods complete."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_ApplyItemMods complete."); } void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool apply, bool only_level_scale /*= false*/) @@ -8167,7 +8167,7 @@ void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 c void Player::_RemoveAllItemMods() { - sLog->outDebug("_RemoveAllItemMods start."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_RemoveAllItemMods start."); for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i) { @@ -8210,12 +8210,12 @@ void Player::_RemoveAllItemMods() } } - sLog->outDebug("_RemoveAllItemMods complete."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_RemoveAllItemMods complete."); } void Player::_ApplyAllItemMods() { - sLog->outDebug("_ApplyAllItemMods start."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_ApplyAllItemMods start."); for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i) { @@ -8259,7 +8259,7 @@ void Player::_ApplyAllItemMods() } } - sLog->outDebug("_ApplyAllItemMods complete."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_ApplyAllItemMods complete."); } void Player::_ApplyAllLevelScaleItemMods(bool apply) @@ -8387,10 +8387,10 @@ void Player::SendLoot(uint64 guid, LootType loot_type) Loot *loot = 0; PermissionTypes permission = ALL_PERMISSION; - sLog->outDebug("Player::SendLoot"); + sLog->outDebug(LOG_FILTER_LOOT, "Player::SendLoot"); if (IS_GAMEOBJECT_GUID(guid)) { - sLog->outDebug(" IS_GAMEOBJECT_GUID(guid)"); + sLog->outDebug(LOG_FILTER_LOOT, "IS_GAMEOBJECT_GUID(guid)"); GameObject *go = GetMap()->GetGameObject(guid); // not check distance for GO in case owned GO (fishing bobber case, for example) @@ -8722,7 +8722,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(LOG_FILTER_NETWORKIO, "Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid); // may be exist better way to do this... switch (zoneid) @@ -10381,7 +10381,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count); ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(entry); if (!pProto) @@ -10880,7 +10880,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanStoreItems %i. item = %u, count = %u", k+1, pItem->GetEntry(), pItem->GetCount()); ItemPrototype const *pProto = pItem->GetProto(); // strange item @@ -11090,7 +11090,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount()); ItemPrototype const *pProto = pItem->GetProto(); if (pProto) { @@ -11241,7 +11241,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount()); ItemPrototype const *pProto = pItem->GetProto(); if (!pProto) @@ -11277,7 +11277,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(LOG_FILTER_PLAYER_ITEMS, "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; @@ -11465,7 +11465,7 @@ uint8 Player::CanUseItem(Item *pItem, bool not_loading) const { if (pItem) { - sLog->outDebug("STORAGE: CanUseItem item = %u", pItem->GetEntry()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUseItem item = %u", pItem->GetEntry()); if (!isAlive() && not_loading) return EQUIP_ERR_YOU_ARE_DEAD; @@ -11553,7 +11553,7 @@ uint8 Player::CanUseItem(ItemPrototype const *pProto) const uint8 Player::CanUseAmmo(uint32 item) const { - sLog->outDebug("STORAGE: CanUseAmmo item = %u", item); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUseAmmo item = %u", item); if (!isAlive()) return EQUIP_ERR_YOU_ARE_DEAD; //if (isStunned()) @@ -11692,7 +11692,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u, guid = %u", bag, slot, pItem->GetEntry(), count, pItem->GetGUIDLow()); Item *pItem2 = GetItemByPos(bag, slot); @@ -11958,7 +11958,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry()); m_items[slot] = pItem; SetUInt64Value(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), pItem->GetGUID()); @@ -11983,7 +11983,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry()); RemoveEnchantmentDurations(pItem); RemoveItemDurations(pItem); @@ -12104,7 +12104,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(LOG_FILTER_PLAYER_ITEMS, "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()) @@ -12191,7 +12191,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItemCount item = %u, count = %u", item, count); uint32 remcount = 0; // in inventory @@ -12320,7 +12320,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(LOG_FILTER_PLAYER_ITEMS, "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++) @@ -12352,7 +12352,7 @@ void Player::DestroyConjuredItems(bool update) { // used when entering arena // destroys all conjured items - sLog->outDebug("STORAGE: DestroyConjuredItems"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyConjuredItems"); // in inventory for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++) @@ -12415,7 +12415,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItemCount item (GUID: %u, Entry: %u) count = %u", pItem->GetGUIDLow(),pItem->GetEntry(), count); if (pItem->GetCount() <= count) { @@ -12470,7 +12470,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count); Item *pNewItem = pSrcItem->CloneItem(count, this); if (!pNewItem) { @@ -12555,7 +12555,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(LOG_FILTER_PLAYER_ITEMS, "STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry()); if (!isAlive()) { @@ -12925,7 +12925,7 @@ void Player::AddItemToBuyBackSlot(Item *pItem) } RemoveItemFromBuyBackSlot(slot, true); - sLog->outDebug("STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot); m_items[slot] = pItem; time_t base = time(NULL); @@ -12947,7 +12947,7 @@ void Player::AddItemToBuyBackSlot(Item *pItem) Item* Player::GetItemFromBuyBackSlot(uint32 slot) { - sLog->outDebug("STORAGE: GetItemFromBuyBackSlot slot = %u", slot); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: GetItemFromBuyBackSlot slot = %u", slot); if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END) return m_items[slot]; return NULL; @@ -12955,7 +12955,7 @@ Item* Player::GetItemFromBuyBackSlot(uint32 slot) void Player::RemoveItemFromBuyBackSlot(uint32 slot, bool del) { - sLog->outDebug("STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot); if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END) { Item *pItem = m_items[slot]; @@ -12981,7 +12981,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(LOG_FILTER_NETWORKIO, "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); @@ -13024,7 +13024,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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_BUY_FAILED"); WorldPacket data(SMSG_BUY_FAILED, (8+4+4+1)); data << uint64(pCreature ? pCreature->GetGUID() : 0); data << uint32(item); @@ -13036,7 +13036,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(LOG_FILTER_NETWORKIO, "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); @@ -13110,7 +13110,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly) if (m_itemDuration.empty()) return; - sLog->outDebug("Player::UpdateItemDuration(%u,%u)", time, realtimeonly); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Player::UpdateItemDuration(%u,%u)", time, realtimeonly); for (ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end();) { @@ -13379,81 +13379,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(LOG_FILTER_PLAYER_ITEMS, "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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %u DEFENCE", enchant_amount); break; case ITEM_MOD_DODGE_RATING: ApplyRatingMod(CR_DODGE, enchant_amount, apply); - sLog->outDebug("+ %u DODGE", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u DODGE", enchant_amount); break; case ITEM_MOD_PARRY_RATING: ApplyRatingMod(CR_PARRY, enchant_amount, apply); - sLog->outDebug("+ %u PARRY", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %u SPELL_CRIT", enchant_amount); break; // Values from ITEM_STAT_MELEE_HA_RATING to ITEM_MOD_HASTE_RANGED_RATING are never used // in Enchantments @@ -13488,13 +13488,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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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: @@ -13511,55 +13511,55 @@ 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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %u HASTE", enchant_amount); break; case ITEM_MOD_EXPERTISE_RATING: ApplyRatingMod(CR_EXPERTISE, enchant_amount, apply); - sLog->outDebug("+ %u EXPERTISE", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %u ARMOR PENETRATION", enchant_amount); break; case ITEM_MOD_SPELL_POWER: ApplySpellPowerBonus(enchant_amount, apply); - sLog->outDebug("+ %u SPELL_POWER", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u SPELL_POWER", enchant_amount); break; case ITEM_MOD_HEALTH_REGEN: ApplyHealthRegenBonus(enchant_amount, apply); - sLog->outDebug("+ %u HEALTH_REGENERATION", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u HEALTH_REGENERATION", enchant_amount); break; case ITEM_MOD_SPELL_PENETRATION: ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE, enchant_amount, apply); m_spellPenetrationItemMod += apply ? int32(enchant_amount) : -int32(enchant_amount); - sLog->outDebug("+ %u SPELL_PENETRATION", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %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(LOG_FILTER_PLAYER_ITEMS, "+ %u BLOCK_VALUE", enchant_amount); break; case ITEM_MOD_SPELL_HEALING_DONE: // deprecated case ITEM_MOD_SPELL_DAMAGE_DONE: // deprecated @@ -14884,7 +14884,7 @@ bool Player::SatisfyQuestLog(bool msg) { WorldPacket data(SMSG_QUESTLOG_FULL, 0); GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTLOG_FULL"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTLOG_FULL"); } return false; } @@ -15033,7 +15033,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(LOG_FILTER_CONDITIONSYS, "Player::SatisfyQuestConditions: conditions not met for quest %u", qInfo->GetQuestId()); return false; } return true; @@ -15835,14 +15835,14 @@ 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(LOG_FILTER_NETWORKIO, "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(LOG_FILTER_NETWORKIO, "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); @@ -15875,7 +15875,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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED"); } } @@ -15886,7 +15886,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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER"); } } @@ -15895,7 +15895,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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID"); } void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver) @@ -15915,7 +15915,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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT"); } } @@ -15927,14 +15927,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(LOG_FILTER_NETWORKIO, "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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM"); //data << pQuest->ReqItemId[item_idx]; //data << count; GetSession()->SendPacket(&data); @@ -15950,7 +15950,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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL"); data << uint32(pQuest->GetQuestId()); data << uint32(entry); data << uint32(old_count + add_count); @@ -16254,7 +16254,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(LOG_FILTER_PLAYER_LOADING, "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) @@ -16468,7 +16468,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(LOG_FILTER_PLAYER_LOADING, "Player %s using client without required expansion tried login at non accessible map %u", GetName(), mapId); RelocateToHomebind(); } @@ -16723,7 +16723,7 @@ 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(LOG_FILTER_PLAYER_LOADING, "The value of player %s after load item and aura is: ", m_name.c_str()); outDebugValues(); // GM state @@ -16867,7 +16867,7 @@ void Player::_LoadActions(PreparedQueryResult result) void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff) { - sLog->outDebug("Loading auras for player %u",GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Loading auras for player %u",GetGUIDLow()); /* 0 1 2 3 4 5 6 7 8 9 10 QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_mask,recalculate_mask,stackcount,amount0,amount1,amount2,base_amount0,base_amount1,base_amount2, @@ -17065,7 +17065,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(LOG_FILTER_PLAYER_LOADING, "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); } @@ -17077,7 +17077,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(LOG_FILTER_PLAYER_LOADING, "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 @@ -17097,7 +17097,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(LOG_FILTER_PLAYER_LOADING, "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 @@ -17405,7 +17405,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result) ++slot; } - sLog->outDebug("Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow()); } } while (result->NextRow()); @@ -17495,7 +17495,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(LOG_FILTER_PLAYER_LOADING, "Daily quest (%u) cooldown for player (GUID: %u)", quest_id, GetGUIDLow()); } while (result->NextRow()); } @@ -17517,7 +17517,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(LOG_FILTER_PLAYER_LOADING, "Weekly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow()); } while (result->NextRow()); } @@ -17690,7 +17690,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(LOG_FILTER_MAPS, "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; } @@ -17966,7 +17966,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(LOG_FILTER_UNITS, "The value of player %s at save: ", m_name.c_str()); outDebugValues(); std::string sql_name = m_name; @@ -18592,18 +18592,18 @@ void Player::outDebugValues() const 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(LOG_FILTER_UNITS, "HP is: \t\t\t%u\t\tMP is: \t\t\t%u",GetMaxHealth(), GetMaxPower(POWER_MANA)); + sLog->outDebug(LOG_FILTER_UNITS, "AGILITY is: \t\t%f\t\tSTRENGTH is: \t\t%f",GetStat(STAT_AGILITY), GetStat(STAT_STRENGTH)); + sLog->outDebug(LOG_FILTER_UNITS, "INTELLECT is: \t\t%f\t\tSPIRIT is: \t\t%f",GetStat(STAT_INTELLECT), GetStat(STAT_SPIRIT)); + sLog->outDebug(LOG_FILTER_UNITS, "STAMINA is: \t\t%f",GetStat(STAT_STAMINA)); + sLog->outDebug(LOG_FILTER_UNITS, "Armor is: \t\t%u\t\tBlock is: \t\t%f",GetArmor(), GetFloatValue(PLAYER_BLOCK_PERCENTAGE)); + sLog->outDebug(LOG_FILTER_UNITS, "HolyRes is: \t\t%u\t\tFireRes is: \t\t%u",GetResistance(SPELL_SCHOOL_HOLY), GetResistance(SPELL_SCHOOL_FIRE)); + sLog->outDebug(LOG_FILTER_UNITS, "NatureRes is: \t\t%u\t\tFrostRes is: \t\t%u",GetResistance(SPELL_SCHOOL_NATURE), GetResistance(SPELL_SCHOOL_FROST)); + sLog->outDebug(LOG_FILTER_UNITS, "ShadowRes is: \t\t%u\t\tArcaneRes is: \t\t%u",GetResistance(SPELL_SCHOOL_SHADOW), GetResistance(SPELL_SCHOOL_ARCANE)); + sLog->outDebug(LOG_FILTER_UNITS, "MIN_DAMAGE is: \t\t%f\tMAX_DAMAGE is: \t\t%f",GetFloatValue(UNIT_FIELD_MINDAMAGE), GetFloatValue(UNIT_FIELD_MAXDAMAGE)); + sLog->outDebug(LOG_FILTER_UNITS, "MIN_OFFHAND_DAMAGE is: \t%f\tMAX_OFFHAND_DAMAGE is: \t%f",GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE), GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE)); + sLog->outDebug(LOG_FILTER_UNITS, "MIN_RANGED_DAMAGE is: \t%f\tMAX_RANGED_DAMAGE is: \t%f",GetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE), GetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE)); + sLog->outDebug(LOG_FILTER_UNITS, "ATTACK_TIME is: \t%u\t\tRANGE_ATTACK_TIME is: \t%u",GetAttackTime(BASE_ATTACK), GetAttackTime(RANGED_ATTACK)); } /*********************************************************/ @@ -18662,7 +18662,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(LOG_FILTER_UNITS, "%s", ss.str().c_str()); CharacterDatabase.Execute(ss.str().c_str()); } @@ -18906,7 +18906,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent) if (pet) { - sLog->outDebug("RemovePet %u, %u, %u", pet->GetEntry(), mode, returnreagent); + sLog->outDebug(LOG_FILTER_PETS,"RemovePet %u, %u, %u", pet->GetEntry(), mode, returnreagent); if (pet->m_removed) return; @@ -19098,7 +19098,7 @@ void Player::PetSpellInitialize() if (!pet) return; - sLog->outDebug("Pet Spells Groups"); + sLog->outDebug(LOG_FILTER_PETS,"Pet Spells Groups"); CharmInfo *charmInfo = pet->GetCharmInfo(); @@ -19219,7 +19219,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(LOG_FILTER_CONDITIONSYS, "VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", veh->ToCreature()->GetEntry(), spellId); continue; } if (IsPassiveSpell(spellId)) @@ -19318,7 +19318,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(LOG_FILTER_SPELLS_AURAS, "Player::AddSpellMod %d", mod->spellId); uint16 Opcode = (mod->type == SPELLMOD_FLAT) ? SMSG_SET_FLAT_SPELL_MODIFIER : SMSG_SET_PCT_SPELL_MODIFIER; int i = 0; @@ -19755,7 +19755,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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ACTIVATETAXIREPLY"); GetSession()->SendDoFlight(mount_display_id, sourcepath); } return true; @@ -19790,7 +19790,7 @@ void Player::ContinueTaxiFlight() if (!sourceNode) return; - sLog->outDebug("WORLD: Restart character %u taxi flight", GetGUIDLow()); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Restart character %u taxi flight", GetGUIDLow()); uint32 mountDisplayId = sObjectMgr->GetTaxiMountDisplayId(sourceNode, GetTeam(),true); uint32 path = m_taxi.GetCurrentTaxiPath(); @@ -20031,7 +20031,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(LOG_FILTER_NETWORKIO, "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; } @@ -20206,7 +20206,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(LOG_FILTER_MAPS, "PLAYER: Player '%s' (GUID: %u) will be teleported to homebind in 60 seconds", GetName(),GetGUIDLow()); } } @@ -20478,7 +20478,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(LOG_FILTER_PLAYER_ITEMS, "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; } @@ -20796,8 +20796,7 @@ 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)); + sLog->outDebug(LOG_FILTER_MAPS, "Object %u (Type: %u) out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target)); #endif } } @@ -20812,8 +20811,7 @@ 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)); + sLog->outDebug(LOG_FILTER_MAPS, "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 @@ -20871,8 +20869,7 @@ 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)); + sLog->outDebug(LOG_FILTER_MAPS, "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 } } @@ -20887,8 +20884,7 @@ 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)); + sLog->outDebug(LOG_FILTER_MAPS, "Object %u (Type: %u, Entry: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target)); #endif } } @@ -21320,7 +21316,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(LOG_FILTER_PLAYER_LOADING, "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 @@ -22540,7 +22536,7 @@ 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(LOG_FILTER_MAPS, "Player::CreateViewpoint: Player %s create seer %u (TypeId: %u).", GetName(), target->GetEntry(), target->GetTypeId()); if (!AddUInt64Value(PLAYER_FARSIGHT, target->GetGUID())) { @@ -22556,7 +22552,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply) } else { - sLog->outDebug("Player::CreateViewpoint: Player %s remove seer", GetName()); + sLog->outDebug(LOG_FILTER_MAPS, "Player::CreateViewpoint: Player %s remove seer", GetName()); if (!RemoveUInt64Value(PLAYER_FARSIGHT, target->GetGUID())) { @@ -24285,13 +24281,13 @@ void Player::SendRefundInfo(Item *item) if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE)) { - sLog->outDebug("Item refund: item not refundable!"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item refund: item not refundable!"); return; } if (GetGUIDLow() != item->GetRefundRecipient()) // Formerly refundable item got traded { - sLog->outDebug("Item refund: item was traded!"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item refund: item was traded!"); item->SetNotRefundable(this); return; } @@ -24299,7 +24295,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(LOG_FILTER_PLAYER_ITEMS, "Item refund: cannot find extendedcost data."); return; } @@ -24345,7 +24341,7 @@ void Player::RefundItem(Item *item) { if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE)) { - sLog->outDebug("Item refund: item not refundable!"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item refund: item not refundable!"); return; } @@ -24361,7 +24357,7 @@ void Player::RefundItem(Item *item) if (GetGUIDLow() != item->GetRefundRecipient()) // Formerly refundable item got traded { - sLog->outDebug("Item refund: item was traded!"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item refund: item was traded!"); item->SetNotRefundable(this); return; } @@ -24369,7 +24365,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(LOG_FILTER_PLAYER_ITEMS, "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 4f7037cfbdc..dbf9e29f87a 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(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_CONTACT_LIST"); } bool PlayerSocial::HasFriend(uint32 friend_guid) diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 11f4cebf864..7afa683d4b3 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -576,11 +576,10 @@ 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->outDebug(LOG_FILTER_TRANSPORTS," ************ 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); + sLog->outDebug(LOG_FILTER_TRANSPORTS, "%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); @@ -623,7 +622,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(LOG_FILTER_MAPSCRIPTS, "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); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e5684729f6e..1ad52613687 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1074,7 +1074,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(LOG_FILTER_UNITS, "Unit::DealSpellDamage have wrong damageInfo->SpellID: %u", damageInfo->SpellID); return; } @@ -2933,7 +2933,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(LOG_FILTER_UNITS, "Interrupt spell for unit %u.", GetEntry()); Spell *spell = m_currentSpells[spellType]; if (spell && (withDelayed || spell->getState() != SPELL_STATE_DELAYED) @@ -3227,7 +3227,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(LOG_FILTER_SPELLS_AURAS,"Aura %u now is remove mode %d", aura->GetId(), removeMode); // dead loop is killing the server probably ASSERT(m_removedAurasCount < 0xFFFFFFFF); @@ -3990,7 +3990,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(LOG_FILTER_SPELLS_AURAS, "Aura %u partially interrupted on unit %u, new duration: %u ms",aura->GetId() , GetGUIDLow(), aura->GetDuration()); } } } @@ -4733,7 +4733,7 @@ void Unit::SendSpellDamageImmune(Unit * target, uint32 spellId) void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo) { - sLog->outDebug("WORLD: Sending SMSG_ATTACKERSTATEUPDATE"); + sLog->outDebug(LOG_FILTER_UNITS, "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; @@ -4974,11 +4974,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); - triggered_spell_id = 25997; - break; } // Sweeping Strikes @@ -9471,7 +9467,7 @@ 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(LOG_FILTER_UNITS, "SetMinion %u for %u, apply %u", minion->GetEntry(), GetEntry(), apply); if (apply) { @@ -13927,7 +13923,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(LOG_FILTER_SPELLS_AURAS, "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; } @@ -13944,7 +13940,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(LOG_FILTER_SPELLS_AURAS, "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; @@ -13952,7 +13948,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(LOG_FILTER_SPELLS_AURAS, "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); @@ -13965,38 +13961,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(LOG_FILTER_SPELLS_AURAS, "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(LOG_FILTER_SPELLS_AURAS, "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(LOG_FILTER_SPELLS_AURAS, "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(LOG_FILTER_SPELLS_AURAS, "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(LOG_FILTER_SPELLS_AURAS, "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(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)", (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); HandleAuraRaidProcFromChargeWithValue(triggeredByAura); @@ -14005,7 +14001,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(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)", (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); HandleAuraRaidProcFromCharge(triggeredByAura); @@ -14014,7 +14010,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(LOG_FILTER_SPELLS_AURAS, "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; @@ -14054,7 +14050,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(LOG_FILTER_SPELLS_AURAS, "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; @@ -14791,7 +14787,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(LOG_FILTER_SPELLS_AURAS, "Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id); return false; } @@ -15374,7 +15370,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const * a 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(LOG_FILTER_UNITS, "SetCharmedBy: charmer %u (GUID %u), charmed %u (GUID %u), type %u.", charmer->GetEntry(), charmer->GetGUIDLow(), GetEntry(), GetGUIDLow(), uint32(type)); if (this == charmer) { @@ -16416,14 +16412,14 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const * a { if (seatId >= 0 && seatId != GetTransSeat()) { - sLog->outDebug("EnterVehicle: %u leave vehicle %u seat %d and enter %d.", GetEntry(), m_vehicle->GetBase()->GetEntry(), GetTransSeat(), seatId); + sLog->outDebug(LOG_FILTER_VEHICLES, "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(LOG_FILTER_VEHICLES, "EnterVehicle: %u exit %u and enter %u.", GetEntry(), m_vehicle->GetBase()->GetEntry(), vehicle->GetBase()->GetEntry()); ExitVehicle(); } } @@ -16643,7 +16639,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(LOG_FILTER_UNITS, "Unit::SetPosition(%f, %f, %f) .. bad coordinates!",x,y,z); return false; } @@ -16676,7 +16672,7 @@ void Unit::SendThreatListUpdate() { if (uint32 count = getThreatManager().getThreatList().size()) { - //sLog->outDebug("WORLD: Send SMSG_THREAT_UPDATE Message"); + //sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_UPDATE Message"); WorldPacket data(SMSG_THREAT_UPDATE, 8 + count * 8); data.append(GetPackGUID()); data << uint32(count); @@ -16694,7 +16690,7 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference) { if (uint32 count = getThreatManager().getThreatList().size()) { - sLog->outDebug("WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message"); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message"); WorldPacket data(SMSG_HIGHEST_THREAT_UPDATE, 8 + 8 + count * 8); data.append(GetPackGUID()); data.appendPackGUID(pHostileReference->getUnitGuid()); @@ -16711,7 +16707,7 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference) void Unit::SendClearThreatListOpcode() { - sLog->outDebug("WORLD: Send SMSG_THREAT_CLEAR Message"); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_CLEAR Message"); WorldPacket data(SMSG_THREAT_CLEAR, 8); data.append(GetPackGUID()); SendMessageToSet(&data, false); @@ -16719,7 +16715,7 @@ void Unit::SendClearThreatListOpcode() void Unit::SendRemoveFromThreatListOpcode(HostileReference* pHostileReference) { - sLog->outDebug("WORLD: Send SMSG_THREAT_REMOVE Message"); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_REMOVE Message"); WorldPacket data(SMSG_THREAT_REMOVE, 8 + 8); data.append(GetPackGUID()); data.appendPackGUID(pHostileReference->getUnitGuid()); diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index b73db80185c..4709df49cc9 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(LOG_FILTER_VEHICLES, "Vehicle::Uninstall %u", me->GetEntry()); for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr) if (Unit *passenger = ObjectAccessor::GetUnit(*GetBase(), 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(LOG_FILTER_VEHICLES, "Vehicle::Die %u", me->GetEntry()); for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr) if (Unit *passenger = ObjectAccessor::GetUnit(*GetBase(), 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(LOG_FILTER_VEHICLES, "Vehicle::Reset"); if (me->GetTypeId() == TYPEID_PLAYER) { if (m_usableSeatNum) @@ -176,7 +176,7 @@ void Vehicle::Reset() void Vehicle::RemoveAllPassengers() { - sLog->outDebug("Vehicle::RemoveAllPassengers"); + sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::RemoveAllPassengers"); for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr) if (Unit *passenger = ObjectAccessor::GetUnit(*GetBase(), itr->second.passenger)) { @@ -309,7 +309,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(LOG_FILTER_VEHICLES, "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->GetGUID(); if (seat->second.seatInfo->CanEnterOrExit()) @@ -397,7 +397,7 @@ void Vehicle::RemovePassenger(Unit *unit) SeatMap::iterator seat = GetSeatIteratorForPassenger(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(LOG_FILTER_VEHICLES, "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 = 0; if (seat->second.seatInfo->CanEnterOrExit()) @@ -463,7 +463,7 @@ void Vehicle::RelocatePassengers(float x, float y, float z, float ang) void Vehicle::Dismiss() { - sLog->outDebug("Vehicle::Dismiss %u", me->GetEntry()); + sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Dismiss %u", me->GetEntry()); Uninstall(); me->SendObjectDeSpawnAnim(me->GetGUID()); me->CombatStop(); @@ -486,7 +486,7 @@ uint16 Vehicle::GetExtraMovementFlagsForBase() const if (vehicleFlags & VEHICLE_FLAG_FULLSPEEDPITCHING) movementMask |= MOVEMENTFLAG2_FULL_SPEED_PITCHING; - sLog->outDebug("Vehicle::GetExtraMovementFlagsForBase() returned %u", movementMask); + sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::GetExtraMovementFlagsForBase() returned %u", movementMask); return movementMask; } |
