Fix some bugs with the use of the model field in npc_types

This commit is contained in:
Noudess 2019-10-15 13:22:49 -04:00
parent bcf0af0a8d
commit 7eb2e834b1
3 changed files with 11 additions and 5 deletions

View File

@ -3061,6 +3061,7 @@ void command_texture(Client *c, const Seperator *sep)
{ {
uint16 texture; uint16 texture;
if (sep->IsNumber(1) && atoi(sep->arg[1]) >= 0 && atoi(sep->arg[1]) <= 255) { if (sep->IsNumber(1) && atoi(sep->arg[1]) >= 0 && atoi(sep->arg[1]) <= 255) {
texture = atoi(sep->arg[1]); texture = atoi(sep->arg[1]);
uint8 helm = 0xFF; uint8 helm = 0xFF;
@ -3072,9 +3073,9 @@ void command_texture(Client *c, const Seperator *sep)
{ {
c->SendTextureWC(i, texture); c->SendTextureWC(i, texture);
} }
else if ((c->GetTarget()->GetRace() > 0 && c->GetTarget()->GetRace() <= 12) || else if ((c->GetTarget()->GetModel() > 0 && c->GetTarget()->GetModel() <= 12) ||
c->GetTarget()->GetRace() == 128 || c->GetTarget()->GetRace() == 130 || c->GetTarget()->GetModel() == 128 || c->GetTarget()->GetModel() == 130 ||
c->GetTarget()->GetRace() == 330 || c->GetTarget()->GetRace() == 522) { c->GetTarget()->GetModel() == 330 || c->GetTarget()->GetModel() == 522) {
for (i = EQEmu::textures::textureBegin; i <= EQEmu::textures::LastTintableTexture; i++) for (i = EQEmu::textures::textureBegin; i <= EQEmu::textures::LastTintableTexture; i++)
{ {
c->GetTarget()->SendTextureWC(i, texture); c->GetTarget()->SendTextureWC(i, texture);
@ -3093,7 +3094,7 @@ void command_texture(Client *c, const Seperator *sep)
} }
if ((c->GetTarget()) && (c->Admin() >= commandTextureOthers)) if ((c->GetTarget()) && (c->Admin() >= commandTextureOthers))
c->GetTarget()->SendIllusionPacket(c->GetTarget()->GetRace(), 0xFF, texture, helm); c->GetTarget()->SendIllusionPacket(c->GetTarget()->GetModel(), 0xFF, texture, helm);
else else
c->SendIllusionPacket(c->GetRace(), 0xFF, texture, helm); c->SendIllusionPacket(c->GetRace(), 0xFF, texture, helm);
} }

View File

@ -1736,7 +1736,11 @@ void Mob::SendIllusionPacket(
uint32 new_drakkin_tattoo; uint32 new_drakkin_tattoo;
uint32 new_drakkin_details; uint32 new_drakkin_details;
race = (in_race) ? in_race : GetBaseRace(); race = in_race;
if (race == 0)
{
race = (use_model) ? use_model : GetBaseRace();
}
if (in_gender != 0xFF) if (in_gender != 0xFF)
{ {

View File

@ -449,6 +449,7 @@ public:
virtual inline uint16 GetDeity() const { return deity; } virtual inline uint16 GetDeity() const { return deity; }
virtual EQEmu::deity::DeityTypeBit GetDeityBit() { return EQEmu::deity::ConvertDeityTypeToDeityTypeBit((EQEmu::deity::DeityType)deity); } virtual EQEmu::deity::DeityTypeBit GetDeityBit() { return EQEmu::deity::ConvertDeityTypeToDeityTypeBit((EQEmu::deity::DeityType)deity); }
inline uint16 GetRace() const { return race; } inline uint16 GetRace() const { return race; }
inline uint16 GetModel() const { return (use_model == 0) ? race : use_model; }
inline uint8 GetGender() const { return gender; } inline uint8 GetGender() const { return gender; }
inline uint8 GetTexture() const { return texture; } inline uint8 GetTexture() const { return texture; }
inline uint8 GetHelmTexture() const { return helmtexture; } inline uint8 GetHelmTexture() const { return helmtexture; }