[Quest API] Add ApplySpell() and SetBuffDuration() overloads to Perl/Lua (#3576)

# Perl
- Add `$bot->ApplySpell(spell_id, duration, level)`.
- Add `$bot->ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `$bot->ApplySpellGroup(spell_id, duration, level)`.
- Add `$bot->ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `$bot->ApplySpellRaid(spell_id)`.
- Add `$bot->ApplySpellRaid(spell_id, duration)`.
- Add `$bot->ApplySpellRaid(spell_id, duration, level)`.
- Add `$bot->ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `$bot->ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$bot->SetSpellDuration(spell_id, duration, level)`.
- Add `$bot->SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `$bot->SetSpellDurationGroup(spell_id, duration, level)`.
- Add `$bot->SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `$bot->SetSpellDurationRaid(spell_id)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration, level)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `$bot->SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$client->ApplySpell(spell_id, duration, level)`.
- Add `$client->ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `$client->ApplySpellGroup(spell_id, duration, level)`.
- Add `$client->ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$client->ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$client->SetSpellDuration(spell_id, duration, level)`.
- Add `$client->SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `$client->SetSpellDurationGroup(spell_id, duration, level)`.
- Add `$client->SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `$client->SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `$mob->ApplySpellBuff(spell_id, duration, level)`.
- Add `$mob->SetSpellDuration(spell_id, duration, level)`.

# Lua
- Add `bot:ApplySpell(spell_id, duration, level)`.
- Add `bot:ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `bot:ApplySpellGroup(spell_id, duration, level)`.
- Add `bot:ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `bot:ApplySpellRaid(spell_id)`.
- Add `bot:ApplySpellRaid(spell_id, duration)`.
- Add `bot:ApplySpellRaid(spell_id, duration, level)`.
- Add `bot:ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `bot:ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `bot:SetSpellDuration(spell_id, duration, level)`.
- Add `bot:SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `bot:SetSpellDurationGroup(spell_id, duration, level)`.
- Add `bot:SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `bot:SetSpellDurationRaid(spell_id, duration, level)`.
- Add `bot:SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `bot:SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `client:ApplySpell(spell_id, duration, level)`.
- Add `client:ApplySpell(spell_id, duration, level, allow_pets)`.
- Add `client:ApplySpellGroup(spell_id, duration, level)`.
- Add `client:ApplySpellGroup(spell_id, duration, level, allow_pets)`.
- Add `client:ApplySpellRaid(spell_id, duration, level)`.
- Add `client:ApplySpellRaid(spell_id, duration, level, allow_pets)`.
- Add `client:ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `client:ApplySpellRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `client:SetSpellDuration(spell_id, duration, level)`.
- Add `client:SetSpellDuration(spell_id, duration, level, allow_pets)`.
- Add `client:SetSpellDurationGroup(spell_id, duration, level)`.
- Add `client:SetSpellDurationGroup(spell_id, duration, level, allow_pets)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level, allow_pets)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only)`.
- Add `client:SetSpellDurationRaid(spell_id, duration, level, allow_pets, is_raid_group_only, allow_bots)`.
- Add `mob:ApplySpellBuff(spell_id, duration, level)`.
- Add `mob:SetSpellDuration(spell_id, duration, level)`.

# Notes
- This allows operators to override the spell level.
This commit is contained in:
Alex King 2023-09-17 14:14:13 -04:00 committed by GitHub
parent d3a414a048
commit bab16771aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 425 additions and 188 deletions

View File

