Code:
public static string GetLocalizedText(string Local)
{
try
{
String Command = Local;
uint Lua_GetLocalizedText_Space = Memory.Manager.WoW.AllocateMemory(Encoding.UTF8.GetBytes(Command).Length + 1);
uint ClntObjMgrGetActivePlayerObj = (uint)Memory.Manager.WoW.MainModule.BaseAddress + (uint)Enums.EndScene.ClntObjMgrGetActivePlayerObj;
uint FrameScript__GetLocalizedText = (uint)Memory.Manager.WoW.MainModule.BaseAddress + (uint)Enums.EndScene.FrameScript__GetLocalizedText;
Memory.Manager.WoW.WriteBytes(Lua_GetLocalizedText_Space, Encoding.UTF8.GetBytes(Command));
String[] asm = new String[]
{
"call " + (uint)ClntObjMgrGetActivePlayerObj,
"mov ecx, eax",
"push -1",
"mov edx, " + Lua_GetLocalizedText_Space + "",
"push edx",
"call " + (uint)FrameScript__GetLocalizedText,
"retn",
};
string Result = Encoding.UTF8.GetString(EndScene.InjectAndExecute(asm));
Memory.Manager.WoW.FreeMemory(Lua_GetLocalizedText_Space);
return Result;
}
catch { return String.Empty; }
}