mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 16:38:26 +00:00
[Quest API] Add EVENT_AA_BUY and EVENT_AA_GAIN to Perl/Lua. (#2504)
# Perl - Add EVENT_AA_BUY to Perl. - Exports `$aa_cost`, `$aa_id`, `$aa_previous_id`, and `$aa_next_id` - Add EVENT_AA_GAIN to Perl. - Exports `$aa_gained` - Add quest::getaaname(aa_id) to Perl. # Lua - Add event_aa_buy to Lua. - Exports `e.aa_cost`, `e.aa_id`, `e.aa_previous_id`, and `e.aa_next_id` - Add event_aa_gain to Lua. - Exports `e.aa_gained` - Add eq.get_aa_name(aa_id) to Lua.
This commit is contained in:
+12
-1
@@ -3444,6 +3444,14 @@ bool lua_is_snowing() {
|
||||
return zone->IsSnowing();
|
||||
}
|
||||
|
||||
std::string lua_get_aa_name(int aa_id) {
|
||||
if (!zone) {
|
||||
return std::string();
|
||||
}
|
||||
|
||||
return zone->GetAAName(aa_id);
|
||||
}
|
||||
|
||||
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
||||
cur = table[#name]; \
|
||||
if(luabind::type(cur) != LUA_TNIL) { \
|
||||
@@ -3910,6 +3918,7 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("has_recipe_learned", &lua_has_recipe_learned),
|
||||
luabind::def("is_raining", &lua_is_raining),
|
||||
luabind::def("is_snowing", &lua_is_snowing),
|
||||
luabind::def("get_aa_name", &lua_get_aa_name),
|
||||
|
||||
/*
|
||||
Cross Zone
|
||||
@@ -4308,7 +4317,9 @@ luabind::scope lua_register_events() {
|
||||
luabind::value("merchant_buy", static_cast<int>(EVENT_MERCHANT_BUY)),
|
||||
luabind::value("merchant_sell", static_cast<int>(EVENT_MERCHANT_SELL)),
|
||||
luabind::value("inspect", static_cast<int>(EVENT_INSPECT)),
|
||||
luabind::value("task_before_update", static_cast<int>(EVENT_TASK_BEFORE_UPDATE))
|
||||
luabind::value("task_before_update", static_cast<int>(EVENT_TASK_BEFORE_UPDATE)),
|
||||
luabind::value("aa_buy", static_cast<int>(EVENT_AA_BUY)),
|
||||
luabind::value("aa_gain", static_cast<int>(EVENT_AA_GAIN))
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user