@ -8568,6 +8568,7 @@ std::vector<Mob*> Bot::GetApplySpellList(
void Bot::ApplySpell(
int spell_id,
int duration,
int level,
ApplySpellType apply_type,
bool allow_pets,
bool is_raid_group_only
@ -8575,13 +8576,14 @@ void Bot::ApplySpell(
const auto& l = GetApplySpellList(apply_type, allow_pets, is_raid_group_only);
for (const auto& m : l) {
m->ApplySpellBuff(spell_id, duration);
m->ApplySpellBuff(spell_id, duration, level);
}
}
void Bot::SetSpellDuration(
int spell_id,
int duration,
int level,
ApplySpellType apply_type,
bool allow_pets,
bool is_raid_group_only
@ -8589,7 +8591,7 @@ void Bot::SetSpellDuration(
const auto& l = GetApplySpellList(apply_type, allow_pets, is_raid_group_only);
for (const auto& m : l) {
m->SetBuffDuration(spell_id, duration);
m->SetBuffDuration(spell_id, duration, level);
}
}

View File

@ -584,7 +584,7 @@ public:
// "Quest API" Methods
bool HasBotSpellEntry(uint16 spellid);
void ApplySpell(int spell_id, int duration = 0, ApplySpellType apply_type = ApplySpellType::Solo, bool allow_pets = false, bool is_raid_group_only = true);
void ApplySpell(int spell_id, int duration = 0, int level = -1, ApplySpellType apply_type = ApplySpellType::Solo, bool allow_pets = false, bool is_raid_group_only = true);
void BreakInvis();
void Escape();
void Fling(float value, float target_x, float target_y, float target_z, bool ignore_los = false, bool clip_through_walls = false, bool calculate_speed = false);
@ -593,7 +593,7 @@ public:
int32 GetAugmentIDAt(int16 slot_id, uint8 augslot);
int32 GetRawItemAC();
void SendSpellAnim(uint16 targetid, uint16 spell_id);
void SetSpellDuration(int spell_id, int duration = 0, ApplySpellType apply_type = ApplySpellType::Solo, bool allow_pets = false, bool is_raid_group_only = true);
void SetSpellDuration(int spell_id, int duration = 0, int level = -1, ApplySpellType apply_type = ApplySpellType::Solo, bool allow_pets = false, bool is_raid_group_only = true);
// "SET" Class Methods
void SetBotSpellID(uint32 newSpellID);

View File

@ -11288,6 +11288,7 @@ std::vector<Mob*> Client::GetApplySpellList(
void Client::ApplySpell(
int spell_id,
int duration,
int level,
ApplySpellType apply_type,
bool allow_pets,
bool is_raid_group_only,
@ -11296,13 +11297,14 @@ void Client::ApplySpell(
const auto& l = GetApplySpellList(apply_type, allow_pets, is_raid_group_only, allow_bots);
for (const auto& m : l) {
m->ApplySpellBuff(spell_id, duration);
m->ApplySpellBuff(spell_id, duration, level);
}
}
void Client::SetSpellDuration(
int spell_id,
int duration,
int level,
ApplySpellType apply_type,
bool allow_pets,
bool is_raid_group_only,
@ -11311,7 +11313,7 @@ void Client::SetSpellDuration(
const auto& l = GetApplySpellList(apply_type, allow_pets, is_raid_group_only, allow_bots);
for (const auto& m : l) {
m->SetBuffDuration(spell_id, duration);
m->SetBuffDuration(spell_id, duration, level);
}
}

View File

@ -923,6 +923,7 @@ public:
void ApplySpell(
int spell_id,
int duration = 0,
int level = -1,
ApplySpellType apply_type = ApplySpellType::Solo,
bool allow_pets = false,
bool is_raid_group_only = true,
@ -932,6 +933,7 @@ public:
void SetSpellDuration(
int spell_id,
int duration = 0,
int level = -1,
ApplySpellType apply_type = ApplySpellType::Solo,
bool allow_pets = false,
bool is_raid_group_only = true,

View File

@ -155,44 +155,58 @@ void Lua_Bot::ApplySpell(int spell_id, int duration) {
self->ApplySpell(spell_id, duration);
}
void Lua_Bot::ApplySpell(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::ApplySpell(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo);
}
void Lua_Bot::ApplySpell(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Lua_Bot::ApplySpellGroup(int spell_id) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, 0, ApplySpellType::Group);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Group);
}
void Lua_Bot::ApplySpellGroup(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Group);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Group);
}
void Lua_Bot::ApplySpellGroup(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group);
}
void Lua_Bot::ApplySpellGroup(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Lua_Bot::ApplySpellRaid(int spell_id) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, 0, ApplySpellType::Raid);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Raid);
}
void Lua_Bot::ApplySpellRaid(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, true, true);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Raid, true, true);
}
void Lua_Bot::ApplySpellRaid(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::ApplySpellRaid(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, true);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, true, true);
}
void Lua_Bot::ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only) {
void Lua_Bot::ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, true);
}
void Lua_Bot::ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
void Lua_Bot::SetSpellDuration(int spell_id) {
@ -205,44 +219,59 @@ void Lua_Bot::SetSpellDuration(int spell_id, int duration) {
self->SetSpellDuration(spell_id, duration);
}
void Lua_Bot::SetSpellDuration(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::SetSpellDuration(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->SetSpellDuration(spell_id, duration, level);
}
void Lua_Bot::SetSpellDuration(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Lua_Bot::SetSpellDurationGroup(int spell_id) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, 0, ApplySpellType::Group);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Group);
}
void Lua_Bot::SetSpellDurationGroup(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Group);
}
void Lua_Bot::SetSpellDurationGroup(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::SetSpellDurationGroup(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group);
}
void Lua_Bot::SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Lua_Bot::SetSpellDurationRaid(int spell_id) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, 0, ApplySpellType::Raid);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Raid);
}
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Raid);
}
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration, bool allow_pets) {
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid);
}
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only) {
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Lua_Bot::SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
int Lua_Bot::CountAugmentEquippedByID(uint32 item_id) {
@ -555,14 +584,20 @@ luabind::scope lua_register_bot() {
.def("AddItem", (void(Lua_Bot::*)(luabind::adl::object))&Lua_Bot::AddItem)
.def("ApplySpell", (void(Lua_Bot::*)(int))&Lua_Bot::ApplySpell)
.def("ApplySpell", (void(Lua_Bot::*)(int,int))&Lua_Bot::ApplySpell)
.def("ApplySpell", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::ApplySpell)
.def("ApplySpell", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::ApplySpell)
.def("ApplySpell", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::ApplySpell)
.def("ApplySpell", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::ApplySpell)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,bool,bool))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,int,bool,bool))&Lua_Bot::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Bot::*)(int,int,int,bool,bool))&Lua_Bot::ApplySpellRaid)
.def("Camp", (void(Lua_Bot::*)(void))&Lua_Bot::Camp)
.def("Camp", (void(Lua_Bot::*)(bool))&Lua_Bot::Camp)
.def("CountBotItem", (uint32(Lua_Bot::*)(uint32))&Lua_Bot::CountBotItem)
@ -622,14 +657,17 @@ luabind::scope lua_register_bot() {
.def("SetExpansionBitmask", (void(Lua_Bot::*)(int,bool))&Lua_Bot::SetExpansionBitmask)
.def("SetSpellDuration", (void(Lua_Bot::*)(int))&Lua_Bot::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Bot::*)(int,int))&Lua_Bot::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::SetSpellDuration)
.def("SetSpellDurationGroup", (void(Lua_Bot::*)(int))&Lua_Bot::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Bot::*)(int,int))&Lua_Bot::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::SetSpellDurationGroup)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int,bool,bool))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int,int))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int,int,bool))&Lua_Bot::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Bot::*)(int,int,int,bool,bool))&Lua_Bot::SetSpellDurationRaid)
.def("SendPayload", (void(Lua_Bot::*)(int))&Lua_Bot::SendPayload)
.def("SendPayload", (void(Lua_Bot::*)(int,std::string))&Lua_Bot::SendPayload)
.def("Signal", (void(Lua_Bot::*)(int))&Lua_Bot::Signal)

