diff --git a/zone/embparser.cpp b/zone/embparser.cpp index f90fd62ee..e927b454d 100644 --- a/zone/embparser.cpp +++ b/zone/embparser.cpp @@ -161,8 +161,8 @@ const char *QuestEventSubroutines[_LargestEventID] = { "EVENT_TASK_BEFORE_UPDATE", "EVENT_AA_BUY", "EVENT_AA_GAIN", - "EVENT_AAXP_GAIN", - "EVENT_XP_GAIN", + "EVENT_AA_EXP_GAIN", + "EVENT_EXP_GAIN", "EVENT_PAYLOAD", "EVENT_LEVEL_DOWN", "EVENT_GM_COMMAND", @@ -2086,13 +2086,13 @@ void PerlembParser::ExportEventVariables( break; } - case EVENT_AAXP_GAIN: { - ExportVar(package_name.c_str(), "aaxp_value", extradata); + case EVENT_AA_EXP_GAIN: { + ExportVar(package_name.c_str(), "aaxp_value", data); break; } - case EVENT_XP_GAIN: { - ExportVar(package_name.c_str(), "xp_value", extradata); + case EVENT_EXP_GAIN: { + ExportVar(package_name.c_str(), "xp_value", data); break; } diff --git a/zone/event_codes.h b/zone/event_codes.h index db1fbbfd8..c92a73f0b 100644 --- a/zone/event_codes.h +++ b/zone/event_codes.h @@ -106,8 +106,8 @@ typedef enum { EVENT_TASK_BEFORE_UPDATE, EVENT_AA_BUY, EVENT_AA_GAIN, - EVENT_AAXP_GAIN, - EVENT_XP_GAIN, + EVENT_AA_EXP_GAIN, + EVENT_EXP_GAIN, EVENT_PAYLOAD, EVENT_LEVEL_DOWN, EVENT_GM_COMMAND, diff --git a/zone/exp.cpp b/zone/exp.cpp index 6d9d3da6e..49940524f 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -806,13 +806,14 @@ void Client::SetEXP(uint64 set_exp, uint64 set_aaxp, bool isrezzexp) { if (m_pp.exp != set_exp) { const auto xp_value = set_exp - m_pp.exp; - const auto export_string = fmt::format("{}",xp_value); - parse->EventPlayer(EVENT_XP_GAIN, this,export_string, xp_value); + const auto export_string = fmt::format("{}", xp_value); + parse->EventPlayer(EVENT_EXP_GAIN, this, export_string, 0); } + if (m_pp.expAA != set_aaxp) { const auto aaxp_value = set_aaxp - m_pp.expAA; const auto export_string = fmt::format("{}",aaxp_value); - parse->EventPlayer(EVENT_AAXP_GAIN, this, export_string, aaxp_value); + parse->EventPlayer(EVENT_AA_EXP_GAIN, this, export_string, 0); } //set the client's EXP and AAEXP diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 0614729a3..99eac0651 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -4737,8 +4737,8 @@ luabind::scope lua_register_events() { luabind::value("task_before_update", static_cast(EVENT_TASK_BEFORE_UPDATE)), luabind::value("aa_buy", static_cast(EVENT_AA_BUY)), luabind::value("aa_gain", static_cast(EVENT_AA_GAIN)), - luabind::value("aaxp_gain", static_cast(EVENT_AAXP_GAIN)), - luabind::value("xp_gain", static_cast(EVENT_XP_GAIN)), + luabind::value("aa_exp_gain", static_cast(EVENT_AA_EXP_GAIN)), + luabind::value("exp_gain", static_cast(EVENT_EXP_GAIN)), luabind::value("payload", static_cast(EVENT_PAYLOAD)), luabind::value("level_down", static_cast(EVENT_LEVEL_DOWN)), luabind::value("gm_command", static_cast(EVENT_GM_COMMAND)), diff --git a/zone/lua_parser.cpp b/zone/lua_parser.cpp index 189178d33..c6a33b225 100644 --- a/zone/lua_parser.cpp +++ b/zone/lua_parser.cpp @@ -148,8 +148,8 @@ const char *LuaEvents[_LargestEventID] = { "event_task_before_update", "event_aa_buy", "event_aa_gain", - "event_aaxp_gain", - "event_xp_gain", + "event_aa_exp_gain", + "event_exp_gain", "event_payload", "event_level_down", "event_gm_command", @@ -277,8 +277,8 @@ LuaParser::LuaParser() { PlayerArgumentDispatch[EVENT_INSPECT] = handle_player_inspect; PlayerArgumentDispatch[EVENT_AA_BUY] = handle_player_aa_buy; PlayerArgumentDispatch[EVENT_AA_GAIN] = handle_player_aa_gain; - PlayerArgumentDispatch[EVENT_AAXP_GAIN] = handle_player_aaxp_gain; - PlayerArgumentDispatch[EVENT_XP_GAIN] = handle_player_xp_gain; + PlayerArgumentDispatch[EVENT_AA_EXP_GAIN] = handle_player_aa_exp_gain; + PlayerArgumentDispatch[EVENT_EXP_GAIN] = handle_player_exp_gain; PlayerArgumentDispatch[EVENT_PAYLOAD] = handle_player_payload; PlayerArgumentDispatch[EVENT_LEVEL_UP] = handle_player_level_up; PlayerArgumentDispatch[EVENT_LEVEL_DOWN] = handle_player_level_down; diff --git a/zone/lua_parser_events.cpp b/zone/lua_parser_events.cpp index 9c6ca23c7..5606c7d78 100644 --- a/zone/lua_parser_events.cpp +++ b/zone/lua_parser_events.cpp @@ -1181,7 +1181,7 @@ void handle_player_aa_gain( lua_setfield(L, -2, "aa_gained"); } -void handle_player_aaxp_gain( +void handle_player_aa_exp_gain( QuestInterface *parse, lua_State* L, Client* client, @@ -1190,10 +1190,10 @@ void handle_player_aaxp_gain( std::vector *extra_pointers ) { lua_pushinteger(L, Strings::ToInt(data)); - lua_setfield(L, -2, "aaxp_value"); + lua_setfield(L, -2, "aa_exp_value"); } -void handle_player_xp_gain( +void handle_player_exp_gain( QuestInterface *parse, lua_State* L, Client* client, @@ -1202,7 +1202,7 @@ void handle_player_xp_gain( std::vector *extra_pointers ) { lua_pushinteger(L, Strings::ToInt(data)); - lua_setfield(L, -2, "xp_value"); + lua_setfield(L, -2, "exp_value"); } void handle_player_level_up( diff --git a/zone/lua_parser_events.h b/zone/lua_parser_events.h index 7f2c89405..45f8cea97 100644 --- a/zone/lua_parser_events.h +++ b/zone/lua_parser_events.h @@ -608,7 +608,7 @@ void handle_player_aa_gain( std::vector *extra_pointers ); -void handle_player_aaxp_gain( +void handle_player_aa_exp_gain( QuestInterface *parse, lua_State* L, Client* client, @@ -617,7 +617,7 @@ void handle_player_aaxp_gain( std::vector *extra_pointers ); -void handle_player_xp_gain( +void handle_player_exp_gain( QuestInterface *parse, lua_State* L, Client* client,