Code:
public enum CtmAction : uint {
FaceTarget = 1,
FaceDestination = 2,
Walk = 4,
InteractNpc = 5,
Loot = 6,
InteractItem = 7,
Attack = 10,
Idle = 13
}
The first two names are probably wrong.. they both have something to do with facing, but havent figured out how to use them right yet.
Also check your offsets.
Those methods are working fine for me (the values should be set to something very similar to what wow uses):
Code:
public void Attack( Unit unit ) {
if ( !unit.IsValid )
return;
Target = unit.Guid;
Destination = unit.Position;
TurnScale = 13.96f;
Distance = 3.66f;
Action = CtmAction.Attack;
}
public void InteractNpc( Unit unit ) {
if ( !unit.IsValid )
return;
Target = unit.Guid;
Destination = unit.Position;
TurnScale = 13.95f;
Distance = 2.75f;
Action = CtmAction.InteractNpc;
}
public void InteractGameObject( GameObject gameObject ) {
if ( !gameObject.IsValid )
return;
Target = gameObject.Guid;
Destination = gameObject.Position;
TurnScale = 13.95f;
Distance = 4.5f;
Action = CtmAction.InteractItem;
}
public void Walk( Position position ) {
Target = 0;
Destination = position;
TurnScale = 13.95f;
Distance = 0.5f;
Action = CtmAction.Walk;
}
Edit: Also note when you are trying to interact with npc (tested) or gameobject (only assumption) and you are already near enough so no moving is required, no interaction will be made by CTM