mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 23:20:25 +00:00
[Bug Fix] Fix Appearance Issues (#3520)
* [Bug Fix] Fix Appearance Issues # Notes - Changing race, gender, or texture of a Mob could result in it changing sizes due to use not sending the size as part of the appearance packet. - Also converts the parameterized method to a struct parameter so that we can optionally send things without back-filling multiple arguments. * Gender cleanup. * Fix. * Formatting.
This commit is contained in:
+38
-16
@@ -268,26 +268,48 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
|
||||
case SE_IllusionCopy:
|
||||
case SE_Illusion: {
|
||||
if (spell.base_value[x1] == -1) {
|
||||
if (gender == 1)
|
||||
gender = 0;
|
||||
else if (gender == 0)
|
||||
gender = 1;
|
||||
SendIllusionPacket(GetRace(), gender, 0xFF, 0xFF);
|
||||
}
|
||||
else if (spell.base_value[x1] == -2) // WTF IS THIS
|
||||
if (gender == FEMALE) {
|
||||
gender = MALE;
|
||||
} else if (gender == MALE) {
|
||||
gender = FEMALE;
|
||||
}
|
||||
|
||||
SendIllusionPacket(
|
||||
AppearanceStruct{
|
||||
.gender_id = gender,
|
||||
.race_id = GetRace(),
|
||||
}
|
||||
);
|
||||
} else if (spell.base_value[x1] == -2) // WTF IS THIS
|
||||
{
|
||||
if (GetRace() == IKSAR || GetRace() == VAHSHIR || GetRace() <= GNOME) {
|
||||
SendIllusionPacket(GetRace(), GetGender(), spell.limit_value[x1], spell.max_value[x1]);
|
||||
SendIllusionPacket(
|
||||
AppearanceStruct{
|
||||
.gender_id = GetGender(),
|
||||
.helmet_texture = static_cast<uint8>(spell.max_value[x1]),
|
||||
.race_id = GetRace(),
|
||||
.texture = static_cast<uint8>(spell.limit_value[x1]),
|
||||
}
|
||||
);
|
||||
}
|
||||
} else if (spell.max_value[x1] > 0) {
|
||||
SendIllusionPacket(
|
||||
AppearanceStruct{
|
||||
.helmet_texture = static_cast<uint8>(spell.max_value[x1]),
|
||||
.race_id = static_cast<uint16>(spell.base_value[x1]),
|
||||
.texture = static_cast<uint8>(spell.limit_value[x1]),
|
||||
}
|
||||
);
|
||||
} else {
|
||||
SendIllusionPacket(
|
||||
AppearanceStruct{
|
||||
.helmet_texture = static_cast<uint8>(spell.max_value[x1]),
|
||||
.race_id = static_cast<uint16>(spell.base_value[x1]),
|
||||
.texture = static_cast<uint8>(spell.limit_value[x1]),
|
||||
}
|
||||
);
|
||||
}
|
||||
else if (spell.max_value[x1] > 0)
|
||||
{
|
||||
SendIllusionPacket(spell.base_value[x1], 0xFF, spell.limit_value[x1], spell.max_value[x1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendIllusionPacket(spell.base_value[x1], 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
|
||||
switch (spell.base_value[x1]) {
|
||||
case OGRE:
|
||||
SendAppearancePacket(AT_Size, 9);
|
||||
|
||||
Reference in New Issue
Block a user