From 0038b2be0e7e912869360e6dc667620c710845b0 Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Wed, 10 Mar 2010 02:41:16 +0100 Subject: [PATCH] * Add GUID logging in Unit::SetCharmedBy. --HG-- branch : trunk --- src/game/Unit.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 93afd45e08..53b4d75b2f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -14930,11 +14930,11 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type) assert(type != CHARM_TYPE_POSSESS || charmer->GetTypeId() == TYPEID_PLAYER); assert((type == CHARM_TYPE_VEHICLE) == IsVehicle()); - sLog.outDebug("SetCharmedBy: charmer %u, charmed %u, type %u.", charmer->GetEntry(), GetEntry(), (uint32)type); + sLog.outDebug("SetCharmedBy: charmer %u (GUID %u), charmed %u (GUID %u), type %u.", charmer->GetEntry(), GetEntry(), (uint32)type); if (this == charmer) { - sLog.outCrash("Unit::SetCharmedBy: Unit %u is trying to charm itself!", GetEntry()); + sLog.outCrash("Unit::SetCharmedBy: Unit %u (GUID %u) is trying to charm itself!", GetEntry(), GetGUIDLow()); return false; } @@ -14943,14 +14943,14 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type) if (GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->GetTransport()) { - sLog.outCrash("Unit::SetCharmedBy: Player on transport is trying to charm %u", GetEntry()); + sLog.outCrash("Unit::SetCharmedBy: Player on transport is trying to charm %u (GUID %u)", GetEntry(), GetGUIDLow()); return false; } // Already charmed if (GetCharmerGUID()) { - sLog.outCrash("Unit::SetCharmedBy: %u has already been charmed but %u is trying to charm it!", GetEntry(), charmer->GetEntry()); + sLog.outCrash("Unit::SetCharmedBy: %u (GUID %u) has already been charmed but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow()); return false; } @@ -14975,7 +14975,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type) // StopCastingCharm may remove a possessed pet? if (!IsInWorld()) { - sLog.outCrash("Unit::SetCharmedBy: %u is not in world but %u is trying to charm it!", GetEntry(), charmer->GetEntry()); + sLog.outCrash("Unit::SetCharmedBy: %u (GUID %u) is not in world but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow()); return false; }