Navigation
Addons
Plugins
Navigation
Addons
Plugins
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.
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; }
The following functions can be used with the IAshitaCore object: