mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-09 22:20:24 +00:00
[Quest API] Add option to Ignore Mods to CalcEXP (#2704)
# Perl - Add `$client->CalcEXP(consider_level, ignore_modifiers)`. # Lua - Add `client:CalcEXP(consider_level)`. - Add `client:CalcEXP(consider_level, ignore_modifiers)`. # Notes - Allows operators to calculate experience based on consider level as well as ignore modifiers to get a baseline of experience that should be expected when killing a mob.
This commit is contained in:
@@ -2916,6 +2916,16 @@ void Lua_Client::SetEXPEnabled(bool is_exp_enabled) {
|
||||
self->SetEXPEnabled(is_exp_enabled);
|
||||
}
|
||||
|
||||
uint64 Lua_Client::CalcEXP(uint8 consider_level) {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->CalcEXP(consider_level);
|
||||
}
|
||||
|
||||
uint64 Lua_Client::CalcEXP(uint8 consider_level, bool ignore_modifiers) {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->CalcEXP(consider_level, ignore_modifiers);
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
|
||||
int Lua_Client::GetBotRequiredLevel()
|
||||
@@ -3047,6 +3057,8 @@ luabind::scope lua_register_client() {
|
||||
.def("BreakInvis", (void(Lua_Client::*)(void))&Lua_Client::BreakInvis)
|
||||
.def("CalcATK", &Lua_Client::CalcATK)
|
||||
.def("CalcCurrentWeight", &Lua_Client::CalcCurrentWeight)
|
||||
.def("CalcEXP", (uint64(Lua_Client::*)(uint8))&Lua_Client::CalcEXP)
|
||||
.def("CalcEXP", (uint64(Lua_Client::*)(uint8,bool))&Lua_Client::CalcEXP)
|
||||
.def("CalcPriceMod", (float(Lua_Client::*)(Lua_Mob,bool))&Lua_Client::CalcPriceMod)
|
||||
.def("CanHaveSkill", (bool(Lua_Client::*)(int))&Lua_Client::CanHaveSkill)
|
||||
.def("CashReward", &Lua_Client::CashReward)
|
||||
|
||||
Reference in New Issue
Block a user