mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 16:58:02 +00:00
[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:
+100
-16
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user