[Pets] Add Pet Constants and Methods (#4987)

* [Pets] Add Pet Constants and Methods

* Remove GetID

* GetPetTypeName()

* Cleanup
This commit is contained in:
Alex King
2025-08-17 01:00:31 -04:00
committed by GitHub
parent 207ee2daa0
commit a4e47d9180
28 changed files with 1209 additions and 742 deletions
+33
View File
@@ -668,6 +668,23 @@ void handle_npc_spell_blocked(
lua_setfield(L, -2, "cast_spell");
}
void handle_npc_pet_command(
QuestInterface *parse,
lua_State* L,
NPC* npc,
Mob *init,
std::string data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
)
{
lua_pushinteger(L, extra_data);
lua_setfield(L, -2, "pet_command");
lua_pushstring(L, data.c_str());
lua_setfield(L, -2, "pet_command_name");
}
// Player
void handle_player_say(
QuestInterface *parse,
@@ -1829,6 +1846,22 @@ void handle_player_connect(
lua_setfield(L, -2, "is_first_login");
}
void handle_player_pet_command(
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
)
{
lua_pushinteger(L, extra_data);
lua_setfield(L, -2, "pet_command");
lua_pushstring(L, data.c_str());
lua_setfield(L, -2, "pet_command_name");
}
// Item
void handle_item_click(
QuestInterface *parse,