nw::DialogPtr

struct DialogPtr

Public Functions

DialogPtr *add_ptr(DialogPtr *ptr, bool is_link = false)

Adds Dialog Pointer, if is_link is false no new pointer or node is created. if is_link is true a new pointer will created with the node copied from input pointer.

DialogPtr *add_string(String value, nw::LanguageID lang = nw::LanguageID::english, bool feminine = false)

Adds Dialog Pointer and Node with string value set.

DialogPtr *add()

Adds empty Dialog Pointer and Node.

DialogPtr *copy() const

Copies dialog pointer and all sub-nodes.

void get_all_subnodes(Vector<DialogNode*> &subnodes)

Gets all sub-nodes that are not links When a pointer is removed from the dialog tree all of its sub-nodes must be removed from the main node list, unless they are links.

std::optional<String> get_condition_param(const String &key)

Gets a condition parameter if it exists.

void remove_condition_param(const String &key)

Removes condition parameter by key.

void remove_condition_param(size_t index)

Removes condition parameter by index.

void remove_ptr(DialogPtr *ptr)

Removes Dialog Ptr from underlying node.

void set_condition_param(const String &key, const String &value)

Sets condition parameter, if key does not exist key and value are appended.

Public Members

Dialog *parent = nullptr
DialogNodeType type = DialogNodeType::entry
uint32_t index = std::numeric_limits<uint32_t>::max()
DialogNode *node = nullptr
Resref script_appears
Vector<std::pair<String, String>> condition_params
bool is_start = false
bool is_link = false
String comment