diff --git a/zone/embparser.cpp b/zone/embparser.cpp index 0b1f763a4..d2e066e25 100644 --- a/zone/embparser.cpp +++ b/zone/embparser.cpp @@ -2106,7 +2106,7 @@ void PerlembParser::ExportEventVariables( case EVENT_LEVEL_UP: { ExportVar(package_name.c_str(), "levels_gained", data); - break;d + break; } case EVENT_LEVEL_DOWN: { diff --git a/zone/exp.cpp b/zone/exp.cpp index f5d42dcd6..1e1cae639 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -804,13 +804,13 @@ void Client::SetEXP(uint64 set_exp, uint64 set_aaxp, bool isrezzexp) { } } - if (m_pp.exp != set_exp) { + if (parse->PlayerHasQuestSub(EVENT_EXP_GAIN) && m_pp.exp != set_exp) { const auto exp_value = set_exp - m_pp.exp; const auto export_string = fmt::format("{}", exp_value); parse->EventPlayer(EVENT_EXP_GAIN, this, export_string, 0); } - if (m_pp.expAA != set_aaxp) { + if (parse->PlayerHasQuestSub(EVENT_AA_EXP_GAIN) && m_pp.expAA != set_aaxp) { const auto aa_exp_value = set_aaxp - m_pp.expAA; const auto export_string = fmt::format("{}", aa_exp_value); parse->EventPlayer(EVENT_AA_EXP_GAIN, this, export_string, 0); diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 706da615c..366195e2e 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_gained", static_cast(EVENT_AA_GAIN)), - luabind::value("aa_exp_gained", static_cast(EVENT_AA_EXP_GAIN)), - luabind::value("exp_gain", static_cast(EVENT_EXP_GAIN)), + luabind::value("aa_exp_gained", 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 ab0e5a4e1..e6002a96f 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_aa_exp_gained", - "event_exp_gained", + "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_AA_EXP_GAIN] = handle_player_aa_exp_gain; - PlayerArgumentDispatch[EVENT_EXP_GAIN] = handle_player_exp_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 43780a5a5..1aaf69996 100644 --- a/zone/lua_parser_events.cpp +++ b/zone/lua_parser_events.cpp @@ -1189,19 +1189,19 @@ void handle_player_aa_exp_gain( uint32 extra_data, std::vector *extra_pointers ) { - lua_pushinteger(L, Strings::ToInt(data)); + lua_pushinteger(L, std::stoull(data)); lua_setfield(L, -2, "aa_exp_gained"); } void handle_player_exp_gain( QuestInterface *parse, lua_State* L, - Client* client,d + Client* client, std::string data, uint32 extra_data, std::vector *extra_pointers ) { - lua_pushinteger(L, Strings::ToInt(data)); + lua_pushinteger(L, std::stoull(data)); lua_setfield(L, -2, "exp_gained"); }