View File

@ -77,29 +77,35 @@ public:
void ApplySpell(int spell_id);
void ApplySpell(int spell_id, int duration);
void ApplySpell(int spell_id, int duration, bool allow_pets);
void ApplySpell(int spell_id, int duration, int level);
void ApplySpell(int spell_id, int duration, int level, bool allow_pets);
void ApplySpellGroup(int spell_id);
void ApplySpellGroup(int spell_id, int duration);
void ApplySpellGroup(int spell_id, int duration, bool allow_pets);
void ApplySpellGroup(int spell_id, int duration, int level);
void ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets);
void ApplySpellRaid(int spell_id);
void ApplySpellRaid(int spell_id, int duration);
void ApplySpellRaid(int spell_id, int duration, bool allow_pets);
void ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only);
void ApplySpellRaid(int spell_id, int duration, int level);
void ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets);
void ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only);
void SetSpellDuration(int spell_id);
void SetSpellDuration(int spell_id, int duration);
void SetSpellDuration(int spell_id, int duration, bool allow_pets);
void SetSpellDuration(int spell_id, int duration, int level);
void SetSpellDuration(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDurationGroup(int spell_id);
void SetSpellDurationGroup(int spell_id, int duration);
void SetSpellDurationGroup(int spell_id, int duration, bool allow_pets);
void SetSpellDurationGroup(int spell_id, int duration, int level);
void SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDurationRaid(int spell_id);
void SetSpellDurationRaid(int spell_id, int duration);
void SetSpellDurationRaid(int spell_id, int duration, bool allow_pets);
void SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only);
void SetSpellDurationRaid(int spell_id, int duration, int level);
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only);
int CountAugmentEquippedByID(uint32 item_id);
int CountItemEquippedByID(uint32 item_id);

View File

