mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
[Quest API] Add SetAAEXPPercentage to Perl/Lua (#4597)
This commit is contained in:
parent
c2ebc2540a
commit
035c51944f
@ -13106,3 +13106,19 @@ void Client::ShowZoneShardMenu()
|
|||||||
number++;
|
number++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Client::SetAAEXPPercentage(uint8 percentage)
|
||||||
|
{
|
||||||
|
const uint32 before_percentage = m_epp.perAA;
|
||||||
|
|
||||||
|
if (before_percentage > 0 && percentage == 0) {
|
||||||
|
MessageString(Chat::White, AA_OFF);
|
||||||
|
} else if (before_percentage == 0 && percentage > 0) {
|
||||||
|
MessageString(Chat::White, AA_ON);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_epp.perAA = EQ::Clamp(static_cast<int>(percentage), 0, 100);
|
||||||
|
|
||||||
|
SendAlternateAdvancementStats();
|
||||||
|
SendAlternateAdvancementTable();
|
||||||
|
}
|
||||||
|
|||||||
@ -692,6 +692,8 @@ public:
|
|||||||
void SetAAEXPModifier(uint32 zone_id, float aa_modifier, int16 instance_version = -1);
|
void SetAAEXPModifier(uint32 zone_id, float aa_modifier, int16 instance_version = -1);
|
||||||
void SetEXPModifier(uint32 zone_id, float exp_modifier, int16 instance_version = -1);
|
void SetEXPModifier(uint32 zone_id, float exp_modifier, int16 instance_version = -1);
|
||||||
|
|
||||||
|
void SetAAEXPPercentage(uint8 percentage);
|
||||||
|
|
||||||
bool UpdateLDoNPoints(uint32 theme_id, int points);
|
bool UpdateLDoNPoints(uint32 theme_id, int points);
|
||||||
void SetLDoNPoints(uint32 theme_id, uint32 points);
|
void SetLDoNPoints(uint32 theme_id, uint32 points);
|
||||||
void SetPVPPoints(uint32 Points) { m_pp.PVPCurrentPoints = Points; }
|
void SetPVPPoints(uint32 Points) { m_pp.PVPCurrentPoints = Points; }
|
||||||
|
|||||||
@ -1864,8 +1864,9 @@ void Client::Handle_OP_AAAction(const EQApplicationPacket *app)
|
|||||||
PurchaseAlternateAdvancementRank(action->ability);
|
PurchaseAlternateAdvancementRank(action->ability);
|
||||||
}
|
}
|
||||||
else if (action->action == aaActionDisableEXP) { //Turn Off AA Exp
|
else if (action->action == aaActionDisableEXP) { //Turn Off AA Exp
|
||||||
if (m_epp.perAA > 0)
|
if (m_epp.perAA > 0) {
|
||||||
MessageString(Chat::White, AA_OFF);
|
MessageString(Chat::White, AA_OFF);
|
||||||
|
}
|
||||||
|
|
||||||
m_epp.perAA = 0;
|
m_epp.perAA = 0;
|
||||||
SendAlternateAdvancementStats();
|
SendAlternateAdvancementStats();
|
||||||
|
|||||||
@ -3458,6 +3458,12 @@ void Lua_Client::ShowZoneShardMenu()
|
|||||||
self->ShowZoneShardMenu();
|
self->ShowZoneShardMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Lua_Client::SetAAEXPPercentage(uint8 percentage)
|
||||||
|
{
|
||||||
|
Lua_Safe_Call_Void();
|
||||||
|
self->SetAAEXPPercentage(percentage);
|
||||||
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_client() {
|
luabind::scope lua_register_client() {
|
||||||
return luabind::class_<Lua_Client, Lua_Mob>("Client")
|
return luabind::class_<Lua_Client, Lua_Mob>("Client")
|
||||||
.def(luabind::constructor<>())
|
.def(luabind::constructor<>())
|
||||||
@ -3890,6 +3896,7 @@ luabind::scope lua_register_client() {
|
|||||||
.def("SetAAEXPModifier", (void(Lua_Client::*)(float))&Lua_Client::SetAAEXPModifier)
|
.def("SetAAEXPModifier", (void(Lua_Client::*)(float))&Lua_Client::SetAAEXPModifier)
|
||||||
.def("SetAAEXPModifier", (void(Lua_Client::*)(uint32,float))&Lua_Client::SetAAEXPModifier)
|
.def("SetAAEXPModifier", (void(Lua_Client::*)(uint32,float))&Lua_Client::SetAAEXPModifier)
|
||||||
.def("SetAAEXPModifier", (void(Lua_Client::*)(uint32,float,int16))&Lua_Client::SetAAEXPModifier)
|
.def("SetAAEXPModifier", (void(Lua_Client::*)(uint32,float,int16))&Lua_Client::SetAAEXPModifier)
|
||||||
|
.def("SetAAEXPPercentage", (void(Lua_Client::*)(uint8))&Lua_Client::SetAAEXPPercentage)
|
||||||
.def("SetAAPoints", (void(Lua_Client::*)(int))&Lua_Client::SetAAPoints)
|
.def("SetAAPoints", (void(Lua_Client::*)(int))&Lua_Client::SetAAPoints)
|
||||||
.def("SetAATitle", (void(Lua_Client::*)(std::string))&Lua_Client::SetAATitle)
|
.def("SetAATitle", (void(Lua_Client::*)(std::string))&Lua_Client::SetAATitle)
|
||||||
.def("SetAATitle", (void(Lua_Client::*)(std::string,bool))&Lua_Client::SetAATitle)
|
.def("SetAATitle", (void(Lua_Client::*)(std::string,bool))&Lua_Client::SetAATitle)
|
||||||
|
|||||||
@ -510,6 +510,7 @@ public:
|
|||||||
void AreaTaunt(float range);
|
void AreaTaunt(float range);
|
||||||
void AreaTaunt(float range, int bonus_hate);
|
void AreaTaunt(float range, int bonus_hate);
|
||||||
luabind::object GetInventorySlots(lua_State* L);
|
luabind::object GetInventorySlots(lua_State* L);
|
||||||
|
void SetAAEXPPercentage(uint8 percentage);
|
||||||
|
|
||||||
void ApplySpell(int spell_id);
|
void ApplySpell(int spell_id);
|
||||||
void ApplySpell(int spell_id, int duration);
|
void ApplySpell(int spell_id, int duration);
|
||||||
|
|||||||
@ -3229,6 +3229,11 @@ perl::array Perl_Client_GetInventorySlots(Client* self)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Perl_Client_SetAAEXPPercentage(Client* self, uint8 percentage)
|
||||||
|
{
|
||||||
|
self->SetAAEXPPercentage(percentage);
|
||||||
|
}
|
||||||
|
|
||||||
void perl_register_client()
|
void perl_register_client()
|
||||||
{
|
{
|
||||||
perl::interpreter perl(PERL_GET_THX);
|
perl::interpreter perl(PERL_GET_THX);
|
||||||
@ -3657,6 +3662,7 @@ void perl_register_client()
|
|||||||
package.add("SetAAEXPModifier", (void(*)(Client*, float))&Perl_Client_SetAAEXPModifier);
|
package.add("SetAAEXPModifier", (void(*)(Client*, float))&Perl_Client_SetAAEXPModifier);
|
||||||
package.add("SetAAEXPModifier", (void(*)(Client*, uint32, float))&Perl_Client_SetAAEXPModifier);
|
package.add("SetAAEXPModifier", (void(*)(Client*, uint32, float))&Perl_Client_SetAAEXPModifier);
|
||||||
package.add("SetAAEXPModifier", (void(*)(Client*, uint32, float, int16))&Perl_Client_SetAAEXPModifier);
|
package.add("SetAAEXPModifier", (void(*)(Client*, uint32, float, int16))&Perl_Client_SetAAEXPModifier);
|
||||||
|
package.add("SetAAEXPPercentage", &Perl_Client_SetAAEXPPercentage);
|
||||||
package.add("SetAAPoints", &Perl_Client_SetAAPoints);
|
package.add("SetAAPoints", &Perl_Client_SetAAPoints);
|
||||||
package.add("SetAATitle", (void(*)(Client*, std::string))&Perl_Client_SetAATitle);
|
package.add("SetAATitle", (void(*)(Client*, std::string))&Perl_Client_SetAATitle);
|
||||||
package.add("SetAATitle", (void(*)(Client*, std::string, bool))&Perl_Client_SetAATitle);
|
package.add("SetAATitle", (void(*)(Client*, std::string, bool))&Perl_Client_SetAATitle);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user