mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-16 01:01:30 +00:00
[Quest API] Add IsAutoAttackEnabled() to Perl/Lua (#2979)
# Perl - Add `$client->IsAutoAttackEnabled()`. # Lua - Add `client:IsAutoAttackEnabled()`. # Notes - Allows operators to check if a client has auto attack enabled.
This commit is contained in:
parent
9d4f231619
commit
0d72295cc9
@ -3038,10 +3038,18 @@ void Lua_Client::UseAugmentContainer(int container_slot)
|
||||
self->UseAugmentContainer(container_slot);
|
||||
}
|
||||
|
||||
|
||||
bool Lua_Client::IsAutoAttackEnabled()
|
||||
{
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->AutoAttackEnabled();
|
||||
}
|
||||
|
||||
bool Lua_Client::IsAutoFireEnabled()
|
||||
{
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->AutoFireEnabled();
|
||||
|
||||
}
|
||||
|
||||
luabind::scope lua_register_client() {
|
||||
@ -3302,6 +3310,7 @@ luabind::scope lua_register_client() {
|
||||
.def("IncreaseSkill", (void(Lua_Client::*)(int))&Lua_Client::IncreaseSkill)
|
||||
.def("IncreaseSkill", (void(Lua_Client::*)(int,int))&Lua_Client::IncreaseSkill)
|
||||
.def("IncrementAA", (void(Lua_Client::*)(int))&Lua_Client::IncrementAA)
|
||||
.def("IsAutoAttackEnabled", (bool(Lua_Client::*)(void))&Lua_Client::IsAutoAttackEnabled)
|
||||
.def("IsAutoFireEnabled", (bool(Lua_Client::*)(void))&Lua_Client::IsAutoFireEnabled)
|
||||
.def("IsCrouching", (bool(Lua_Client::*)(void))&Lua_Client::IsCrouching)
|
||||
.def("IsDead", &Lua_Client::IsDead)
|
||||
|
||||
@ -466,6 +466,7 @@ public:
|
||||
void SetItemCooldown(uint32 item_id, uint32 in_time);
|
||||
uint32 GetItemCooldown(uint32 item_id);
|
||||
void UseAugmentContainer(int container_slot);
|
||||
bool IsAutoAttackEnabled();
|
||||
bool IsAutoFireEnabled();
|
||||
|
||||
void ApplySpell(int spell_id);
|
||||
|
||||
@ -2897,6 +2897,11 @@ void Perl_Client_UseAugmentContainer(Client* self, int container_slot)
|
||||
self->UseAugmentContainer(container_slot);
|
||||
}
|
||||
|
||||
bool Perl_Client_IsAutoAttackEnabled(Client* self)
|
||||
{
|
||||
return self->AutoAttackEnabled();
|
||||
}
|
||||
|
||||
bool Perl_Client_IsAutoFireEnabled(Client* self)
|
||||
{
|
||||
return self->AutoFireEnabled();
|
||||
@ -3164,6 +3169,7 @@ void perl_register_client()
|
||||
package.add("IncreaseSkill", (void(*)(Client*, int))&Perl_Client_IncreaseSkill);
|
||||
package.add("IncreaseSkill", (void(*)(Client*, int, int))&Perl_Client_IncreaseSkill);
|
||||
package.add("IncrementAA", &Perl_Client_IncrementAA);
|
||||
package.add("IsAutoAttackEnabled", &Perl_Client_IsAutoAttackEnabled);
|
||||
package.add("IsAutoFireEnabled", &Perl_Client_IsAutoFireEnabled);
|
||||
package.add("IsBecomeNPC", &Perl_Client_IsBecomeNPC);
|
||||
package.add("IsCrouching", &Perl_Client_IsCrouching);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user