@ -2716,59 +2716,74 @@ void Lua_Client::ApplySpell(int spell_id, int duration) {
self->ApplySpell(spell_id, duration);
}
void Lua_Client::ApplySpell(int spell_id, int duration, bool allow_pets) {
void Lua_Client::ApplySpell(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->ApplySpell(spell_id, duration, level);
}
void Lua_Client::ApplySpell(int spell_id, int duration, bool allow_pets, bool allow_bots) {
void Lua_Client::ApplySpell(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets, true, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Lua_Client::ApplySpell(int spell_id, int duration, int level, bool allow_pets, bool allow_bots) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets, true, allow_bots);
}
void Lua_Client::ApplySpellGroup(int spell_id) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, 0, ApplySpellType::Group);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Group);
}
void Lua_Client::ApplySpellGroup(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Group);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Group);
}
void Lua_Client::ApplySpellGroup(int spell_id, int duration, bool allow_pets) {
void Lua_Client::ApplySpellGroup(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group);
}
void Lua_Client::ApplySpellGroup(int spell_id, int duration, bool allow_pets, bool allow_bots) {
void Lua_Client::ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets, true, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Lua_Client::ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets, bool allow_bots) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets, true, allow_bots);
}
void Lua_Client::ApplySpellRaid(int spell_id) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, 0, ApplySpellType::Raid);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Raid);
}
void Lua_Client::ApplySpellRaid(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Raid);
}
void Lua_Client::ApplySpellRaid(int spell_id, int duration, bool allow_pets) {
void Lua_Client::ApplySpellRaid(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid);
}
void Lua_Client::ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only) {
void Lua_Client::ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Lua_Client::ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots) {
void Lua_Client::ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
void Lua_Client::ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots) {
Lua_Safe_Call_Void();
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
}
void Lua_Client::SetSpellDuration(int spell_id) {
@ -2781,59 +2796,74 @@ void Lua_Client::SetSpellDuration(int spell_id, int duration) {
self->SetSpellDuration(spell_id, duration);
}
void Lua_Client::SetSpellDuration(int spell_id, int duration, bool allow_pets) {
void Lua_Client::SetSpellDuration(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->SetSpellDuration(spell_id, duration, level);
}
void Lua_Client::SetSpellDuration(int spell_id, int duration, bool allow_pets, bool allow_bots) {
void Lua_Client::SetSpellDuration(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets, true, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Lua_Client::SetSpellDuration(int spell_id, int duration, int level, bool allow_pets, bool allow_bots) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets, true, allow_bots);
}
void Lua_Client::SetSpellDurationGroup(int spell_id) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, 0, ApplySpellType::Group);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Group);
}
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Group);
}
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration, bool allow_pets) {
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group);
}
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration, bool allow_pets, bool allow_bots) {
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets, true, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Lua_Client::SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets, bool allow_bots) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets, true, allow_bots);
}
void Lua_Client::SetSpellDurationRaid(int spell_id) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, 0, ApplySpellType::Raid);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Raid);
}
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Raid);
}
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, bool allow_pets) {
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid);
}
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only) {
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots) {
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets, is_raid_group_only, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
void Lua_Client::SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots) {
Lua_Safe_Call_Void();
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets, is_raid_group_only, allow_bots);
}
void Lua_Client::UpdateAdmin() {
@ -3164,17 +3194,20 @@ luabind::scope lua_register_client() {
.def("Admin", (int16(Lua_Client::*)(void))&Lua_Client::Admin)
.def("ApplySpell", (void(Lua_Client::*)(int))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int,bool))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int,int))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::ApplySpell)
.def("ApplySpell", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::ApplySpell)
.def("ApplySpellGroup", (void(Lua_Client::*)(int))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int,bool))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int,int))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::ApplySpellGroup)
.def("ApplySpellRaid", (void(Lua_Client::*)(int))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,bool))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,bool,bool,bool))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,int))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::ApplySpellRaid)
.def("ApplySpellRaid", (void(Lua_Client::*)(int,int,int,bool,bool,bool))&Lua_Client::ApplySpellRaid)
.def("AssignTask", (void(Lua_Client::*)(int))&Lua_Client::AssignTask)
.def("AssignTask", (void(Lua_Client::*)(int,int))&Lua_Client::AssignTask)
.def("AssignTask", (void(Lua_Client::*)(int,int,bool))&Lua_Client::AssignTask)
@ -3595,17 +3628,20 @@ luabind::scope lua_register_client() {
.def("SetSkillPoints", (void(Lua_Client::*)(int))&Lua_Client::SetSkillPoints)
.def("SetSpellDuration", (void(Lua_Client::*)(int))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int,bool))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int,int))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::SetSpellDuration)
.def("SetSpellDuration", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::SetSpellDuration)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int,bool))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int,int))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationGroup", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::SetSpellDurationGroup)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,bool,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,bool,bool,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,int))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,int,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,int,bool,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetSpellDurationRaid", (void(Lua_Client::*)(int,int,int,bool,bool,bool))&Lua_Client::SetSpellDurationRaid)
.def("SetStartZone", (void(Lua_Client::*)(int))&Lua_Client::SetStartZone)
.def("SetStartZone", (void(Lua_Client::*)(int,float))&Lua_Client::SetStartZone)
.def("SetStartZone", (void(Lua_Client::*)(int,float,float))&Lua_Client::SetStartZone)

View File

@ -483,35 +483,41 @@ public:
void ApplySpell(int spell_id);
void ApplySpell(int spell_id, int duration);
void ApplySpell(int spell_id, int duration, bool allow_pets);
void ApplySpell(int spell_id, int duration, bool allow_pets, bool allow_bots);
void ApplySpell(int spell_id, int duration, int level);
void ApplySpell(int spell_id, int duration, int level, bool allow_pets);
void ApplySpell(int spell_id, int duration, int level, bool allow_pets, bool allow_bots);
void ApplySpellGroup(int spell_id);
void ApplySpellGroup(int spell_id, int duration);
void ApplySpellGroup(int spell_id, int duration, bool allow_pets);
void ApplySpellGroup(int spell_id, int duration, bool allow_pets, bool allow_bots);
void ApplySpellGroup(int spell_id, int duration, int level);
void ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets);
void ApplySpellGroup(int spell_id, int duration, int level, bool allow_pets, bool allow_bots);
void ApplySpellRaid(int spell_id);
void ApplySpellRaid(int spell_id, int duration);
void ApplySpellRaid(int spell_id, int duration, bool allow_pets);
void ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only);
void ApplySpellRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots);
void ApplySpellRaid(int spell_id, int duration, int level);
void ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets);
void ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only);
void ApplySpellRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots);
void SetSpellDuration(int spell_id);
void SetSpellDuration(int spell_id, int duration);
void SetSpellDuration(int spell_id, int duration, bool allow_pets);
void SetSpellDuration(int spell_id, int duration, bool allow_pets, bool allow_bots);
void SetSpellDuration(int spell_id, int duration, int level);
void SetSpellDuration(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDuration(int spell_id, int duration, int level, bool allow_pets, bool allow_bots);
void SetSpellDurationGroup(int spell_id);
void SetSpellDurationGroup(int spell_id, int duration);
void SetSpellDurationGroup(int spell_id, int duration, bool allow_pets);
void SetSpellDurationGroup(int spell_id, int duration, bool allow_pets, bool allow_bots);
void SetSpellDurationGroup(int spell_id, int duration, int level);
void SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDurationGroup(int spell_id, int duration, int level, bool allow_pets, bool allow_bots);
void SetSpellDurationRaid(int spell_id);
void SetSpellDurationRaid(int spell_id, int duration);
void SetSpellDurationRaid(int spell_id, int duration, bool allow_pets);
void SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only);
void SetSpellDurationRaid(int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots);
void SetSpellDurationRaid(int spell_id, int duration, int level);
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets);
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only);
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots);
int GetEnvironmentDamageModifier();

