public static void ClickToMoveTmp(Single x, Single y, Single z, UInt64 guid, Int32 action, Single precision)
{
// Offset:
CGPlayer_C__ClickToMove = 0x727400;
uint ClntObjMgrGetActivePlayerObj = 0x4038F0;
// Allocate Memory:
UInt32 Pos_Codecave = Hook.Memory.AllocateMemory(0x4 * 3);
UInt32 GUID_Codecave = Hook.Memory.AllocateMemory(0x

;
UInt32 Precision_Codecave = Hook.Memory.AllocateMemory(0x4);
// Write value:
Hook.Memory.WriteUInt64(GUID_Codecave, guid);
Hook.Memory.WriteFloat(Precision_Codecave, precision);
Hook.Memory.WriteFloat(Pos_Codecave, x);
Hook.Memory.WriteFloat(Pos_Codecave + 0x4, y);
Hook.Memory.WriteFloat(Pos_Codecave + 0x8, z);
// BOOL __thiscall CGPlayer_C__ClickToMove(WoWActivePlayer *this, CLICKTOMOVETYPE clickType, WGUID *interactGuid, WOWPOS *clickPos, float precision)
string[] asm = new string[]
{
"mov edx, [" + Precision_Codecave + "]",
"push edx",
"call " + (uint)ClntObjMgrGetActivePlayerObj,
"mov ecx, eax",
"push " + Pos_Codecave,
"push " + GUID_Codecave,
"push " + action,
"call " + (uint)CGPlayer_C__ClickToMove,
"retn",
};
MyHook.InjectAndExecute(asm);
Hook.Memory.FreeMemory(Pos_Codecave);
Hook.Memory.FreeMemory(GUID_Codecave);
Hook.Memory.FreeMemory(Precision_Codecave);
}