From 0babfec043590457807f2f22c57eea2814e9788c Mon Sep 17 00:00:00 2001 From: balrok Date: Mon, 9 Mar 2009 14:19:17 +0300 Subject: [PATCH] [7424] Codestyle: removed not needed \n in log output. Signed-off-by: VladimirMangos --- src/game/Creature.cpp | 4 ++-- src/game/GMTicketHandler.cpp | 2 +- src/game/Map.cpp | 2 +- src/game/ObjectAccessor.cpp | 2 +- src/game/PetHandler.cpp | 32 ++++++++++++++++---------------- src/game/Player.cpp | 4 ++-- src/game/SkillHandler.cpp | 2 +- src/game/Spell.cpp | 4 ++-- src/game/SpellEffects.cpp | 12 ++++++------ src/game/Unit.cpp | 2 +- src/game/WorldSocket.cpp | 2 +- src/shared/revision_nr.h | 2 +- 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 785d99858..2d9a48981 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1562,7 +1562,7 @@ SpellEntry const *Creature::reachWithSpellAttack(Unit *pVictim) SpellEntry const *spellInfo = sSpellStore.LookupEntry(m_spells[i] ); if(!spellInfo) { - sLog.outError("WORLD: unknown spell id %i\n", m_spells[i]); + sLog.outError("WORLD: unknown spell id %i", m_spells[i]); continue; } @@ -1612,7 +1612,7 @@ SpellEntry const *Creature::reachWithSpellCure(Unit *pVictim) SpellEntry const *spellInfo = sSpellStore.LookupEntry(m_spells[i] ); if(!spellInfo) { - sLog.outError("WORLD: unknown spell id %i\n", m_spells[i]); + sLog.outError("WORLD: unknown spell id %i", m_spells[i]); continue; } diff --git a/src/game/GMTicketHandler.cpp b/src/game/GMTicketHandler.cpp index c33968221..3a1aefdfd 100644 --- a/src/game/GMTicketHandler.cpp +++ b/src/game/GMTicketHandler.cpp @@ -119,7 +119,7 @@ void WorldSession::HandleGMTicketCreateOpcode( WorldPacket & recv_data ) data.Initialize( SMSG_GMTICKET_CREATE, 4 ); data << uint32(2); SendPacket( &data ); - DEBUG_LOG("update the ticket\n"); + DEBUG_LOG("update the ticket"); //TODO: Guard player map HashMapHolder::MapType &m = ObjectAccessor::Instance().GetPlayers(); diff --git a/src/game/Map.cpp b/src/game/Map.cpp index e86a687da..d4134f710 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1937,7 +1937,7 @@ void InstanceMap::PermBindAllPlayers(Player *player) InstanceSave *save = sInstanceSaveManager.GetInstanceSave(GetInstanceId()); if(!save) { - sLog.outError("Cannot bind players, no instance save available for map!\n"); + sLog.outError("Cannot bind players, no instance save available for map!"); return; } diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp index 07830f15b..25dcffd44 100644 --- a/src/game/ObjectAccessor.cpp +++ b/src/game/ObjectAccessor.cpp @@ -408,7 +408,7 @@ ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia) return NULL; } - DEBUG_LOG("Deleting Corpse and spawning bones.\n"); + DEBUG_LOG("Deleting Corpse and spawning bones."); // remove corpse from player_guid -> corpse map RemoveCorpse(corpse); diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 626bee716..f8610ccfd 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -44,16 +44,16 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) // used also for charmed creature Unit* pet= ObjectAccessor::GetUnit(*_player, guid1); - sLog.outDetail("HandlePetAction.Pet %u flag is %u, spellid is %u, target %u.\n", uint32(GUID_LOPART(guid1)), flag, spellid, uint32(GUID_LOPART(guid2)) ); + sLog.outDetail("HandlePetAction.Pet %u flag is %u, spellid is %u, target %u.", uint32(GUID_LOPART(guid1)), flag, spellid, uint32(GUID_LOPART(guid2)) ); if(!pet) { - sLog.outError( "Pet %u not exist.\n", uint32(GUID_LOPART(guid1)) ); + sLog.outError( "Pet %u not exist.", uint32(GUID_LOPART(guid1)) ); return; } if(pet != GetPlayer()->GetPet() && pet != GetPlayer()->GetCharm()) { - sLog.outError("HandlePetAction.Pet %u isn't pet of player %s.\n", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName() ); + sLog.outError("HandlePetAction.Pet %u isn't pet of player %s.", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName() ); return; } @@ -143,7 +143,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) _player->Uncharm(); break; default: - sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.\n", flag, spellid); + sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.", flag, spellid); } break; case ACT_REACTION: // 0x600 @@ -171,7 +171,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellid ); if(!spellInfo) { - sLog.outError("WORLD: unknown PET spell id %i\n", spellid); + sLog.outError("WORLD: unknown PET spell id %i", spellid); return; } @@ -261,7 +261,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) break; } default: - sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.\n", flag, spellid); + sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.", flag, spellid); } } @@ -269,7 +269,7 @@ void WorldSession::HandlePetNameQuery( WorldPacket & recv_data ) { CHECK_PACKET_SIZE(recv_data,4+8); - sLog.outDetail( "HandlePetNameQuery. CMSG_PET_NAME_QUERY\n" ); + sLog.outDetail( "HandlePetNameQuery. CMSG_PET_NAME_QUERY" ); uint32 petnumber; uint64 petguid; @@ -309,7 +309,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data ) { CHECK_PACKET_SIZE(recv_data, 8+4+2+2); - sLog.outDetail( "HandlePetSetAction. CMSG_PET_SET_ACTION\n" ); + sLog.outDetail( "HandlePetSetAction. CMSG_PET_SET_ACTION" ); uint64 petguid; uint32 position; @@ -328,7 +328,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data ) if(!pet || (pet != _player->GetPet() && pet != _player->GetCharm())) { - sLog.outError( "HandlePetSetAction: Unknown pet or pet owner.\n" ); + sLog.outError( "HandlePetSetAction: Unknown pet or pet owner." ); return; } @@ -346,7 +346,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data ) recv_data >> spell_id; recv_data >> act_state; - sLog.outDetail( "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X\n", _player->GetName(), position, spell_id, act_state); + sLog.outDetail( "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X", _player->GetName(), position, spell_id, 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 if(!((act_state == ACT_ENABLED || act_state == ACT_DISABLED || act_state == ACT_PASSIVE) && spell_id && !pet->HasSpell(spell_id))) @@ -378,7 +378,7 @@ void WorldSession::HandlePetRename( WorldPacket & recv_data ) { CHECK_PACKET_SIZE(recv_data, 8+1); - sLog.outDetail( "HandlePetRename. CMSG_PET_RENAME\n" ); + sLog.outDetail( "HandlePetRename. CMSG_PET_RENAME" ); uint64 petguid; uint8 isdeclined; @@ -496,7 +496,7 @@ void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket) if(guid != pet->GetGUID()) { - sLog.outError( "HandlePetUnlearnOpcode.Pet %u isn't pet of player %s .\n", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() ); + sLog.outError( "HandlePetUnlearnOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() ); return; } @@ -530,7 +530,7 @@ void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket ) if(!pet || (pet != _player->GetPet() && pet != _player->GetCharm())) { - sLog.outError( "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .\n", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() ); + sLog.outError( "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() ); return; } @@ -582,7 +582,7 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket ) if(!pet || (pet != _player->GetPet() && pet!= _player->GetCharm())) { - sLog.outError( "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .\n", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() ); + sLog.outError( "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() ); return; } @@ -592,7 +592,7 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket ) SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellid); if(!spellInfo) { - sLog.outError("WORLD: unknown PET spell id %i\n", spellid); + sLog.outError("WORLD: unknown PET spell id %i", spellid); return; } @@ -778,5 +778,5 @@ void WorldSession::HandlePetLearnTalent( WorldPacket & recv_data ) // learn! (other talent ranks will unlearned at learning) pet->learnSpell(spellid); - sLog.outDetail("TalentID: %u Rank: %u Spell: %u\n", talent_id, requested_rank, spellid); + sLog.outDetail("TalentID: %u Rank: %u Spell: %u", talent_id, requested_rank, spellid); } diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 6baea0750..8a1cbfa55 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -15657,7 +15657,7 @@ bool Player::_LoadHomeBind(QueryResult *result) CharacterDatabase.PExecute("INSERT INTO character_homebind (guid,map,zone,position_x,position_y,position_z) VALUES ('%u', '%u', '%u', '%f', '%f', '%f')", GetGUIDLow(), m_homebindMapId, (uint32)m_homebindZoneId, m_homebindX, m_homebindY, m_homebindZ); } - DEBUG_LOG("Setting player home position: mapid is: %u, zoneid is %u, X is %f, Y is %f, Z is %f\n", + DEBUG_LOG("Setting player home position: mapid is: %u, zoneid is %u, X is %f, Y is %f, Z is %f", m_homebindMapId, m_homebindZoneId, m_homebindX, m_homebindY, m_homebindZ); return true; @@ -19872,4 +19872,4 @@ void Player::HandleFall(MovementInfo const& movementInfo) void Player::UpdateAchievementCriteria( AchievementCriteriaTypes type, uint32 miscvalue1/*=0*/, uint32 miscvalue2/*=0*/, Unit *unit/*=NULL*/, uint32 time/*=0*/ ) { GetAchievementMgr().UpdateAchievementCriteria(type, miscvalue1,miscvalue2,unit,time); -} \ No newline at end of file +} diff --git a/src/game/SkillHandler.cpp b/src/game/SkillHandler.cpp index dac37e6b0..1a79923d7 100644 --- a/src/game/SkillHandler.cpp +++ b/src/game/SkillHandler.cpp @@ -126,7 +126,7 @@ void WorldSession::HandleLearnTalentOpcode( WorldPacket & recv_data ) // learn! (other talent ranks will unlearned at learning) GetPlayer( )->learnSpell(spellid,false); - sLog.outDetail("TalentID: %u Rank: %u Spell: %u\n", talent_id, requested_rank, spellid); + sLog.outDetail("TalentID: %u Rank: %u Spell: %u", talent_id, requested_rank, spellid); // update free talent points GetPlayer()->SetFreeTalentPoints(CurTalentPoints - 1); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 25372e51e..821b67e36 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2044,7 +2044,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list &TagUnitMap) } } else - sLog.outError( "SPELL: unknown target coordinates for spell ID %u\n", m_spellInfo->Id ); + sLog.outError( "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id ); }break; case TARGET_BEHIND_VICTIM: { @@ -3530,7 +3530,7 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar EffectEnchantItemTmp(i); else { - sLog.outError("SPELL: unknown effect %u spell id %u\n", + sLog.outError("SPELL: unknown effect %u spell id %u", eff, m_spellInfo->Id); } } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index abfc1cd64..5a738426b 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -802,7 +802,7 @@ void Spell::EffectDummy(uint32 i) creatureTarget->RemoveCorpse(); creatureTarget->SetHealth(0); // just for nice GM-mode view - DEBUG_LOG("AddObject at SpellEfects.cpp EffectDummy\n"); + DEBUG_LOG("AddObject at SpellEfects.cpp EffectDummy"); map->Add(pGameObj); WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8); @@ -1653,7 +1653,7 @@ void Spell::EffectDummy(uint32 i) if(!spellInfo) { - sLog.outError("WORLD: unknown spell id %i\n", spell_id); + sLog.outError("WORLD: unknown spell id %i", spell_id); return; } @@ -1752,7 +1752,7 @@ void Spell::EffectTriggerSpellWithValue(uint32 i) if(!spellInfo) { - sLog.outError("EffectTriggerSpellWithValue of spell %u: triggering unknown spell id %i\n", m_spellInfo->Id,triggered_spell_id); + sLog.outError("EffectTriggerSpellWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); return; } @@ -2015,7 +2015,7 @@ void Spell::EffectTeleportUnits(uint32 i) SpellTargetPosition const* st = spellmgr.GetSpellTargetPosition(m_spellInfo->Id); if(!st) { - sLog.outError( "Spell::EffectTeleportUnits - unknown Teleport coordinates for spell ID %u\n", m_spellInfo->Id ); + sLog.outError( "Spell::EffectTeleportUnits - unknown Teleport coordinates for spell ID %u", m_spellInfo->Id ); return; } ((Player*)unitTarget)->TeleportTo(st->target_mapId,st->target_X,st->target_Y,st->target_Z,st->target_Orientation,unitTarget==m_caster ? TELE_TO_SPELL : 0); @@ -2055,7 +2055,7 @@ void Spell::EffectTeleportUnits(uint32 i) // If not exist data for dest location - return if(!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)) { - sLog.outError( "Spell::EffectTeleportUnits - unknown EffectImplicitTargetB[%u] = %u for spell ID %u\n", i, m_spellInfo->EffectImplicitTargetB[i], m_spellInfo->Id ); + sLog.outError( "Spell::EffectTeleportUnits - unknown EffectImplicitTargetB[%u] = %u for spell ID %u", i, m_spellInfo->EffectImplicitTargetB[i], m_spellInfo->Id ); return; } // Init dest coordinates @@ -6290,7 +6290,7 @@ void Spell::EffectTransmitted(uint32 effIndex) pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel() ); pGameObj->SetSpellId(m_spellInfo->Id); - DEBUG_LOG("AddObject at SpellEfects.cpp EffectTransmitted\n"); + DEBUG_LOG("AddObject at SpellEfects.cpp EffectTransmitted"); //m_caster->AddGameObject(pGameObj); //m_ObjToDel.push_back(pGameObj); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 04b83a9de..9efece118 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -901,7 +901,7 @@ void Unit::CastCustomSpell(Unit* Victim,uint32 spellId, int32 const* bp0, int32 if(!spellInfo) { - sLog.outError("CastCustomSpell: unknown spell id %i\n", spellId); + sLog.outError("CastCustomSpell: unknown spell id %i", spellId); return; } diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp index 5b7574b27..3955f41da 100644 --- a/src/game/WorldSocket.cpp +++ b/src/game/WorldSocket.cpp @@ -315,7 +315,7 @@ int WorldSocket::handle_input (ACE_HANDLE) } case 0: { - DEBUG_LOG ("WorldSocket::handle_input: Peer has closed connection\n"); + DEBUG_LOG ("WorldSocket::handle_input: Peer has closed connection"); errno = ECONNRESET; return -1; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ff2d069c8..3c5eab9d3 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7423" + #define REVISION_NR "7424" #endif // __REVISION_NR_H__