View File

@ -2532,6 +2532,11 @@ void Lua_Mob::ApplySpellBuff(int spell_id, int duration) {
self->ApplySpellBuff(spell_id, duration);
}
void Lua_Mob::ApplySpellBuff(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->ApplySpellBuff(spell_id, level);
}
int Lua_Mob::GetBuffStatValueBySlot(uint8 slot, const char* identifier) {
Lua_Safe_Call_Int();
return self->GetBuffStatValueBySlot(slot, identifier);
@ -2552,6 +2557,11 @@ void Lua_Mob::SetBuffDuration(int spell_id, int duration) {
self->SetBuffDuration(spell_id, duration);
}
void Lua_Mob::SetBuffDuration(int spell_id, int duration, int level) {
Lua_Safe_Call_Void();
self->SetBuffDuration(spell_id, duration, level);
}
Lua_Mob Lua_Mob::GetUltimateOwner() {
Lua_Safe_Call_Class(Lua_Mob);
return Lua_Mob(self->GetUltimateOwner());
@ -3166,7 +3176,8 @@ luabind::scope lua_register_mob() {
.def("AddToHateList", (void(Lua_Mob::*)(Lua_Mob,int64,int64,bool,bool))&Lua_Mob::AddToHateList)
.def("AddToHateList", (void(Lua_Mob::*)(Lua_Mob,int64,int64,bool,bool,bool))&Lua_Mob::AddToHateList)
.def("ApplySpellBuff", (void(Lua_Mob::*)(int))&Lua_Mob::ApplySpellBuff)
.def("ApplySpellBuff", (void(Lua_Mob::*)(int, int))&Lua_Mob::ApplySpellBuff)
.def("ApplySpellBuff", (void(Lua_Mob::*)(int,int))&Lua_Mob::ApplySpellBuff)
.def("ApplySpellBuff", (void(Lua_Mob::*)(int,int,int))&Lua_Mob::ApplySpellBuff)
.def("Attack", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::Attack)
.def("Attack", (bool(Lua_Mob::*)(Lua_Mob,int))&Lua_Mob::Attack)
.def("Attack", (bool(Lua_Mob::*)(Lua_Mob,int,bool))&Lua_Mob::Attack)
@ -3613,7 +3624,8 @@ luabind::scope lua_register_mob() {
.def("SetBucket", (void(Lua_Mob::*)(std::string,std::string))&Lua_Mob::SetBucket)
.def("SetBucket", (void(Lua_Mob::*)(std::string,std::string,std::string))&Lua_Mob::SetBucket)
.def("SetBuffDuration", (void(Lua_Mob::*)(int))&Lua_Mob::SetBuffDuration)
.def("SetBuffDuration", (void(Lua_Mob::*)(int, int))&Lua_Mob::SetBuffDuration)
.def("SetBuffDuration", (void(Lua_Mob::*)(int,int))&Lua_Mob::SetBuffDuration)
.def("SetBuffDuration", (void(Lua_Mob::*)(int,int,int))&Lua_Mob::SetBuffDuration)
.def("SetCurrentWP", &Lua_Mob::SetCurrentWP)
.def("SetDestructibleObject", (void(Lua_Mob::*)(bool))&Lua_Mob::SetDestructibleObject)
.def("SetDisableMelee", (void(Lua_Mob::*)(bool))&Lua_Mob::SetDisableMelee)

View File

@ -481,10 +481,12 @@ public:
bool CanRaceEquipItem(uint32 item_id);
void ApplySpellBuff(int spell_id);
void ApplySpellBuff(int spell_id, int duration);
void ApplySpellBuff(int spell_id, int duration, int level);
int GetBuffStatValueBySlot(uint8 slot, const char* identifier);
int GetBuffStatValueBySpell(int spell_id, const char* identifier);
void SetBuffDuration(int spell_id);
void SetBuffDuration(int spell_id, int duration);
void SetBuffDuration(int spell_id, int duration, int level);
void CloneAppearance(Lua_Mob other);
void CloneAppearance(Lua_Mob other, bool clone_name);
void DamageArea(int64 damage);

View File

@ -497,8 +497,8 @@ public:
void ListAppearanceEffects(Client* c);
void ClearAppearenceEffects();
void SendSavedAppearenceEffects(Client *receiver);
void SetBuffDuration(int spell_id, int duration = 0);
void ApplySpellBuff(int spell_id, int duration = 0);
void SetBuffDuration(int spell_id, int duration = 0, int level_override = -1);
void ApplySpellBuff(int spell_id, int duration = 0, int level_override = -1);
int GetBuffStatValueBySpell(int32 spell_id, const char* stat_identifier);
int GetBuffStatValueBySlot(uint8 slot, const char* stat_identifier);

View File

@ -65,24 +65,59 @@ void Perl_Bot_ApplySpell(Bot* self, int spell_id, int duration)
self->ApplySpell(spell_id, duration);
}
void Perl_Bot_ApplySpell(Bot* self, int spell_id, int duration, bool allow_pets)
void Perl_Bot_ApplySpell(Bot* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo);
}
void Perl_Bot_ApplySpell(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Perl_Bot_ApplySpellGroup(Bot* self, int spell_id)
{
self->ApplySpell(spell_id, 0, ApplySpellType::Group);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Group);
}
void Perl_Bot_ApplySpellGroup(Bot* self, int spell_id, int duration)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Group);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Group);
}
void Perl_Bot_ApplySpellGroup(Bot* self, int spell_id, int duration, bool allow_pets)
void Perl_Bot_ApplySpellGroup(Bot* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group);
}
void Perl_Bot_ApplySpellGroup(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Perl_Bot_ApplySpellRaid(Bot* self, int spell_id)
{
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Raid);
}
void Perl_Bot_ApplySpellRaid(Bot* self, int spell_id, int duration)
{
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Raid);
}
void Perl_Bot_ApplySpellRaid(Bot* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid);
}
void Perl_Bot_ApplySpellRaid(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Perl_Bot_ApplySpellRaid(Bot* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
uint32 Perl_Bot_CountBotItem(Bot* self, uint32 item_id)
@ -315,24 +350,59 @@ void Perl_Bot_SetSpellDuration(Bot* self, int spell_id, int duration)
self->SetSpellDuration(spell_id, duration);
}
void Perl_Bot_SetSpellDuration(Bot* self, int spell_id, int duration, bool allow_pets)
void Perl_Bot_SetSpellDuration(Bot* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->SetSpellDuration(spell_id, duration);
}
void Perl_Bot_SetSpellDuration(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Perl_Bot_SetSpellDurationGroup(Bot* self, int spell_id)
{
self->SetSpellDuration(spell_id, 0, ApplySpellType::Group);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Group);
}
void Perl_Bot_SetSpellDurationGroup(Bot* self, int spell_id, int duration)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Group);
}
void Perl_Bot_SetSpellDurationGroup(Bot* self, int spell_id, int duration, bool allow_pets)
void Perl_Bot_SetSpellDurationGroup(Bot* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group);
}
void Perl_Bot_SetSpellDurationGroup(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Perl_Bot_SetSpellDurationRaid(Bot* self, int spell_id)
{
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Raid);
}
void Perl_Bot_SetSpellDurationRaid(Bot* self, int spell_id, int duration)
{
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Raid);
}
void Perl_Bot_SetSpellDurationRaid(Bot* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid);
}
void Perl_Bot_SetSpellDurationRaid(Bot* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Perl_Bot_SetSpellDurationRaid(Bot* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
bool Perl_Bot_ReloadBotDataBuckets(Bot* self)
@ -473,10 +543,17 @@ void perl_register_bot()
package.add("AddItem", &Perl_Bot_AddItem);
package.add("ApplySpell", (void(*)(Bot*, int))&Perl_Bot_ApplySpell);
package.add("ApplySpell", (void(*)(Bot*, int, int))&Perl_Bot_ApplySpell);
package.add("ApplySpell", (void(*)(Bot*, int, int, bool))&Perl_Bot_ApplySpell);
package.add("ApplySpell", (void(*)(Bot*, int, int, int))&Perl_Bot_ApplySpell);
package.add("ApplySpell", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_ApplySpell);
package.add("ApplySpellGroup", (void(*)(Bot*, int))&Perl_Bot_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Bot*, int, int))&Perl_Bot_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Bot*, int, int, bool))&Perl_Bot_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Bot*, int, int, int))&Perl_Bot_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_ApplySpellGroup);
package.add("ApplySpellRaid", (void(*)(Bot*, int))&Perl_Bot_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Bot*, int, int))&Perl_Bot_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Bot*, int, int, int))&Perl_Bot_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Bot*, int, int, int, bool, bool))&Perl_Bot_ApplySpellRaid);
package.add("Camp", (void(*)(Bot*))&Perl_Bot_Camp);
package.add("Camp", (void(*)(Bot*, bool))&Perl_Bot_Camp);
package.add("CountAugmentEquippedByID", &Perl_Bot_CountAugmentEquippedByID);
@ -533,10 +610,17 @@ void perl_register_bot()
package.add("SetExpansionBitmask", (void(*)(Bot*, int, bool))&Perl_Bot_SetExpansionBitmask);
package.add("SetSpellDuration", (void(*)(Bot*, int))&Perl_Bot_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Bot*, int, int))&Perl_Bot_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Bot*, int, int, bool))&Perl_Bot_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Bot*, int, int, int))&Perl_Bot_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_SetSpellDuration);
package.add("SetSpellDurationGroup", (void(*)(Bot*, int))&Perl_Bot_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Bot*, int, int))&Perl_Bot_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Bot*, int, int, bool))&Perl_Bot_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Bot*, int, int, int))&Perl_Bot_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_SetSpellDurationGroup);
package.add("SetSpellDurationRaid", (void(*)(Bot*, int))&Perl_Bot_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Bot*, int, int))&Perl_Bot_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Bot*, int, int, int))&Perl_Bot_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Bot*, int, int, int, bool))&Perl_Bot_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Bot*, int, int, int, bool, bool))&Perl_Bot_SetSpellDurationRaid);
package.add("Signal", &Perl_Bot_Signal);
package.add("Sit", &Perl_Bot_Sit);
package.add("Stand", &Perl_Bot_Stand);

