[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
+4 -1
View File
@@ -188,7 +188,8 @@ const char *LuaEvents[_LargestEventID] = {
"event_entity_variable_update",
"event_aa_loss",
"event_spell_blocked",
"event_read_item"
"event_read_item",
"event_pet_command"
};
extern Zone *zone;
@@ -264,6 +265,7 @@ LuaParser::LuaParser() {
NPCArgumentDispatch[EVENT_ENTITY_VARIABLE_SET] = handle_npc_entity_variable;
NPCArgumentDispatch[EVENT_ENTITY_VARIABLE_UPDATE] = handle_npc_entity_variable;
NPCArgumentDispatch[EVENT_SPELL_BLOCKED] = handle_npc_spell_blocked;
NPCArgumentDispatch[EVENT_PET_COMMAND] = handle_npc_pet_command;
PlayerArgumentDispatch[EVENT_SAY] = handle_player_say;
PlayerArgumentDispatch[EVENT_ENVIRONMENTAL_DAMAGE] = handle_player_environmental_damage;
@@ -355,6 +357,7 @@ LuaParser::LuaParser() {
PlayerArgumentDispatch[EVENT_SPELL_BLOCKED] = handle_player_spell_blocked;
PlayerArgumentDispatch[EVENT_READ_ITEM] = handle_player_read_item;
PlayerArgumentDispatch[EVENT_CONNECT] = handle_player_connect;
PlayerArgumentDispatch[EVENT_PET_COMMAND] = handle_player_pet_command;
ItemArgumentDispatch[EVENT_ITEM_CLICK] = handle_item_click;
ItemArgumentDispatch[EVENT_ITEM_CLICK_CAST] = handle_item_click;