diff options
| author | Spp <spp@jorge.gr> | 2013-05-21 09:55:09 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2013-05-21 09:55:09 +0200 |
| commit | 86afccc8ff7f54d8ebf28473bc2799dc7e039083 (patch) | |
| tree | b5519c8b3400cb5ca7a1b5496494361285812cd4 /src/server/game/Handlers/PetHandler.cpp | |
| parent | 1b6fb2b6959f504d9e33d2326691cf43a04690d2 (diff) | |
| parent | d1677b2db08f71a5bddedd9659cc5a66f325f47f (diff) | |
Merge branch 'master' into 4.3.4 (Only the Logging System One)
Conflicts:
src/server/game/AI/EventAI/CreatureEventAI.cpp
src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
src/server/game/Achievements/AchievementMgr.cpp
src/server/game/Battlegrounds/ArenaTeam.cpp
src/server/game/Battlegrounds/BattlegroundMgr.cpp
src/server/game/DataStores/DBCStores.cpp
src/server/game/Entities/DynamicObject/DynamicObject.cpp
src/server/game/Entities/Object/Object.cpp
src/server/game/Entities/Object/Updates/UpdateData.cpp
src/server/game/Entities/Player/Player.cpp
src/server/game/Entities/Unit/Unit.cpp
src/server/game/Globals/ObjectMgr.cpp
src/server/game/Guilds/Guild.cpp
src/server/game/Guilds/GuildMgr.cpp
src/server/game/Handlers/AuctionHouseHandler.cpp
src/server/game/Handlers/BattleGroundHandler.cpp
src/server/game/Handlers/BattlefieldHandler.cpp
src/server/game/Handlers/CalendarHandler.cpp
src/server/game/Handlers/CharacterHandler.cpp
src/server/game/Handlers/ChatHandler.cpp
src/server/game/Handlers/GroupHandler.cpp
src/server/game/Handlers/GuildHandler.cpp
src/server/game/Handlers/ItemHandler.cpp
src/server/game/Handlers/MailHandler.cpp
src/server/game/Handlers/MiscHandler.cpp
src/server/game/Handlers/MovementHandler.cpp
src/server/game/Handlers/NPCHandler.cpp
src/server/game/Handlers/PetitionsHandler.cpp
src/server/game/Handlers/QuestHandler.cpp
src/server/game/Handlers/SpellHandler.cpp
src/server/game/Handlers/TradeHandler.cpp
src/server/game/Instances/InstanceScript.cpp
src/server/game/Server/WorldSession.cpp
src/server/game/Server/WorldSocket.cpp
src/server/game/Spells/Auras/SpellAuraEffects.cpp
src/server/game/Spells/Auras/SpellAuras.cpp
src/server/game/Spells/SpellEffects.cpp
src/server/game/Spells/SpellMgr.cpp
src/server/game/Tools/PlayerDump.cpp
src/server/game/World/World.cpp
src/server/scripts/Commands/cs_modify.cpp
src/server/scripts/Commands/cs_reload.cpp
src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
Diffstat (limited to 'src/server/game/Handlers/PetHandler.cpp')
| -rw-r--r-- | src/server/game/Handlers/PetHandler.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 8e6fe56150a..c26c0ce7c01 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -38,13 +38,13 @@ void WorldSession::HandleDismissCritter(WorldPacket& recvData) uint64 guid; recvData >> guid; - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DISMISS_CRITTER for GUID " UI64FMTD, guid); + TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DISMISS_CRITTER for GUID " UI64FMTD, guid); Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid); if (!pet) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Vanitypet (guid: %u) does not exist - player '%s' (guid: %u / account: %u) attempted to dismiss it (possibly lagged out)", + TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Vanitypet (guid: %u) does not exist - player '%s' (guid: %u / account: %u) attempted to dismiss it (possibly lagged out)", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow(), GetAccountId()); return; } @@ -75,17 +75,17 @@ void WorldSession::HandlePetAction(WorldPacket& recvData) // used also for charmed creature Unit* pet= ObjectAccessor::GetUnit(*_player, guid1); - sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet %u - flag: %u, spellid: %u, target: %u.", uint32(GUID_LOPART(guid1)), uint32(flag), spellid, uint32(GUID_LOPART(guid2))); + TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet %u - flag: %u, spellid: %u, target: %u.", uint32(GUID_LOPART(guid1)), uint32(flag), spellid, uint32(GUID_LOPART(guid2))); if (!pet) { - sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet (GUID: %u) doesn't exist for player %s (GUID: %u)", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID())); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet (GUID: %u) doesn't exist for player %s (GUID: %u)", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID())); return; } if (pet != GetPlayer()->GetFirstControlled()) { - sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet (GUID: %u) does not belong to player %s (GUID: %u)", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID())); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet (GUID: %u) does not belong to player %s (GUID: %u)", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID())); return; } @@ -121,19 +121,19 @@ void WorldSession::HandlePetStopAttack(WorldPacket &recvData) uint64 guid; recvData >> guid; - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PET_STOP_ATTACK for GUID " UI64FMTD "", guid); + TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PET_STOP_ATTACK for GUID " UI64FMTD "", guid); Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid); if (!pet) { - sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetStopAttack: Pet %u does not exist", uint32(GUID_LOPART(guid))); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetStopAttack: Pet %u does not exist", uint32(GUID_LOPART(guid))); return; } if (pet != GetPlayer()->GetPet() && pet != GetPlayer()->GetCharm()) { - sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetStopAttack: Pet GUID %u isn't a pet or charmed creature of player %s", + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetStopAttack: Pet GUID %u isn't a pet or charmed creature of player %s", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str()); return; } @@ -149,7 +149,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetAction(petGuid: " UI64FMTD ", tagGuid: " UI64FMTD ", spellId: %u, flag: %u): object (entry: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetAction(petGuid: " UI64FMTD ", tagGuid: " UI64FMTD ", spellId: %u, flag: %u): object (entry: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", guid1, guid2, spellid, flag, pet->GetGUIDLow(), pet->GetTypeId()); return; } @@ -279,7 +279,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid charmInfo->SaveStayPosition(); break; default: - sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid); } break; case ACT_REACTION: // 0x6 @@ -308,7 +308,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid); if (!spellInfo) { - sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown PET spell id %i", spellid); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: unknown PET spell id %i", spellid); return; } @@ -413,13 +413,13 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid break; } default: - sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid); } } void WorldSession::HandlePetNameQuery(WorldPacket& recvData) { - sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetNameQuery. CMSG_PET_NAME_QUERY"); + TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandlePetNameQuery. CMSG_PET_NAME_QUERY"); uint32 petnumber; uint64 petguid; @@ -468,7 +468,7 @@ bool WorldSession::CheckStableMaster(uint64 guid) { if (!GetPlayer()->isGameMaster() && !GetPlayer()->HasAuraType(SPELL_AURA_OPEN_STABLE)) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid)); + TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid)); return false; } } @@ -477,7 +477,7 @@ bool WorldSession::CheckStableMaster(uint64 guid) { if (!GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_STABLEMASTER)) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Stablemaster (GUID:%u) not found or you can't interact with him.", GUID_LOPART(guid)); + TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Stablemaster (GUID:%u) not found or you can't interact with him.", GUID_LOPART(guid)); return false; } } @@ -486,7 +486,7 @@ bool WorldSession::CheckStableMaster(uint64 guid) void WorldSession::HandlePetSetAction(WorldPacket& recvData) { - sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetSetAction. CMSG_PET_SET_ACTION"); + TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandlePetSetAction. CMSG_PET_SET_ACTION"); uint64 petguid; uint8 count; @@ -497,14 +497,14 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData) if (!pet || pet != _player->GetFirstControlled()) { - sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetSetAction: Unknown pet (GUID: %u) or pet owner (GUID: %u)", GUID_LOPART(petguid), _player->GetGUIDLow()); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetSetAction: Unknown pet (GUID: %u) or pet owner (GUID: %u)", GUID_LOPART(petguid), _player->GetGUIDLow()); return; } CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); return; } @@ -566,7 +566,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData) uint32 spell_id = UNIT_ACTION_BUTTON_ACTION(data[i]); uint8 act_state = UNIT_ACTION_BUTTON_TYPE(data[i]); - sLog->outInfo(LOG_FILTER_NETWORKIO, "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X", + TC_LOG_INFO(LOG_FILTER_NETWORKIO, "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X", _player->GetName().c_str(), position[i], spell_id, uint32(act_state)); //if it's act for spell (en/disable/cast) and there is a spell given (0 = remove spell) which pet doesn't know, don't add @@ -603,7 +603,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData) void WorldSession::HandlePetRename(WorldPacket& recvData) { - sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetRename. CMSG_PET_RENAME"); + TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandlePetRename. CMSG_PET_RENAME"); uint64 petguid; uint8 isdeclined; @@ -690,7 +690,7 @@ void WorldSession::HandlePetAbandon(WorldPacket& recvData) { uint64 guid; recvData >> guid; //pet guid - sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid)); + TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid)); if (!_player->IsInWorld()) return; @@ -708,7 +708,7 @@ void WorldSession::HandlePetAbandon(WorldPacket& recvData) void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket) { - sLog->outInfo(LOG_FILTER_NETWORKIO, "CMSG_PET_SPELL_AUTOCAST"); + TC_LOG_INFO(LOG_FILTER_NETWORKIO, "CMSG_PET_SPELL_AUTOCAST"); uint64 guid; uint32 spellid; uint8 state; //1 for on, 0 for off @@ -724,7 +724,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket) if (!pet || (pet != _player->GetGuardianPet() && pet != _player->GetCharm())) { - sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s (GUID: %u).", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID())); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s (GUID: %u).", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID())); return; } @@ -736,7 +736,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket) CharmInfo* charmInfo = pet->GetCharmInfo(); if (!charmInfo) { - sLog->outError(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId()); return; } @@ -750,7 +750,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket) void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_CAST_SPELL"); + TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_CAST_SPELL"); uint64 guid; uint8 castCount; @@ -759,7 +759,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket) recvPacket >> guid >> castCount >> spellId >> castFlags; - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_CAST_SPELL, guid: " UI64FMTD ", castCount: %u, spellId %u, castFlags %u", guid, castCount, spellId, castFlags); + TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_CAST_SPELL, guid: " UI64FMTD ", castCount: %u, spellId %u, castFlags %u", guid, castCount, spellId, castFlags); // This opcode is also sent from charmed and possessed units (players and creatures) if (!_player->GetGuardianPet() && !_player->GetCharm()) @@ -769,14 +769,14 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket) if (!caster || (caster != _player->GetGuardianPet() && caster != _player->GetCharm())) { - sLog->outError(LOG_FILTER_NETWORKIO, "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s (GUID: %u).", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID())); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s (GUID: %u).", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID())); return; } SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) { - sLog->outError(LOG_FILTER_NETWORKIO, "WORLD: unknown PET spell id %i", spellId); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: unknown PET spell id %i", spellId); return; } @@ -864,7 +864,7 @@ void WorldSession::SendPetNameInvalid(uint32 error, const std::string& name, Dec void WorldSession::HandlePetLearnTalent(WorldPacket& recvData) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_LEARN_TALENT"); + TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_LEARN_TALENT"); uint64 guid; uint32 talentId, requestedRank; @@ -876,7 +876,7 @@ void WorldSession::HandlePetLearnTalent(WorldPacket& recvData) void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket& recvData) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LEARN_PREVIEW_TALENTS_PET"); + TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_LEARN_PREVIEW_TALENTS_PET"); uint64 guid; recvData >> guid; |
