Indenting adjustments

This commit is contained in:
Valorith 2023-02-11 00:37:42 -05:00 committed by Akkadius
parent 724f4ddfb8
commit 1f51a2fceb
3 changed files with 33 additions and 32 deletions

View File

@ -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: {

View File

@ -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);

View File

@ -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<std::any> *extra_pointers
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
uint32 extra_data,
std::vector<std::any> *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<std::any> *extra_pointers
QuestInterface *parse,
lua_State* L,
Client* client,
std::string data,
uint32 extra_data,
std::vector<std::any> *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(