View File

@ -2616,59 +2616,74 @@ void Perl_Client_ApplySpell(Client* self, int spell_id, int duration)
self->ApplySpell(spell_id, duration);
}
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->ApplySpell(spell_id, duration, level);
}
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets, true, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, int level, bool allow_pets, bool allow_bots)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Solo, allow_pets, true, allow_bots);
}
void Perl_Client_ApplySpellGroup(Client* self, int spell_id)
{
self->ApplySpell(spell_id, 0, ApplySpellType::Group);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Group);
}
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Group);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Group);
}
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group);
}
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets, true, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, int level, bool allow_pets, bool allow_bots)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Group, allow_pets, true, allow_bots);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id)
{
self->ApplySpell(spell_id, 0, ApplySpellType::Raid);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Raid);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Raid);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Raid);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, int level)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, bool allow_pets, bool is_raid_group_only)
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots)
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots)
{
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
}
void Perl_Client_SetSpellDuration(Client* self, int spell_id)
@ -2681,59 +2696,74 @@ void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration)
self->SetSpellDuration(spell_id, duration);
}
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets);
self->SetSpellDuration(spell_id, duration, level);
}
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets, true, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets);
}
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, int level, bool allow_pets, bool allow_bots)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Solo, allow_pets, true, allow_bots);
}
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id)
{
self->SetSpellDuration(spell_id, 0, ApplySpellType::Group);
self->SetSpellDuration(spell_id, 0, -1, ApplySpellType::Group);
}
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group);
self->SetSpellDuration(spell_id, duration, -1, ApplySpellType::Group);
}
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group);
}
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets, true, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets);
}
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, int level, bool allow_pets, bool allow_bots)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Group, allow_pets, true, allow_bots);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id)
{
self->ApplySpell(spell_id, 0, ApplySpellType::Raid);
self->ApplySpell(spell_id, 0, -1, ApplySpellType::Raid);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration)
{
self->ApplySpell(spell_id, duration, ApplySpellType::Raid);
self->ApplySpell(spell_id, duration, -1, ApplySpellType::Raid);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, bool allow_pets)
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, int level)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets);
self->ApplySpell(spell_id, duration, level, ApplySpellType::Raid);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, bool allow_pets, bool is_raid_group_only)
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, int level, bool allow_pets)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots)
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only)
{
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only);
}
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only, bool allow_bots)
{
self->SetSpellDuration(spell_id, duration, level, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
}
perl::array Perl_Client_GetPEQZoneFlags(Client* self)
@ -2985,17 +3015,20 @@ void perl_register_client()
package.add("Admin", &Perl_Client_Admin);
package.add("ApplySpell", (void(*)(Client*, int))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int, bool))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int, bool, bool))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int, int))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int, int, bool))&Perl_Client_ApplySpell);
package.add("ApplySpell", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_ApplySpell);
package.add("ApplySpellGroup", (void(*)(Client*, int))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int, bool))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int, bool, bool))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int, int))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int, int, bool))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellGroup", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_ApplySpellGroup);
package.add("ApplySpellRaid", (void(*)(Client*, int))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, bool))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, bool, bool))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, bool, bool, bool))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, int))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, int, bool))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_ApplySpellRaid);
package.add("ApplySpellRaid", (void(*)(Client*, int, int, int, bool, bool, bool))&Perl_Client_ApplySpellRaid);
package.add("AssignTask", (void(*)(Client*, int))&Perl_Client_AssignTask);
package.add("AssignTask", (void(*)(Client*, int, int))&Perl_Client_AssignTask);
package.add("AssignTask", (void(*)(Client*, int, int, bool))&Perl_Client_AssignTask);
@ -3410,17 +3443,21 @@ void perl_register_client()
package.add("SetSkillPoints", &Perl_Client_SetSkillPoints);
package.add("SetSpellDuration", (void(*)(Client*, int))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int, bool))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int, bool, bool))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int, int))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int, int, bool))&Perl_Client_SetSpellDuration);
package.add("SetSpellDuration", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_SetSpellDuration);
package.add("SetSpellDurationGroup", (void(*)(Client*, int))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, bool))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, bool, bool))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, int))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, int, bool))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_SetSpellDurationGroup);
package.add("SetSpellDurationRaid", (void(*)(Client*, int))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, bool, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, bool, bool, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, int))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, int, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, int, bool, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, int, bool, bool, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, int, bool, bool, bool))&Perl_Client_SetSpellDurationRaid);
package.add("SetStartZone", (void(*)(Client*, uint32))&Perl_Client_SetStartZone);
package.add("SetStartZone", (void(*)(Client*, uint32, float, float, float))&Perl_Client_SetStartZone);
package.add("SetStartZone", (void(*)(Client*, uint32, float, float, float, float))&Perl_Client_SetStartZone);

