[Quest API] Add Entity Variable Events to Perl/Lua (#4092)

* [Quest API] Add Entity Variable Events to Perl/Lua

- Add `EVENT_ENTITY_VARIABLE_DELETE`.
- Add `EVENT_ENTITY_VARIABLE_SET`.
- Add `EVENT_ENTITY_VARIABLE_UPDATE`.
- All export `$variable_name` and `$variable_value`.

- Add `event_entity_variable_delete`.
- Add `event_entity_variable_set`.
- Add `event_entity_variable_update`.
- All export `e.variable_name` and `e.variable_value`.

- Allows operators to perform operations when entity variables are cleared, deleted, set, or updated.

* Update mob.cpp

* Cleanup.

* Cleanup

* Update mob.cpp

* Update lua_general.cpp

* Update embparser_api.cpp
This commit is contained in:
Alex King
2024-02-19 21:34:33 -05:00
committed by GitHub
parent db3601c25c
commit 5a89fcfb78
8 changed files with 295 additions and 78 deletions
+29
View File
@@ -240,6 +240,16 @@ void handle_npc_timer_stop(
std::vector<std::any> *extra_pointers
);
void handle_npc_entity_variable(
QuestInterface *parse,
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
);
// Player
void handle_player_say(
QuestInterface *parse,
@@ -808,6 +818,15 @@ void handle_player_timer_stop(
std::vector<std::any> *extra_pointers
);
void handle_player_entity_variable(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
);
// Item
void handle_item_click(
QuestInterface *parse,
@@ -1192,5 +1211,15 @@ void handle_bot_timer_stop(
std::vector<std::any> *extra_pointers
);
void handle_bot_entity_variable(
QuestInterface *parse,
lua_State* L,
Bot* bot,
Mob* init,
std::string data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
);
#endif
#endif