[Hotfix] SendIllusion revert to October

This commit is contained in:
Chris Miles 2021-06-23 00:17:56 -05:00 committed by GitHub
parent c214c3a95b
commit 1f154af2ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 45 deletions

View File

@ -1815,25 +1815,23 @@ void Mob::SendIllusionPacket(
new_drakkin_details = (in_drakkin_details == 0xFFFFFFFF) ? GetDrakkinDetails() : in_drakkin_details; new_drakkin_details = (in_drakkin_details == 0xFFFFFFFF) ? GetDrakkinDetails() : in_drakkin_details;
new_aa_title = in_aa_title; new_aa_title = in_aa_title;
bool reset_features_to_player_profile = IsClient() && in_race == 0; // Reset features to Base from the Player Profile
if (reset_features_to_player_profile) { if (IsClient() && in_race == 0) {
auto c = CastToClient(); race = CastToClient()->GetBaseRace();
race = c->GetBaseRace(); gender = CastToClient()->GetBaseGender();
gender = c->GetBaseGender();
new_texture = texture = 0xFF; new_texture = texture = 0xFF;
new_helmtexture = helmtexture = 0xFF; new_helmtexture = helmtexture = 0xFF;
new_haircolor = haircolor = c->GetBaseHairColor(); new_haircolor = haircolor = CastToClient()->GetBaseHairColor();
new_beardcolor = beardcolor = c->GetBaseBeardColor(); new_beardcolor = beardcolor = CastToClient()->GetBaseBeardColor();
new_eyecolor1 = eyecolor1 = c->GetBaseEyeColor(); new_eyecolor1 = eyecolor1 = CastToClient()->GetBaseEyeColor();
new_eyecolor2 = eyecolor2 = c->GetBaseEyeColor(); new_eyecolor2 = eyecolor2 = CastToClient()->GetBaseEyeColor();
new_hairstyle = hairstyle = c->GetBaseHairStyle(); new_hairstyle = hairstyle = CastToClient()->GetBaseHairStyle();
new_luclinface = luclinface = c->GetBaseFace(); new_luclinface = luclinface = CastToClient()->GetBaseFace();
new_beard = beard = c->GetBaseBeard(); new_beard = beard = CastToClient()->GetBaseBeard();
new_aa_title = aa_title = 0xFF; new_aa_title = aa_title = 0xFF;
new_drakkin_heritage = drakkin_heritage = c->GetBaseHeritage(); new_drakkin_heritage = drakkin_heritage = CastToClient()->GetBaseHeritage();
new_drakkin_tattoo = drakkin_tattoo = c->GetBaseTattoo(); new_drakkin_tattoo = drakkin_tattoo = CastToClient()->GetBaseTattoo();
new_drakkin_details = drakkin_details = c->GetBaseDetails(); new_drakkin_details = drakkin_details = CastToClient()->GetBaseDetails();
switch (race) { switch (race) {
case OGRE: case OGRE:
size = 9; size = 9;
@ -1864,8 +1862,8 @@ void Mob::SendIllusionPacket(
} }
} }
// update internal values for mob from illusion // update internal values for mob
size = (in_size <= 0.0f) ? GetRaceGenderDefaultHeight(race, gender) : in_size; size = (in_size <= 0.0f) ? GetSize() : in_size;
texture = new_texture; texture = new_texture;
helmtexture = new_helmtexture; helmtexture = new_helmtexture;
haircolor = new_haircolor; haircolor = new_haircolor;
@ -1879,37 +1877,34 @@ void Mob::SendIllusionPacket(
drakkin_tattoo = new_drakkin_tattoo; drakkin_tattoo = new_drakkin_tattoo;
drakkin_details = new_drakkin_details; drakkin_details = new_drakkin_details;
// send packet auto outapp = new EQApplicationPacket(OP_Illusion, sizeof(Illusion_Struct));
auto outapp = new EQApplicationPacket(OP_Illusion, sizeof(Illusion_Struct)); Illusion_Struct *is = (Illusion_Struct *) outapp->pBuffer;
auto *i = (Illusion_Struct *) outapp->pBuffer; is->spawnid = GetID();
i->spawnid = GetID(); strcpy(is->charname, GetCleanName());
strcpy(i->charname, GetCleanName()); is->race = race;
i->race = race; is->gender = gender;
i->gender = gender; is->texture = new_texture;
i->texture = new_texture; is->helmtexture = new_helmtexture;
i->helmtexture = new_helmtexture; is->haircolor = new_haircolor;
i->haircolor = new_haircolor; is->beardcolor = new_beardcolor;
i->beardcolor = new_beardcolor; is->beard = new_beard;
i->beard = new_beard; is->eyecolor1 = new_eyecolor1;
i->eyecolor1 = new_eyecolor1; is->eyecolor2 = new_eyecolor2;
i->eyecolor2 = new_eyecolor2; is->hairstyle = new_hairstyle;
i->hairstyle = new_hairstyle; is->face = new_luclinface;
i->face = new_luclinface; is->drakkin_heritage = new_drakkin_heritage;
i->drakkin_heritage = new_drakkin_heritage; is->drakkin_tattoo = new_drakkin_tattoo;
i->drakkin_tattoo = new_drakkin_tattoo; is->drakkin_details = new_drakkin_details;
i->drakkin_details = new_drakkin_details; is->size = size;
i->size = size;
entity_list.QueueClients(this, outapp); entity_list.QueueClients(this, outapp);
safe_delete(outapp); safe_delete(outapp);
// Refresh armor and tints after send illusion packet /* Refresh armor and tints after send illusion packet */
SendArmorAppearance(); SendArmorAppearance();
LogMobAppearance( LogSpells(
"[SendIllusionPacket] race [{}] gender [{}] new_texture [{}] new_helmtexture [{}] new_haircolor [{}] new_beardcolor [{}] " "Illusion: Race [{}] Gender [{}] Texture [{}] HelmTexture [{}] HairColor [{}] BeardColor [{}] EyeColor1 [{}] EyeColor2 [{}] HairStyle [{}] Face [{}] DrakkinHeritage [{}] DrakkinTattoo [{}] DrakkinDetails [{}] Size [{}]",
"new_eyecolor1 [{}] new_eyecolor2 [{}] new_hairstyle [{}] new_luclinface [{}] new_drakkin_heritage [{}] "
"new_drakkin_tattoo [{}] new_drakkin_details [{}] size [{}]",
race, race,
gender, gender,
new_texture, new_texture,

View File

@ -1478,7 +1478,9 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
} }
} }
SendArmorAppearance(); for (int x = EQ::textures::textureBegin; x <= EQ::textures::LastTintableTexture; x++) {
SendWearChange(x);
}
if (caster == this && spell.id != 287 && spell.id != 601 && if (caster == this && spell.id != 287 && spell.id != 601 &&
(spellbonuses.IllusionPersistence || aabonuses.IllusionPersistence || (spellbonuses.IllusionPersistence || aabonuses.IllusionPersistence ||
@ -3902,7 +3904,9 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
SendAppearancePacket(AT_Size, 6); SendAppearancePacket(AT_Size, 6);
} }
SendArmorAppearance(); for (int x = EQ::textures::textureBegin; x <= EQ::textures::LastTintableTexture; x++) {
SendWearChange(x);
}
break; break;
} }