Fix faulty debug logging and a crash caused by improper typecasting. Fixes issue #1068

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-03-12 14:25:43 +01:00
parent b23a85e810
commit b085d8eadc

View File

@@ -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