[Quest API] Cleanup string copies and push_backs. (#2807)

# Notes
- Several places use `push_back` instead of `emplace_back`.
- Several places use `std::string` instead of `const std::string&`.
This commit is contained in:
Alex King
2023-01-29 15:14:49 -05:00
committed by GitHub
parent 0fef46a6c1
commit bcc2e022dc
21 changed files with 372 additions and 397 deletions
+112 -127
View File
@@ -32,7 +32,7 @@ void handle_npc_event_say(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -55,7 +55,7 @@ void handle_npc_event_trade(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -113,7 +113,7 @@ void handle_npc_event_hp(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -137,7 +137,7 @@ void handle_npc_single_mob(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -152,7 +152,7 @@ void handle_npc_single_client(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -162,27 +162,12 @@ void handle_npc_single_client(
lua_setfield(L, -2, "other");
}
void handle_npc_single_npc(
QuestInterface *parse,
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
Lua_NPC l_npc(reinterpret_cast<NPC*>(init));
luabind::adl::object l_npc_o = luabind::adl::object(L, l_npc);
l_npc_o.push(L);
lua_setfield(L, -2, "other");
}
void handle_npc_task_accepted(
QuestInterface *parse,
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -200,7 +185,7 @@ void handle_npc_popup(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -218,7 +203,7 @@ void handle_npc_waypoint(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -236,7 +221,7 @@ void handle_npc_hate(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -245,7 +230,7 @@ void handle_npc_hate(
l_mob_o.push(L);
lua_setfield(L, -2, "other");
lua_pushboolean(L, std::stoi(data) == 0 ? false : true);
lua_pushboolean(L, std::stoi(data) != 0);
lua_setfield(L, -2, "joined");
}
@@ -255,7 +240,7 @@ void handle_npc_signal(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -268,7 +253,7 @@ void handle_npc_payload(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -286,7 +271,7 @@ void handle_npc_timer(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -299,7 +284,7 @@ void handle_npc_death(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -353,7 +338,7 @@ void handle_npc_cast(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -376,7 +361,7 @@ void handle_npc_area(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -392,7 +377,7 @@ void handle_npc_null(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -403,7 +388,7 @@ void handle_npc_loot_zone(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -428,7 +413,7 @@ void handle_npc_spawn_zone(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -443,7 +428,7 @@ void handle_npc_despawn_zone(
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -458,7 +443,7 @@ void handle_npc_damage(
lua_State* L,
NPC* npc,
Mob* init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -476,16 +461,16 @@ void handle_npc_damage(
lua_pushnumber(L, std::stoi(sep.arg[3]));
lua_setfield(L, -2, "skill_id");
lua_pushboolean(L, std::stoi(sep.arg[4]) == 0 ? false : true);
lua_pushboolean(L, std::stoi(sep.arg[4]) != 0);
lua_setfield(L, -2, "is_damage_shield");
lua_pushboolean(L, std::stoi(sep.arg[5]) == 0 ? false : true);
lua_pushboolean(L, std::stoi(sep.arg[5]) != 0);
lua_setfield(L, -2, "is_avoidable");
lua_pushnumber(L, std::stoi(sep.arg[6]));
lua_setfield(L, -2, "buff_slot");
lua_pushboolean(L, std::stoi(sep.arg[7]) == 0 ? false : true);
lua_pushboolean(L, std::stoi(sep.arg[7]) != 0);
lua_setfield(L, -2, "is_buff_tic");
lua_pushnumber(L, std::stoi(sep.arg[8]));
@@ -502,7 +487,7 @@ void handle_player_say(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -517,7 +502,7 @@ void handle_player_environmental_damage(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -536,7 +521,7 @@ void handle_player_death(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -575,7 +560,7 @@ void handle_player_timer(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -587,7 +572,7 @@ void handle_player_discover_item(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -609,7 +594,7 @@ void handle_player_fish_forage_success(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -623,7 +608,7 @@ void handle_player_click_object(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -637,7 +622,7 @@ void handle_player_click_door(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -651,7 +636,7 @@ void handle_player_signal(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -663,7 +648,7 @@ void handle_player_payload(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -680,7 +665,7 @@ void handle_player_popup_response(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -692,7 +677,7 @@ void handle_player_pick_up(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -706,7 +691,7 @@ void handle_player_cast(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -736,7 +721,7 @@ void handle_player_task_fail(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -748,7 +733,7 @@ void handle_player_zone(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -777,7 +762,7 @@ void handle_player_duel_win(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -791,7 +776,7 @@ void handle_player_duel_loss(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -805,7 +790,7 @@ void handle_player_loot(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -824,7 +809,7 @@ void handle_player_task_stage_complete(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -840,7 +825,7 @@ void handle_player_task_update(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -859,7 +844,7 @@ void handle_player_command(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -884,7 +869,7 @@ void handle_player_combine(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -899,7 +884,7 @@ void handle_player_feign(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -913,7 +898,7 @@ void handle_player_area(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -928,7 +913,7 @@ void handle_player_respawn(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -943,7 +928,7 @@ void handle_player_packet(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -960,7 +945,7 @@ void handle_player_null(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -970,7 +955,7 @@ void handle_player_use_skill(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -986,7 +971,7 @@ void handle_test_buff(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -996,7 +981,7 @@ void handle_player_combine_validate(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1027,7 +1012,7 @@ void handle_player_bot_command(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1052,7 +1037,7 @@ void handle_player_warp(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1071,7 +1056,7 @@ void handle_player_quest_combine(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1083,7 +1068,7 @@ void handle_player_consider(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1095,7 +1080,7 @@ void handle_player_consider_corpse(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1107,7 +1092,7 @@ void handle_player_inspect(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1121,7 +1106,7 @@ void handle_player_aa_buy(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1143,7 +1128,7 @@ void handle_player_aa_gain(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1155,7 +1140,7 @@ void handle_player_level_up(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1167,7 +1152,7 @@ void handle_player_level_down(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1179,7 +1164,7 @@ void handle_player_gm_command(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1191,7 +1176,7 @@ void handle_player_bot_create(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1216,7 +1201,7 @@ void handle_player_damage(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1234,16 +1219,16 @@ void handle_player_damage(
lua_pushnumber(L, std::stoi(sep.arg[3]));
lua_setfield(L, -2, "skill_id");
lua_pushboolean(L, std::stoi(sep.arg[4]) == 0 ? false : true);
lua_pushboolean(L, std::stoi(sep.arg[4]) != 0);
lua_setfield(L, -2, "is_damage_shield");
lua_pushboolean(L, std::stoi(sep.arg[5]) == 0 ? false : true);
lua_pushboolean(L, std::stoi(sep.arg[5]) != 0);
lua_setfield(L, -2, "is_avoidable");
lua_pushnumber(L, std::stoi(sep.arg[6]));
lua_setfield(L, -2, "buff_slot");
lua_pushboolean(L, std::stoi(sep.arg[7]) == 0 ? false : true);
lua_pushboolean(L, std::stoi(sep.arg[7]) != 0);
lua_setfield(L, -2, "is_buff_tic");
lua_pushnumber(L, std::stoi(sep.arg[8]));
@@ -1264,7 +1249,7 @@ void handle_item_click(
Client* client,
EQ::ItemInstance* item,
Mob *mob,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1278,7 +1263,7 @@ void handle_item_timer(
Client* client,
EQ::ItemInstance* item,
Mob *mob,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1292,7 +1277,7 @@ void handle_item_proc(
Client* client,
EQ::ItemInstance* item,
Mob *mob,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1320,7 +1305,7 @@ void handle_item_loot(
Client* client,
EQ::ItemInstance* item,
Mob *mob,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1343,7 +1328,7 @@ void handle_item_equip(
Client* client,
EQ::ItemInstance* item,
Mob *mob,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1357,7 +1342,7 @@ void handle_item_augment(
Client* client,
EQ::ItemInstance* item,
Mob *mob,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1376,7 +1361,7 @@ void handle_item_augment_insert(
Client* client,
EQ::ItemInstance* item,
Mob *mob,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1395,7 +1380,7 @@ void handle_item_augment_remove(
Client* client,
EQ::ItemInstance* item,
Mob *mob,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1417,7 +1402,7 @@ void handle_item_null(
Client* client,
EQ::ItemInstance* item,
Mob *mob,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1430,7 +1415,7 @@ void handle_spell_event(
Mob* mob,
Client* client,
uint32 spell_id,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1479,7 +1464,7 @@ void handle_translocate_finish(
Mob* mob,
Client* client,
uint32 spell_id,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1504,7 +1489,7 @@ void handle_player_equip_item(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1531,7 +1516,7 @@ void handle_spell_null(
Mob* mob,
Client* client,
uint32 spell_id,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1541,7 +1526,7 @@ void handle_encounter_timer(
QuestInterface *parse,
lua_State* L,
Encounter* encounter,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1553,7 +1538,7 @@ void handle_encounter_load(
QuestInterface *parse,
lua_State* L,
Encounter* encounter,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1574,7 +1559,7 @@ void handle_encounter_unload(
QuestInterface *parse,
lua_State* L,
Encounter* encounter,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1589,7 +1574,7 @@ void handle_encounter_null(
QuestInterface *parse,
lua_State* L,
Encounter* encounter,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1599,7 +1584,7 @@ void handle_player_skill_up(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1621,7 +1606,7 @@ void handle_player_language_skill_up(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1640,7 +1625,7 @@ void handle_player_alt_currency_merchant(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1665,7 +1650,7 @@ void handle_player_merchant(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1690,7 +1675,7 @@ void handle_player_augment_insert(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1722,7 +1707,7 @@ void handle_player_augment_remove(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1760,7 +1745,7 @@ void handle_bot_null(
lua_State* L,
Bot* bot,
Mob* init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1771,7 +1756,7 @@ void handle_bot_cast(
lua_State* L,
Bot* bot,
Mob* init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1802,7 +1787,7 @@ void handle_bot_combat(
lua_State* L,
Bot* bot,
Mob* init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1811,7 +1796,7 @@ void handle_bot_combat(
l_mob_o.push(L);
lua_setfield(L, -2, "other");
lua_pushboolean(L, std::stoi(data) == 0 ? false : true);
lua_pushboolean(L, std::stoi(data) != 0);
lua_setfield(L, -2, "joined");
}
@@ -1820,7 +1805,7 @@ void handle_bot_death(
lua_State* L,
Bot* bot,
Mob* init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1857,7 +1842,7 @@ void handle_bot_popup_response(
lua_State* L,
Bot* bot,
Mob* init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1875,7 +1860,7 @@ void handle_bot_say(
lua_State* L,
Bot* bot,
Mob* init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1896,7 +1881,7 @@ void handle_bot_signal(
lua_State* L,
Bot* bot,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1909,7 +1894,7 @@ void handle_bot_payload(
lua_State* L,
Bot* bot,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1927,7 +1912,7 @@ void handle_bot_slay(
lua_State* L,
Bot* bot,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1942,7 +1927,7 @@ void handle_bot_target_change(
lua_State* L,
Bot* bot,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1957,7 +1942,7 @@ void handle_bot_timer(
lua_State* L,
Bot* bot,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -1970,7 +1955,7 @@ void handle_bot_trade(
lua_State* L,
Bot* bot,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -2028,7 +2013,7 @@ void handle_bot_use_skill(
lua_State* L,
Bot* bot,
Mob *init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -2045,7 +2030,7 @@ void handle_bot_equip_item(
lua_State* L,
Bot* bot,
Mob* init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -2071,7 +2056,7 @@ void handle_bot_damage(
lua_State* L,
Bot* bot,
Mob* init,
std::string data,
const std::string& data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
) {
@@ -2089,16 +2074,16 @@ void handle_bot_damage(
lua_pushnumber(L, std::stoi(sep.arg[3]));
lua_setfield(L, -2, "skill_id");
lua_pushboolean(L, std::stoi(sep.arg[4]) == 0 ? false : true);
lua_pushboolean(L, std::stoi(sep.arg[4]) != 0);
lua_setfield(L, -2, "is_damage_shield");
lua_pushboolean(L, std::stoi(sep.arg[5]) == 0 ? false : true);
lua_pushboolean(L, std::stoi(sep.arg[5]) != 0);
lua_setfield(L, -2, "is_avoidable");
lua_pushnumber(L, std::stoi(sep.arg[6]));
lua_setfield(L, -2, "buff_slot");
lua_pushboolean(L, std::stoi(sep.arg[7]) == 0 ? false : true);
lua_pushboolean(L, std::stoi(sep.arg[7]) != 0);
lua_setfield(L, -2, "is_buff_tic");
lua_pushnumber(L, std::stoi(sep.arg[8]));