aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-03-12 14:25:43 +0100
committerMachiavelli <none@none>2010-03-12 14:25:43 +0100
commitb085d8eadc52f402bcef5aab789d0b922f2fdf38 (patch)
tree9ea8d844c41d951b0eb4a4f3951d8ca58471de4b
parentb23a85e81001c8545677ffb08094a0445b9e87bc (diff)
Fix faulty debug logging and a crash caused by improper typecasting. Fixes issue #1068
--HG-- branch : trunk
-rw-r--r--src/game/MotionMaster.cpp2
1 files changed, 1 insertions, 1 deletions
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<Player>(*target,dist,angle), MOTION_SLOT_ACTIVE);
}
else