[Constants] Change Race Changes to Race Namespace (#5000)

This commit is contained in:
Alex King 2025-08-30 15:33:11 -04:00 committed by GitHub
parent 33df8ea665
commit 92c8b0e585
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 2127 additions and 2396 deletions

View File

@ -95,12 +95,12 @@ bool IsOfEqualRace(int r1, int r2)
} }
// TODO: add more values // TODO: add more values
switch (r1) { switch (r1) {
case DARK_ELF: case Race::DarkElf:
if (r2 == Race::NeriakCitizen) { if (r2 == Race::NeriakCitizen) {
return true; return true;
} }
break; break;
case BARBARIAN: case Race::Barbarian:
if (r2 == Race::HalasCitizen) { if (r2 == Race::HalasCitizen) {
return true; return true;
} }
@ -116,49 +116,49 @@ bool IsOfIndiffRace(int r1, int r2)
} }
// TODO: add more values // TODO: add more values
switch (r1) { switch (r1) {
case DARK_ELF: case Race::DarkElf:
case OGRE: case Race::Ogre:
case TROLL: case Race::Troll:
if (r2 == OGRE || r2 == TROLL || r2 == DARK_ELF) { if (r2 == Race::Ogre || r2 == Race::Troll || r2 == Race::DarkElf) {
return true; return true;
} }
break; break;
case HUMAN: case Race::Human:
case BARBARIAN: case Race::Barbarian:
case HALF_ELF: case Race::HalfElf:
case GNOME: case Race::Gnome:
case HALFLING: case Race::Halfling:
case WOOD_ELF: case Race::WoodElf:
if (r2 == HUMAN || if (r2 == Race::Human ||
r2 == BARBARIAN || r2 == Race::Barbarian ||
r2 == ERUDITE || r2 == Race::Erudite ||
r2 == HALF_ELF || r2 == Race::HalfElf ||
r2 == GNOME || r2 == Race::Gnome ||
r2 == HALFLING || r2 == Race::Halfling ||
r2 == DWARF || r2 == Race::Dwarf ||
r2 == HIGH_ELF || r2 == Race::HighElf ||
r2 == WOOD_ELF) { r2 == Race::WoodElf) {
return true; return true;
} }
break; break;
case ERUDITE: case Race::Erudite:
if (r2 == HUMAN || r2 == HALF_ELF) { if (r2 == Race::Human || r2 == Race::HalfElf) {
return true; return true;
} }
break; break;
case DWARF: case Race::Dwarf:
if (r2 == HALFLING || r2 == GNOME) { if (r2 == Race::Halfling || r2 == Race::Gnome) {
return true; return true;
} }
break; break;
case HIGH_ELF: case Race::HighElf:
if (r2 == WOOD_ELF) { if (r2 == Race::WoodElf) {
return true; return true;
} }
break; break;
case VAHSHIR: case Race::VahShir:
return true; return true;
case IKSAR: case Race::Iksar:
return false; return false;
} }
return false; return false;

File diff suppressed because it is too large Load Diff

View File

