xoreos
0.0.5
|
#include <container.h>
Public Member Functions | |
ScriptContainer () | |
~ScriptContainer () | |
const Common::UString & | getScript () const |
bool | hasScript () const |
void | enableEvent (EventType event, bool enabled) |
Enable/Disable the handling of a specific event. More... | |
void | enableEvents (bool enabled) |
Enable/Disable the handling of all events. More... | |
bool | runScript (EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
bool | runScript (Event &event) |
Static Public Member Functions | |
static bool | runScript (const Common::UString &script, EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
static bool | runScript (const Common::UString &script, EventType event, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
static bool | runScript (const Common::UString &script, Event &event) |
static bool | runScript (const Common::UString &script, Event &event, const Aurora::NWScript::ScriptState &state) |
Protected Member Functions | |
void | clearScript () |
void | readScript (const Aurora::GFF3Struct &gff) |
void | readScript (const Aurora::GFF4Struct &gff) |
Private Attributes | |
Common::UString | _script |
std::map< EventType, bool > | _eventEnabled |
Definition at line 51 of file container.h.
Engines::DragonAge::ScriptContainer::ScriptContainer | ( | ) |
Definition at line 58 of file container.cpp.
Engines::DragonAge::ScriptContainer::~ScriptContainer | ( | ) |
Definition at line 61 of file container.cpp.
|
protected |
Definition at line 86 of file container.cpp.
References _script, and Common::UString::clear().
Referenced by readScript().
void Engines::DragonAge::ScriptContainer::enableEvent | ( | EventType | event, |
bool | enabled | ||
) |
Enable/Disable the handling of a specific event.
Definition at line 72 of file container.cpp.
References _eventEnabled.
void Engines::DragonAge::ScriptContainer::enableEvents | ( | bool | enabled | ) |
Enable/Disable the handling of all events.
Definition at line 76 of file container.cpp.
References _eventEnabled, Engines::DragonAge::kEventTypeInvalid, Engines::DragonAge::kEventTypePartyPickerInit, Engines::DragonAge::kEventTypeSpellCastAt, Engines::DragonAge::kEventTypeTrainingBegin, and Engines::DragonAge::kEventTypeTrainingMovementCommandIssued.
Referenced by Engines::DragonAge::Creature::createFakePC(), Engines::DragonAge::Waypoint::load(), Engines::DragonAge::Area::loadARE(), Engines::DragonAge::Placeable::loadProperties(), and Engines::DragonAge::Campaign::readCIFDynamic().
const Common::UString & Engines::DragonAge::ScriptContainer::getScript | ( | ) | const |
Definition at line 64 of file container.cpp.
References _script.
bool Engines::DragonAge::ScriptContainer::hasScript | ( | ) | const |
Definition at line 68 of file container.cpp.
References _script, and Common::UString::empty().
|
protected |
Definition at line 90 of file container.cpp.
References _script, ARRAYSIZE, clearScript(), Aurora::GFF3Struct::getString(), and Engines::DragonAge::kScriptNames.
Referenced by Engines::DragonAge::Waypoint::load(), Engines::DragonAge::Area::loadARE(), Engines::DragonAge::Placeable::loadProperties(), and Engines::DragonAge::Campaign::readCIFDynamic().
|
protected |
Definition at line 97 of file container.cpp.
References _script, ARRAYSIZE, clearScript(), Aurora::GFF4Struct::getString(), and Engines::DragonAge::kScriptFields.
bool Engines::DragonAge::ScriptContainer::runScript | ( | EventType | event, |
const Aurora::NWScript::ObjectReference | owner = Aurora::NWScript::ObjectReference() , |
||
const Aurora::NWScript::ObjectReference | triggerer = Aurora::NWScript::ObjectReference() |
||
) |
Definition at line 104 of file container.cpp.
Referenced by Engines::DragonAge::Placeable::click(), Engines::DragonAge::Creature::click(), Engines::DragonAge::Campaign::enter(), Engines::DragonAge::Functions::handleEvent(), Engines::DragonAge::Campaign::leave(), and runScript().
bool Engines::DragonAge::ScriptContainer::runScript | ( | Event & | event | ) |
Definition at line 113 of file container.cpp.
References _eventEnabled, _script, Engines::DragonAge::Event::getType(), and runScript().
|
static |
Definition at line 121 of file container.cpp.
References Aurora::NWScript::NCSFile::getEmptyState(), and runScript().
|
static |
Definition at line 128 of file container.cpp.
References runScript().
|
static |
Definition at line 139 of file container.cpp.
References Aurora::NWScript::NCSFile::getEmptyState(), and runScript().
|
static |
Definition at line 143 of file container.cpp.
References Common::UString::c_str(), Common::UString::empty(), Common::exceptionDispatcherWarning(), Aurora::NWScript::NCSFile::getEnvironment(), Aurora::NWScript::Variable::getFloat(), Aurora::NWScript::Variable::getInt(), Engines::DragonAge::Event::getTarget(), Aurora::NWScript::Variable::getType(), Aurora::NWScript::kTypeFloat, Aurora::NWScript::kTypeInt, Aurora::NWScript::NCSFile::run(), and Aurora::NWScript::VariableContainer::setVariable().
|
private |
Definition at line 92 of file container.h.
Referenced by enableEvent(), enableEvents(), and runScript().
|
private |
Definition at line 90 of file container.h.
Referenced by clearScript(), getScript(), hasScript(), readScript(), and runScript().