View File

@ -2880,6 +2880,11 @@ void Perl_Mob_SetBuffDuration(Mob* self, int spell_id, int duration) // @categor
self->SetBuffDuration(spell_id, duration);
}
void Perl_Mob_SetBuffDuration(Mob* self, int spell_id, int duration, int level) // @categories Script Utility, Spells and Disciplines
{
self->SetBuffDuration(spell_id, duration, level);
}
void Perl_Mob_ApplySpellBuff(Mob* self, int spell_id) // @categories Script Utility, Spells and Disciplines
{
self->ApplySpellBuff(spell_id);
@ -2890,6 +2895,11 @@ void Perl_Mob_ApplySpellBuff(Mob* self, int spell_id, int duration) // @categori
self->ApplySpellBuff(spell_id, duration);
}
void Perl_Mob_ApplySpellBuff(Mob* self, int spell_id, int duration, int level) // @categories Script Utility, Spells and Disciplines
{
self->ApplySpellBuff(spell_id, duration, level);
}
int Perl_Mob_GetSkillDmgAmt(Mob* self, int skill_id)
{
return self->GetSkillDmgAmt(skill_id);
@ -3436,6 +3446,7 @@ void perl_register_mob()
package.add("AddToHateList", (void(*)(Mob*, Mob*, int64_t, int64_t, bool, bool, bool))&Perl_Mob_AddToHateList);
package.add("ApplySpellBuff", (void(*)(Mob*, int))&Perl_Mob_ApplySpellBuff);
package.add("ApplySpellBuff", (void(*)(Mob*, int, int))&Perl_Mob_ApplySpellBuff);
package.add("ApplySpellBuff", (void(*)(Mob*, int, int, int))&Perl_Mob_ApplySpellBuff);
package.add("Attack", (bool(*)(Mob*, Mob*))&Perl_Mob_Attack);
package.add("Attack", (bool(*)(Mob*, Mob*, int))&Perl_Mob_Attack);
package.add("Attack", (bool(*)(Mob*, Mob*, int, bool))&Perl_Mob_Attack);
@ -3927,6 +3938,7 @@ void perl_register_mob()
package.add("SetBucket", (void(*)(Mob*, std::string, std::string, std::string))&Perl_Mob_SetBucket);
package.add("SetBuffDuration", (void(*)(Mob*, int))&Perl_Mob_SetBuffDuration);
package.add("SetBuffDuration", (void(*)(Mob*, int, int))&Perl_Mob_SetBuffDuration);
package.add("SetBuffDuration", (void(*)(Mob*, int, int, int))&Perl_Mob_SetBuffDuration);
package.add("SetCurrentWP", &Perl_Mob_SetCurrentWP);
package.add("SetDeltas", &Perl_Mob_SetDeltas);
package.add("SetDisableMelee", &Perl_Mob_SetDisableMelee);

View File

@ -10378,7 +10378,7 @@ bool Mob::HasPersistDeathIllusion(int32 spell_id) {
return false;
}
void Mob::SetBuffDuration(int spell_id, int duration) {
void Mob::SetBuffDuration(int spell_id, int duration, int level) {
/*
Will refresh the buff with specified spell_id to the specified duration
@ -10402,22 +10402,20 @@ void Mob::SetBuffDuration(int spell_id, int duration) {
int buff_count = GetMaxTotalSlots();
for (int slot = 0; slot < buff_count; slot++) {
if (!adjust_all_buffs) {
if (IsValidSpell(buffs[slot].spellid) && buffs[slot].spellid == spell_id) {
SpellOnTarget(buffs[slot].spellid, this, 0, false, 0, false, -1, duration, true);
SpellOnTarget(buffs[slot].spellid, this, 0, false, 0, false, level, duration, true);
return;
}
}
else {
} else {
if (IsValidSpell(buffs[slot].spellid)) {
SpellOnTarget(buffs[slot].spellid, this, 0, false, 0, false, -1, duration, true);
SpellOnTarget(buffs[slot].spellid, this, 0, false, 0, false, level, duration, true);
}
}
}
}
void Mob::ApplySpellBuff(int spell_id, int duration)
void Mob::ApplySpellBuff(int spell_id, int duration, int level)
{
/*
Used for quest command to apply a new buff with custom duration.
@ -10435,7 +10433,7 @@ void Mob::ApplySpellBuff(int spell_id, int duration)
duration = PERMANENT_BUFF_DURATION;
}
SpellOnTarget(spell_id, this, 0, false, 0, false, -1, duration);
SpellOnTarget(spell_id, this, 0, false, 0, false, level, duration);
}
int Mob::GetBuffStatValueBySpell(int32 spell_id, const char* stat_identifier)