From 1f51a2fceb70158962a968b96866ce3134ff960b Mon Sep 17 00:00:00 2001 From: Valorith Date: Sat, 11 Feb 2023 00:37:42 -0500 Subject: [PATCH] Indenting adjustments --- zone/embparser.cpp | 8 ++++---- zone/exp.cpp | 25 +++++++++++++------------ zone/lua_parser_events.cpp | 32 ++++++++++++++++---------------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/zone/embparser.cpp b/zone/embparser.cpp index 086d84514..55de03710 100644 --- a/zone/embparser.cpp +++ b/zone/embparser.cpp @@ -2087,13 +2087,13 @@ void PerlembParser::ExportEventVariables( } case EVENT_AA_EXP_GAIN: { - ExportVar(package_name.c_str(), "aa_exp_gained", data); - break; + ExportVar(package_name.c_str(), "aa_exp_gained", data); + break; } case EVENT_EXP_GAIN: { - ExportVar(package_name.c_str(), "exp_gained", data); - break; + ExportVar(package_name.c_str(), "exp_gained", data); + break; } case EVENT_INSPECT: { diff --git a/zone/exp.cpp b/zone/exp.cpp index 1e1cae639..ca2cc8612 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -804,17 +804,17 @@ void Client::SetEXP(uint64 set_exp, uint64 set_aaxp, bool isrezzexp) { } } - 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 (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 (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); - } + 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); + } //set the client's EXP and AAEXP m_pp.exp = set_exp; @@ -822,8 +822,9 @@ void Client::SetEXP(uint64 set_exp, uint64 set_aaxp, bool isrezzexp) { if (GetLevel() < 51) { m_epp.perAA = 0; // turn off aa exp if they drop below 51 - } else - SendAlternateAdvancementStats(); //otherwise, send them an AA update + } else { + SendAlternateAdvancementStats(); //otherwise, send them an AA update + } //send the expdata in any case so the xp bar isnt stuck after leveling uint32 tmpxp1 = GetEXPForLevel(GetLevel()+1); diff --git a/zone/lua_parser_events.cpp b/zone/lua_parser_events.cpp index 1aaf69996..ba2463bdd 100644 --- a/zone/lua_parser_events.cpp +++ b/zone/lua_parser_events.cpp @@ -1182,27 +1182,27 @@ void handle_player_aa_gain( } void handle_player_aa_exp_gain( - QuestInterface *parse, - lua_State* L, - Client* client, - std::string data, - uint32 extra_data, - std::vector *extra_pointers + QuestInterface *parse, + lua_State* L, + Client* client, + std::string data, + uint32 extra_data, + std::vector *extra_pointers ) { - lua_pushinteger(L, std::stoull(data)); - lua_setfield(L, -2, "aa_exp_gained"); + 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, - std::string data, - uint32 extra_data, - std::vector *extra_pointers + QuestInterface *parse, + lua_State* L, + Client* client, + std::string data, + uint32 extra_data, + std::vector *extra_pointers ) { - lua_pushinteger(L, std::stoull(data)); - lua_setfield(L, -2, "exp_gained"); + lua_pushinteger(L, std::stoull(data)); + lua_setfield(L, -2, "exp_gained"); } void handle_player_level_up(