mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 15:58:36 +00:00
add GetBotSpellCategoryIDByShortName and CopyBotBlockedPetBuffs, update ^defaultsettings command
This commit is contained in:
@@ -11734,6 +11734,10 @@ void Bot::CopySettings(Bot* to, uint8 settingType, uint16 spellType) {
|
||||
|
||||
void Bot::CopyBotSpellSettings(Bot* to)
|
||||
{
|
||||
if (!to) {
|
||||
return;
|
||||
}
|
||||
|
||||
to->ResetBotSpellSettings();
|
||||
to->bot_spell_settings.clear();
|
||||
|
||||
@@ -11784,6 +11788,38 @@ void Bot::ResetBotSpellSettings()
|
||||
SetBotEnforceSpellSetting(false);
|
||||
}
|
||||
|
||||
void Bot::CopyBotBlockedBuffs(Bot* to) {
|
||||
if (!to) {
|
||||
return;
|
||||
}
|
||||
|
||||
to->ClearBotBlockedBuffs();
|
||||
|
||||
std::vector<BotBlockedBuffs_Struct> blockedBuffs = GetBotBlockedBuffs();
|
||||
|
||||
if (!blockedBuffs.empty()) {
|
||||
for (auto& blocked_buff : blockedBuffs) {
|
||||
to->SetBotBlockedBuff(blocked_buff.spell_id, blocked_buff.blocked);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Bot::CopyBotBlockedPetBuffs(Bot* to) {
|
||||
if (!to) {
|
||||
return;
|
||||
}
|
||||
|
||||
to->ClearBotBlockedBuffs();
|
||||
|
||||
std::vector<BotBlockedBuffs_Struct> blockedBuffs = GetBotBlockedBuffs();
|
||||
|
||||
if (!blockedBuffs.empty()) {
|
||||
for (auto& blocked_buff : blockedBuffs) {
|
||||
to->SetBotBlockedPetBuff(blocked_buff.spell_id, blocked_buff.blocked_pet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Bot::BotPassiveCheck() {
|
||||
if (GetBotStance() == Stance::Passive) {
|
||||
GetOwner()->Message(
|
||||
|
||||
Reference in New Issue
Block a user