mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 10:50:24 +00:00
[Feature] Add Experience Gain Toggle. (#2676)
* [Feature] Add Experience Gain Toggle. # Perl - Add `$client->IsEXPEnabled()`. - Add `$client->SetEXPEnabled(is_exp_enabled)`. # Lua - Add `client:IsEXPEnabled()`. - Add `client:SetEXPEnabled(is_exp_enabled)`. # Commands - Add `#exptoggle [Toggle] - Toggle your or your target's experience gain.`. # Notes - Allows operators to turn on/off a player's experience gain individually without changing their rule values. - The command allows operators to give players access to the command to disable their own experience gain.
This commit is contained in:
@@ -2906,6 +2906,16 @@ luabind::object Lua_Client::GetAugmentIDsBySlotID(lua_State* L, int16 slot_id) {
|
||||
return lua_table;
|
||||
}
|
||||
|
||||
bool Lua_Client::IsEXPEnabled() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsEXPEnabled();
|
||||
}
|
||||
|
||||
void Lua_Client::SetEXPEnabled(bool is_exp_enabled) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetEXPEnabled(is_exp_enabled);
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
|
||||
int Lua_Client::GetBotRequiredLevel()
|
||||
@@ -3248,6 +3258,7 @@ luabind::scope lua_register_client() {
|
||||
.def("IsCrouching", (bool(Lua_Client::*)(void))&Lua_Client::IsCrouching)
|
||||
.def("IsDead", &Lua_Client::IsDead)
|
||||
.def("IsDueling", (bool(Lua_Client::*)(void))&Lua_Client::IsDueling)
|
||||
.def("IsEXPEnabled", (bool(Lua_Client::*)(void))&Lua_Client::IsEXPEnabled)
|
||||
.def("IsGrouped", (bool(Lua_Client::*)(void))&Lua_Client::IsGrouped)
|
||||
.def("IsLD", (bool(Lua_Client::*)(void))&Lua_Client::IsLD)
|
||||
.def("IsMedding", (bool(Lua_Client::*)(void))&Lua_Client::IsMedding)
|
||||
@@ -3409,6 +3420,7 @@ luabind::scope lua_register_client() {
|
||||
.def("SetDueling", (void(Lua_Client::*)(bool))&Lua_Client::SetDueling)
|
||||
.def("SetEXP", (void(Lua_Client::*)(uint32,uint32))&Lua_Client::SetEXP)
|
||||
.def("SetEXP", (void(Lua_Client::*)(uint32,uint32,bool))&Lua_Client::SetEXP)
|
||||
.def("SetEXPEnabled", (void(Lua_Client::*)(bool))&Lua_Client::SetEXPEnabled)
|
||||
.def("SetEXPModifier", (void(Lua_Client::*)(uint32,double))&Lua_Client::SetEXPModifier)
|
||||
.def("SetEXPModifier", (void(Lua_Client::*)(uint32,double,int16))&Lua_Client::SetEXPModifier)
|
||||
.def("SetEbonCrystals", (void(Lua_Client::*)(uint32))&Lua_Client::SetEbonCrystals)
|
||||
|
||||
Reference in New Issue
Block a user