mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 00:46:46 +00:00
[Constants] Change Race Changes to Race Namespace (#5000)
This commit is contained in:
@@ -46,9 +46,9 @@ void bot_command_beard_color(Client *c, const Seperator *sep)
|
||||
uint8 uvalue = Strings::ToInt(sep->arg[1]);
|
||||
|
||||
auto fail_type = AFT_None;
|
||||
if (my_bot->GetGender() != Gender::Male && my_bot->GetRace() != DWARF)
|
||||
if (my_bot->GetGender() != Gender::Male && my_bot->GetRace() != Race::Dwarf)
|
||||
fail_type = AFT_GenderRace;
|
||||
else if (!PlayerAppearance::IsValidBeardColor(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
else if (!RaceAppearance::IsValidBeardColor(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
fail_type = AFT_Value;
|
||||
else
|
||||
my_bot->SetBeardColor(uvalue);
|
||||
@@ -83,9 +83,9 @@ void bot_command_beard_style(Client *c, const Seperator *sep)
|
||||
uint8 uvalue = Strings::ToInt(sep->arg[1]);
|
||||
|
||||
auto fail_type = AFT_None;
|
||||
if (my_bot->GetGender() != Gender::Male && my_bot->GetRace() != DWARF)
|
||||
if (my_bot->GetGender() != Gender::Male && my_bot->GetRace() != Race::Dwarf)
|
||||
fail_type = AFT_GenderRace;
|
||||
else if (!PlayerAppearance::IsValidBeard(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
else if (!RaceAppearance::IsValidBeard(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
fail_type = AFT_Value;
|
||||
else
|
||||
my_bot->SetBeard(uvalue);
|
||||
@@ -122,9 +122,9 @@ void bot_command_details(Client *c, const Seperator *sep)
|
||||
uint32 uvalue = Strings::ToInt(sep->arg[1]);
|
||||
|
||||
auto fail_type = AFT_None;
|
||||
if (my_bot->GetRace() != DRAKKIN)
|
||||
if (my_bot->GetRace() != Race::Drakkin)
|
||||
fail_type = AFT_Race;
|
||||
else if (!PlayerAppearance::IsValidDetail(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
else if (!RaceAppearance::IsValidDetail(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
fail_type = AFT_Value;
|
||||
else
|
||||
my_bot->SetDrakkinDetails(uvalue);
|
||||
@@ -281,7 +281,7 @@ void bot_command_eyes(Client *c, const Seperator *sep)
|
||||
// eye_bias = 2;
|
||||
|
||||
auto fail_type = AFT_None;
|
||||
if (!PlayerAppearance::IsValidEyeColor(my_bot->GetRace(), my_bot->GetGender(), uvalue)) {
|
||||
if (!RaceAppearance::IsValidEyeColor(my_bot->GetRace(), my_bot->GetGender(), uvalue)) {
|
||||
fail_type = AFT_Value;
|
||||
}
|
||||
else {
|
||||
@@ -328,12 +328,12 @@ void bot_command_face(Client *c, const Seperator *sep)
|
||||
uint8 uvalue = Strings::ToInt(sep->arg[1]);
|
||||
|
||||
auto fail_type = AFT_None;
|
||||
if (!PlayerAppearance::IsValidFace(my_bot->GetRace(), my_bot->GetGender(), uvalue)) {
|
||||
if (!RaceAppearance::IsValidFace(my_bot->GetRace(), my_bot->GetGender(), uvalue)) {
|
||||
fail_type = AFT_Value;
|
||||
}
|
||||
else {
|
||||
uint8 old_woad = 0;
|
||||
if (my_bot->GetRace() == BARBARIAN)
|
||||
if (my_bot->GetRace() == Race::Barbarian)
|
||||
old_woad = ((my_bot->GetLuclinFace() / 10) * 10);
|
||||
my_bot->SetLuclinFace((old_woad + uvalue));
|
||||
}
|
||||
@@ -368,7 +368,7 @@ void bot_command_hair_color(Client *c, const Seperator *sep)
|
||||
uint8 uvalue = Strings::ToInt(sep->arg[1]);
|
||||
|
||||
auto fail_type = AFT_None;
|
||||
if (!PlayerAppearance::IsValidHairColor(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
if (!RaceAppearance::IsValidHairColor(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
fail_type = AFT_Value;
|
||||
else
|
||||
my_bot->SetHairColor(uvalue);
|
||||
@@ -403,7 +403,7 @@ void bot_command_hairstyle(Client *c, const Seperator *sep)
|
||||
uint8 uvalue = Strings::ToInt(sep->arg[1]);
|
||||
|
||||
auto fail_type = AFT_None;
|
||||
if (!PlayerAppearance::IsValidHair(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
if (!RaceAppearance::IsValidHair(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
fail_type = AFT_Value;
|
||||
else
|
||||
my_bot->SetHairStyle(uvalue);
|
||||
@@ -440,9 +440,9 @@ void bot_command_heritage(Client *c, const Seperator *sep)
|
||||
uint32 uvalue = Strings::ToInt(sep->arg[1]);
|
||||
|
||||
auto fail_type = AFT_None;
|
||||
if (my_bot->GetRace() != DRAKKIN)
|
||||
if (my_bot->GetRace() != Race::Drakkin)
|
||||
fail_type = AFT_Race;
|
||||
else if (!PlayerAppearance::IsValidHeritage(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
else if (!RaceAppearance::IsValidHeritage(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
fail_type = AFT_Value;
|
||||
else
|
||||
my_bot->SetDrakkinHeritage(uvalue);
|
||||
@@ -479,9 +479,9 @@ void bot_command_tattoo(Client *c, const Seperator *sep)
|
||||
uint32 uvalue = Strings::ToInt(sep->arg[1]);
|
||||
|
||||
auto fail_type = AFT_None;
|
||||
if (my_bot->GetRace() != DRAKKIN)
|
||||
if (my_bot->GetRace() != Race::Drakkin)
|
||||
fail_type = AFT_Race;
|
||||
else if (!PlayerAppearance::IsValidTattoo(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
else if (!RaceAppearance::IsValidTattoo(my_bot->GetRace(), my_bot->GetGender(), uvalue))
|
||||
fail_type = AFT_Value;
|
||||
else
|
||||
my_bot->SetDrakkinTattoo(uvalue);
|
||||
@@ -516,10 +516,10 @@ void bot_command_woad(Client *c, const Seperator *sep)
|
||||
uint8 uvalue = Strings::ToInt(sep->arg[1]);
|
||||
|
||||
auto fail_type = AFT_None;
|
||||
if (my_bot->GetRace() != BARBARIAN) {
|
||||
if (my_bot->GetRace() != Race::Barbarian) {
|
||||
fail_type = AFT_Race;
|
||||
}
|
||||
else if (!PlayerAppearance::IsValidWoad(my_bot->GetRace(), my_bot->GetGender(), uvalue)) {
|
||||
else if (!RaceAppearance::IsValidWoad(my_bot->GetRace(), my_bot->GetGender(), uvalue)) {
|
||||
fail_type = AFT_Value;
|
||||
}
|
||||
else {
|
||||
|
||||
+26
-26
@@ -455,13 +455,13 @@ void bot_command_follow_distance(Client *c, const Seperator *sep)
|
||||
fmt::format("- You must use a value between 1 and {}.", RuleI(Bots, MaxFollowDistance))
|
||||
};
|
||||
p.example_format = { fmt::format("{} [reset]/[set [value]] [actionable]", sep->arg[0]) };
|
||||
p.examples_one = {
|
||||
"To set all bots to follow at a distance of 25:",
|
||||
fmt::format("{} set 25 spawned", sep->arg[0])
|
||||
p.examples_one = {
|
||||
"To set all bots to follow at a distance of 25:",
|
||||
fmt::format("{} set 25 spawned", sep->arg[0])
|
||||
};
|
||||
p.examples_two = {
|
||||
"To check the curret following distance of all bots:",
|
||||
fmt::format("{} current spawned", sep->arg[0])
|
||||
p.examples_two = {
|
||||
"To check the curret following distance of all bots:",
|
||||
fmt::format("{} current spawned", sep->arg[0])
|
||||
};
|
||||
p.examples_three =
|
||||
{
|
||||
@@ -470,10 +470,10 @@ void bot_command_follow_distance(Client *c, const Seperator *sep)
|
||||
"{} reset byclass {}",
|
||||
sep->arg[0],
|
||||
Class::Wizard
|
||||
)
|
||||
)
|
||||
};
|
||||
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
|
||||
|
||||
|
||||
std::string popup_text = c->SendBotCommandHelpWindow(p);
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
@@ -483,7 +483,7 @@ void bot_command_follow_distance(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
const int ab_mask = ActionableBots::ABM_Type2;
|
||||
|
||||
|
||||
uint32 bfd = RuleI(Bots, DefaultFollowDistance);
|
||||
bool set_flag = false;
|
||||
bool current_check = false;
|
||||
@@ -862,7 +862,7 @@ void bot_command_report(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::White, "usage: %s ([actionable: target | byname | ownergroup | ownerraid | targetgroup | namesgroup | healrotationmembers | healrotationtargets | mmr | byclass | byrace | spawned] ([actionable_name]))", sep->arg[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const int ab_mask = ActionableBots::ABM_Type1;
|
||||
|
||||
std::string arg1 = sep->arg[1];
|
||||
@@ -1057,7 +1057,7 @@ void bot_command_stance(Client *c, const Seperator *sep)
|
||||
BotCommandHelpParams p;
|
||||
|
||||
p.description = { "Change a bot's stance to control the way it behaves." };
|
||||
p.notes =
|
||||
p.notes =
|
||||
{
|
||||
"- Changing a stance will reset all settings to match that stance type.",
|
||||
"- Any changes made will only save to that stance for future use.",
|
||||
@@ -1122,29 +1122,29 @@ void bot_command_stance(Client *c, const Seperator *sep)
|
||||
Stance::AEBurn
|
||||
)
|
||||
};
|
||||
p.example_format =
|
||||
p.example_format =
|
||||
{ fmt::format( "{} [current | value]", sep->arg[0]) };
|
||||
p.examples_one =
|
||||
{
|
||||
"To set all bots to BurnAE:",
|
||||
p.examples_one =
|
||||
{
|
||||
"To set all bots to BurnAE:",
|
||||
fmt::format("{} {} spawned {}",
|
||||
sep->arg[0],
|
||||
Stance::Aggressive,
|
||||
Class::ShadowKnight
|
||||
)
|
||||
};
|
||||
p.examples_two =
|
||||
{
|
||||
"To set all Shadowknights to Aggressive:",
|
||||
p.examples_two =
|
||||
{
|
||||
"To set all Shadowknights to Aggressive:",
|
||||
fmt::format("{} {} byclass {}",
|
||||
sep->arg[0],
|
||||
Stance::Aggressive,
|
||||
Class::ShadowKnight
|
||||
)
|
||||
};
|
||||
p.examples_three = {
|
||||
"To check the current stances of all bots:",
|
||||
fmt::format("{} current spawned", sep->arg[0])
|
||||
p.examples_three = {
|
||||
"To check the current stances of all bots:",
|
||||
fmt::format("{} current spawned", sep->arg[0])
|
||||
};
|
||||
|
||||
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
|
||||
@@ -1239,7 +1239,7 @@ void bot_command_stance(Client *c, const Seperator *sep)
|
||||
database.botdb.LoadBotSettings(bot_iter);
|
||||
|
||||
if (
|
||||
(bot_iter->GetClass() == Class::Warrior || bot_iter->GetClass() == Class::Paladin || bot_iter->GetClass() == Class::ShadowKnight) &&
|
||||
(bot_iter->GetClass() == Class::Warrior || bot_iter->GetClass() == Class::Paladin || bot_iter->GetClass() == Class::ShadowKnight) &&
|
||||
(bot_iter->GetBotStance() == Stance::Aggressive)
|
||||
) {
|
||||
bot_iter->SetTaunting(true);
|
||||
@@ -1255,7 +1255,7 @@ void bot_command_stance(Client *c, const Seperator *sep)
|
||||
bot_iter->GetPet()->CastToNPC()->SetTaunting(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bot_iter->Save();
|
||||
++success_count;
|
||||
}
|
||||
@@ -1431,7 +1431,7 @@ void bot_command_summon(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::White, "usage: %s ([actionable: target | byname | ownergroup | ownerraid | targetgroup | namesgroup | healrotationtargets | mmr | byclass | byrace | spawned] ([actionable_name]))", sep->arg[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const int ab_mask = ActionableBots::ABM_Type1;
|
||||
|
||||
std::string arg1 = sep->arg[1];
|
||||
@@ -1550,7 +1550,7 @@ void bot_command_toggle_ranged(Client *c, const Seperator *sep)
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
std::string arg1 = sep->arg[1];
|
||||
|
||||
int ab_arg = 1;
|
||||
@@ -1712,7 +1712,7 @@ void bot_command_toggle_helm(Client *c, const Seperator *sep)
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
std::string arg1 = sep->arg[1];
|
||||
|
||||
int ab_arg = 1;
|
||||
|
||||
Reference in New Issue
Block a user