[Cleanup/Feature] Add support for bots to #showstats/#mystats (#3427)

* Initial Push

* Update classes.cpp

* Update mob.cpp

* Update mob.cpp

* Update showstats.cpp

* Update mystats.cpp

* Remove unused variables.

* Update mob.cpp

* Update class.cpp

* Update race.cpp

* Update mob.h
This commit is contained in:
Alex King
2023-07-01 19:47:54 -04:00
committed by GitHub
parent 927d379e75
commit a1f2764978
16 changed files with 1544 additions and 855 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ void FindClass(Client *c, const Seperator *sep)
class_id,
class_name,
(
c->IsPlayerClass(class_id) ?
IsPlayerClass(class_id) ?
fmt::format(
" ({})",
Strings::Commify(GetPlayerClassBit(class_id))
@@ -55,7 +55,7 @@ void FindClass(Client *c, const Seperator *sep)
class_id,
class_name,
(
c->IsPlayerClass(class_id) ?
IsPlayerClass(class_id) ?
fmt::format(
" | ({})",
Strings::Commify(GetPlayerClassBit(class_id))
+2 -2
View File
@@ -13,7 +13,7 @@ void FindRace(Client *c, const Seperator *sep)
race_id,
race_name,
(
c->IsPlayerRace(race_id) ?
IsPlayerRace(race_id) ?
fmt::format(
" ({})",
Strings::Commify(GetPlayerRaceBit(race_id))
@@ -55,7 +55,7 @@ void FindRace(Client *c, const Seperator *sep)
race_id,
race_name,
(
c->IsPlayerRace(race_id) ?
IsPlayerRace(race_id) ?
fmt::format(
" ({})",
Strings::Commify(GetPlayerRaceBit(race_id))
+12 -9
View File
@@ -2,16 +2,19 @@
void command_mystats(Client *c, const Seperator *sep)
{
if (c->GetTarget() && c->GetPet()) {
if (c->GetTarget()->IsPet() && c->GetTarget() == c->GetPet()) {
c->GetTarget()->ShowStats(c);
}
else {
c->ShowStats(c);
}
Mob* t = c;
if (c->GetTarget()) {
t = c->GetTarget();
}
else {
c->ShowStats(c);
if (
(t->IsPet() && t == c->GetPet()) ||
(t->IsBot() && t->CastToBot()->GetOwner() && t->CastToBot()->GetOwner() == c)
) {
t->ShowStats(c);
return;
}
c->ShowStats(c);
}
+5 -5
View File
@@ -2,11 +2,11 @@
void command_showstats(Client *c, const Seperator *sep)
{
if (c->GetTarget() != 0) {
c->GetTarget()->ShowStats(c);
}
else {
c->ShowStats(c);
Mob* t = c;
if (c->GetTarget()) {
t = c->GetTarget();
}
t->ShowStats(c);
}
+2 -2
View File
@@ -20,7 +20,7 @@ void command_texture(Client *c, const Seperator *sep)
target = c->GetTarget();
}
if (Mob::IsPlayerRace(target->GetModel())) { // Player Races Wear Armor, so Wearchange is sent instead
if (IsPlayerRace(target->GetModel())) { // Player Races Wear Armor, so Wearchange is sent instead
for (
int texture_slot = EQ::textures::textureBegin;
texture_slot <= EQ::textures::LastTintableTexture;
@@ -44,7 +44,7 @@ void command_texture(Client *c, const Seperator *sep)
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
texture,
(
Mob::IsPlayerRace(target->GetModel()) ?
IsPlayerRace(target->GetModel()) ?
"" :
fmt::format(
" Helmet Texture: {}",