@ -21,103 +21,7 @@
#include "../common/types.h" #include "../common/types.h"
#include <string> #include <string>
namespace Gender {
constexpr uint8 Male = 0;
constexpr uint8 Female = 1;
constexpr uint8 Neuter = 2;
}
//theres a big list straight from the client below.
#define HUMAN 1
#define BARBARIAN 2
#define ERUDITE 3
#define WOOD_ELF 4
#define HIGH_ELF 5
#define DARK_ELF 6
#define HALF_ELF 7
#define DWARF 8
#define TROLL 9
#define OGRE 10
#define HALFLING 11
#define GNOME 12
#define WEREWOLF 14
#define WOLF 42
#define BEAR 43
#define SKELETON 60
#define TIGER 63
#define ELEMENTAL 75
#define ALLIGATOR 91
#define OGGOK_CITIZEN 93
#define EYE_OF_ZOMM 108
#define WOLF_ELEMENTAL 120
#define INVISIBLE_MAN 127
#define IKSAR 128
#define VAHSHIR 130
#define CONTROLLED_BOAT 141
#define MINOR_ILL_OBJ 142
#define TREE 143
#define IKSAR_SKELETON 161
#define FROGLOK 330
// TODO: check all clients for (BYTE) usage of '/who all' class and remove FROGLOK2, if possible (330 - 74 = 256 .. WORD->BYTE conversion loss...)
#define FROGLOK2 74 // Not sure why /who all reports race as 74 for frogloks
#define FAIRY 473
#define DRAKKIN 522 // 32768
#define EMU_RACE_NPC 131069 // was 65533
#define EMU_RACE_PET 131070 // was 65534
#define EMU_RACE_UNKNOWN 131071 // was 65535
// player race values
#define PLAYER_RACE_UNKNOWN 0
#define PLAYER_RACE_HUMAN 1
#define PLAYER_RACE_BARBARIAN 2
#define PLAYER_RACE_ERUDITE 3
#define PLAYER_RACE_WOOD_ELF 4
#define PLAYER_RACE_HIGH_ELF 5
#define PLAYER_RACE_DARK_ELF 6
#define PLAYER_RACE_HALF_ELF 7
#define PLAYER_RACE_DWARF 8
#define PLAYER_RACE_TROLL 9
#define PLAYER_RACE_OGRE 10
#define PLAYER_RACE_HALFLING 11
#define PLAYER_RACE_GNOME 12
#define PLAYER_RACE_IKSAR 13
#define PLAYER_RACE_VAHSHIR 14
#define PLAYER_RACE_FROGLOK 15
#define PLAYER_RACE_DRAKKIN 16
#define PLAYER_RACE_COUNT 16
#define PLAYER_RACE_EMU_NPC 17
#define PLAYER_RACE_EMU_PET 18
#define PLAYER_RACE_EMU_COUNT 19
// player race bits
#define PLAYER_RACE_UNKNOWN_BIT 0
#define PLAYER_RACE_HUMAN_BIT 1
#define PLAYER_RACE_BARBARIAN_BIT 2
#define PLAYER_RACE_ERUDITE_BIT 4
#define PLAYER_RACE_WOOD_ELF_BIT 8
#define PLAYER_RACE_HIGH_ELF_BIT 16
#define PLAYER_RACE_DARK_ELF_BIT 32
#define PLAYER_RACE_HALF_ELF_BIT 64
#define PLAYER_RACE_DWARF_BIT 128
#define PLAYER_RACE_TROLL_BIT 256
#define PLAYER_RACE_OGRE_BIT 512
#define PLAYER_RACE_HALFLING_BIT 1024
#define PLAYER_RACE_GNOME_BIT 2048
#define PLAYER_RACE_IKSAR_BIT 4096
#define PLAYER_RACE_VAHSHIR_BIT 8192
#define PLAYER_RACE_FROGLOK_BIT 16384
#define PLAYER_RACE_DRAKKIN_BIT 32768
#define PLAYER_RACE_ALL_MASK 65535
const char* GetRaceIDName(uint16 race_id); const char* GetRaceIDName(uint16 race_id);
const char* GetPlayerRaceName(uint32 player_race_value);
const char* GetGenderName(uint32 gender_id); const char* GetGenderName(uint32 gender_id);
bool IsPlayerRace(uint16 race_id); bool IsPlayerRace(uint16 race_id);
@ -127,25 +31,13 @@ uint32 GetPlayerRaceValue(uint16 race_id);
uint16 GetPlayerRaceBit(uint16 race_id); uint16 GetPlayerRaceBit(uint16 race_id);
uint16 GetRaceIDFromPlayerRaceValue(uint32 player_race_value); uint16 GetRaceIDFromPlayerRaceValue(uint32 player_race_value);
uint16 GetRaceIDFromPlayerRaceBit(uint32 player_race_bit);
float GetRaceGenderDefaultHeight(int race, int gender); float GetRaceGenderDefaultHeight(int race, int gender);
// player race-/gender-based model feature validators namespace Gender {
namespace PlayerAppearance constexpr uint8 Male = 0;
{ constexpr uint8 Female = 1;
bool IsValidBeard(uint16 race_id, uint8 gender_id, uint8 beard_value, bool use_luclin = true); constexpr uint8 Neuter = 2;
bool IsValidBeardColor(uint16 race_id, uint8 gender_id, uint8 beard_color_value, bool use_luclin = true);
bool IsValidDetail(uint16 race_id, uint8 gender_id, uint32 detail_value, bool use_luclin = true);
bool IsValidEyeColor(uint16 race_id, uint8 gender_id, uint8 eye_color_value, bool use_luclin = true);
bool IsValidFace(uint16 race_id, uint8 gender_id, uint8 face_value, bool use_luclin = true);
bool IsValidHair(uint16 race_id, uint8 gender_id, uint8 hair_value, bool use_luclin = true);
bool IsValidHairColor(uint16 race_id, uint8 gender_id, uint8 hair_color_value, bool use_luclin = true);
bool IsValidHead(uint16 race_id, uint8 gender_id, uint8 head_value, bool use_luclin = true);
bool IsValidHeritage(uint16 race_id, uint8 gender_id, uint32 heritage_value, bool use_luclin = true);
bool IsValidTattoo(uint16 race_id, uint8 gender_id, uint32 tattoo_value, bool use_luclin = true);
bool IsValidTexture(uint16 race_id, uint8 gender_id, uint8 texture_value, bool use_luclin = true);
bool IsValidWoad(uint16 race_id, uint8 gender_id, uint8 woad_value, bool use_luclin = true);
} }
namespace Race { namespace Race {
@ -884,8 +776,92 @@ namespace Race {
constexpr uint16 Pegasus3 = 732; constexpr uint16 Pegasus3 = 732;
constexpr uint16 InteractiveObject = 2250; constexpr uint16 InteractiveObject = 2250;
constexpr uint16 Node = 2254; constexpr uint16 Node = 2254;
}
constexpr uint16 ALL_RACES_BITMASK = 65535; namespace RaceBitmask {
constexpr uint16 Unknown = 0;
constexpr uint16 Human = 1;
constexpr uint16 Barbarian = 2;
constexpr uint16 Erudite = 4;
constexpr uint16 WoodElf = 8;
constexpr uint16 HighElf = 16;
constexpr uint16 DarkElf = 32;
constexpr uint16 HalfElf = 64;
constexpr uint16 Dwarf = 128;
constexpr uint16 Troll = 256;
constexpr uint16 Ogre = 512;
constexpr uint16 Halfling = 1024;
constexpr uint16 Gnome = 2048;
constexpr uint16 Iksar = 4096;
constexpr uint16 VahShir = 8192;
constexpr uint16 Froglok = 16384;
constexpr uint16 Drakkin = 32768;
constexpr uint16 All = 65535;
}
namespace RaceIndex {
constexpr uint16 Human = 1;
constexpr uint16 Barbarian = 2;
constexpr uint16 Erudite = 3;
constexpr uint16 WoodElf = 4;
constexpr uint16 HighElf = 5;
constexpr uint16 DarkElf = 6;
constexpr uint16 HalfElf = 7;
constexpr uint16 Dwarf = 8;
constexpr uint16 Troll = 9;
constexpr uint16 Ogre = 10;
constexpr uint16 Halfling = 11;
constexpr uint16 Gnome = 12;
constexpr uint16 Iksar = 13;
constexpr uint16 VahShir = 14;
constexpr uint16 Froglok = 15;
constexpr uint16 Drakkin = 16;
}
namespace RaceAppearance {
bool IsValidBeard(uint16 race_id, uint8 gender_id, uint8 beard_value, bool use_luclin = true);
bool IsValidBeardColor(uint16 race_id, uint8 gender_id, uint8 beard_color_value, bool use_luclin = true);
bool IsValidDetail(uint16 race_id, uint8 gender_id, uint32 detail_value, bool use_luclin = true);
bool IsValidEyeColor(uint16 race_id, uint8 gender_id, uint8 eye_color_value, bool use_luclin = true);
bool IsValidFace(uint16 race_id, uint8 gender_id, uint8 face_value, bool use_luclin = true);
bool IsValidHair(uint16 race_id, uint8 gender_id, uint8 hair_value, bool use_luclin = true);
bool IsValidHairColor(uint16 race_id, uint8 gender_id, uint8 hair_color_value, bool use_luclin = true);
bool IsValidHeritage(uint16 race_id, uint8 gender_id, uint32 heritage_value, bool use_luclin = true);
bool IsValidTattoo(uint16 race_id, uint8 gender_id, uint32 tattoo_value, bool use_luclin = true);
bool IsValidWoad(uint16 race_id, uint8 gender_id, uint8 woad_value, bool use_luclin = true);
constexpr int HumanMale = (Race::Human << 8) | Gender::Male;
constexpr int HumanFemale = (Race::Human << 8) | Gender::Female;
constexpr int BarbarianMale = (Race::Barbarian << 8) | Gender::Male;
constexpr int BarbarianFemale = (Race::Barbarian << 8) | Gender::Female;
constexpr int EruditeMale = (Race::Erudite << 8) | Gender::Male;
constexpr int EruditeFemale = (Race::Erudite << 8) | Gender::Female;
constexpr int WoodElfMale = (Race::WoodElf << 8) | Gender::Male;
constexpr int WoodElfFemale = (Race::WoodElf << 8) | Gender::Female;
constexpr int HighElfMale = (Race::HighElf << 8) | Gender::Male;
constexpr int HighElfFemale = (Race::HighElf << 8) | Gender::Female;
constexpr int DarkElfMale = (Race::DarkElf << 8) | Gender::Male;
constexpr int DarkElfFemale = (Race::DarkElf << 8) | Gender::Female;
constexpr int HalfElfMale = (Race::HalfElf << 8) | Gender::Male;
constexpr int HalfElfFemale = (Race::HalfElf << 8) | Gender::Female;
constexpr int DwarfMale = (Race::Dwarf << 8) | Gender::Male;
constexpr int DwarfFemale = (Race::Dwarf << 8) | Gender::Female;
constexpr int TrollMale = (Race::Troll << 8) | Gender::Male;
constexpr int TrollFemale = (Race::Troll << 8) | Gender::Female;
constexpr int OgreMale = (Race::Ogre << 8) | Gender::Male;
constexpr int OgreFemale = (Race::Ogre << 8) | Gender::Female;
constexpr int HalflingMale = (Race::Halfling << 8) | Gender::Male;
constexpr int HalflingFemale = (Race::Halfling << 8) | Gender::Female;
constexpr int GnomeMale = (Race::Gnome << 8) | Gender::Male;
constexpr int GnomeFemale = (Race::Gnome << 8) | Gender::Female;
constexpr int IksarMale = (Race::Iksar << 8) | Gender::Male;
constexpr int IksarFemale = (Race::Iksar << 8) | Gender::Female;
constexpr int VahShirMale = (Race::VahShir << 8) | Gender::Male;
constexpr int VahShirFemale = (Race::VahShir << 8) | Gender::Female;
constexpr int FroglokMale = (Race::Froglok2 << 8) | Gender::Male;
constexpr int FroglokFemale = (Race::Froglok2 << 8) | Gender::Female;
constexpr int DrakkinMale = (Race::Drakkin << 8) | Gender::Male;
constexpr int DrakkinFemale = (Race::Drakkin << 8) | Gender::Female;
} }
#endif #endif

View File

@ -2076,10 +2076,10 @@ bool CheckCharCreateInfoTitanium(CharCreate_Struct *cc)
classtemp = cc->class_ - 1; classtemp = cc->class_ - 1;
racetemp = cc->race - 1; racetemp = cc->race - 1;
// these have non sequential race numbers so they need to be mapped // these have non sequential race numbers so they need to be mapped
if (cc->race == FROGLOK) racetemp = 14; if (cc->race == Race::Froglok2) racetemp = 14;
if (cc->race == VAHSHIR) racetemp = 13; if (cc->race == Race::VahShir) racetemp = 13;
if (cc->race == IKSAR) racetemp = 12; if (cc->race == Race::Iksar) racetemp = 12;
if (cc->race == DRAKKIN) racetemp = 15; if (cc->race == Race::Drakkin) racetemp = 15;
// if out of range looking it up in the table would crash stuff // if out of range looking it up in the table would crash stuff
// so we return from these // so we return from these
@ -2186,43 +2186,43 @@ void Client::SetRaceStartingSkills( PlayerProfile_Struct *pp )
{ {
switch( pp->race ) switch( pp->race )
{ {
case BARBARIAN: case Race::Barbarian:
case DWARF: case Race::Dwarf:
case ERUDITE: case Race::Erudite:
case HALF_ELF: case Race::HalfElf:
case HIGH_ELF: case Race::HighElf:
case HUMAN: case Race::Human:
case OGRE: case Race::Ogre:
case TROLL: case Race::Troll:
case DRAKKIN: //Drakkin are supposed to get a starting AA Skill case Race::Drakkin: //Drakkin are supposed to get a starting AA Skill
{ {
// No Race Specific Skills // No Race Specific Skills
break; break;
} }
case DARK_ELF: case Race::DarkElf:
{ {
pp->skills[EQ::skills::SkillHide] = 50; pp->skills[EQ::skills::SkillHide] = 50;
break; break;
} }
case FROGLOK: case Race::Froglok2:
{ {
if (RuleI(Skills, SwimmingStartValue) < 125) { if (RuleI(Skills, SwimmingStartValue) < 125) {
pp->skills[EQ::skills::SkillSwimming] = 125; pp->skills[EQ::skills::SkillSwimming] = 125;
} }
break; break;
} }
case GNOME: case Race::Gnome:
{ {
pp->skills[EQ::skills::SkillTinkering] = 50; pp->skills[EQ::skills::SkillTinkering] = 50;
break; break;
} }
case HALFLING: case Race::Halfling:
{ {
pp->skills[EQ::skills::SkillHide] = 50; pp->skills[EQ::skills::SkillHide] = 50;
pp->skills[EQ::skills::SkillSneak] = 50; pp->skills[EQ::skills::SkillSneak] = 50;
break; break;
} }
case IKSAR: case Race::Iksar:
{ {
pp->skills[EQ::skills::SkillForage] = 50; pp->skills[EQ::skills::SkillForage] = 50;
if (RuleI(Skills, SwimmingStartValue) < 100) { if (RuleI(Skills, SwimmingStartValue) < 100) {
@ -2230,13 +2230,13 @@ void Client::SetRaceStartingSkills( PlayerProfile_Struct *pp )
} }
break; break;
} }
case WOOD_ELF: case Race::WoodElf:
{ {
pp->skills[EQ::skills::SkillForage] = 50; pp->skills[EQ::skills::SkillForage] = 50;
pp->skills[EQ::skills::SkillHide] = 50; pp->skills[EQ::skills::SkillHide] = 50;
break; break;
} }
case VAHSHIR: case Race::VahShir:
{ {
pp->skills[EQ::skills::SkillSafeFall] = 50; pp->skills[EQ::skills::SkillSafeFall] = 50;
pp->skills[EQ::skills::SkillSneak] = 50; pp->skills[EQ::skills::SkillSneak] = 50;

View File

@ -643,7 +643,7 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S
whomlen = strlen(whom->whom); whomlen = strlen(whom->whom);
if (whom->wrace == 0x001A) { // 0x001A is the old Froglok race number and is sent by the client for /who all froglok if (whom->wrace == 0x001A) { // 0x001A is the old Froglok race number and is sent by the client for /who all froglok
whom->wrace = FROGLOK; // This is what EQEmu uses for the Froglok Race number. whom->wrace = Race::Froglok2; // This is what EQEmu uses for the Froglok Race number.
} }
} }

View File

@ -1619,7 +1619,7 @@ bool Mob::CanUseAlternateAdvancementRank(AA::Rank *rank)
auto race = GetPlayerRaceValue(GetBaseRace()); auto race = GetPlayerRaceValue(GetBaseRace());
race = race > PLAYER_RACE_COUNT ? Race::Human : race; race = race > RaceIndex::Drakkin ? Race::Human : race;
if (!(a->races & (1 << (race - 1)))) { if (!(a->races & (1 << (race - 1)))) {
return false; return false;

View File

@ -896,7 +896,7 @@ int Mob::GetClassRaceACBonus()
ac_bonus = 16; ac_bonus = 16;
} }
if (GetRace() == IKSAR) if (GetRace() == Race::Iksar)
ac_bonus += EQ::Clamp(static_cast<int>(level), 10, 35); ac_bonus += EQ::Clamp(static_cast<int>(level), 10, 35);
return ac_bonus; return ac_bonus;
@ -3545,7 +3545,7 @@ int Mob::GetHandToHandDelay(void)
int iksar = 0; int iksar = 0;
if (IsClient() && CastToClient()->GetItemIDAt(12) == 10652 && GetLevel() > 46) if (IsClient() && CastToClient()->GetItemIDAt(12) == 10652 && GetLevel() > 46)
epic = 280; epic = 280;
else if (GetRace() == IKSAR) else if (GetRace() == Race::Iksar)
iksar = 1; iksar = 1;
// the delay bonus from the monk epic scales up to a skill of 280 // the delay bonus from the monk epic scales up to a skill of 280
if (epic >= skill) if (epic >= skill)
@ -3586,8 +3586,8 @@ int Mob::GetHandToHandDelay(void)
return 16; return 16;
int level = GetLevel(); int level = GetLevel();
if (level > 62) if (level > 62)
return GetRace() == IKSAR ? 21 : 20; return GetRace() == Race::Iksar ? 21 : 20;
return GetRace() == IKSAR ? mnk_iks_delay[level] : mnk_hum_delay[level]; return GetRace() == Race::Iksar ? mnk_iks_delay[level] : mnk_hum_delay[level];
} }
else if (GetClass() == Class::Beastlord) { else if (GetClass() == Class::Beastlord) {
int level = GetLevel(); int level = GetLevel();

View File

@ -317,7 +317,7 @@ Bot::Bot(
); );
} else if (spell.base_value[x1] == -2) // WTF IS THIS } else if (spell.base_value[x1] == -2) // WTF IS THIS
{ {
if (GetRace() == IKSAR || GetRace() == VAHSHIR || GetRace() <= GNOME) { if (GetRace() == Race::Iksar || GetRace() == Race::VahShir || GetRace() <= Race::Gnome) {
SendIllusionPacket( SendIllusionPacket(
AppearanceStruct{ AppearanceStruct{
.gender_id = GetGender(), .gender_id = GetGender(),
@ -346,27 +346,27 @@ Bot::Bot(
} }
switch (spell.base_value[x1]) { switch (spell.base_value[x1]) {
case OGRE: case Race::Ogre:
SendAppearancePacket(AppearanceType::Size, 9); SendAppearancePacket(AppearanceType::Size, 9);
break; break;
case TROLL: case Race::Troll:
SendAppearancePacket(AppearanceType::Size, 8); SendAppearancePacket(AppearanceType::Size, 8);
break; break;
case VAHSHIR: case Race::VahShir:
case BARBARIAN: case Race::Barbarian:
SendAppearancePacket(AppearanceType::Size, 7); SendAppearancePacket(AppearanceType::Size, 7);
break; break;
case HALF_ELF: case Race::HalfElf:
case WOOD_ELF: case Race::WoodElf:
case DARK_ELF: case Race::DarkElf:
case FROGLOK: case Race::Froglok2:
SendAppearancePacket(AppearanceType::Size, 5); SendAppearancePacket(AppearanceType::Size, 5);
break; break;
case DWARF: case Race::Dwarf:
SendAppearancePacket(AppearanceType::Size, 4); SendAppearancePacket(AppearanceType::Size, 4);
break; break;
case HALFLING: case Race::Halfling:
case GNOME: case Race::Gnome:
SendAppearancePacket(AppearanceType::Size, 3); SendAppearancePacket(AppearanceType::Size, 3);
break; break;
default: default:
@ -457,10 +457,10 @@ Bot::Bot(
int resurrection_sickness_spell_id = ( int resurrection_sickness_spell_id = (
RuleB(Bots, OldRaceRezEffects) && RuleB(Bots, OldRaceRezEffects) &&
( (
GetRace() == BARBARIAN || GetRace() == Race::Barbarian ||
GetRace() == DWARF || GetRace() == Race::Dwarf ||
GetRace() == TROLL || GetRace() == Race::Troll ||
GetRace() == OGRE GetRace() == Race::Ogre
) ? ) ?
RuleI(Bots, OldResurrectionSicknessSpell) : RuleI(Bots, OldResurrectionSicknessSpell) :
RuleI(Bots, ResurrectionSicknessSpell) RuleI(Bots, ResurrectionSicknessSpell)
@ -955,9 +955,9 @@ void Bot::GenerateBaseStats()
float BotSize = GetSize(); float BotSize = GetSize();
switch(GetRace()) { switch(GetRace()) {
case HUMAN: // Humans have no race bonus case Race::Human: // Humans have no race bonus
break; break;
case BARBARIAN: case Race::Barbarian:
Strength += 28; Strength += 28;
Stamina += 20; Stamina += 20;
Agility += 7; Agility += 7;
@ -968,7 +968,7 @@ void Bot::GenerateBaseStats()
BotSize = 7.0; BotSize = 7.0;
ColdResist += 10; ColdResist += 10;
break; break;
case ERUDITE: case Race::Erudite:
Strength -= 15; Strength -= 15;
Stamina -= 5; Stamina -= 5;
Agility -= 5; Agility -= 5;
@ -979,7 +979,7 @@ void Bot::GenerateBaseStats()
MagicResist += 5; MagicResist += 5;
DiseaseResist -= 5; DiseaseResist -= 5;
break; break;
case WOOD_ELF: case Race::WoodElf:
Strength -= 10; Strength -= 10;
Stamina -= 10; Stamina -= 10;
Agility += 20; Agility += 20;
@ -987,7 +987,7 @@ void Bot::GenerateBaseStats()
Wisdom += 5; Wisdom += 5;
BotSize = 5.0; BotSize = 5.0;
break; break;
case HIGH_ELF: case Race::HighElf:
Strength -= 20; Strength -= 20;
Stamina -= 10; Stamina -= 10;
Agility += 10; Agility += 10;
@ -996,7 +996,7 @@ void Bot::GenerateBaseStats()
Intelligence += 12; Intelligence += 12;
Charisma += 5; Charisma += 5;
break; break;
case DARK_ELF: case Race::DarkElf:
Strength -= 15; Strength -= 15;
Stamina -= 10; Stamina -= 10;
Agility += 15; Agility += 15;
@ -1005,7 +1005,7 @@ void Bot::GenerateBaseStats()
Charisma -= 15; Charisma -= 15;
BotSize = 5.0; BotSize = 5.0;
break; break;
case HALF_ELF: case Race::HalfElf:
Strength -= 5; Strength -= 5;
Stamina -= 5; Stamina -= 5;
Agility += 15; Agility += 15;
@ -1013,7 +1013,7 @@ void Bot::GenerateBaseStats()
Wisdom -= 15; Wisdom -= 15;
BotSize = 5.5; BotSize = 5.5;
break; break;
case DWARF: case Race::Dwarf:
Strength += 15; Strength += 15;
Stamina += 15; Stamina += 15;
Agility -= 5; Agility -= 5;
@ -1025,7 +1025,7 @@ void Bot::GenerateBaseStats()
MagicResist -= 5; MagicResist -= 5;
PoisonResist += 5; PoisonResist += 5;
break; break;
case TROLL: case Race::Troll:
Strength += 33; Strength += 33;
Stamina += 34; Stamina += 34;
Agility += 8; Agility += 8;
@ -1035,7 +1035,7 @@ void Bot::GenerateBaseStats()
BotSize = 8.0; BotSize = 8.0;
FireResist -= 20; FireResist -= 20;
break; break;
case OGRE: case Race::Ogre:
Strength += 55; Strength += 55;
Stamina += 77; Stamina += 77;
Agility -= 5; Agility -= 5;
@ -1045,7 +1045,7 @@ void Bot::GenerateBaseStats()
Charisma -= 38; Charisma -= 38;
BotSize = 9.0; BotSize = 9.0;
break; break;
case HALFLING: case Race::Halfling:
Strength -= 5; Strength -= 5;
Agility += 20; Agility += 20;
Dexterity += 15; Dexterity += 15;
@ -1056,7 +1056,7 @@ void Bot::GenerateBaseStats()
PoisonResist += 5; PoisonResist += 5;
DiseaseResist += 5; DiseaseResist += 5;
break; break;
case GNOME: case Race::Gnome:
Strength -= 15; Strength -= 15;
Stamina -= 5; Stamina -= 5;
Agility += 10; Agility += 10;
@ -1066,7 +1066,7 @@ void Bot::GenerateBaseStats()
Charisma -= 15; Charisma -= 15;
BotSize = 3.0; BotSize = 3.0;
break; break;
case IKSAR: case Race::Iksar:
Strength -= 5; Strength -= 5;
Stamina -= 5; Stamina -= 5;
Agility += 15; Agility += 15;
@ -1076,7 +1076,7 @@ void Bot::GenerateBaseStats()
MagicResist -= 5; MagicResist -= 5;
FireResist -= 5; FireResist -= 5;
break; break;
case VAHSHIR: case Race::VahShir:
Strength += 15; Strength += 15;
Agility += 15; Agility += 15;
Dexterity -= 5; Dexterity -= 5;
@ -1087,7 +1087,7 @@ void Bot::GenerateBaseStats()
MagicResist -= 5; MagicResist -= 5;
FireResist -= 5; FireResist -= 5;
break; break;
case FROGLOK: case Race::Froglok2:
Strength -= 5; Strength -= 5;
Stamina += 5; Stamina += 5;
Agility += 25; Agility += 25;
@ -1097,7 +1097,7 @@ void Bot::GenerateBaseStats()
MagicResist -= 5; MagicResist -= 5;
FireResist -= 5; FireResist -= 5;
break; break;
case DRAKKIN: case Race::Drakkin:
Strength -= 5; Strength -= 5;
Stamina += 5; Stamina += 5;
Agility += 10; Agility += 10;
@ -1140,7 +1140,7 @@ void Bot::GenerateBaseStats()
void Bot::GenerateAppearance() { void Bot::GenerateAppearance() {
// Randomize facial appearance // Randomize facial appearance
int iFace = 0; int iFace = 0;
if (GetRace() == BARBARIAN) // Barbarian w/Tatoo if (GetRace() == Race::Barbarian) // Barbarian w/Tatoo
{ {
iFace = zone->random.Int(0, 79); iFace = zone->random.Int(0, 79);
} }
@ -1152,13 +1152,13 @@ void Bot::GenerateAppearance() {
int iHair = 0; int iHair = 0;
int iBeard = 0; int iBeard = 0;
int iBeardColor = 1; int iBeardColor = 1;
if (GetRace() == DRAKKIN) { if (GetRace() == Race::Drakkin) {
iHair = zone->random.Int(0, 8); iHair = zone->random.Int(0, 8);
iBeard = zone->random.Int(0, 11); iBeard = zone->random.Int(0, 11);
iBeardColor = zone->random.Int(0, 3); iBeardColor = zone->random.Int(0, 3);
} else if (GetGender()) { } else if (GetGender()) {
iHair = zone->random.Int(0, 2); iHair = zone->random.Int(0, 2);
if (GetRace() == DWARF && zone->random.Int(1, 100) < 50) { if (GetRace() == Race::Dwarf && zone->random.Int(1, 100) < 50) {
iFace += 10; iFace += 10;
} }
} else { } else {
@ -1168,7 +1168,7 @@ void Bot::GenerateAppearance() {
} }
int iHairColor = 0; int iHairColor = 0;
if (GetRace() == DRAKKIN) { if (GetRace() == Race::Drakkin) {
iHairColor = zone->random.Int(0, 3); iHairColor = zone->random.Int(0, 3);
} else { } else {
iHairColor = zone->random.Int(0, 19); iHairColor = zone->random.Int(0, 19);
@ -1176,7 +1176,7 @@ void Bot::GenerateAppearance() {
auto iEyeColor1 = (uint8)zone->random.Int(0, 9); auto iEyeColor1 = (uint8)zone->random.Int(0, 9);
uint8 iEyeColor2 = 0; uint8 iEyeColor2 = 0;
if (GetRace() == DRAKKIN) { if (GetRace() == Race::Drakkin) {
iEyeColor1 = iEyeColor2 = (uint8)zone->random.Int(0, 11); iEyeColor1 = iEyeColor2 = (uint8)zone->random.Int(0, 11);
} else if (zone->random.Int(1, 100) > 96) { } else if (zone->random.Int(1, 100) > 96) {
iEyeColor2 = zone->random.Int(0, 9); iEyeColor2 = zone->random.Int(0, 9);
@ -1187,7 +1187,7 @@ void Bot::GenerateAppearance() {
int iHeritage = 0; int iHeritage = 0;
int iTattoo = 0; int iTattoo = 0;
int iDetails = 0; int iDetails = 0;
if (GetRace() == DRAKKIN) { if (GetRace() == Race::Drakkin) {
iHeritage = zone->random.Int(0, 6); iHeritage = zone->random.Int(0, 6);
iTattoo = zone->random.Int(0, 7); iTattoo = zone->random.Int(0, 7);
iDetails = zone->random.Int(0, 7); iDetails = zone->random.Int(0, 7);
@ -5404,9 +5404,9 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
case Class::Paladin: case Class::Paladin:
{ {
bool is_large_race = ( bool is_large_race = (
GetBaseRace() == OGRE || GetBaseRace() == Race::Ogre ||
GetBaseRace() == TROLL || GetBaseRace() == Race::Troll ||
GetBaseRace() == BARBARIAN GetBaseRace() == Race::Barbarian
); );
bool has_bash_skill = GetSkill(EQ::skills::SkillBash) > 0; bool has_bash_skill = GetSkill(EQ::skills::SkillBash) > 0;
bool has_shield_in_secondary = bool has_shield_in_secondary =

View File

@ -46,9 +46,9 @@ void bot_command_beard_color(Client *c, const Seperator *sep)
uint8 uvalue = Strings::ToInt(sep->arg[1]); uint8 uvalue = Strings::ToInt(sep->arg[1]);
auto fail_type = AFT_None; 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; 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; fail_type = AFT_Value;
else else
my_bot->SetBeardColor(uvalue); 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]); uint8 uvalue = Strings::ToInt(sep->arg[1]);
auto fail_type = AFT_None; 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; 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; fail_type = AFT_Value;
else else
my_bot->SetBeard(uvalue); my_bot->SetBeard(uvalue);
@ -122,9 +122,9 @@ void bot_command_details(Client *c, const Seperator *sep)
uint32 uvalue = Strings::ToInt(sep->arg[1]); uint32 uvalue = Strings::ToInt(sep->arg[1]);
auto fail_type = AFT_None; auto fail_type = AFT_None;
if (my_bot->GetRace() != DRAKKIN) if (my_bot->GetRace() != Race::Drakkin)
fail_type = AFT_Race; 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; fail_type = AFT_Value;
else else
my_bot->SetDrakkinDetails(uvalue); my_bot->SetDrakkinDetails(uvalue);
@ -281,7 +281,7 @@ void bot_command_eyes(Client *c, const Seperator *sep)
// eye_bias = 2; // eye_bias = 2;
auto fail_type = AFT_None; 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; fail_type = AFT_Value;
} }
else { else {
@ -328,12 +328,12 @@ void bot_command_face(Client *c, const Seperator *sep)
uint8 uvalue = Strings::ToInt(sep->arg[1]); uint8 uvalue = Strings::ToInt(sep->arg[1]);
auto fail_type = AFT_None; 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; fail_type = AFT_Value;
} }
else { else {
uint8 old_woad = 0; uint8 old_woad = 0;
if (my_bot->GetRace() == BARBARIAN) if (my_bot->GetRace() == Race::Barbarian)
old_woad = ((my_bot->GetLuclinFace() / 10) * 10); old_woad = ((my_bot->GetLuclinFace() / 10) * 10);
my_bot->SetLuclinFace((old_woad + uvalue)); 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]); uint8 uvalue = Strings::ToInt(sep->arg[1]);
auto fail_type = AFT_None; 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; fail_type = AFT_Value;
else else
my_bot->SetHairColor(uvalue); my_bot->SetHairColor(uvalue);
@ -403,7 +403,7 @@ void bot_command_hairstyle(Client *c, const Seperator *sep)
uint8 uvalue = Strings::ToInt(sep->arg[1]); uint8 uvalue = Strings::ToInt(sep->arg[1]);
auto fail_type = AFT_None; 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; fail_type = AFT_Value;
else else
my_bot->SetHairStyle(uvalue); my_bot->SetHairStyle(uvalue);
@ -440,9 +440,9 @@ void bot_command_heritage(Client *c, const Seperator *sep)
uint32 uvalue = Strings::ToInt(sep->arg[1]); uint32 uvalue = Strings::ToInt(sep->arg[1]);
auto fail_type = AFT_None; auto fail_type = AFT_None;
if (my_bot->GetRace() != DRAKKIN) if (my_bot->GetRace() != Race::Drakkin)
fail_type = AFT_Race; 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; fail_type = AFT_Value;
else else
my_bot->SetDrakkinHeritage(uvalue); my_bot->SetDrakkinHeritage(uvalue);
@ -479,9 +479,9 @@ void bot_command_tattoo(Client *c, const Seperator *sep)
uint32 uvalue = Strings::ToInt(sep->arg[1]); uint32 uvalue = Strings::ToInt(sep->arg[1]);
auto fail_type = AFT_None; auto fail_type = AFT_None;
if (my_bot->GetRace() != DRAKKIN) if (my_bot->GetRace() != Race::Drakkin)
fail_type = AFT_Race; 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; fail_type = AFT_Value;
else else
my_bot->SetDrakkinTattoo(uvalue); my_bot->SetDrakkinTattoo(uvalue);
@ -516,10 +516,10 @@ void bot_command_woad(Client *c, const Seperator *sep)
uint8 uvalue = Strings::ToInt(sep->arg[1]); uint8 uvalue = Strings::ToInt(sep->arg[1]);
auto fail_type = AFT_None; auto fail_type = AFT_None;
if (my_bot->GetRace() != BARBARIAN) { if (my_bot->GetRace() != Race::Barbarian) {
fail_type = AFT_Race; 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; fail_type = AFT_Value;
} }
else { else {

View File

@ -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)) 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.example_format = { fmt::format("{} [reset]/[set [value]] [actionable]", sep->arg[0]) };
p.examples_one = { p.examples_one = {
"To set all bots to follow at a distance of 25:", "To set all bots to follow at a distance of 25:",
fmt::format("{} set 25 spawned", sep->arg[0]) fmt::format("{} set 25 spawned", sep->arg[0])
}; };
p.examples_two = { p.examples_two = {
"To check the curret following distance of all bots:", "To check the curret following distance of all bots:",
fmt::format("{} current spawned", sep->arg[0]) fmt::format("{} current spawned", sep->arg[0])
}; };
p.examples_three = p.examples_three =
{ {
@ -470,10 +470,10 @@ void bot_command_follow_distance(Client *c, const Seperator *sep)
"{} reset byclass {}", "{} reset byclass {}",
sep->arg[0], sep->arg[0],
Class::Wizard Class::Wizard
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" }; p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::string popup_text = c->SendBotCommandHelpWindow(p); std::string popup_text = c->SendBotCommandHelpWindow(p);
popup_text = DialogueWindow::Table(popup_text); 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; const int ab_mask = ActionableBots::ABM_Type2;
uint32 bfd = RuleI(Bots, DefaultFollowDistance); uint32 bfd = RuleI(Bots, DefaultFollowDistance);
bool set_flag = false; bool set_flag = false;
bool current_check = 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]); 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; return;
} }
const int ab_mask = ActionableBots::ABM_Type1; const int ab_mask = ActionableBots::ABM_Type1;
std::string arg1 = sep->arg[1]; std::string arg1 = sep->arg[1];
@ -1057,7 +1057,7 @@ void bot_command_stance(Client *c, const Seperator *sep)
BotCommandHelpParams p; BotCommandHelpParams p;
p.description = { "Change a bot's stance to control the way it behaves." }; 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.", "- Changing a stance will reset all settings to match that stance type.",
"- Any changes made will only save to that stance for future use.", "- 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 Stance::AEBurn
) )
}; };
p.example_format = p.example_format =
{ fmt::format( "{} [current | value]", sep->arg[0]) }; { fmt::format( "{} [current | value]", sep->arg[0]) };
p.examples_one = p.examples_one =
{ {
"To set all bots to BurnAE:", "To set all bots to BurnAE:",
fmt::format("{} {} spawned {}", fmt::format("{} {} spawned {}",
sep->arg[0], sep->arg[0],
Stance::Aggressive, Stance::Aggressive,
Class::ShadowKnight Class::ShadowKnight
) )
}; };
p.examples_two = p.examples_two =
{ {
"To set all Shadowknights to Aggressive:", "To set all Shadowknights to Aggressive:",
fmt::format("{} {} byclass {}", fmt::format("{} {} byclass {}",
sep->arg[0], sep->arg[0],
Stance::Aggressive, Stance::Aggressive,
Class::ShadowKnight Class::ShadowKnight
) )
}; };
p.examples_three = { p.examples_three = {
"To check the current stances of all bots:", "To check the current stances of all bots:",
fmt::format("{} current spawned", sep->arg[0]) fmt::format("{} current spawned", sep->arg[0])
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" }; 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); database.botdb.LoadBotSettings(bot_iter);
if ( 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->GetBotStance() == Stance::Aggressive)
) { ) {
bot_iter->SetTaunting(true); 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->GetPet()->CastToNPC()->SetTaunting(false);
} }
} }
bot_iter->Save(); bot_iter->Save();
++success_count; ++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]); c->Message(Chat::White, "usage: %s ([actionable: target | byname | ownergroup | ownerraid | targetgroup | namesgroup | healrotationtargets | mmr | byclass | byrace | spawned] ([actionable_name]))", sep->arg[0]);
return; return;
} }
const int ab_mask = ActionableBots::ABM_Type1; const int ab_mask = ActionableBots::ABM_Type1;
std::string arg1 = sep->arg[1]; std::string arg1 = sep->arg[1];
@ -1550,7 +1550,7 @@ void bot_command_toggle_ranged(Client *c, const Seperator *sep)
return; return;
} }
std::string arg1 = sep->arg[1]; std::string arg1 = sep->arg[1];
int ab_arg = 1; int ab_arg = 1;
@ -1712,7 +1712,7 @@ void bot_command_toggle_helm(Client *c, const Seperator *sep)
return; return;
} }
std::string arg1 = sep->arg[1]; std::string arg1 = sep->arg[1];
int ab_arg = 1; int ab_arg = 1;

View File

@ -8445,7 +8445,7 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
merchant->SayString(zone->random.Int(WONT_SELL_DEEDS1, WONT_SELL_DEEDS6)); merchant->SayString(zone->random.Int(WONT_SELL_DEEDS1, WONT_SELL_DEEDS6));
} else if (lowestvalue == fmod.race_mod) { // race biggest } else if (lowestvalue == fmod.race_mod) { // race biggest
// Non-standard race (ex. illusioned to wolf) // Non-standard race (ex. illusioned to wolf)
if (GetRace() > PLAYER_RACE_COUNT) { if (!IsPlayerRace(GetRace())) {
messageid = zone->random.Int(1, 3); // these aren't sequential StringIDs :( messageid = zone->random.Int(1, 3); // these aren't sequential StringIDs :(
switch (messageid) { switch (messageid) {
case 1: case 1:

View File

@ -1011,52 +1011,52 @@ int32 Client::CalcMR()
{ {
//racial bases //racial bases
switch (GetBaseRace()) { switch (GetBaseRace()) {
case HUMAN: case Race::Human:
MR = 25; MR = 25;
break; break;
case BARBARIAN: case Race::Barbarian:
MR = 25; MR = 25;
break; break;
case ERUDITE: case Race::Erudite:
MR = 30; MR = 30;
break; break;
case WOOD_ELF: case Race::WoodElf:
MR = 25; MR = 25;
break; break;
case HIGH_ELF: case Race::HighElf:
MR = 25; MR = 25;
break; break;
case DARK_ELF: case Race::DarkElf:
MR = 25; MR = 25;
break; break;
case HALF_ELF: case Race::HalfElf:
MR = 25; MR = 25;
break; break;
case DWARF: case Race::Dwarf:
MR = 30; MR = 30;
break; break;
case TROLL: case Race::Troll:
MR = 25; MR = 25;
break; break;
case OGRE: case Race::Ogre:
MR = 25; MR = 25;
break; break;
case HALFLING: case Race::Halfling:
MR = 25; MR = 25;
break; break;
case GNOME: case Race::Gnome:
MR = 25; MR = 25;
break; break;
case IKSAR: case Race::Iksar:
MR = 25; MR = 25;
break; break;
case VAHSHIR: case Race::VahShir:
MR = 25; MR = 25;
break; break;
case FROGLOK: case Race::Froglok2:
MR = 30; MR = 30;
break; break;
case DRAKKIN: case Race::Drakkin:
{ {
MR = 25; MR = 25;
if (GetDrakkinHeritage() == 2) if (GetDrakkinHeritage() == 2)
@ -1085,52 +1085,52 @@ int32 Client::CalcFR()
{ {
//racial bases //racial bases
switch (GetBaseRace()) { switch (GetBaseRace()) {
case HUMAN: case Race::Human:
FR = 25; FR = 25;
break; break;
case BARBARIAN: case Race::Barbarian:
FR = 25; FR = 25;
break; break;
case ERUDITE: case Race::Erudite:
FR = 25; FR = 25;
break; break;
case WOOD_ELF: case Race::WoodElf:
FR = 25; FR = 25;
break; break;
case HIGH_ELF: case Race::HighElf:
FR = 25; FR = 25;
break; break;
case DARK_ELF: case Race::DarkElf:
FR = 25; FR = 25;
break; break;
case HALF_ELF: case Race::HalfElf:
FR = 25; FR = 25;
break; break;
case DWARF: case Race::Dwarf:
FR = 25; FR = 25;
break; break;
case TROLL: case Race::Troll:
FR = 5; FR = 5;
break; break;
case OGRE: case Race::Ogre:
FR = 25; FR = 25;
break; break;
case HALFLING: case Race::Halfling:
FR = 25; FR = 25;
break; break;
case GNOME: case Race::Gnome:
FR = 25; FR = 25;
break; break;
case IKSAR: case Race::Iksar:
FR = 30; FR = 30;
break; break;
case VAHSHIR: case Race::VahShir:
FR = 25; FR = 25;
break; break;
case FROGLOK: case Race::Froglok2:
FR = 25; FR = 25;
break; break;
case DRAKKIN: case Race::Drakkin:
{ {
FR = 25; FR = 25;
if (GetDrakkinHeritage() == 0) if (GetDrakkinHeritage() == 0)
@ -1171,52 +1171,52 @@ int32 Client::CalcDR()
{ {
//racial bases //racial bases
switch (GetBaseRace()) { switch (GetBaseRace()) {
case HUMAN: case Race::Human:
DR = 15; DR = 15;
break; break;
case BARBARIAN: case Race::Barbarian:
DR = 15; DR = 15;
break; break;
case ERUDITE: case Race::Erudite:
DR = 10; DR = 10;
break; break;
case WOOD_ELF: case Race::WoodElf:
DR = 15; DR = 15;
break; break;
case HIGH_ELF: case Race::HighElf:
DR = 15; DR = 15;
break; break;
case DARK_ELF: case Race::DarkElf:
DR = 15; DR = 15;
break; break;
case HALF_ELF: case Race::HalfElf:
DR = 15; DR = 15;
break; break;
case DWARF: case Race::Dwarf:
DR = 15; DR = 15;
break; break;
case TROLL: case Race::Troll:
DR = 15; DR = 15;
break; break;
case OGRE: case Race::Ogre:
DR = 15; DR = 15;
break; break;
case HALFLING: case Race::Halfling:
DR = 20; DR = 20;
break; break;
case GNOME: case Race::Gnome:
DR = 15; DR = 15;
break; break;
case IKSAR: case Race::Iksar:
DR = 15; DR = 15;
break; break;
case VAHSHIR: case Race::VahShir:
DR = 15; DR = 15;
break; break;
case FROGLOK: case Race::Froglok2:
DR = 15; DR = 15;
break; break;
case DRAKKIN: case Race::Drakkin:
{ {
DR = 15; DR = 15;
if (GetDrakkinHeritage() == 1) if (GetDrakkinHeritage() == 1)
@ -1263,52 +1263,52 @@ int32 Client::CalcPR()
{ {
//racial bases //racial bases
switch (GetBaseRace()) { switch (GetBaseRace()) {
case HUMAN: case Race::Human:
PR = 15; PR = 15;
break; break;
case BARBARIAN: case Race::Barbarian:
PR = 15; PR = 15;
break; break;
case ERUDITE: case Race::Erudite:
PR = 15; PR = 15;
break; break;
case WOOD_ELF: case Race::WoodElf:
PR = 15; PR = 15;
break; break;
case HIGH_ELF: case Race::HighElf:
PR = 15; PR = 15;
break; break;
case DARK_ELF: case Race::DarkElf:
PR = 15; PR = 15;
break; break;
case HALF_ELF: case Race::HalfElf:
PR = 15; PR = 15;
break; break;
case DWARF: case Race::Dwarf:
PR = 20; PR = 20;
break; break;
case TROLL: case Race::Troll:
PR = 15; PR = 15;
break; break;
case OGRE: case Race::Ogre:
PR = 15; PR = 15;
break; break;
case HALFLING: case Race::Halfling:
PR = 20; PR = 20;
break; break;
case GNOME: case Race::Gnome:
PR = 15; PR = 15;
break; break;
case IKSAR: case Race::Iksar:
PR = 15; PR = 15;
break; break;
case VAHSHIR: case Race::VahShir:
PR = 15; PR = 15;
break; break;
case FROGLOK: case Race::Froglok2:
PR = 30; PR = 30;
break; break;
case DRAKKIN: case Race::Drakkin:
{ {
PR = 15; PR = 15;
if (GetDrakkinHeritage() == 3) if (GetDrakkinHeritage() == 3)
@ -1355,52 +1355,52 @@ int32 Client::CalcCR()
{ {
//racial bases //racial bases
switch (GetBaseRace()) { switch (GetBaseRace()) {
case HUMAN: case Race::Human:
CR = 25; CR = 25;
break; break;
case BARBARIAN: case Race::Barbarian:
CR = 35; CR = 35;
break; break;
case ERUDITE: case Race::Erudite:
CR = 25; CR = 25;
break; break;
case WOOD_ELF: case Race::WoodElf:
CR = 25; CR = 25;
break; break;
case HIGH_ELF: case Race::HighElf:
CR = 25; CR = 25;
break; break;
case DARK_ELF: case Race::DarkElf:
CR = 25; CR = 25;
break; break;
case HALF_ELF: case Race::HalfElf:
CR = 25; CR = 25;
break; break;
case DWARF: case Race::Dwarf:
CR = 25; CR = 25;
break; break;
case TROLL: case Race::Troll:
CR = 25; CR = 25;
break; break;
case OGRE: case Race::Ogre:
CR = 25; CR = 25;
break; break;
case HALFLING: case Race::Halfling:
CR = 25; CR = 25;
break; break;
case GNOME: case Race::Gnome:
CR = 25; CR = 25;
break; break;
case IKSAR: case Race::Iksar:
CR = 15; CR = 15;
break; break;
case VAHSHIR: case Race::VahShir:
CR = 25; CR = 25;
break; break;
case FROGLOK: case Race::Froglok2:
CR = 25; CR = 25;
break; break;
case DRAKKIN: case Race::Drakkin:
{ {
CR = 25; CR = 25;
if (GetDrakkinHeritage() == 4) if (GetDrakkinHeritage() == 4)

View File

@ -1515,23 +1515,23 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
switch (race) switch (race)
{ {
case OGRE: case Race::Ogre:
size = 9; break; size = 9; break;
case TROLL: case Race::Troll:
size = 8; break; size = 8; break;
case VAHSHIR: case BARBARIAN: case Race::VahShir: case Race::Barbarian:
size = 7; break; size = 7; break;
case HUMAN: case HIGH_ELF: case ERUDITE: case IKSAR: case DRAKKIN: case Race::Human: case Race::HighElf: case Race::Erudite: case Race::Iksar: case Race::Drakkin:
size = 6; break; size = 6; break;
case HALF_ELF: case Race::HalfElf:
size = 5.5; break; size = 5.5; break;
case WOOD_ELF: case DARK_ELF: case FROGLOK: case Race::WoodElf: case Race::DarkElf: case Race::Froglok2:
size = 5; break; size = 5; break;
case DWARF: case Race::Dwarf:
size = 4; break; size = 4; break;
case HALFLING: case Race::Halfling:
size = 3.5; break; size = 3.5; break;
case GNOME: case Race::Gnome:
size = 3; break; size = 3; break;
default: default:
size = 0; size = 0;

View File

@ -1648,7 +1648,7 @@ void Client::OPGMTraining(const EQApplicationPacket *app)
//#pragma GCC push_options //#pragma GCC push_options
//#pragma GCC optimize ("O0") //#pragma GCC optimize ("O0")
for (int sk = EQ::skills::Skill1HBlunt; sk <= EQ::skills::HIGHEST_SKILL; ++sk) { for (int sk = EQ::skills::Skill1HBlunt; sk <= EQ::skills::HIGHEST_SKILL; ++sk) {
if (sk == EQ::skills::SkillTinkering && GetRace() != GNOME) { if (sk == EQ::skills::SkillTinkering && GetRace() != Race::Gnome) {
gmtrain->skills[sk] = 0; //Non gnomes can't tinker! gmtrain->skills[sk] = 0; //Non gnomes can't tinker!
} else { } else {
gmtrain->skills[sk] = GetMaxSkillAfterSpecializationRules((EQ::skills::SkillType)sk, MaxSkill((EQ::skills::SkillType)sk, GetClass(), RuleI(Character, MaxLevel))); gmtrain->skills[sk] = GetMaxSkillAfterSpecializationRules((EQ::skills::SkillType)sk, MaxSkill((EQ::skills::SkillType)sk, GetClass(), RuleI(Character, MaxLevel)));

View File

@ -1389,7 +1389,7 @@ void EntityList::SendZoneSpawnsBulk(Client *client)
bool is_delayed_packet = ( bool is_delayed_packet = (
DistanceSquared(client_position, spawn_position) > distance_max || DistanceSquared(client_position, spawn_position) > distance_max ||
(spawn->IsClient() && (spawn->GetRace() == MINOR_ILL_OBJ || spawn->GetRace() == TREE)) (spawn->IsClient() && (spawn->GetRace() == Race::MinorIllusion || spawn->GetRace() == Race::Tree))
); );
if (is_delayed_packet) { if (is_delayed_packet) {
@ -1413,7 +1413,7 @@ void EntityList::SendZoneSpawnsBulk(Client *client)
* *
* Illusion races on PCs don't work as a mass spawn * Illusion races on PCs don't work as a mass spawn
* But they will work as an add_spawn AFTER CLIENT_CONNECTED. * But they will work as an add_spawn AFTER CLIENT_CONNECTED.
* if (spawn->IsClient() && (race == MINOR_ILL_OBJ || race == TREE)) { * if (spawn->IsClient() && (race == Race::MinorIllusion || race == Race::Tree)) {
* app = new EQApplicationPacket; * app = new EQApplicationPacket;
* spawn->CreateSpawnPacket(app); * spawn->CreateSpawnPacket(app);
* client->QueuePacket(app, true, Client::CLIENT_CONNECTED); * client->QueuePacket(app, true, Client::CLIENT_CONNECTED);

View File

@ -130,7 +130,7 @@ uint64 Client::CalcEXP(uint8 consider_level, bool ignore_modifiers) {
if ( if (
GetClass() == Class::Warrior || GetClass() == Class::Warrior ||
GetClass() == Class::Rogue || GetClass() == Class::Rogue ||
GetBaseRace() == HALFLING GetBaseRace() == Race::Halfling
) { ) {
total_modifier *= 1.05; total_modifier *= 1.05;
} }
@ -291,7 +291,7 @@ void Client::CalculateStandardAAExp(uint64 &add_aaxp, uint8 conlevel, bool resex
// Shouldn't race not affect AA XP? // Shouldn't race not affect AA XP?
if (RuleB(Character, UseRaceClassExpBonuses)) if (RuleB(Character, UseRaceClassExpBonuses))
{ {
if (GetBaseRace() == HALFLING) { if (GetBaseRace() == Race::Halfling) {
aatotalmod *= 1.05; aatotalmod *= 1.05;
} }
@ -439,7 +439,7 @@ void Client::CalculateExp(uint64 in_add_exp, uint64 &add_exp, uint64 &add_aaxp,
if (RuleB(Character, UseRaceClassExpBonuses)) if (RuleB(Character, UseRaceClassExpBonuses))
{ {
if (GetBaseRace() == HALFLING) { if (GetBaseRace() == Race::Halfling) {
totalmod *= 1.05; totalmod *= 1.05;
} }
@ -1057,13 +1057,13 @@ uint32 Client::GetEXPForLevel(uint16 check_level)
if(RuleB(Character,UseOldRaceExpPenalties)) if(RuleB(Character,UseOldRaceExpPenalties))
{ {
float racemod = 1.0; float racemod = 1.0;
if(GetBaseRace() == TROLL || GetBaseRace() == IKSAR) { if(GetBaseRace() == Race::Troll || GetBaseRace() == Race::Iksar) {
racemod = 1.2; racemod = 1.2;
} else if(GetBaseRace() == OGRE) { } else if(GetBaseRace() == Race::Ogre) {
racemod = 1.15; racemod = 1.15;
} else if(GetBaseRace() == BARBARIAN) { } else if(GetBaseRace() == Race::Barbarian) {
racemod = 1.05; racemod = 1.05;
} else if(GetBaseRace() == HALFLING) { } else if(GetBaseRace() == Race::Halfling) {
racemod = 0.95; racemod = 0.95;
} }

View File

@ -83,7 +83,7 @@ void command_feature(Client *c, const Seperator *sep)
feature_changed = "Beard Color"; feature_changed = "Beard Color";
value_changed = f.beardcolor; value_changed = f.beardcolor;
} else if (is_details) { } else if (is_details) {
if (t->GetRace() != DRAKKIN) { if (t->GetRace() != Race::Drakkin) {
c->Message(Chat::White, "You must target a Drakkin to use this command."); c->Message(Chat::White, "You must target a Drakkin to use this command.");
return; return;
} }
@ -116,7 +116,7 @@ void command_feature(Client *c, const Seperator *sep)
feature_changed = "Helmet Texture"; feature_changed = "Helmet Texture";
value_changed = helm_texture; value_changed = helm_texture;
} else if (is_heritage) { } else if (is_heritage) {
if (t->GetRace() != DRAKKIN) { if (t->GetRace() != Race::Drakkin) {
c->Message(Chat::White, "You must target a Drakkin to use this command."); c->Message(Chat::White, "You must target a Drakkin to use this command.");
return; return;
} }
@ -148,7 +148,7 @@ void command_feature(Client *c, const Seperator *sep)
feature_changed = "Size"; feature_changed = "Size";
value_changed = size; value_changed = size;
} else if (is_tattoo) { } else if (is_tattoo) {
if (t->GetRace() != DRAKKIN) { if (t->GetRace() != Race::Drakkin) {
c->Message(Chat::White, "You must target a Drakkin to use this command."); c->Message(Chat::White, "You must target a Drakkin to use this command.");
return; return;
} }

View File

@ -8,7 +8,7 @@ void command_randomfeatures(Client *c, const Seperator *sep)
} }
auto target = c->GetTarget(); auto target = c->GetTarget();
if (target->RandomizeFeatures()) { if (target->RandomizeFeatures()) {
c->Message( c->Message(
Chat::White, Chat::White,

View File

@ -3819,7 +3819,7 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
// Adjust all settings based on the min and max for each feature of each race and gender // Adjust all settings based on the min and max for each feature of each race and gender
switch (GetRace()) { switch (GetRace()) {
case HUMAN: case Race::Human:
new_hair_color = zone->random.Int(0, 19); new_hair_color = zone->random.Int(0, 19);
if (current_gender == Gender::Male) { if (current_gender == Gender::Male) {
@ -3831,7 +3831,7 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case BARBARIAN: case Race::Barbarian:
new_hair_color = zone->random.Int(0, 19); new_hair_color = zone->random.Int(0, 19);
new_luclin_face = zone->random.Int(0, 87); new_luclin_face = zone->random.Int(0, 87);
@ -3844,7 +3844,7 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case ERUDITE: case Race::Erudite:
if (current_gender == Gender::Male) { if (current_gender == Gender::Male) {
new_beard_color = zone->random.Int(0, 19); new_beard_color = zone->random.Int(0, 19);
new_beard = zone->random.Int(0, 5); new_beard = zone->random.Int(0, 5);
@ -3854,7 +3854,7 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case WOOD_ELF: case Race::WoodElf:
new_hair_color = zone->random.Int(0, 19); new_hair_color = zone->random.Int(0, 19);
if (current_gender == Gender::Male) { if (current_gender == Gender::Male) {
@ -3864,7 +3864,7 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case HIGH_ELF: case Race::HighElf:
new_hair_color = zone->random.Int(0, 14); new_hair_color = zone->random.Int(0, 14);
if (current_gender == Gender::Male) { if (current_gender == Gender::Male) {
@ -3876,7 +3876,7 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case DARK_ELF: case Race::DarkElf:
new_hair_color = zone->random.Int(13, 18); new_hair_color = zone->random.Int(13, 18);
if (current_gender == Gender::Male) { if (current_gender == Gender::Male) {
@ -3888,7 +3888,7 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case HALF_ELF: case Race::HalfElf:
new_hair_color = zone->random.Int(0, 19); new_hair_color = zone->random.Int(0, 19);
if (current_gender == Gender::Male) { if (current_gender == Gender::Male) {
@ -3900,7 +3900,7 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case DWARF: case Race::Dwarf:
new_hair_color = zone->random.Int(0, 19); new_hair_color = zone->random.Int(0, 19);
new_beard_color = new_hair_color; new_beard_color = new_hair_color;
@ -3913,7 +3913,7 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case TROLL: case Race::Troll:
new_eye_color_one = zone->random.Int(0, 10); new_eye_color_one = zone->random.Int(0, 10);
new_eye_color_two = zone->random.Int(0, 10); new_eye_color_two = zone->random.Int(0, 10);
@ -3923,14 +3923,14 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case OGRE: case Race::Ogre:
if (current_gender == Gender::Female) { if (current_gender == Gender::Female) {
new_hair_style = zone->random.Int(0, 3); new_hair_style = zone->random.Int(0, 3);
new_hair_color = zone->random.Int(0, 23); new_hair_color = zone->random.Int(0, 23);
} }
break; break;
case HALFLING: case Race::Halfling:
new_hair_color = zone->random.Int(0, 19); new_hair_color = zone->random.Int(0, 19);
if (current_gender == Gender::Male) { if (current_gender == Gender::Male) {
@ -3942,7 +3942,7 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case GNOME: case Race::Gnome:
new_hair_color = zone->random.Int(0, 24); new_hair_color = zone->random.Int(0, 24);
if (current_gender == Gender::Male) { if (current_gender == Gender::Male) {
@ -3954,14 +3954,14 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
} }
break; break;
case IKSAR: case Race::Iksar:
case VAHSHIR: case Race::VahShir:
new_luclin_face = zone->random.Int(0, 7); new_luclin_face = zone->random.Int(0, 7);
break; break;
case FROGLOK: case Race::Froglok2:
new_luclin_face = zone->random.Int(0, 9); new_luclin_face = zone->random.Int(0, 9);
break; break;
case DRAKKIN: case Race::Drakkin:
new_hair_color = zone->random.Int(0, 3); new_hair_color = zone->random.Int(0, 3);
new_beard_color = new_hair_color; new_beard_color = new_hair_color;
new_eye_color_one = zone->random.Int(0, 11); new_eye_color_one = zone->random.Int(0, 11);
@ -4023,8 +4023,8 @@ bool Mob::RandomizeFeatures(bool send_illusion, bool set_variables)
uint16 Mob::GetFactionRace() { uint16 Mob::GetFactionRace() {
uint16 current_race = GetRace(); uint16 current_race = GetRace();
if (IsPlayerRace(current_race) || current_race == TREE || if (IsPlayerRace(current_race) || current_race == Race::Tree ||
current_race == MINOR_ILL_OBJ) { current_race == Race::MinorIllusion) {
return current_race; return current_race;
} }
else { else {
@ -7704,7 +7704,7 @@ bool Mob::CanRaceEquipItem(uint32 item_id)
} }
auto item_races = itm->Races; auto item_races = itm->Races;
if(item_races == PLAYER_RACE_ALL_MASK) { if(item_races == RaceBitmask::All) {
return true; return true;
} }

View File

@ -2901,7 +2901,7 @@ void NPC::DoNPCEmote(uint8 event_, uint32 emote_id, Mob* t)
// Mob Variables // Mob Variables
Strings::FindReplace(processed, "$mname", GetCleanName()); Strings::FindReplace(processed, "$mname", GetCleanName());
Strings::FindReplace(processed, "$mracep", GetRacePlural()); Strings::FindReplace(processed, "$mracep", GetRacePlural());
Strings::FindReplace(processed, "$mrace", GetPlayerRaceName(GetRace())); Strings::FindReplace(processed, "$mrace", GetRaceIDName(GetRace()));
Strings::FindReplace(processed, "$mclass", GetClassIDName(GetClass())); Strings::FindReplace(processed, "$mclass", GetClassIDName(GetClass()));
Strings::FindReplace(processed, "$mclassp", GetClassPlural()); Strings::FindReplace(processed, "$mclassp", GetClassPlural());
@ -2909,7 +2909,7 @@ void NPC::DoNPCEmote(uint8 event_, uint32 emote_id, Mob* t)
Strings::FindReplace(processed, "$name", t ? t->GetCleanName() : "foe"); Strings::FindReplace(processed, "$name", t ? t->GetCleanName() : "foe");
Strings::FindReplace(processed, "$class", t ? GetClassIDName(t->GetClass()) : "class"); Strings::FindReplace(processed, "$class", t ? GetClassIDName(t->GetClass()) : "class");
Strings::FindReplace(processed, "$classp", t ? t->GetClassPlural() : "classes"); Strings::FindReplace(processed, "$classp", t ? t->GetClassPlural() : "classes");
Strings::FindReplace(processed, "$race", t ? GetPlayerRaceName(t->GetRace()) : "race"); Strings::FindReplace(processed, "$race", t ? GetRaceIDName(t->GetRace()) : "race");
Strings::FindReplace(processed, "$racep", t ? t->GetRacePlural() : "races"); Strings::FindReplace(processed, "$racep", t ? t->GetRacePlural() : "races");
if (emoteid == e->emoteid) { if (emoteid == e->emoteid) {
@ -3792,7 +3792,7 @@ bool NPC::IsGuard()
case Race::HalasCitizen: case Race::HalasCitizen:
case Race::NeriakCitizen: case Race::NeriakCitizen:
case Race::GrobbCitizen: case Race::GrobbCitizen:
case OGGOK_CITIZEN: case Race::OggokCitizen:
case Race::KaladimCitizen: case Race::KaladimCitizen:
return true; return true;
default: default:

View File

@ -352,9 +352,9 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk)
if (ca_atk->m_skill == EQ::skills::SkillBash) { // SLAM - Bash without a shield equipped if (ca_atk->m_skill == EQ::skills::SkillBash) { // SLAM - Bash without a shield equipped
switch (GetRace()) { switch (GetRace()) {
case OGRE: case Race::Ogre:
case TROLL: case Race::Troll:
case BARBARIAN: case Race::Barbarian:
bypass_skill_check = true; bypass_skill_check = true;
default: default:
break; break;

View File

@ -466,7 +466,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
} }
} }
else if (spec.tradeskill == EQ::skills::SkillTinkering) { else if (spec.tradeskill == EQ::skills::SkillTinkering) {
if (user_pp.race != GNOME) { if (user_pp.race != Race::Gnome) {
user->Message(Chat::Red, "Only gnomes can tinker."); user->Message(Chat::Red, "Only gnomes can tinker.");
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0); auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp); user->QueuePacket(outapp);
@ -643,7 +643,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
} }
} }
else if (spec.tradeskill == EQ::skills::SkillTinkering) { else if (spec.tradeskill == EQ::skills::SkillTinkering) {
if (user->GetRace() != GNOME) { if (user->GetRace() != Race::Gnome) {
user->Message(Chat::Red, "Only gnomes can tinker."); user->Message(Chat::Red, "Only gnomes can tinker.");
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0); auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp); user->QueuePacket(outapp);

View File

@ -4276,7 +4276,7 @@ bool WorldServer::SendVoiceMacro(Client* From, uint32 Type, char* Target, uint32
uint16 player_race = GetPlayerRaceValue(From->GetRace()); uint16 player_race = GetPlayerRaceValue(From->GetRace());
if (player_race == PLAYER_RACE_UNKNOWN) { if (player_race == Race::Doug) {
player_race = From->GetBaseRace(); player_race = From->GetBaseRace();
} }