mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 15:38:27 +00:00
[Quest API] Add EVENT_LEVEL_DOWN to Perl/Lua. (#2620)
* [Quest API] Add EVENT_LEVEL_DOWN to Perl/Lua. # Perl - Add `EVENT_LEVEL_DOWN`, exports `$levels_lost`. - Add `$levels_gained` export to `EVENT_LEVEL_UP`. # Lua - Add `event_level_down`, exports `e.levels_lost`. - Add `e.levels_gained` export to `event_level_up`. # Notes - Allows operators to perform actions on level down. - Allows operators to tell how many levels were lost or gained in case people are gaining/losing multiple levels and they want to keep track or use this as a mechanic in their code somewhere. * Update exp.cpp * Update embparser.cpp
This commit is contained in:
+4
-1
@@ -150,7 +150,8 @@ const char *LuaEvents[_LargestEventID] = {
|
||||
"event_task_before_update",
|
||||
"event_aa_buy",
|
||||
"event_aa_gain",
|
||||
"event_payload"
|
||||
"event_payload",
|
||||
"event_level_down"
|
||||
};
|
||||
|
||||
extern Zone *zone;
|
||||
@@ -262,6 +263,8 @@ LuaParser::LuaParser() {
|
||||
PlayerArgumentDispatch[EVENT_AA_BUY] = handle_player_aa_buy;
|
||||
PlayerArgumentDispatch[EVENT_AA_GAIN] = handle_player_aa_gain;
|
||||
PlayerArgumentDispatch[EVENT_PAYLOAD] = handle_player_payload;
|
||||
PlayerArgumentDispatch[EVENT_LEVEL_UP] = handle_player_level_up;
|
||||
PlayerArgumentDispatch[EVENT_LEVEL_DOWN] = handle_player_level_down;
|
||||
|
||||
ItemArgumentDispatch[EVENT_ITEM_CLICK] = handle_item_click;
|
||||
ItemArgumentDispatch[EVENT_ITEM_CLICK_CAST] = handle_item_click;
|
||||
|
||||
Reference in New Issue
Block a user