From b085d8eadc52f402bcef5aab789d0b922f2fdf38 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Fri, 12 Mar 2010 14:25:43 +0100 Subject: Fix faulty debug logging and a crash caused by improper typecasting. Fixes issue #1068 --HG-- branch : trunk --- src/game/MotionMaster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index 1db93806665..91f432ca09f 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -244,7 +244,7 @@ MotionMaster::MoveChase(Unit* target, float dist, float angle) DEBUG_LOG("Player (GUID: %u) chase to %s (GUID: %u)", i_owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", - target->GetTypeId() == TYPEID_PLAYER ? i_owner->GetGUIDLow() : i_owner->ToCreature()->GetDBTableGUIDLow()); + target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToPlayer()->GetDBTableGUIDLow()); Mutate(new TargetedMovementGenerator(*target,dist,angle), MOTION_SLOT_ACTIVE); } else -- cgit v1.2.3