dao::CClientExoApp

class

The game’s client application object. You never construct one: call Get() for the game’s.

Declared in dao/ClientExoApp.h.

Functions

CClientExoApp()

CClientExoApp()=delete

CClientExoApp()

CClientExoApp(const CClientExoApp &)=delete

Commands()

void * Commands() const

Returns the script commands object (dao/Script.h).

The application creates it while starting up and hands it to the script VM.

Returns the object, or null before it exists

CurrentExplore()

static GameModeExplore * CurrentExplore()

Returns explore mode, which tracks what is under the cursor (dao/GameModes.h).

Returns explore mode, or null unless the game is in exploration or combat

CurrentMode()

static std::optional<GameMode> CurrentMode()

Returns the game’s current mode.

A static shortcut for Get()->Mode().

Returns the mode, or nullopt before the application or its mode controller exists

GameModes()

GameModeController * GameModes() const

Returns the game mode controller (dao/GameModes.h).

Returns the controller, or null before the application has finished starting up

Get()

static CClientExoApp * Get()

Returns the application object.

Returns the object, or null before the engine has created it (for example, while plugins load) and after it is destroyed

GetCreatureById()

CCCreature * GetCreatureById(ObjectId id)

Finds a creature by id.

Returns the creature, or null if the id names nothing or something that is not a creature

GetGameObjectById()

CGameObject * GetGameObjectById(ObjectId id)

Finds a game object by id.

Returns the object, or null if the id names nothing or an object of another class

GetModule()

CCModule * GetModule()

Returns the current module.

Returns the module, or null before a game is loaded

GetObjectById()

CCObject * GetObjectById(ObjectId id)

Finds an object by id.

Returns the object, or null if the id names nothing or an object of another class

GetPlaceableById()

CCPlaceable * GetPlaceableById(ObjectId id)

Finds a placeable by id.

Returns the placeable, or null if the id names nothing or something that is not a placeable

GetWayPointById()

CCWayPoint * GetWayPointById(ObjectId id)

Finds a waypoint by id.

Returns the waypoint, or null if the id names nothing or something that is not a waypoint

IsPaused()

bool IsPaused() const

Returns whether the game is paused.

Mode()

std::optional<GameMode> Mode() const

Returns the game’s current mode.

Returns the mode, or nullopt before the game mode controller exists

operator=()

CClientExoApp & operator=(const CClientExoApp &)=delete

PausedMilliseconds()

std::uint32_t PausedMilliseconds() const

Returns the total time spent paused this session, in milliseconds.

A pause still in progress is not counted until it ends.

SetPaused()

void SetPaused(bool paused, bool second=true)

Pauses or resumes the game by calling the engine’s own SetPaused.

Parameter  
paused true to pause, false to resume
second the engine’s second argument. The pause key passes true; what it means is not yet known

~CClientExoApp()

~CClientExoApp()=delete

Fields

Field Type  
kCommands std::size_t = 0x1E4 Offset of the script commands object pointer.
kFlagValue std::size_t = 0xC offset of the value byte in a flag object
kModeHolder std::size_t = 0x114 Offset of the GameModeController pointer (dao/GameModes.h).
kPausedFlag std::size_t = 0xD8 offset of the pause’s flag object
kPausedSince std::size_t = 0xF8 GetTickCount() when the pause began.
kPausedTotal std::size_t = 0xFC total milliseconds paused so far
kSecondFlag std::size_t = 0xE8 flag object SetPaused sets from second
kSize std::size_t = 0x2F0 the object’s size, as passed to operator new