User Tools

Site Tools


plugins:using_ashitacore

Using AshitaCore Object

What is the AshitaCore Object?

The IAshitaCore object is the main IAshitaCore implementation that is internal to Ashita. When a plugin is loaded, the plugins Initialize method is called within the PluginBase inheritance, and the IAshitaCore pointer is passed to the plugin. This pointer should be stored and used later to interact with Ashita. Plugins cannot interact with Ashita unless this object is used.


Using AshitaCore Object

You can use the IAshitaCore object directly like a normal pointer object. If you are using a high-end IDE such as Visual Studio, there should be IntelliSense that completes for you to help you with using the object.
Otherwise, you can open the Ashita.h file within the Plugin ADK folder located at:

\Ashita\Plugins\ADK\Ashita.h

For example, if you wanted to write a message to the games chat log, you can use:

bool ExamplePlugin::Initialize(IAshitaCore* ashitaCore, DWORD dwPluginId)
{
    // Store the variables we are passed..
    this->m_AshitaCore = ashitaCore;
    this->m_PluginId = dwPluginId;
 
    // Write 'Hello world!' to the chat log..
    this->m_AshitaCore->GetChatManager()->Write("Hello world!");
 
    return true;
}

IAshitaCore Implemented Functions

The following functions can be used with the IAshitaCore object:

  • GetAshitaInstallPathA: Returns the current path to Ashita. (Ansi)
  • GetAshitaInstallPathW: Returns the current path to Ashita. (Unicode)
  • GetHandle: Returns the base handle to Ashita.dll. (The base address it is loaded at.)
  • GetFFXiHwnd: Returns the main FFXi window handle.
  • GetConfigurationManager: Returns the configuration manager interface for interacting with configuration files.
  • GetPointerManager: Returns the pointer manager interface for interacting with pointers.
  • GetResourceManager: Returns the resource manager interface for interacting with the games data files.
  • GetFontManager: Returns the font manager interface for interacting with highly-customizable built-in font objects.
  • GetChatManager: Returns the chat manager interface for interacting with the games chat log and command system.
  • GetDataManager: Returns the data manager interface for interacting with various data from the game. (Inventory, Player, Party, Target, etc.)
  • GetInputManager: Returns the input manager interface for interacting with the keyboard and mouse.
  • GetPacketManager: Returns the packet manager interface for interacting with the games packets.
  • GetPluginManager: Returns the plugin manager interface for interacting with the Ashita plugin manager.
  • GetGuiManager: Returns the Gui manager interface for interacting with the old AnTweakBar UI system.
  • GetImGuiManager: Returns the ImGui manager interface for interacting with the new ImGui system.
plugins/using_ashitacore.txt · Last modified: 2016/07/15 23:09 by atom0s