code cleanup 3

This commit is contained in:
nytmyr
2025-01-10 12:10:12 -06:00
parent 95c1bb6883
commit 90e95572fd
38 changed files with 718 additions and 729 deletions
+5 -5
View File
@@ -82,12 +82,12 @@ void bot_command_behind_mob(Client* c, const Seperator* sep)
int ab_arg = 1;
bool current_check = false;
uint32 typeValue = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
typeValue = atoi(sep->arg[1]);
type_value = atoi(sep->arg[1]);
++ab_arg;
if (typeValue < 0 || typeValue > 1) {
if (type_value < 0 || type_value > 1) {
c->Message(Chat::Yellow, "You must enter either 0 for disabled or 1 for enabled.");
return;
@@ -147,7 +147,7 @@ void bot_command_behind_mob(Client* c, const Seperator* sep)
);
}
else {
my_bot->SetBehindMob(typeValue);
my_bot->SetBehindMob(type_value);
++success_count;
}
}
@@ -168,7 +168,7 @@ void bot_command_behind_mob(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots {} stay behind mobs.",
success_count,
typeValue ? "will now" : "will no longer"
type_value ? "will now" : "will no longer"
).c_str()
);
}
+34 -34
View File
@@ -149,10 +149,10 @@ void bot_command_blocked_buffs(Client* c, const Seperator* sep)
}
const int ab_mask = ActionableBots::ABM_Type1;
std::string actionableArg = sep->arg[ab_arg];
std::string actionable_arg = sep->arg[ab_arg];
if (actionableArg.empty()) {
actionableArg = "target";
if (actionable_arg.empty()) {
actionable_arg = "target";
}
std::string class_race_arg = sep->arg[ab_arg];
@@ -164,23 +164,23 @@ void bot_command_blocked_buffs(Client* c, const Seperator* sep)
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
if (ActionableBots::PopulateSBL(c, actionable_arg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
bool isSuccess = false;
uint16 successCount = 0;
Bot* firstFound = nullptr;
bool is_success = false;
uint16 success_count = 0;
Bot* first_found = nullptr;
for (auto bot_iter : sbl) {
if (!bot_iter->IsInGroupOrRaid(c)) {
continue;
}
if (!firstFound) {
firstFound = bot_iter;
if (!first_found) {
first_found = bot_iter;
}
if (add) {
@@ -190,11 +190,11 @@ void bot_command_blocked_buffs(Client* c, const Seperator* sep)
bot_iter->SetBotBlockedBuff(spell_id, false);
}
else if (list) {
std::vector<BotBlockedBuffs_Struct> blockedBuffs = bot_iter->GetBotBlockedBuffs();
std::vector<BotBlockedBuffs_Struct> blocked_buffs = bot_iter->GetBotBlockedBuffs();
bool found = false;
if (!blockedBuffs.empty()) {
for (auto& blocked_buff : blockedBuffs) {
if (!blocked_buffs.empty()) {
for (auto& blocked_buff : blocked_buffs) {
if (blocked_buff.blocked == 1 && IsValidSpell(blocked_buff.spell_id)) {
found = true;
c->Message(
@@ -232,11 +232,11 @@ void bot_command_blocked_buffs(Client* c, const Seperator* sep)
);
}
isSuccess = true;
++successCount;
is_success = true;
++success_count;
}
if (!isSuccess) {
if (!is_success) {
c->Message(Chat::Yellow, "No bots were selected.");
}
else {
@@ -245,8 +245,8 @@ void bot_command_blocked_buffs(Client* c, const Seperator* sep)
Chat::Yellow,
fmt::format(
"{} {} {} blocking {} [#{}]",
((successCount == 1 && firstFound) ? firstFound->GetCleanName() : (fmt::format("{}", successCount).c_str())),
((successCount == 1 && firstFound) ? "is" : "of your bots"),
((success_count == 1 && first_found) ? first_found->GetCleanName() : (fmt::format("{}", success_count).c_str())),
((success_count == 1 && first_found) ? "is" : "of your bots"),
(add ? "now" : "no longer"),
spells[spell_id].name,
spell_id
@@ -408,10 +408,10 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
}
const int ab_mask = ActionableBots::ABM_Type1;
std::string actionableArg = sep->arg[ab_arg];
std::string actionable_arg = sep->arg[ab_arg];
if (actionableArg.empty()) {
actionableArg = "target";
if (actionable_arg.empty()) {
actionable_arg = "target";
}
std::string class_race_arg = sep->arg[ab_arg];
@@ -423,23 +423,23 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
if (ActionableBots::PopulateSBL(c, actionable_arg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
bool isSuccess = false;
uint16 successCount = 0;
Bot* firstFound = nullptr;
bool is_success = false;
uint16 success_count = 0;
Bot* first_found = nullptr;
for (auto bot_iter : sbl) {
if (!bot_iter->IsInGroupOrRaid(c)) {
continue;
}
if (!firstFound) {
firstFound = bot_iter;
if (!first_found) {
first_found = bot_iter;
}
if (add) {
@@ -449,11 +449,11 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
bot_iter->SetBotBlockedPetBuff(spell_id, false);
}
else if (list) {
std::vector<BotBlockedBuffs_Struct> blockedBuffs = bot_iter->GetBotBlockedBuffs();
std::vector<BotBlockedBuffs_Struct> blocked_buffs = bot_iter->GetBotBlockedBuffs();
bool found = false;
if (!blockedBuffs.empty()) {
for (auto& blocked_buff : blockedBuffs) {
if (!blocked_buffs.empty()) {
for (auto& blocked_buff : blocked_buffs) {
if (blocked_buff.blocked_pet == 1 && IsValidSpell(blocked_buff.spell_id)) {
found = true;
c->Message(
@@ -491,11 +491,11 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
);
}
isSuccess = true;
++successCount;
is_success = true;
++success_count;
}
if (!isSuccess) {
if (!is_success) {
c->Message(Chat::Yellow, "No bots were selected.");
}
else {
@@ -504,8 +504,8 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
Chat::Yellow,
fmt::format(
"{} {} {} blocking {} [#{}] on their pet.",
((successCount == 1 && firstFound) ? firstFound->GetCleanName() : (fmt::format("{}", successCount).c_str())),
((successCount == 1 && firstFound) ? "is" : "of your bots"),
((success_count == 1 && first_found) ? first_found->GetCleanName() : (fmt::format("{}", success_count).c_str())),
((success_count == 1 && first_found) ? "is" : "of your bots"),
(add ? "now" : "no longer"),
spells[spell_id].name,
spell_id
+98 -98
View File
@@ -175,13 +175,13 @@ void bot_command_cast(Client* c, const Seperator* sep)
}
int ab_arg = 2;
uint16 spellType = UINT16_MAX;
uint16 subType = UINT16_MAX;
uint16 subTargetType = UINT16_MAX;
bool aaType = false;
int aaID = 0;
bool bySpellID = false;
uint16 chosenSpellID = UINT16_MAX;
uint16 spell_type = UINT16_MAX;
uint16 sub_type = UINT16_MAX;
uint16 sub_target_type = UINT16_MAX;
bool aa_type = false;
int aa_id = 0;
bool by_spell_id = false;
uint16 chosen_spell_id = UINT16_MAX;
if (!arg1.compare("aa") || !arg1.compare("harmtouch") || !arg1.compare("layonhands")) {
if (!RuleB(Bots, AllowCastAAs)) {
@@ -190,10 +190,10 @@ void bot_command_cast(Client* c, const Seperator* sep)
}
if (!arg1.compare("harmtouch")) {
aaID = zone->GetAlternateAdvancementAbilityByRank(aaHarmTouch)->id;
aa_id = zone->GetAlternateAdvancementAbilityByRank(aaHarmTouch)->id;
}
else if (!arg1.compare("layonhands")) {
aaID = zone->GetAlternateAdvancementAbilityByRank(aaLayonHands)->id;
aa_id = zone->GetAlternateAdvancementAbilityByRank(aaLayonHands)->id;
}
else if (!sep->IsNumber(2) || !zone->GetAlternateAdvancementAbility(Strings::ToInt(arg2))) {
c->Message(Chat::Yellow, "You must enter an AA ID.");
@@ -201,10 +201,10 @@ void bot_command_cast(Client* c, const Seperator* sep)
}
else {
++ab_arg;
aaID = Strings::ToInt(arg2);
aa_id = Strings::ToInt(arg2);
}
aaType = true;
aa_type = true;
}
if (!arg1.compare("spellid")) {
@@ -215,8 +215,8 @@ void bot_command_cast(Client* c, const Seperator* sep)
if (sep->IsNumber(2) && IsValidSpell(atoi(sep->arg[2]))) {
++ab_arg;
chosenSpellID = atoi(sep->arg[2]);
bySpellID = true;
chosen_spell_id = atoi(sep->arg[2]);
by_spell_id = true;
}
else {
c->Message(Chat::Yellow, "You must enter a valid spell ID.");
@@ -225,11 +225,11 @@ void bot_command_cast(Client* c, const Seperator* sep)
}
}
if (!aaType && !bySpellID) {
if (!aa_type && !by_spell_id) {
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || (spellType > BotSpellTypes::END && spellType < BotSpellTypes::COMMANDED_START) || spellType > BotSpellTypes::COMMANDED_END) {
if (spell_type < BotSpellTypes::START || (spell_type > BotSpellTypes::END && spell_type < BotSpellTypes::COMMANDED_START) || spell_type > BotSpellTypes::COMMANDED_END) {
c->Message(
Chat::Yellow,
fmt::format(
@@ -245,7 +245,7 @@ void bot_command_cast(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -262,7 +262,7 @@ void bot_command_cast(Client* c, const Seperator* sep)
}
}
switch (spellType) { //Allowed command checks
switch (spell_type) { //Allowed command checks
case BotSpellTypes::Charm:
if (!RuleB(Bots, AllowCommandedCharm)) {
c->Message(Chat::Yellow, "This commanded type is currently disabled.");
@@ -304,50 +304,50 @@ void bot_command_cast(Client* c, const Seperator* sep)
break;
}
std::string argString = sep->arg[ab_arg];
std::string arg_string = sep->arg[ab_arg];
if (!argString.compare("shrink")) {
subType = CommandedSubTypes::Shrink;
if (!arg_string.compare("shrink")) {
sub_type = CommandedSubTypes::Shrink;
++ab_arg;
}
else if (!argString.compare("grow")) {
subType = CommandedSubTypes::Grow;
else if (!arg_string.compare("grow")) {
sub_type = CommandedSubTypes::Grow;
++ab_arg;
}
else if (!argString.compare("see")) {
subType = CommandedSubTypes::SeeInvis;
else if (!arg_string.compare("see")) {
sub_type = CommandedSubTypes::SeeInvis;
++ab_arg;
}
else if (!argString.compare("invis")) {
subType = CommandedSubTypes::Invis;
else if (!arg_string.compare("invis")) {
sub_type = CommandedSubTypes::Invis;
++ab_arg;
}
else if (!argString.compare("undead")) {
subType = CommandedSubTypes::InvisUndead;
else if (!arg_string.compare("undead")) {
sub_type = CommandedSubTypes::InvisUndead;
++ab_arg;
}
else if (!argString.compare("animals")) {
subType = CommandedSubTypes::InvisAnimals;
else if (!arg_string.compare("animals")) {
sub_type = CommandedSubTypes::InvisAnimals;
++ab_arg;
}
else if (!argString.compare("selo")) {
subType = CommandedSubTypes::Selo;
else if (!arg_string.compare("selo")) {
sub_type = CommandedSubTypes::Selo;
++ab_arg;
}
argString = sep->arg[ab_arg];
arg_string = sep->arg[ab_arg];
if (!argString.compare("single")) {
subTargetType = CommandedSubTypes::SingleTarget;
if (!arg_string.compare("single")) {
sub_target_type = CommandedSubTypes::SingleTarget;
++ab_arg;
}
else if (!argString.compare("group")) {
subTargetType = CommandedSubTypes::GroupTarget;
else if (!arg_string.compare("group")) {
sub_target_type = CommandedSubTypes::GroupTarget;
++ab_arg;
}
else if (!argString.compare("ae")) {
subTargetType = CommandedSubTypes::AETarget;
else if (!arg_string.compare("ae")) {
sub_target_type = CommandedSubTypes::AETarget;
++ab_arg;
}
}
@@ -355,27 +355,27 @@ void bot_command_cast(Client* c, const Seperator* sep)
Mob* tar = c->GetTarget();
if (!tar) {
if ((!aaType && !bySpellID) && spellType != BotSpellTypes::Escape && spellType != BotSpellTypes::Pet) {
if ((!aa_type && !by_spell_id) && spell_type != BotSpellTypes::Escape && spell_type != BotSpellTypes::Pet) {
c->Message(Chat::Yellow, "You need a target for that.");
return;
}
}
if (!aaType && !bySpellID) {
if (IsPetBotSpellType(spellType) && !tar->IsPet()) {
if (!aa_type && !by_spell_id) {
if (IsPetBotSpellType(spell_type) && !tar->IsPet()) {
c->Message(
Chat::Yellow,
fmt::format(
"[{}] is an invalid target. {} requires a pet to be targeted.",
tar->GetCleanName(),
tar->GetSpellTypeNameByID(spellType)
tar->GetSpellTypeNameByID(spell_type)
).c_str()
);
return;
}
switch (spellType) { //Target Checks
switch (spell_type) { //Target Checks
case BotSpellTypes::Resurrect:
if (!tar->IsCorpse() || !tar->CastToCorpse()->IsPlayerCorpse()) {
c->Message(
@@ -409,9 +409,9 @@ void bot_command_cast(Client* c, const Seperator* sep)
break;
default:
if (
(IsBotSpellTypeDetrimental(spellType) && !c->IsAttackAllowed(tar)) ||
(IsBotSpellTypeDetrimental(spell_type) && !c->IsAttackAllowed(tar)) ||
(
spellType == BotSpellTypes::Charm &&
spell_type == BotSpellTypes::Charm &&
(
tar->IsClient() ||
tar->IsCorpse() ||
@@ -430,7 +430,7 @@ void bot_command_cast(Client* c, const Seperator* sep)
return;
}
if (IsBotSpellTypeBeneficial(spellType)) {
if (IsBotSpellTypeBeneficial(spell_type)) {
if (
(tar->IsNPC() && !tar->GetOwner()) ||
(tar->GetOwner() && tar->GetOwner()->IsOfClientBot() && !c->IsInGroupOrRaid(tar->GetOwner())) ||
@@ -453,7 +453,7 @@ void bot_command_cast(Client* c, const Seperator* sep)
}
if (
(spellType == BotSpellTypes::Cure || spellType == BotSpellTypes::GroupCures || spellType == BotSpellTypes::PetCures) &&
(spell_type == BotSpellTypes::Cure || spell_type == BotSpellTypes::GroupCures || spell_type == BotSpellTypes::PetCures) &&
!c->CastToBot()->GetNeedsCured(tar)
) {
c->Message(
@@ -468,10 +468,10 @@ void bot_command_cast(Client* c, const Seperator* sep)
}
const int ab_mask = ActionableBots::ABM_Type1;
std::string actionableArg = sep->arg[ab_arg];
std::string actionable_arg = sep->arg[ab_arg];
if (actionableArg.empty()) {
actionableArg = "spawned";
if (actionable_arg.empty()) {
actionable_arg = "spawned";
}
std::string class_race_arg = sep->arg[ab_arg];
@@ -483,19 +483,19 @@ void bot_command_cast(Client* c, const Seperator* sep)
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
if (ActionableBots::PopulateSBL(c, actionable_arg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
BotSpell botSpell;
botSpell.SpellId = 0;
botSpell.SpellIndex = 0;
botSpell.ManaCost = 0;
bool isSuccess = false;
uint16 successCount = 0;
Bot* firstFound = nullptr;
BotSpell bot_spell;
bot_spell.SpellId = 0;
bot_spell.SpellIndex = 0;
bot_spell.ManaCost = 0;
bool is_success = false;
uint16 success_count = 0;
Bot* first_found = nullptr;
for (auto bot_iter : sbl) {
if (!bot_iter->IsInGroupOrRaid(c)) {
@@ -506,31 +506,31 @@ void bot_command_cast(Client* c, const Seperator* sep)
continue;
}
Mob* newTar = tar;
Mob* new_tar = tar;
if (!aaType && !bySpellID) {
if (!SpellTypeRequiresTarget(spellType)) {
newTar = bot_iter;
if (!aa_type && !by_spell_id) {
if (!SpellTypeRequiresTarget(spell_type)) {
new_tar = bot_iter;
}
if (!newTar) {
if (!new_tar) {
continue;
}
if (
IsBotSpellTypeBeneficial(spellType) &&
IsBotSpellTypeBeneficial(spell_type) &&
!RuleB(Bots, CrossRaidBuffingAndHealing) &&
!bot_iter->IsInGroupOrRaid(newTar, true)
!bot_iter->IsInGroupOrRaid(new_tar, true)
) {
continue;
}
if (IsBotSpellTypeDetrimental(spellType) && !bot_iter->IsAttackAllowed(newTar)) {
if (IsBotSpellTypeDetrimental(spell_type) && !bot_iter->IsAttackAllowed(new_tar)) {
bot_iter->BotGroupSay(
bot_iter,
fmt::format(
"I cannot attack [{}].",
newTar->GetCleanName()
new_tar->GetCleanName()
).c_str()
);
@@ -538,14 +538,14 @@ void bot_command_cast(Client* c, const Seperator* sep)
}
}
if (aaType) {
if (!bot_iter->GetAA(zone->GetAlternateAdvancementAbility(aaID)->first_rank_id)) {
if (aa_type) {
if (!bot_iter->GetAA(zone->GetAlternateAdvancementAbility(aa_id)->first_rank_id)) {
continue;
}
AA::Rank* tempRank = nullptr;
AA::Rank*& rank = tempRank;
uint16 spell_id = bot_iter->GetSpellByAA(aaID, rank);
AA::Rank* temp_rank = nullptr;
AA::Rank*& rank = temp_rank;
uint16 spell_id = bot_iter->GetSpellByAA(aa_id, rank);
if (!IsValidSpell(spell_id)) {
continue;
@@ -555,27 +555,27 @@ void bot_command_cast(Client* c, const Seperator* sep)
continue;
}
isSuccess = true;
++successCount;
is_success = true;
++success_count;
continue;
}
else if (bySpellID) {
if (!bot_iter->CanUseBotSpell(chosenSpellID)) {
else if (by_spell_id) {
if (!bot_iter->CanUseBotSpell(chosen_spell_id)) {
continue;
}
if (!tar || (spells[chosenSpellID].target_type == ST_Self && tar != bot_iter)) {
if (!tar || (spells[chosen_spell_id].target_type == ST_Self && tar != bot_iter)) {
tar = bot_iter;
}
if (bot_iter->AttemptForcedCastSpell(tar, chosenSpellID)) {
if (!firstFound) {
firstFound = bot_iter;
if (bot_iter->AttemptForcedCastSpell(tar, chosen_spell_id)) {
if (!first_found) {
first_found = bot_iter;
}
isSuccess = true;
++successCount;
is_success = true;
++success_count;
}
continue;
@@ -583,13 +583,13 @@ void bot_command_cast(Client* c, const Seperator* sep)
else {
bot_iter->SetCommandedSpell(true);
if (bot_iter->AICastSpell(newTar, 100, spellType, subTargetType, subType)) {
if (!firstFound) {
firstFound = bot_iter;
if (bot_iter->AICastSpell(new_tar, 100, spell_type, sub_target_type, sub_type)) {
if (!first_found) {
first_found = bot_iter;
}
isSuccess = true;
++successCount;
is_success = true;
++success_count;
}
bot_iter->SetCommandedSpell(false);
@@ -602,22 +602,22 @@ void bot_command_cast(Client* c, const Seperator* sep)
std::string type = "";
if (aaType) {
type = zone->GetAAName(zone->GetAlternateAdvancementAbility(aaID)->first_rank_id);
if (aa_type) {
type = zone->GetAAName(zone->GetAlternateAdvancementAbility(aa_id)->first_rank_id);
}
else if (bySpellID) {
else if (by_spell_id) {
type = "Forced";
}
else {
type = c->GetSpellTypeNameByID(spellType);
type = c->GetSpellTypeNameByID(spell_type);
}
if (!isSuccess) {
if (!is_success) {
c->Message(
Chat::Yellow,
fmt::format(
"No bots are capable of casting [{}] on {}. This could be due to this to any number of things: range, mana, immune, target type, etc.",
(bySpellID ? spells[chosenSpellID].name : type),
(by_spell_id ? spells[chosen_spell_id].name : type),
tar ? tar->GetCleanName() : "your target"
).c_str()
);
@@ -627,9 +627,9 @@ void bot_command_cast(Client* c, const Seperator* sep)
Chat::Yellow,
fmt::format(
"{} {} [{}]{}",
((successCount == 1 && firstFound) ? firstFound->GetCleanName() : (fmt::format("{}", successCount).c_str())),
((successCount == 1 && firstFound) ? "casted" : "of your bots casted"),
(bySpellID ? spells[chosenSpellID].name : type),
((success_count == 1 && first_found) ? first_found->GetCleanName() : (fmt::format("{}", success_count).c_str())),
((success_count == 1 && first_found) ? "casted" : "of your bots casted"),
(by_spell_id ? spells[chosen_spell_id].name : type),
tar ? (fmt::format(" on {}.", tar->GetCleanName()).c_str()) : "."
).c_str()
);
+45 -45
View File
@@ -106,9 +106,9 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
std::string arg1 = sep->arg[1];
int ab_arg = 2;
bool validOption = false;
uint16 spellType = UINT16_MAX;
uint16 settingType = UINT16_MAX;
bool valid_option = false;
uint16 spell_type = UINT16_MAX;
uint16 setting_type = UINT16_MAX;
std::vector<std::string> options =
{
"all",
@@ -133,25 +133,25 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
};
if (sep->IsNumber(4)) {
spellType = atoi(sep->arg[4]);
spell_type = atoi(sep->arg[4]);
}
else {
spellType = c->GetSpellTypeIDByShortName(sep->arg[4]);
spell_type = c->GetSpellTypeIDByShortName(sep->arg[4]);
}
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
spellType = UINT16_MAX;
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
spell_type = UINT16_MAX;
}
for (int i = 0; i < options.size(); i++) {
if (sep->arg[3] == options[i]) {
settingType = c->GetBotSpellCategoryIDByShortName(sep->arg[3]);
validOption = true;
setting_type = c->GetBotSpellCategoryIDByShortName(sep->arg[3]);
valid_option = true;
break;
}
}
if (!validOption) {
if (!valid_option) {
c->Message(
Chat::Yellow,
fmt::format(
@@ -219,17 +219,17 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
std::string output = "";
if (settingType != UINT16_MAX) {
if (spellType != UINT16_MAX) {
from->CopySettings(to, settingType, spellType);
if (setting_type != UINT16_MAX) {
if (spell_type != UINT16_MAX) {
from->CopySettings(to, setting_type, spell_type);
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
from->CopySettings(to, settingType, i);
from->CopySettings(to, setting_type, i);
}
}
output = from->GetBotSpellCategoryName(settingType);
output = from->GetBotSpellCategoryName(setting_type);
}
else {
if (!strcasecmp(sep->arg[3], "misc")) {
@@ -241,20 +241,20 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
output = "^spellsettings";
}
else if (!strcasecmp(sep->arg[3], "spelltypesettings")) {
if (spellType != UINT16_MAX) {
from->CopySettings(to, BotSettingCategories::SpellHold, spellType);
from->CopySettings(to, BotSettingCategories::SpellDelay, spellType);
from->CopySettings(to, BotSettingCategories::SpellMinThreshold, spellType);
from->CopySettings(to, BotSettingCategories::SpellMaxThreshold, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeAggroCheck, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeMinManaPct, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeMaxManaPct, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeMinHPPct, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeMaxHPPct, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeIdlePriority, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeEngagedPriority, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypePursuePriority, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeAEOrGroupTargetCount, spellType);
if (spell_type != UINT16_MAX) {
from->CopySettings(to, BotSettingCategories::SpellHold, spell_type);
from->CopySettings(to, BotSettingCategories::SpellDelay, spell_type);
from->CopySettings(to, BotSettingCategories::SpellMinThreshold, spell_type);
from->CopySettings(to, BotSettingCategories::SpellMaxThreshold, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeAggroCheck, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeMinManaPct, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeMaxManaPct, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeMinHPPct, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeMaxHPPct, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeIdlePriority, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeEngagedPriority, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypePursuePriority, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeAEOrGroupTargetCount, spell_type);
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
@@ -285,20 +285,20 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
else if (!strcasecmp(sep->arg[3], "all")) {
from->CopySettings(to, BotSettingCategories::BaseSetting);
if (spellType != UINT16_MAX) {
from->CopySettings(to, BotSettingCategories::SpellHold, spellType);
from->CopySettings(to, BotSettingCategories::SpellDelay, spellType);
from->CopySettings(to, BotSettingCategories::SpellMinThreshold, spellType);
from->CopySettings(to, BotSettingCategories::SpellMaxThreshold, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeAggroCheck, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeMinManaPct, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeMaxManaPct, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeMinHPPct, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeMaxHPPct, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeIdlePriority, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeEngagedPriority, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypePursuePriority, spellType);
from->CopySettings(to, BotSettingCategories::SpellTypeAEOrGroupTargetCount, spellType);
if (spell_type != UINT16_MAX) {
from->CopySettings(to, BotSettingCategories::SpellHold, spell_type);
from->CopySettings(to, BotSettingCategories::SpellDelay, spell_type);
from->CopySettings(to, BotSettingCategories::SpellMinThreshold, spell_type);
from->CopySettings(to, BotSettingCategories::SpellMaxThreshold, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeAggroCheck, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeMinManaPct, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeMaxManaPct, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeMinHPPct, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeMaxHPPct, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeIdlePriority, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeEngagedPriority, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypePursuePriority, spell_type);
from->CopySettings(to, BotSettingCategories::SpellTypeAEOrGroupTargetCount, spell_type);
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
@@ -346,9 +346,9 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
"{}'s{}{} settings were copied to {}.",
from->GetCleanName(),
(
spellType != UINT16_MAX ?
spell_type != UINT16_MAX ?
fmt::format(" [{}] ",
c->GetSpellTypeNameByID(spellType)
c->GetSpellTypeNameByID(spell_type)
)
: " "
),
+100 -100
View File
@@ -109,8 +109,8 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
std::string arg1 = sep->arg[1];
int ab_arg = 2;
bool validOption = false;
uint16 spellType = UINT16_MAX;
bool valid_option = false;
uint16 spell_type = UINT16_MAX;
std::vector<std::string> options =
{
"all",
@@ -138,14 +138,14 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
if (sep->IsNumber(2) || c->GetSpellTypeIDByShortName(sep->arg[2]) != UINT16_MAX) {
if (sep->IsNumber(2)) {
spellType = atoi(sep->arg[2]);
spell_type = atoi(sep->arg[2]);
}
if (c->GetSpellTypeIDByShortName(sep->arg[2]) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(sep->arg[2]);
spell_type = c->GetSpellTypeIDByShortName(sep->arg[2]);
}
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -161,12 +161,12 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
break;
}
validOption = true;
valid_option = true;
break;
}
}
if (!validOption) {
if (!valid_option) {
c->Message(
Chat::Yellow,
fmt::format(
@@ -197,212 +197,212 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
Bot* first_found = nullptr;
int success_count = 0;
std::string output = "";
uint8 botStance = 2;
uint8 bot_stance = 2;
for (auto myBot : sbl) {
for (auto my_bot : sbl) {
if (!first_found) {
first_found = myBot;
first_found = my_bot;
}
botStance = myBot->GetBotStance();
bot_stance = my_bot->GetBotStance();
if (!strcasecmp(sep->arg[1], "misc")) {
for (uint16 i = BotBaseSettings::START; i <= BotBaseSettings::END; ++i) {
myBot->SetBotBaseSetting(i, myBot->GetDefaultBotBaseSetting(i, botStance));
my_bot->SetBotBaseSetting(i, my_bot->GetDefaultBotBaseSetting(i, bot_stance));
output = "miscellanous settings";
}
}
else if (!strcasecmp(sep->arg[1], "holds")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellHold(spellType, myBot->GetDefaultSpellHold(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellHold(spell_type, my_bot->GetDefaultSpellHold(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellHold(i, myBot->GetDefaultSpellHold(i, botStance));
my_bot->SetSpellHold(i, my_bot->GetDefaultSpellHold(i, bot_stance));
}
}
output = "hold settings";
}
else if (!strcasecmp(sep->arg[1], "delays")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellDelay(spellType, myBot->GetDefaultSpellDelay(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellDelay(spell_type, my_bot->GetDefaultSpellDelay(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellDelay(i, myBot->GetDefaultSpellDelay(i, botStance));
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i, bot_stance));
}
}
output = "delay settings";
}
else if (!strcasecmp(sep->arg[1], "minthresholds")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellMinThreshold(spellType, myBot->GetDefaultSpellMinThreshold(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellMinThreshold(spell_type, my_bot->GetDefaultSpellMinThreshold(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellMinThreshold(i, myBot->GetDefaultSpellMinThreshold(i, botStance));
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i, bot_stance));
}
}
output = "minimum threshold settings";
}
else if (!strcasecmp(sep->arg[1], "maxthresholds")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellMaxThreshold(spellType, myBot->GetDefaultSpellMaxThreshold(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellMaxThreshold(spell_type, my_bot->GetDefaultSpellMaxThreshold(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellMaxThreshold(i, myBot->GetDefaultSpellMaxThreshold(i, botStance));
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i, bot_stance));
}
}
output = "maximum threshold settings";
}
else if (!strcasecmp(sep->arg[1], "aggrochecks")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellTypeAggroCheck(spellType, myBot->GetDefaultSpellTypeAggroCheck(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellTypeAggroCheck(spell_type, my_bot->GetDefaultSpellTypeAggroCheck(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellTypeAggroCheck(i, myBot->GetDefaultSpellTypeAggroCheck(i, botStance));
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i, bot_stance));
}
}
output = "aggro check settings";
}
else if (!strcasecmp(sep->arg[1], "minmanapct")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellTypeMinManaLimit(spellType, myBot->GetDefaultSpellTypeMinManaLimit(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellTypeMinManaLimit(spell_type, my_bot->GetDefaultSpellTypeMinManaLimit(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellTypeMinManaLimit(i, myBot->GetDefaultSpellTypeMinManaLimit(i, botStance));
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i, bot_stance));
}
}
output = "min mana settings";
}
else if (!strcasecmp(sep->arg[1], "maxmanapct")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellTypeMaxManaLimit(spellType, myBot->GetDefaultSpellTypeMaxManaLimit(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellTypeMaxManaLimit(spell_type, my_bot->GetDefaultSpellTypeMaxManaLimit(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellTypeMaxManaLimit(i, myBot->GetDefaultSpellTypeMaxManaLimit(i, botStance));
my_bot->SetSpellTypeMaxManaLimit(i, my_bot->GetDefaultSpellTypeMaxManaLimit(i, bot_stance));
}
}
output = "max mana settings";
}
else if (!strcasecmp(sep->arg[1], "minhppct")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellTypeMinHPLimit(spellType, myBot->GetDefaultSpellTypeMinHPLimit(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellTypeMinHPLimit(spell_type, my_bot->GetDefaultSpellTypeMinHPLimit(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellTypeMinHPLimit(i, myBot->GetDefaultSpellTypeMinHPLimit(i, botStance));
my_bot->SetSpellTypeMinHPLimit(i, my_bot->GetDefaultSpellTypeMinHPLimit(i, bot_stance));
}
}
output = "min hp settings";
}
else if (!strcasecmp(sep->arg[1], "maxhppct")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellTypeMaxHPLimit(spellType, myBot->GetDefaultSpellTypeMaxHPLimit(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellTypeMaxHPLimit(spell_type, my_bot->GetDefaultSpellTypeMaxHPLimit(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellTypeMaxHPLimit(i, myBot->GetDefaultSpellTypeMaxHPLimit(i, botStance));
my_bot->SetSpellTypeMaxHPLimit(i, my_bot->GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
}
}
output = "max hp settings";
}
else if (!strcasecmp(sep->arg[1], "idlepriority")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Idle, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Idle, myBot->GetClass(), botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetClass(), botStance));
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
}
}
output = "idle priority settings";
}
else if (!strcasecmp(sep->arg[1], "engagedpriority")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Engaged, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Engaged, myBot->GetClass(), botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetClass(), botStance));
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
}
}
output = "engaged priority settings";
}
else if (!strcasecmp(sep->arg[1], "pursuepriority")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Pursue, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Pursue, myBot->GetClass(), botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetClass(), botStance));
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
}
}
output = "pursue priority settings";
}
else if (!strcasecmp(sep->arg[1], "targetcounts")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellTypeAEOrGroupTargetCount(spellType, myBot->GetDefaultSpellTypeAEOrGroupTargetCount(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellTypeAEOrGroupTargetCount(spell_type, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellTypeAEOrGroupTargetCount(i, myBot->GetDefaultSpellTypeAEOrGroupTargetCount(i, botStance));
my_bot->SetSpellTypeAEOrGroupTargetCount(i, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(i, bot_stance));
}
}
output = "target count settings";
}
else if (!strcasecmp(sep->arg[1], "spellsettings")) {
myBot->ResetBotSpellSettings();
my_bot->ResetBotSpellSettings();
output = "^spellsettings";
}
else if (!strcasecmp(sep->arg[1], "spelltypesettings")) {
if (spellType != UINT16_MAX) {
myBot->SetSpellHold(spellType, myBot->GetDefaultSpellHold(spellType, botStance));
myBot->SetSpellDelay(spellType, myBot->GetDefaultSpellDelay(spellType, botStance));
myBot->SetSpellMinThreshold(spellType, myBot->GetDefaultSpellMinThreshold(spellType, botStance));
myBot->SetSpellMaxThreshold(spellType, myBot->GetDefaultSpellMaxThreshold(spellType, botStance));
myBot->SetSpellTypeAggroCheck(spellType, myBot->GetDefaultSpellTypeAggroCheck(spellType, botStance));
myBot->SetSpellTypeMinManaLimit(spellType, myBot->GetDefaultSpellTypeMinManaLimit(spellType, botStance));
myBot->SetSpellTypeMaxManaLimit(spellType, myBot->GetDefaultSpellTypeMaxManaLimit(spellType, botStance));
myBot->SetSpellTypeMinHPLimit(spellType, myBot->GetDefaultSpellTypeMinHPLimit(spellType, botStance));
myBot->SetSpellTypeMaxHPLimit(spellType, myBot->GetDefaultSpellTypeMaxHPLimit(spellType, botStance));
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Idle, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Idle, myBot->GetClass(), botStance));
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Engaged, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Engaged, myBot->GetClass(), botStance));
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Pursue, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Pursue, myBot->GetClass(), botStance));
myBot->SetSpellTypeAEOrGroupTargetCount(spellType, myBot->GetDefaultSpellTypeAEOrGroupTargetCount(spellType, botStance));
if (spell_type != UINT16_MAX) {
my_bot->SetSpellHold(spell_type, my_bot->GetDefaultSpellHold(SpellType, bot_stance));
my_bot->SetSpellDelay(spell_type, my_bot->GetDefaultSpellDelay(spell_type, bot_stance));
my_bot->SetSpellMinThreshold(spell_type, my_bot->GetDefaultSpellMinThreshold(spell_type, bot_stance));
my_bot->SetSpellMaxThreshold(spell_type, my_bot->GetDefaultSpellMaxThreshold(spell_type, bot_stance));
my_bot->SetSpellTypeAggroCheck(spell_type, my_bot->GetDefaultSpellTypeAggroCheck(spell_type, bot_stance));
my_bot->SetSpellTypeMinManaLimit(spell_type, my_bot->GetDefaultSpellTypeMinManaLimit(spell_type, bot_stance));
my_bot->SetSpellTypeMaxManaLimit(spell_type, my_bot->GetDefaultSpellTypeMaxManaLimit(spell_type, bot_stance));
my_bot->SetSpellTypeMinHPLimit(spell_type, my_bot->GetDefaultSpellTypeMinHPLimit(spell_type, bot_stance));
my_bot->SetSpellTypeMaxHPLimit(spell_type, my_bot->GetDefaultSpellTypeMaxHPLimit(spell_type, bot_stance));
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
my_bot->SetSpellTypeAEOrGroupTargetCount(spell_type, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellHold(i, myBot->GetDefaultSpellHold(i, botStance));
myBot->SetSpellDelay(i, myBot->GetDefaultSpellDelay(i, botStance));
myBot->SetSpellMinThreshold(i, myBot->GetDefaultSpellMinThreshold(i, botStance));
myBot->SetSpellMaxThreshold(i, myBot->GetDefaultSpellMaxThreshold(i, botStance));
myBot->SetSpellTypeAggroCheck(i, myBot->GetDefaultSpellTypeAggroCheck(i, botStance));
myBot->SetSpellTypeMinManaLimit(i, myBot->GetDefaultSpellTypeMinManaLimit(i, botStance));
myBot->SetSpellTypeMaxManaLimit(i, myBot->GetDefaultSpellTypeMaxManaLimit(i, botStance));
myBot->SetSpellTypeMinHPLimit(i, myBot->GetDefaultSpellTypeMinHPLimit(i, botStance));
myBot->SetSpellTypeMaxHPLimit(i, myBot->GetDefaultSpellTypeMaxHPLimit(i, botStance));
myBot->SetSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetClass(), botStance));
myBot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetClass(), botStance));
myBot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetClass(), botStance));
myBot->SetSpellTypeAEOrGroupTargetCount(i, myBot->GetDefaultSpellTypeAEOrGroupTargetCount(i, botStance));
my_bot->SetSpellHold(i, my_bot->GetDefaultSpellHold(i, bot_stance));
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i, bot_stance));
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i, bot_stance));
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i, bot_stance));
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i, bot_stance));
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i, bot_stance));
my_bot->SetSpellTypeMaxManaLimit(i, my_bot->GetDefaultSpellTypeMaxManaLimit(i, bot_stance));
my_bot->SetSpellTypeMinHPLimit(i, my_bot->GetDefaultSpellTypeMinHPLimit(i, bot_stance));
my_bot->SetSpellTypeMaxHPLimit(i, my_bot->GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
my_bot->SetSpellTypeAEOrGroupTargetCount(i, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(i, bot_stance));
}
}
@@ -410,29 +410,29 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
}
else if (!strcasecmp(sep->arg[1], "all")) {
for (uint16 i = BotBaseSettings::START; i <= BotBaseSettings::END; ++i) {
myBot->SetBotBaseSetting(i, myBot->GetDefaultBotBaseSetting(i, botStance));
my_bot->SetBotBaseSetting(i, my_bot->GetDefaultBotBaseSetting(i, bot_stance));
}
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
myBot->SetSpellHold(i, myBot->GetDefaultSpellHold(i, botStance));
myBot->SetSpellDelay(i, myBot->GetDefaultSpellDelay(i, botStance));
myBot->SetSpellMinThreshold(i, myBot->GetDefaultSpellMinThreshold(i, botStance));
myBot->SetSpellMaxThreshold(i, myBot->GetDefaultSpellMaxThreshold(i, botStance));
myBot->SetSpellTypeAggroCheck(i, myBot->GetDefaultSpellTypeAggroCheck(i, botStance));
myBot->SetSpellTypeMinManaLimit(i, myBot->GetDefaultSpellTypeMinManaLimit(i, botStance));
myBot->SetSpellTypeMaxManaLimit(i, myBot->GetDefaultSpellTypeMaxManaLimit(i, botStance));
myBot->SetSpellTypeMinHPLimit(i, myBot->GetDefaultSpellTypeMinHPLimit(i, botStance));
myBot->SetSpellTypeMaxHPLimit(i, myBot->GetDefaultSpellTypeMaxHPLimit(i, botStance));
myBot->SetSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetClass(), botStance));
myBot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetClass(), botStance));
myBot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetClass(), botStance));
myBot->SetSpellTypeAEOrGroupTargetCount(i, myBot->GetDefaultSpellTypeAEOrGroupTargetCount(i, botStance));
my_bot->SetSpellHold(i, my_bot->GetDefaultSpellHold(i, bot_stance));
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i, bot_stance));
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i, bot_stance));
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i, bot_stance));
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i, bot_stance));
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i, bot_stance));
my_bot->SetSpellTypeMaxManaLimit(i, my_bot->GetDefaultSpellTypeMaxManaLimit(i, bot_stance));
my_bot->SetSpellTypeMinHPLimit(i, my_bot->GetDefaultSpellTypeMinHPLimit(i, bot_stance));
my_bot->SetSpellTypeMaxHPLimit(i, my_bot->GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
my_bot->SetSpellTypeAEOrGroupTargetCount(i, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(i, bot_stance));
};
myBot->ResetBotSpellSettings();
myBot->ClearBotBlockedBuffs();
my_bot->ResetBotSpellSettings();
my_bot->ClearBotBlockedBuffs();
myBot->Save();
my_bot->Save();
output = "settings";
@@ -448,9 +448,9 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
"{} says, '{}{} were restored.'",
first_found->GetCleanName(),
(
spellType != UINT16_MAX ?
spell_type != UINT16_MAX ?
fmt::format("My [{}] ",
c->GetSpellTypeNameByID(spellType)
c->GetSpellTypeNameByID(spell_type)
)
: "My "
),
@@ -465,9 +465,9 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
"{} of your bot's{}{} were restored.",
success_count,
(
spellType != UINT16_MAX ?
spell_type != UINT16_MAX ?
fmt::format(" [{}] ",
c->GetSpellTypeNameByID(spellType)
c->GetSpellTypeNameByID(spell_type)
)
: " "
),
+20 -20
View File
@@ -131,13 +131,13 @@ void bot_command_depart(Client* c, const Seperator* sep)
tar = c;
}
std::string argString = sep->arg[ab_arg];
std::string arg_string = sep->arg[ab_arg];
const int ab_mask = ActionableBots::ABM_Type1;
std::string actionableArg = sep->arg[ab_arg];
std::string actionable_arg = sep->arg[ab_arg];
if (actionableArg.empty()) {
actionableArg = "spawned";
if (actionable_arg.empty()) {
actionable_arg = "spawned";
}
std::string class_race_arg = sep->arg[ab_arg];
@@ -149,19 +149,19 @@ void bot_command_depart(Client* c, const Seperator* sep)
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
if (ActionableBots::PopulateSBL(c, actionable_arg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
BotSpell botSpell;
botSpell.SpellId = 0;
botSpell.SpellIndex = 0;
botSpell.ManaCost = 0;
BotSpell bot_spell;
bot_spell.SpellId = 0;
bot_spell.SpellIndex = 0;
bot_spell.ManaCost = 0;
bool isSuccess = false;
std::map<std::string, std::pair<uint8_t, uint8_t>> listZones;
bool is_success = false;
std::map<std::string, std::pair<uint8_t, uint8_t>> list_zones;
for (auto bot_iter : sbl) {
if (!bot_iter->IsInGroupOrRaid(tar, !single)) {
@@ -172,9 +172,9 @@ void bot_command_depart(Client* c, const Seperator* sep)
continue;
}
std::vector<BotSpell_wPriority> botSpellListItr = bot_iter->GetPrioritizedBotSpellsBySpellType(bot_iter, BotSpellTypes::Teleport, tar);
std::vector<BotSpell_wPriority> bot_spell_list_itr = bot_iter->GetPrioritizedBotSpellsBySpellType(bot_iter, BotSpellTypes::Teleport, tar);
for (std::vector<BotSpell_wPriority>::iterator itr = botSpellListItr.begin(); itr != botSpellListItr.end(); ++itr) {
for (std::vector<BotSpell_wPriority>::iterator itr = bot_spell_list_itr.begin(); itr != bot_spell_list_itr.end(); ++itr) {
if (!IsValidSpell(itr->SpellId)) {
continue;
}
@@ -188,9 +188,9 @@ void bot_command_depart(Client* c, const Seperator* sep)
}
if (list) {
auto it = listZones.find(spells[itr->SpellId].teleport_zone);
auto it = list_zones.find(spells[itr->SpellId].teleport_zone);
if (it != listZones.end()) {
if (it != list_zones.end()) {
const auto& [val1, val2] = it->second;
if (val1 == spells[itr->SpellId].target_type && val2 == bot_iter->GetClass()) {
@@ -214,7 +214,7 @@ void bot_command_depart(Client* c, const Seperator* sep)
).c_str()
);
listZones.insert({ spells[itr->SpellId].teleport_zone, {spells[itr->SpellId].target_type, bot_iter->GetClass()} });
list_zones.insert({ spells[itr->SpellId].teleport_zone, {spells[itr->SpellId].target_type, bot_iter->GetClass()} });
continue;
}
@@ -268,12 +268,12 @@ void bot_command_depart(Client* c, const Seperator* sep)
);
}
isSuccess = true;
is_success = true;
}
bot_iter->SetCommandedSpell(false);
if (isSuccess) {
if (is_success) {
return;
}
else {
@@ -283,8 +283,8 @@ void bot_command_depart(Client* c, const Seperator* sep)
}
if (
(list && listZones.empty()) ||
(!list && !isSuccess)
(list && list_zones.empty()) ||
(!list && !is_success)
) {
c->Message(
Chat::Yellow,
+33 -33
View File
@@ -122,10 +122,10 @@ void bot_command_discipline(Client* c, const Seperator* sep)
}
const int ab_mask = ActionableBots::ABM_Type1;
std::string actionableArg = sep->arg[ab_arg];
std::string actionable_arg = sep->arg[ab_arg];
if (actionableArg.empty()) {
actionableArg = "spawned";
if (actionable_arg.empty()) {
actionable_arg = "spawned";
}
std::string class_race_arg = sep->arg[ab_arg];
@@ -137,15 +137,15 @@ void bot_command_discipline(Client* c, const Seperator* sep)
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
if (ActionableBots::PopulateSBL(c, actionable_arg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
bool isSuccess = false;
uint16 successCount = 0;
Bot* firstFound = nullptr;
bool is_success = false;
uint16 success_count = 0;
Bot* first_found = nullptr;
for (auto bot_iter : sbl) {
if (!bot_iter->IsInGroupOrRaid(c)) {
@@ -157,22 +157,22 @@ void bot_command_discipline(Client* c, const Seperator* sep)
}
if (spell_id == UINT16_MAX) { // Aggressive/Defensive type
std::vector<BotSpells_Struct_wIndex> botSpellList;
std::vector<BotSpells_Struct_wIndex> bot_spell_list;
if (aggressive) {
botSpellList = bot_iter->BotGetSpellsByType(BotSpellTypes::DiscAggressive);
bot_spell_list = bot_iter->BotGetSpellsByType(BotSpellTypes::DiscAggressive);
}
else if (defensive) {
botSpellList = bot_iter->BotGetSpellsByType(BotSpellTypes::DiscDefensive);
bot_spell_list = bot_iter->BotGetSpellsByType(BotSpellTypes::DiscDefensive);
}
for (int i = botSpellList.size() - 1; i >= 0; i--) {
if (!IsValidSpell(botSpellList[i].spellid)) {
for (int i = bot_spell_list.size() - 1; i >= 0; i--) {
if (!IsValidSpell(bot_spell_list[i].spellid)) {
continue;
}
if (!bot_iter->CheckDisciplineReuseTimer(botSpellList[i].spellid)) {
uint32 remaining_time = (bot_iter->GetDisciplineReuseRemainingTime(botSpellList[i].spellid) / 1000);
if (!bot_iter->CheckDisciplineReuseTimer(bot_spell_list[i].spellid)) {
uint32 remaining_time = (bot_iter->GetDisciplineReuseRemainingTime(bot_spell_list[i].spellid) / 1000);
bot_iter->OwnerMessage(
fmt::format(
@@ -184,30 +184,30 @@ void bot_command_discipline(Client* c, const Seperator* sep)
continue;
}
if (bot_iter->GetEndurance() < spells[botSpellList[i].spellid].endurance_cost) {
if (bot_iter->GetEndurance() < spells[bot_spell_list[i].spellid].endurance_cost) {
continue;
}
if (bot_iter->DivineAura() && !IsCastNotStandingSpell(botSpellList[i].spellid)) {
if (bot_iter->DivineAura() && !IsCastNotStandingSpell(bot_spell_list[i].spellid)) {
continue;
}
if (spells[botSpellList[i].spellid].buff_duration_formula != 0 && spells[botSpellList[i].spellid].target_type == ST_Self && bot_iter->HasDiscBuff()) {
if (spells[bot_spell_list[i].spellid].buff_duration_formula != 0 && spells[bot_spell_list[i].spellid].target_type == ST_Self && bot_iter->HasDiscBuff()) {
continue;
}
if (!tar || (spells[botSpellList[i].spellid].target_type == ST_Self && tar != bot_iter)) {
if (!tar || (spells[bot_spell_list[i].spellid].target_type == ST_Self && tar != bot_iter)) {
tar = bot_iter;
}
if (bot_iter->AttemptForcedCastSpell(tar, botSpellList[i].spellid, true)) {
if (!firstFound) {
firstFound = bot_iter;
if (bot_iter->AttemptForcedCastSpell(tar, bot_spell_list[i].spellid, true)) {
if (!first_found) {
first_found = bot_iter;
}
isSuccess = true;
++successCount;
spell_id = botSpellList[i].spellid;
is_success = true;
++success_count;
spell_id = bot_spell_list[i].spellid;
}
}
}
@@ -252,19 +252,19 @@ void bot_command_discipline(Client* c, const Seperator* sep)
}
if (bot_iter->AttemptForcedCastSpell(tar, spell_id, true)) {
if (!firstFound) {
firstFound = bot_iter;
if (!first_found) {
first_found = bot_iter;
}
isSuccess = true;
++successCount;
is_success = true;
++success_count;
}
}
continue;
}
if (!isSuccess) {
if (!is_success) {
c->Message(Chat::Yellow, "No bots were selected.");
}
else {
@@ -273,8 +273,8 @@ void bot_command_discipline(Client* c, const Seperator* sep)
Chat::Yellow,
fmt::format(
"{} {} {} {} discipline.",
((successCount == 1 && firstFound) ? firstFound->GetCleanName() : (fmt::format("{}", successCount).c_str())),
((successCount == 1 && firstFound) ? "used" : "of your bots used"),
((success_count == 1 && first_found) ? first_found->GetCleanName() : (fmt::format("{}", success_count).c_str())),
((success_count == 1 && first_found) ? "used" : "of your bots used"),
(aggressive ? "an" : "a"),
(aggressive ? "aggressive" : "defensive")
).c_str()
@@ -285,8 +285,8 @@ void bot_command_discipline(Client* c, const Seperator* sep)
Chat::Yellow,
fmt::format(
"{} {} their {} [#{}] discipline.",
((successCount == 1 && firstFound) ? firstFound->GetCleanName() : (fmt::format("{}", successCount).c_str())),
((successCount == 1 && firstFound) ? "used" : "of your bots used"),
((success_count == 1 && first_found) ? first_found->GetCleanName() : (fmt::format("{}", success_count).c_str())),
((success_count == 1 && first_found) ? "used" : "of your bots used"),
spells[spell_id].name,
spell_id
).c_str()
+19 -19
View File
@@ -82,7 +82,7 @@ void bot_command_follow(Client* c, const Seperator* sep)
bool chain = false;
bool reset = false;
bool currentCheck = false;
bool current_check = false;
int ab_arg = 1;
Mob* target_mob = nullptr;
@@ -94,7 +94,7 @@ void bot_command_follow(Client* c, const Seperator* sep)
++ab_arg;
}
else if (!optional_arg.compare("current")) {
currentCheck = true;
current_check = true;
++ab_arg;
}
else {
@@ -124,13 +124,13 @@ void bot_command_follow(Client* c, const Seperator* sep)
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
auto botCount = sbl.size();
auto bot_count = sbl.size();
Mob* follow_mob = nullptr;
std::list<Bot*> chainList;
std::list<Bot*>::const_iterator it = chainList.begin();
std::list<Bot*> chain_list;
std::list<Bot*>::const_iterator it = chain_list.begin();
uint16 count = 0;
for (auto bot_iter : sbl) {
if (currentCheck) {
if (current_check) {
follow_mob = entity_list.GetMob(bot_iter->GetFollowID());
c->Message(
@@ -150,7 +150,7 @@ void bot_command_follow(Client* c, const Seperator* sep)
}
if (bot_iter == target_mob) {
if (botCount == 1) {
if (bot_count == 1) {
c->Message(
Chat::Yellow,
fmt::format(
@@ -167,13 +167,13 @@ void bot_command_follow(Client* c, const Seperator* sep)
}
bot_iter->WipeHateList();
--botCount;
--bot_count;
continue;
}
if (!bot_iter->IsInGroupOrRaid(target_mob)) {
--botCount;
--bot_count;
continue;
}
@@ -191,20 +191,20 @@ void bot_command_follow(Client* c, const Seperator* sep)
}
else {
if (chain) {
Mob* nextTar = target_mob;
Mob* next_tar = target_mob;
if (count > 0) {
nextTar = *it;
next_tar = *it;
if (!nextTar) {
nextTar = target_mob;
if (!next_tar) {
next_tar = target_mob;
}
}
chainList.push_back(bot_iter);
chain_list.push_back(bot_iter);
++it;
++count;
bot_iter->SetFollowID(nextTar->GetID());
bot_iter->SetFollowID(next_tar->GetID());
}
else {
bot_iter->SetFollowID(target_mob->GetID());
@@ -222,13 +222,13 @@ void bot_command_follow(Client* c, const Seperator* sep)
bot_iter->GetPet()->SetFollowID(bot_iter->GetID());
}
if (currentCheck || !botCount) {
if (current_check || !bot_count) {
return;
}
follow_mob = target_mob;
if (botCount == 1) {
if (bot_count == 1) {
follow_mob = entity_list.GetMob(sbl.front()->GetFollowID());
c->Message(
@@ -246,7 +246,7 @@ void bot_command_follow(Client* c, const Seperator* sep)
Chat::Green,
fmt::format(
"{} of your bots are following you.",
botCount
bot_count
).c_str()
);
}
@@ -255,7 +255,7 @@ void bot_command_follow(Client* c, const Seperator* sep)
Chat::Green,
fmt::format(
"{} of your bots are {} {}.",
botCount,
bot_count,
chain ? "chain following" : "following",
follow_mob ? follow_mob->GetCleanName() : "you"
).c_str()
+5 -5
View File
@@ -82,12 +82,12 @@ void bot_command_illusion_block(Client* c, const Seperator* sep)
int ab_arg = 1;
bool current_check = false;
uint32 typeValue = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
typeValue = atoi(sep->arg[1]);
type_value = atoi(sep->arg[1]);
++ab_arg;
if (typeValue < 0 || typeValue > 1) {
if (type_value < 0 || type_value > 1) {
c->Message(Chat::Yellow, "You must enter either 0 for disabled or 1 for enabled.");
return;
@@ -147,7 +147,7 @@ void bot_command_illusion_block(Client* c, const Seperator* sep)
);
}
else {
my_bot->SetIllusionBlock(typeValue);
my_bot->SetIllusionBlock(type_value);
++success_count;
}
}
@@ -168,7 +168,7 @@ void bot_command_illusion_block(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots {} block illusions.",
success_count,
typeValue ? "will now" : "will no longer"
type_value ? "will now" : "will no longer"
).c_str()
);
}
+4 -4
View File
@@ -123,10 +123,10 @@ void bot_command_item_use(Client* c, const Seperator* sep)
}
const int ab_mask = ActionableBots::ABM_Type1;
std::string actionableArg = sep->arg[ab_arg];
std::string actionable_arg = sep->arg[ab_arg];
if (actionableArg.empty()) {
actionableArg = "spawned";
if (actionable_arg.empty()) {
actionable_arg = "spawned";
}
std::string class_race_arg = sep->arg[ab_arg];
@@ -138,7 +138,7 @@ void bot_command_item_use(Client* c, const Seperator* sep)
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
if (ActionableBots::PopulateSBL(c, actionable_arg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
+5 -5
View File
@@ -81,12 +81,12 @@ void bot_command_max_melee_range(Client* c, const Seperator* sep)
int ab_arg = 1;
bool current_check = false;
uint32 typeValue = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
typeValue = atoi(sep->arg[1]);
type_value = atoi(sep->arg[1]);
++ab_arg;
if (typeValue < 0 || typeValue > 1) {
if (type_value < 0 || type_value > 1) {
c->Message(Chat::Yellow, "You must enter either 0 for disabled or 1 for enabled.");
return;
@@ -146,7 +146,7 @@ void bot_command_max_melee_range(Client* c, const Seperator* sep)
);
}
else {
my_bot->SetMaxMeleeRange(typeValue);
my_bot->SetMaxMeleeRange(type_value);
++success_count;
}
}
@@ -167,7 +167,7 @@ void bot_command_max_melee_range(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots {} stay at max melee range.",
success_count,
typeValue ? "will now" : "will no longer"
type_value ? "will now" : "will no longer"
).c_str()
);
}
+58 -69
View File
@@ -228,10 +228,10 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
}
const int ab_mask = ActionableBots::ABM_Type1;
std::string actionableArg = sep->arg[ab_arg];
std::string actionable_arg = sep->arg[ab_arg];
if (actionableArg.empty()) {
actionableArg = "target";
if (actionable_arg.empty()) {
actionable_arg = "target";
}
std::string class_race_arg = sep->arg[ab_arg];
@@ -243,17 +243,17 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
if (ActionableBots::PopulateSBL(c, actionable_arg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
std::string currentType;
std::string current_type;
uint16 reclaim_energy_id = RuleI(Bots, ReclaimEnergySpellID);
bool isSuccess = false;
uint16 successCount = 0;
Bot* firstFound = nullptr;
bool is_success = false;
uint16 success_count = 0;
Bot* first_found = nullptr;
for (auto bot_iter : sbl) {
if (bot_iter->GetClass() != Class::Magician) {
@@ -284,28 +284,28 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
if (current_check) {
switch (bot_iter->GetPetChooserID()) {
case 0:
currentType = "auto";
current_type = "auto";
break;
case SumWater:
currentType = "water";
current_type = "water";
break;
case SumFire:
currentType = "fire";
current_type = "fire";
break;
case SumAir:
currentType = "air";
current_type = "air";
break;
case SumEarth:
currentType = "earth";
current_type = "earth";
break;
case MonsterSum:
currentType = "monster";
current_type = "monster";
break;
case SumMageMultiElement:
currentType = "epic";
current_type = "epic";
break;
default:
currentType = "null";
current_type = "null";
break;
}
@@ -314,22 +314,22 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
fmt::format(
"{} says, 'I'm currently summoning {} pets.'",
bot_iter->GetCleanName(),
currentType
current_type
).c_str()
);
continue;
}
uint8 airMinLevel = 255;
uint8 fireMinLevel = 255;
uint8 waterMinLevel = 255;
uint8 earthMinLevel = 255;
uint8 monsterMinLevel = 255;
uint8 epicMinLevel = 255;
std::list<BotSpell> botSpellList = bot_iter->GetBotSpellsBySpellType(bot_iter, BotSpellTypes::Pet);
uint8 air_min_level = 255;
uint8 fire_min_level = 255;
uint8 water_min_level = 255;
uint8 earth_min_level = 255;
uint8 monster_min_level = 255;
uint8 epic_min_level = 255;
std::list<BotSpell> bot_spell_list = bot_iter->GetBotSpellsBySpellType(bot_iter, BotSpellTypes::Pet);
for (const auto& s : botSpellList) {
for (const auto& s : bot_spell_list) {
if (!IsValidSpell(s.SpellId)) {
continue;
}
@@ -340,65 +340,54 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
auto spell = spells[s.SpellId];
if (!strncmp(spell.teleport_zone, "SumWater", 8) && spell.classes[Class::Magician - 1] < waterMinLevel) {
waterMinLevel = spell.classes[Class::Magician - 1];
if (!strncmp(spell.teleport_zone, "SumWater", 8) && spell.classes[Class::Magician - 1] < water_min_level) {
water_min_level = spell.classes[Class::Magician - 1];
}
else if (!strncmp(spell.teleport_zone, "SumFire", 7) && spell.classes[Class::Magician - 1] < fireMinLevel) {
fireMinLevel = spell.classes[Class::Magician - 1];
else if (!strncmp(spell.teleport_zone, "SumFire", 7) && spell.classes[Class::Magician - 1] < fire_min_level) {
fire_min_level = spell.classes[Class::Magician - 1];
}
else if (!strncmp(spell.teleport_zone, "SumAir", 6) && spell.classes[Class::Magician - 1] < airMinLevel) {
airMinLevel = spell.classes[Class::Magician - 1];
else if (!strncmp(spell.teleport_zone, "SumAir", 6) && spell.classes[Class::Magician - 1] < air_min_level) {
air_min_level = spell.classes[Class::Magician - 1];
}
else if (!strncmp(spell.teleport_zone, "SumEarth", 8) && spell.classes[Class::Magician - 1] < earthMinLevel) {
earthMinLevel = spell.classes[Class::Magician - 1];
else if (!strncmp(spell.teleport_zone, "SumEarth", 8) && spell.classes[Class::Magician - 1] < earth_min_level) {
earth_min_level = spell.classes[Class::Magician - 1];
}
else if (!strncmp(spell.teleport_zone, "MonsterSum", 10) && spell.classes[Class::Magician - 1] < monsterMinLevel) {
monsterMinLevel = spell.classes[Class::Magician - 1];
else if (!strncmp(spell.teleport_zone, "MonsterSum", 10) && spell.classes[Class::Magician - 1] < monster_min_level) {
monster_min_level = spell.classes[Class::Magician - 1];
}
}
uint8 minLevel = std::min({
waterMinLevel,
fireMinLevel,
airMinLevel,
earthMinLevel,
monsterMinLevel
uint8 min_level = std::min({
water_min_level,
fire_min_level,
air_min_level,
earth_min_level,
monster_min_level
});
epicMinLevel = RuleI(Bots, AllowMagicianEpicPetLevel);
LogTestDebug("{} says, 'minLevel = {} | waterMinLevel = {} | fireMinLevel = {} | airMinLevel = {} | earthMinLevel = {} | monsterMinLevel = {} | epicMinLevel = {}'",
bot_iter->GetCleanName(),
minLevel,
waterMinLevel,
fireMinLevel,
airMinLevel,
earthMinLevel,
monsterMinLevel,
epicMinLevel
); //deleteme
epic_min_level = RuleI(Bots, AllowMagicianEpicPetLevel);
switch (pet_type) {
case 0:
level_req = minLevel;
level_req = min_level;
break;
case SumWater:
level_req = waterMinLevel;
level_req = water_min_level;
break;
case SumFire:
level_req = fireMinLevel;
level_req = fire_min_level;
break;
case SumAir:
level_req = airMinLevel;
level_req = air_min_level;
break;
case SumEarth:
level_req = earthMinLevel;
level_req = earth_min_level;
break;
case MonsterSum:
level_req = monsterMinLevel;
level_req = monster_min_level;
break;
case SumMageMultiElement:
level_req = epicMinLevel;
level_req = epic_min_level;
break;
default:
break;
@@ -416,31 +405,31 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
bot_iter->CastSpell(reclaim_energy_id, pet_id);
}
if (!firstFound) {
firstFound = bot_iter;
if (!first_found) {
first_found = bot_iter;
}
isSuccess = true;
++successCount;
is_success = true;
++success_count;
}
if (current_check) {
return;
}
if (!isSuccess) {
if (!is_success) {
c->Message(Chat::Yellow, "No bots were selected.");
return;
}
if (successCount == 1 && firstFound) {
if (success_count == 1 && first_found) {
c->Message(
Chat::Green,
fmt::format(
"{} says, 'I will now summon {} pets.'",
firstFound->GetCleanName(),
currentType
first_found->GetCleanName(),
current_type
).c_str()
);
}
@@ -449,7 +438,7 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
Chat::Green,
fmt::format(
"{} of your bots will now summon {} pets.",
successCount,
success_count,
arg1
).c_str()
);
+4 -4
View File
@@ -15,10 +15,10 @@ void bot_command_pull(Client *c, const Seperator *sep)
std::string arg1 = sep->arg[1];
int ab_arg = 1;
std::string actionableArg = sep->arg[ab_arg];
std::string actionable_arg = sep->arg[ab_arg];
if (actionableArg.empty()) {
actionableArg = "spawned";
if (actionable_arg.empty()) {
actionable_arg = "spawned";
}
std::string class_race_arg = sep->arg[ab_arg];
@@ -30,7 +30,7 @@ void bot_command_pull(Client *c, const Seperator *sep)
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
if (ActionableBots::PopulateSBL(c, actionable_arg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
+5 -5
View File
@@ -81,12 +81,12 @@ void bot_command_sit_hp_percent(Client* c, const Seperator* sep)
int ab_arg = 1;
bool current_check = false;
uint32 typeValue = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
typeValue = atoi(sep->arg[1]);
type_value = atoi(sep->arg[1]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100 (0%% to 100%% of health).");
return;
@@ -146,7 +146,7 @@ void bot_command_sit_hp_percent(Client* c, const Seperator* sep)
);
}
else {
my_bot->SetSitHPPct(typeValue);
my_bot->SetSitHPPct(type_value);
++success_count;
}
}
@@ -167,7 +167,7 @@ void bot_command_sit_hp_percent(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots will now sit in combat whem at or below [{}%%] HP.'",
success_count,
typeValue
type_value
).c_str()
);
}
+5 -5
View File
@@ -81,12 +81,12 @@ void bot_command_sit_in_combat(Client* c, const Seperator* sep)
int ab_arg = 1;
bool current_check = false;
uint32 typeValue = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
typeValue = atoi(sep->arg[1]);
type_value = atoi(sep->arg[1]);
++ab_arg;
if (typeValue < 0 || typeValue > 1) {
if (type_value < 0 || type_value > 1) {
c->Message(Chat::Yellow, "You must enter either 0 for disabled or 1 for enabled.");
return;
@@ -146,7 +146,7 @@ void bot_command_sit_in_combat(Client* c, const Seperator* sep)
);
}
else {
my_bot->SetMedInCombat(typeValue);
my_bot->SetMedInCombat(type_value);
++success_count;
}
}
@@ -167,7 +167,7 @@ void bot_command_sit_in_combat(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots {} sit in combat.",
success_count,
typeValue ? "will now" : "will no longer"
type_value ? "will now" : "will no longer"
).c_str()
);
}
+5 -5
View File
@@ -81,12 +81,12 @@ void bot_command_sit_mana_percent(Client* c, const Seperator* sep)
int ab_arg = 1;
bool current_check = false;
uint32 typeValue = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
typeValue = atoi(sep->arg[1]);
type_value = atoi(sep->arg[1]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100 (0%% to 100%% of health).");
return;
@@ -146,7 +146,7 @@ void bot_command_sit_mana_percent(Client* c, const Seperator* sep)
);
}
else {
my_bot->SetSitManaPct(typeValue);
my_bot->SetSitManaPct(type_value);
++success_count;
}
}
@@ -167,7 +167,7 @@ void bot_command_sit_mana_percent(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots will now sit in combat whem at or below [{}%%] mana.'",
success_count,
typeValue
TypeValue
).c_str()
);
}
+14 -14
View File
@@ -111,14 +111,14 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -126,7 +126,7 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -144,9 +144,9 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 1) {
if (type_value < 0 || type_value > 1) {
c->Message(Chat::Yellow, "You must enter either 0 for disabled or 1 for enabled.");
return;
@@ -201,13 +201,13 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] aggro check is currently [{}].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellTypeAggroCheck(spellType) ? "enabled" : "disabled"
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellTypeAggroCheck(spell_type) ? "enabled" : "disabled"
).c_str()
);
}
else {
my_bot->SetSpellTypeAggroCheck(spellType, typeValue);
my_bot->SetSpellTypeAggroCheck(spell_type, type_value);
++success_count;
}
}
@@ -218,8 +218,8 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] aggro check was [{}].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellTypeAggroCheck(spellType) ? "enabled" : "disabled"
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellTypeAggroCheck(spell_type) ? "enabled" : "disabled"
).c_str()
);
}
@@ -229,8 +229,8 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots [{}] their [{}] aggro check.",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue ? "enabled" : "disabled"
c->GetSpellTypeNameByID(spell_type),
type_value ? "enabled" : "disabled"
).c_str()
);
}
+14 -14
View File
@@ -117,14 +117,14 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -132,7 +132,7 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -150,9 +150,9 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 1 || typeValue > 60000) {
if (type_value < 1 || type_value > 60000) {
c->Message(Chat::Yellow, "You must enter a value between 1-60000 (1ms to 60s).");
return;
@@ -207,13 +207,13 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] spell delay is currently [{}] seconds.'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellDelay(spellType) / 1000.00
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellDelay(spell_type) / 1000.00
).c_str()
);
}
else {
my_bot->SetSpellDelay(spellType, typeValue);
my_bot->SetSpellDelay(spell_type, type_value);
++success_count;
}
}
@@ -224,8 +224,8 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] spell delay was set to [{}] seconds.'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellDelay(spellType) / 1000.00
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellDelay(spell_type) / 1000.00
).c_str()
);
}
@@ -235,8 +235,8 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] spell delay to [{}] seconds.",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue / 1000.00
c->GetSpellTypeNameByID(spell_type),
type_value / 1000.00
).c_str()
);
}
+14 -14
View File
@@ -115,14 +115,14 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -130,7 +130,7 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -148,9 +148,9 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100.");
return;
@@ -205,13 +205,13 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] engaged cast priority is currently [{}].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellTypePriority(spellType, BotPriorityCategories::Engaged)
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellTypePriority(spell_type, BotPriorityCategories::Engaged)
).c_str()
);
}
else {
my_bot->SetSpellTypePriority(spellType, BotPriorityCategories::Engaged, typeValue);
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Engaged, type_value);
++success_count;
}
}
@@ -222,8 +222,8 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] engaged cast priority was set to [{}].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellTypePriority(spellType, BotPriorityCategories::Engaged)
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellTypePriority(spell_type, BotPriorityCategories::Engaged)
).c_str()
);
}
@@ -233,8 +233,8 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] engaged cast priority to [{}].",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue
c->GetSpellTypeNameByID(spell_type),
type_value
).c_str()
);
}
+14 -14
View File
@@ -101,14 +101,14 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -116,7 +116,7 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -134,9 +134,9 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 1) {
if (type_value < 0 || type_value > 1) {
c->Message(Chat::Yellow, "You must enter either 0 for disabled or 1 for enabled.");
return;
@@ -186,13 +186,13 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] spell hold is currently [{}].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellHold(spellType) ? "enabled" : "disabled"
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellHold(spell_type) ? "enabled" : "disabled"
).c_str()
);
}
else {
my_bot->SetSpellHold(spellType, typeValue);
my_bot->SetSpellHold(spell_type, type_value);
++success_count;
}
}
@@ -203,8 +203,8 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] spell hold was [{}].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellHold(spellType) ? "enabled" : "disabled"
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellHold(spell_type) ? "enabled" : "disabled"
).c_str()
);
}
@@ -214,8 +214,8 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots [{}] their [{}] spell hold.",
success_count,
typeValue ? "enabled" : "disabled",
c->GetSpellTypeNameByID(spellType)
type_value ? "enabled" : "disabled",
c->GetSpellTypeNameByID(spell_type)
).c_str()
);
}
+14 -14
View File
@@ -115,14 +115,14 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -130,7 +130,7 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -148,9 +148,9 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100.");
return;
@@ -205,13 +205,13 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] idle cast priority is currently [{}].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellTypePriority(spellType, BotPriorityCategories::Idle)
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellTypePriority(spell_type, BotPriorityCategories::Idle)
).c_str()
);
}
else {
my_bot->SetSpellTypePriority(spellType, BotPriorityCategories::Idle, typeValue);
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Idle, type_value);
++success_count;
}
}
@@ -222,8 +222,8 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] idle cast priority was set to [{}].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellTypePriority(spellType, BotPriorityCategories::Idle)
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellTypePriority(spell_type, BotPriorityCategories::Idle)
).c_str()
);
}
@@ -233,8 +233,8 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] idle cast priority to [{}].",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue
c->GetSpellTypeNameByID(spell_type),
type_value
).c_str()
);
}
+14 -14
View File
@@ -111,14 +111,14 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -126,7 +126,7 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -144,9 +144,9 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100 (0%% to 100%% of health).");
return;
@@ -201,13 +201,13 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] maximum HP is currently [{}%%].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellTypeMaxHPLimit(spellType)
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellTypeMaxHPLimit(spell_type)
).c_str()
);
}
else {
my_bot->SetSpellTypeMaxHPLimit(spellType, typeValue);
my_bot->SetSpellTypeMaxHPLimit(spell_type, type_value);
++success_count;
}
}
@@ -218,8 +218,8 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] maximum HP was set to [{}%%].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellTypeMaxHPLimit(spellType)
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellTypeMaxHPLimit(spell_type)
).c_str()
);
}
@@ -229,8 +229,8 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] maximum HP to [{}%%].",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue
c->GetSpellTypeNameByID(spell_type),
type_value
).c_str()
);
}
+14 -14
View File
@@ -111,14 +111,14 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -126,7 +126,7 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -144,9 +144,9 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100 (0%% to 100%% of mana).");
return;
@@ -201,13 +201,13 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] maximum mana is currently [{}%%].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellTypeMaxManaLimit(spellType)
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellTypeMaxManaLimit(spell_type)
).c_str()
);
}
else {
my_bot->SetSpellTypeMaxManaLimit(spellType, typeValue);
my_bot->SetSpellTypeMaxManaLimit(spell_type, type_value);
++success_count;
}
}
@@ -218,8 +218,8 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] maximum mana was set to [{}%%].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellTypeMaxManaLimit(spellType)
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellTypeMaxManaLimit(spell_type)
).c_str()
);
}
@@ -229,8 +229,8 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] maximum mana to [{}%%].",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue
c->GetSpellTypeNameByID(spell_type),
type_value
).c_str()
);
}
+14 -14
View File
@@ -117,14 +117,14 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -132,7 +132,7 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -150,9 +150,9 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100 (0%% to 100%% of health).");
return;
@@ -207,13 +207,13 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] maximum threshold is currently [{}%%].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellMaxThreshold(spellType)
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellMaxThreshold(spell_type)
).c_str()
);
}
else {
my_bot->SetSpellMaxThreshold(spellType, typeValue);
my_bot->SetSpellMaxThreshold(spell_type, type_value);
++success_count;
}
}
@@ -224,8 +224,8 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] maximum threshold was set to [{}%%].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellMaxThreshold(spellType)
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellMaxThreshold(spell_type)
).c_str()
);
}
@@ -235,8 +235,8 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] maximum threshold to [{}%%].",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue
c->GetSpellTypeNameByID(spell_type),
type_value
).c_str()
);
}
+14 -14
View File
@@ -111,14 +111,14 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -126,7 +126,7 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -144,9 +144,9 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100 (0%% to 100%% of mana).");
return;
@@ -201,13 +201,13 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] minimum HP is currently [{}%%].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellTypeMinHPLimit(spellType)
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellTypeMinHPLimit(spell_type)
).c_str()
);
}
else {
my_bot->SetSpellTypeMinHPLimit(spellType, typeValue);
my_bot->SetSpellTypeMinHPLimit(spell_type, type_value);
++success_count;
}
}
@@ -218,8 +218,8 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] minimum HP was set to [{}%%].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellTypeMinHPLimit(spellType)
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellTypeMinHPLimit(spell_type)
).c_str()
);
}
@@ -229,8 +229,8 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] minimum HP to [{}%%].",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue
c->GetSpellTypeNameByID(spell_type),
type_value
).c_str()
);
}
+14 -14
View File
@@ -111,14 +111,14 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -126,7 +126,7 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -144,9 +144,9 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100 (0%% to 100%% of mana).");
return;
@@ -201,13 +201,13 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] minimum mana is currently [{}%%].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellTypeMinManaLimit(spellType)
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellTypeMinManaLimit(spell_type)
).c_str()
);
}
else {
my_bot->SetSpellTypeMinManaLimit(spellType, typeValue);
my_bot->SetSpellTypeMinManaLimit(spell_type, type_value);
++success_count;
}
}
@@ -218,8 +218,8 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] minimum mana was set to [{}%%].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellTypeMinManaLimit(spellType)
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellTypeMinManaLimit(spell_type)
).c_str()
);
}
@@ -229,8 +229,8 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] minimum mana to [{}%%].",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue
c->GetSpellTypeNameByID(spell_type),
type_value
).c_str()
);
}
+14 -14
View File
@@ -119,14 +119,14 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -134,7 +134,7 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -152,9 +152,9 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100 (0%% to 100%% of health).");
return;
@@ -209,13 +209,13 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] minimum threshold is currently [{}%%].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellMinThreshold(spellType)
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellMinThreshold(spell_type)
).c_str()
);
}
else {
my_bot->SetSpellMinThreshold(spellType, typeValue);
my_bot->SetSpellMinThreshold(spell_type, type_value);
++success_count;
}
}
@@ -226,8 +226,8 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] minimum threshold was set to [{}%%].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellMinThreshold(spellType)
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellMinThreshold(spell_type)
).c_str()
);
}
@@ -237,8 +237,8 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] minimum threshold to [{}%%].",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue
c->GetSpellTypeNameByID(spell_type),
type_value
).c_str()
);
}
+14 -14
View File
@@ -115,14 +115,14 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -130,7 +130,7 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -148,9 +148,9 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100.");
return;
@@ -205,13 +205,13 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] pursue cast priority is currently [{}].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellTypePriority(spellType, BotPriorityCategories::Pursue)
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellTypePriority(spell_type, BotPriorityCategories::Pursue)
).c_str()
);
}
else {
my_bot->SetSpellTypePriority(spellType, BotPriorityCategories::Pursue, typeValue);
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Pursue, type_value);
++success_count;
}
}
@@ -222,8 +222,8 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] pursue cast priority was set to [{}].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellTypePriority(spellType, BotPriorityCategories::Pursue)
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellTypePriority(spell_type, BotPriorityCategories::Pursue)
).c_str()
);
}
@@ -233,8 +233,8 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] pursue cast priority to [{}].",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue
c->GetSpellTypeNameByID(spell_type),
type_value
).c_str()
);
}
+14 -14
View File
@@ -111,14 +111,14 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
// String/Int type checks
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (spellType < BotSpellTypes::START || spellType > BotSpellTypes::END) {
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
return;
@@ -126,7 +126,7 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
}
else {
c->Message(
@@ -144,9 +144,9 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
}
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 1 || typeValue > 100) {
if (type_value < 1 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 1-100.");
return;
@@ -201,13 +201,13 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] target count is currently [{}].'",
my_bot->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
my_bot->GetSpellTypeAEOrGroupTargetCount(spellType)
c->GetSpellTypeNameByID(spell_type),
my_bot->GetSpellTypeAEOrGroupTargetCount(spell_type)
).c_str()
);
}
else {
my_bot->SetSpellTypeAEOrGroupTargetCount(spellType, typeValue);
my_bot->SetSpellTypeAEOrGroupTargetCount(spell_type, type_value);
++success_count;
}
}
@@ -218,8 +218,8 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
fmt::format(
"{} says, 'My [{}] target count was set to [{}].'",
first_found->GetCleanName(),
c->GetSpellTypeNameByID(spellType),
first_found->GetSpellTypeAEOrGroupTargetCount(spellType)
c->GetSpellTypeNameByID(spell_type),
first_found->GetSpellTypeAEOrGroupTargetCount(spell_type)
).c_str()
);
}
@@ -229,8 +229,8 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots set their [{}] target count to [{}].",
success_count,
c->GetSpellTypeNameByID(spellType),
typeValue
c->GetSpellTypeNameByID(spell_type),
type_value
).c_str()
);
}
+26 -26
View File
@@ -88,29 +88,29 @@ void bot_command_taunt(Client* c, const Seperator* sep)
std::string arg1 = sep->arg[1];
std::string arg2 = sep->arg[2];
bool tauntState = false;
bool petTaunt = false;
bool validOption = false;
bool taunt_state = false;
bool pet_taunt = false;
bool valid_option = false;
int ab_arg = 1;
if (!arg1.compare("on")) {
tauntState = true;
validOption = true;
taunt_state = true;
valid_option = true;
++ab_arg;
}
else if (!arg1.compare("off")) {
validOption = true;
valid_option = true;
++ab_arg;
}
if (!arg2.compare("pet")) {
petTaunt = true;
validOption = true;
pet_taunt = true;
valid_option = true;
++ab_arg;
}
if (!validOption) {
if (!valid_option) {
c->Message(
Chat::Yellow,
fmt::format(
@@ -125,10 +125,10 @@ void bot_command_taunt(Client* c, const Seperator* sep)
}
const int ab_mask = ActionableBots::ABM_Type1;
std::string actionableArg = sep->arg[ab_arg];
std::string actionable_arg = sep->arg[ab_arg];
if (actionableArg.empty()) {
actionableArg = "target";
if (actionable_arg.empty()) {
actionable_arg = "target";
}
std::string class_race_arg = sep->arg[ab_arg];
@@ -140,22 +140,22 @@ void bot_command_taunt(Client* c, const Seperator* sep)
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
if (ActionableBots::PopulateSBL(c, actionable_arg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
int botTauntingCount = 0;
int petTauntingCount = 0;
int bot_taunting_count = 0;
int pet_taunting_count = 0;
if (!petTaunt) {
if (!pet_taunt) {
for (auto bot_iter : sbl) {
if (!bot_iter->GetSkill(EQ::skills::SkillTaunt)) {
continue;
}
bot_iter->SetTaunting(tauntState);
bot_iter->SetTaunting(taunt_state);
Bot::BotGroupSay(
bot_iter,
@@ -165,11 +165,11 @@ void bot_command_taunt(Client* c, const Seperator* sep)
).c_str()
);
++botTauntingCount;
++bot_taunting_count;
}
}
if (petTaunt) {
if (pet_taunt) {
for (auto bot_iter : sbl) {
if (!bot_iter->HasPet()) {
continue;
@@ -179,7 +179,7 @@ void bot_command_taunt(Client* c, const Seperator* sep)
continue;
}
bot_iter->GetPet()->CastToNPC()->SetTaunting(tauntState);
bot_iter->GetPet()->CastToNPC()->SetTaunting(taunt_state);
Bot::BotGroupSay(
bot_iter,
@@ -189,18 +189,18 @@ void bot_command_taunt(Client* c, const Seperator* sep)
).c_str()
);
++petTauntingCount;
++pet_taunting_count;
}
}
if (botTauntingCount || petTauntingCount) {
if (bot_taunting_count || pet_taunting_count) {
c->Message(
Chat::Green,
fmt::format(
"{} of your {} are {} taunting.",
(botTauntingCount ? botTauntingCount : petTauntingCount),
(botTauntingCount ? "bots" : "bots' pets"),
tauntState ? "now" : "no longer"
(bot_taunting_count ? bot_taunting_count : pet_taunting_count),
(bot_taunting_count ? "bots" : "bots' pets"),
taunt_state ? "now" : "no longer"
).c_str()
);
}
@@ -209,7 +209,7 @@ void bot_command_taunt(Client* c, const Seperator* sep)
Chat::Yellow,
fmt::format(
"None of your {} are capable of taunting.",
!petTaunt ? "bots" : "bots' pets"
!pet_taunt ? "bots" : "bots' pets"
).c_str()
);
}
+2 -2
View File
@@ -142,7 +142,7 @@ void Raid::HandleOfflineBots(uint32 owner) {
}
}
uint8 Bot::GetNumberNeedingHealedInRaidGroup(uint8& need_healed, uint8 hpr, bool includePets, Raid* raid) {
uint8 Bot::GetNumberNeedingHealedInRaidGroup(uint8& need_healed, uint8 hpr, bool include_pets, Raid* raid) {
if (raid) {
uint32 r_group = raid->GetGroup(GetName());
@@ -153,7 +153,7 @@ uint8 Bot::GetNumberNeedingHealedInRaidGroup(uint8& need_healed, uint8 hpr, bool
need_healed++;
}
if (includePets && m.member->GetPet() && m.member->GetPet()->GetHPRatio() <= hpr) {
if (include_pets && m.member->GetPet() && m.member->GetPet()->GetHPRatio() <= hpr) {
need_healed++;
}
}
+4 -4
View File
@@ -12,10 +12,10 @@ void command_illusion_block(Client* c, const Seperator* sep)
}
if (sep->IsNumber(1)) {
int setStatus = atoi(sep->arg[1]);
if (setStatus == 0 || setStatus == 1) {
c->SetIllusionBlock(setStatus);
c->Message(Chat::White, "Your Illusion Block has been %s.", (setStatus ? "enabled" : "disabled"));
int set_status = atoi(sep->arg[1]);
if (set_status == 0 || set_status == 1) {
c->SetIllusionBlock(set_status);
c->Message(Chat::White, "Your Illusion Block has been %s.", (set_status ? "enabled" : "disabled"));
}
else {
c->Message(Chat::White, "You must enter 0 for disabled or 1 for enabled.");
+13 -13
View File
@@ -89,13 +89,13 @@ void command_spell_delays(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (!IsClientBotSpellType(spellType)) {
if (!IsClientBotSpellType(spell_type)) {
c->Message(Chat::Yellow, "Invalid spell type.");
c->SendSpellTypePrompts(false, true);
@@ -104,9 +104,9 @@ void command_spell_delays(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
if (!IsClientBotSpellType(spellType)) {
if (!IsClientBotSpellType(spell_type)) {
c->Message(Chat::Yellow, "Invalid spell type.");
c->SendSpellTypePrompts(false, true);
}
@@ -128,9 +128,9 @@ void command_spell_delays(Client* c, const Seperator* sep)
// Enable/Disable/Current checks
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 60000) {
if (type_value < 0 || type_value > 60000) {
c->Message(Chat::Yellow, "You must enter a value between 1-60000 (1ms to 60s).");
return;
@@ -159,19 +159,19 @@ void command_spell_delays(Client* c, const Seperator* sep)
Chat::Green,
fmt::format(
"Your [{}] delay is currently {} seconds.'",
c->GetSpellTypeNameByID(spellType),
c->GetSpellDelay(spellType) / 1000.00
c->GetSpellTypeNameByID(spell_type),
c->GetSpellDelay(spell_type) / 1000.00
).c_str()
);
}
else {
c->SetSpellDelay(spellType, typeValue);
c->SetSpellDelay(spell_type, type_value);
c->Message(
Chat::Green,
fmt::format(
"Your [{}] delay was set to {} seconds.'",
c->GetSpellTypeNameByID(spellType),
c->GetSpellDelay(spellType) / 1000.00
c->GetSpellTypeNameByID(spell_type),
c->GetSpellDelay(spell_type) / 1000.00
).c_str()
);
}
+13 -13
View File
@@ -93,13 +93,13 @@ void command_spell_holds(Client *c, const Seperator *sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (!IsClientBotSpellType(spellType)) {
if (!IsClientBotSpellType(spell_type)) {
c->Message(Chat::Yellow, "Invalid spell type.");
c->SendSpellTypePrompts(false, true);
@@ -108,9 +108,9 @@ void command_spell_holds(Client *c, const Seperator *sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
if (!IsClientBotSpellType(spellType)) {
if (!IsClientBotSpellType(spell_type)) {
c->Message(Chat::Yellow, "Invalid spell type.");
c->SendSpellTypePrompts(false, true);
}
@@ -132,9 +132,9 @@ void command_spell_holds(Client *c, const Seperator *sep)
// Enable/Disable/Current checks
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 1) {
if (type_value < 0 || type_value > 1) {
c->Message(Chat::Yellow, "You must enter either 0 for disabled or 1 for enabled.");
return;
@@ -163,19 +163,19 @@ void command_spell_holds(Client *c, const Seperator *sep)
Chat::Green,
fmt::format(
"Your [{}] spell hold is currently [{}].'",
c->GetSpellTypeNameByID(spellType),
c->GetSpellHold(spellType) ? "enabled" : "disabled"
c->GetSpellTypeNameByID(spell_type),
c->GetSpellHold(spell_type) ? "enabled" : "disabled"
).c_str()
);
}
else {
c->SetSpellHold(spellType, typeValue);
c->SetSpellHold(spell_type, type_value);
c->Message(
Chat::Green,
fmt::format(
"Your [{}] spell hold was [{}].'",
c->GetSpellTypeNameByID(spellType),
c->GetSpellHold(spellType) ? "enabled" : "disabled"
c->GetSpellTypeNameByID(spell_type),
c->GetSpellHold(spell_type) ? "enabled" : "disabled"
).c_str()
);
}
+13 -13
View File
@@ -89,13 +89,13 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (!IsClientBotSpellType(spellType)) {
if (!IsClientBotSpellType(spell_type)) {
c->Message(Chat::Yellow, "Invalid spell type.");
c->SendSpellTypePrompts(false, true);
@@ -104,9 +104,9 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
if (!IsClientBotSpellType(spellType)) {
if (!IsClientBotSpellType(spell_type)) {
c->Message(Chat::Yellow, "Invalid spell type.");
c->SendSpellTypePrompts(false, true);
}
@@ -128,9 +128,9 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
// Enable/Disable/Current checks
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100 (0%% to 100%% of your health).");
return;
@@ -159,19 +159,19 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
Chat::Green,
fmt::format(
"Your [{}] maximum hold is currently [{}%%].'",
c->GetSpellTypeNameByID(spellType),
c->GetSpellMaxThreshold(spellType)
c->GetSpellTypeNameByID(spell_type),
c->GetSpellMaxThreshold(spell_type)
).c_str()
);
}
else {
c->SetSpellMaxThreshold(spellType, typeValue);
c->SetSpellMaxThreshold(spell_type, type_value);
c->Message(
Chat::Green,
fmt::format(
"Your [{}] maximum hold was set to [{}%%].'",
c->GetSpellTypeNameByID(spellType),
c->GetSpellMaxThreshold(spellType)
c->GetSpellTypeNameByID(spell_type),
c->GetSpellMaxThreshold(spell_type)
).c_str()
);
}
+13 -13
View File
@@ -89,13 +89,13 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
std::string arg2 = sep->arg[2];
int ab_arg = 2;
bool current_check = false;
uint16 spellType = 0;
uint32 typeValue = 0;
uint16 spell_type = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
spellType = atoi(sep->arg[1]);
spell_type = atoi(sep->arg[1]);
if (!IsClientBotSpellType(spellType)) {
if (!IsClientBotSpellType(spell_type)) {
c->Message(Chat::Yellow, "Invalid spell type.");
c->SendSpellTypePrompts(false, true);
@@ -104,9 +104,9 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
}
else {
if (c->GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
spellType = c->GetSpellTypeIDByShortName(arg1);
spell_type = c->GetSpellTypeIDByShortName(arg1);
if (!IsClientBotSpellType(spellType)) {
if (!IsClientBotSpellType(spell_type)) {
c->Message(Chat::Yellow, "Invalid spell type.");
c->SendSpellTypePrompts(false, true);
}
@@ -128,9 +128,9 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
// Enable/Disable/Current checks
if (sep->IsNumber(2)) {
typeValue = atoi(sep->arg[2]);
type_value = atoi(sep->arg[2]);
++ab_arg;
if (typeValue < 0 || typeValue > 100) {
if (type_value < 0 || type_value > 100) {
c->Message(Chat::Yellow, "You must enter a value between 0-100 (0%% to 100%% of your health).");
return;
@@ -159,19 +159,19 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
Chat::Green,
fmt::format(
"Your [{}] minimum hold is currently [{}%%].'",
c->GetSpellTypeNameByID(spellType),
c->GetSpellMinThreshold(spellType)
c->GetSpellTypeNameByID(spell_type),
c->GetSpellMinThreshold(spell_type)
).c_str()
);
}
else {
c->SetSpellMinThreshold(spellType, typeValue);
c->SetSpellMinThreshold(spell_type, type_value);
c->Message(
Chat::Green,
fmt::format(
"Your [{}] minimum hold was set to [{}%%].'",
c->GetSpellTypeNameByID(spellType),
c->GetSpellMinThreshold(spellType)
c->GetSpellTypeNameByID(spell_type),
c->GetSpellMinThreshold(spell_type)
).c_str()
);
}
+6 -6
View File
@@ -2262,24 +2262,24 @@ void Group::ClearAllNPCMarks()
}
int8 Group::GetNumberNeedingHealedInGroup(int8 hpr, bool includePets) {
int8 needHealed = 0;
int8 Group::GetNumberNeedingHealedInGroup(int8 hpr, bool include_pets) {
int8 need_healed = 0;
for( int i = 0; i<MAX_GROUP_MEMBERS; i++) {
if(members[i] && !members[i]->qglobal) {
if(members[i]->GetHPRatio() <= hpr)
needHealed++;
need_healed++;
if(includePets) {
if(include_pets) {
if(members[i]->GetPet() && members[i]->GetPet()->GetHPRatio() <= hpr) {
needHealed++;
need_healed++;
}
}
}
}
return needHealed;
return need_healed;
}
void Group::UpdateGroupAAs()
+1 -1
View File
@@ -107,7 +107,7 @@ public:
void UpdateGroupAAs();
void SaveGroupLeaderAA();
void MarkNPC(Mob* Target, int Number);
int8 GetNumberNeedingHealedInGroup(int8 hpr, bool includePets);
int8 GetNumberNeedingHealedInGroup(int8 hpr, bool include_pets);
void DelegateMainTank(const char *NewMainAssistName, uint8 toggle = 0);
void DelegateMainAssist(const char *NewMainAssistName, uint8 toggle = 0);
void DelegatePuller(const char *NewMainAssistName, uint8 toggle = 0);