mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-21 11:53:53 +00:00
Formatting
This commit is contained in:
parent
5f044c3d43
commit
19519908a6
@ -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: {
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -4737,8 +4737,8 @@ luabind::scope lua_register_events() {
|
||||
luabind::value("task_before_update", static_cast<int>(EVENT_TASK_BEFORE_UPDATE)),
|
||||
luabind::value("aa_buy", static_cast<int>(EVENT_AA_BUY)),
|
||||
luabind::value("aa_gained", static_cast<int>(EVENT_AA_GAIN)),
|
||||
luabind::value("aa_exp_gained", static_cast<int>(EVENT_AA_EXP_GAIN)),
|
||||
luabind::value("exp_gain", static_cast<int>(EVENT_EXP_GAIN)),
|
||||
luabind::value("aa_exp_gained", static_cast<int>(EVENT_AA_EXP_GAIN)),
|
||||
luabind::value("exp_gain", static_cast<int>(EVENT_EXP_GAIN)),
|
||||
luabind::value("payload", static_cast<int>(EVENT_PAYLOAD)),
|
||||
luabind::value("level_down", static_cast<int>(EVENT_LEVEL_DOWN)),
|
||||
luabind::value("gm_command", static_cast<int>(EVENT_GM_COMMAND)),
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -1189,19 +1189,19 @@ void handle_player_aa_exp_gain(
|
||||
uint32 extra_data,
|
||||
std::vector<std::any> *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<std::any> *extra_pointers
|
||||
) {
|
||||
lua_pushinteger(L, Strings::ToInt(data));
|
||||
lua_pushinteger(L, std::stoull(data));
|
||||
lua_setfield(L, -2, "exp_gained");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user