mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-02 23:40:26 +00:00
[Pets] Add Pet Constants and Methods (#4987)
* [Pets] Add Pet Constants and Methods * Remove GetID * GetPetTypeName() * Cleanup
This commit is contained in:
+14
-1
@@ -5701,6 +5701,16 @@ luabind::object lua_get_timers(lua_State* L, Mob* m) {
|
||||
return t;
|
||||
}
|
||||
|
||||
std::string lua_get_pet_command_name(uint8 pet_command)
|
||||
{
|
||||
return PetCommand::GetName(pet_command);
|
||||
}
|
||||
|
||||
std::string lua_get_pet_type_name(uint8 pet_type)
|
||||
{
|
||||
return PetType::GetName(pet_type);
|
||||
}
|
||||
|
||||
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
||||
cur = table[#name]; \
|
||||
if(luabind::type(cur) != LUA_TNIL) { \
|
||||
@@ -6514,6 +6524,8 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("handin", &lua_handin),
|
||||
luabind::def("get_paused_timers", &lua_get_paused_timers),
|
||||
luabind::def("get_timers", &lua_get_timers),
|
||||
luabind::def("get_pet_command_name", &lua_get_pet_command_name),
|
||||
luabind::def("get_pet_type_name", &lua_get_pet_type_name),
|
||||
/*
|
||||
Cross Zone
|
||||
*/
|
||||
@@ -6979,7 +6991,8 @@ luabind::scope lua_register_events() {
|
||||
luabind::value("entity_variable_set", static_cast<int>(EVENT_ENTITY_VARIABLE_SET)),
|
||||
luabind::value("entity_variable_update", static_cast<int>(EVENT_ENTITY_VARIABLE_UPDATE)),
|
||||
luabind::value("aa_loss", static_cast<int>(EVENT_AA_LOSS)),
|
||||
luabind::value("read", static_cast<int>(EVENT_READ_ITEM))
|
||||
luabind::value("read", static_cast<int>(EVENT_READ_ITEM)),
|
||||
luabind::value("pet_command", static_cast<int>(EVENT_PET_COMMAND))
|
||||
)];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user