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::DragonAge2::ScriptContainer::ScriptContainer | ( | ) |
Definition at line 57 of file container.cpp.
Engines::DragonAge2::ScriptContainer::~ScriptContainer | ( | ) |
Definition at line 60 of file container.cpp.
|
protected |
Definition at line 82 of file container.cpp.
References _script, and Common::UString::clear().
Referenced by readScript().
void Engines::DragonAge2::ScriptContainer::enableEvent | ( | EventType | event, |
bool | enabled | ||
) |
Enable/Disable the handling of a specific event.
Definition at line 71 of file container.cpp.
References _eventEnabled.
void Engines::DragonAge2::ScriptContainer::enableEvents | ( | bool | enabled | ) |
Enable/Disable the handling of all events.
Definition at line 75 of file container.cpp.
References _eventEnabled, Engines::DragonAge2::kEventTypeAOETargetingGUIOpened, Engines::DragonAge2::kEventTypeInvalid, and Engines::DragonAge2::kEventTypeSpellCastAt.
Referenced by Engines::DragonAge2::Creature::createFakePC(), Engines::DragonAge2::Waypoint::load(), Engines::DragonAge2::Area::loadARE(), Engines::DragonAge2::Placeable::loadProperties(), and Engines::DragonAge2::Campaign::readCIFDynamic().
const Common::UString & Engines::DragonAge2::ScriptContainer::getScript | ( | ) | const |
Definition at line 63 of file container.cpp.
References _script.
bool Engines::DragonAge2::ScriptContainer::hasScript | ( | ) | const |
Definition at line 67 of file container.cpp.
References _script, and Common::UString::empty().
|
protected |
Definition at line 86 of file container.cpp.
References _script, ARRAYSIZE, clearScript(), Aurora::GFF3Struct::getString(), and Engines::DragonAge2::kScriptNames.
Referenced by Engines::DragonAge2::Waypoint::load(), Engines::DragonAge2::Area::loadARE(), Engines::DragonAge2::Placeable::loadProperties(), and Engines::DragonAge2::Campaign::readCIFDynamic().
|
protected |
Definition at line 93 of file container.cpp.
References _script, ARRAYSIZE, clearScript(), Aurora::GFF4Struct::getString(), and Engines::DragonAge2::kScriptFields.
bool Engines::DragonAge2::ScriptContainer::runScript | ( | EventType | event, |
const Aurora::NWScript::ObjectReference | owner = Aurora::NWScript::ObjectReference() , |
||
const Aurora::NWScript::ObjectReference | triggerer = Aurora::NWScript::ObjectReference() |
||
) |
Definition at line 100 of file container.cpp.
Referenced by Engines::DragonAge2::Placeable::click(), Engines::DragonAge2::Creature::click(), Engines::DragonAge2::Campaign::enter(), Engines::DragonAge2::Functions::handleEvent(), Engines::DragonAge2::Functions::handleEventRef(), Engines::DragonAge2::Campaign::leave(), and runScript().
bool Engines::DragonAge2::ScriptContainer::runScript | ( | Event & | event | ) |
Definition at line 109 of file container.cpp.
References _eventEnabled, _script, Engines::DragonAge2::Event::getType(), and runScript().
|
static |
Definition at line 117 of file container.cpp.
References Aurora::NWScript::NCSFile::getEmptyState(), and runScript().
|
static |
Definition at line 124 of file container.cpp.
References runScript().
|
static |
Definition at line 135 of file container.cpp.
References Aurora::NWScript::NCSFile::getEmptyState(), and runScript().
|
static |
Definition at line 139 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::DragonAge2::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().