diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 634e13334..4f30a9f56 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -767,8 +767,6 @@ void Client::CompleteConnect() entity_list.SendAppearanceEffects(this); - entity_list.SendIllusionWearChange(this); - SendWearChangeAndLighting(EQ::textures::LastTexture); Mob* pet = GetPet(); if (pet) { diff --git a/zone/entity.cpp b/zone/entity.cpp index 3658c9045..8ca65065b 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -4863,25 +4863,6 @@ void EntityList::SendAppearanceEffects(Client *c) } } -void EntityList::SendIllusionWearChange(Client *c) -{ - if (!c) { - return; - } - - for (auto &e : mob_list) { - auto &mob = e.second; - - if (mob) { - if (mob == c) { - continue; - } - - mob->SendIllusionWearChange(c); - } - } -} - void EntityList::ZoneWho(Client *c, Who_All_Struct *Who) { // This is only called for SoF clients, as regular /who is now handled server-side for that client. diff --git a/zone/entity.h b/zone/entity.h index 766cd7eda..7a8dba701 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -413,7 +413,6 @@ public: void SendNimbusEffects(Client *c); void SendUntargetable(Client *c); void SendAppearanceEffects(Client *c); - void SendIllusionWearChange(Client *c); void DuelMessage(Mob* winner, Mob* loser, bool flee); void QuestJournalledSayClose(Mob *sender, float dist, const char* mobname, const char* message, Journal::Options &opts); void GroupMessage(uint32 gid, const char *from, const char *message); diff --git a/zone/mob.h b/zone/mob.h index 22a7a57ee..e974b0bca 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -424,7 +424,6 @@ public: void ApplyHealthTransferDamage(Mob *caster, Mob *target, uint16 spell_id); void ApplySpellEffectIllusion(int32 spell_id, Mob* caster, int buffslot, int base, int limit, int max); void ApplyIllusionToCorpse(int32 spell_id, Corpse* new_corpse); - void SendIllusionWearChange(Client* c); int16 GetItemSlotToConsumeCharge(int32 spell_id, uint32 inventory_slot); bool CheckItemRaceClassDietyRestrictionsOnCast(uint32 inventory_slot); bool IsFromTriggeredSpell(EQ::spells::CastingSlot slot, uint32 item_slot = 0xFFFFFFFF); diff --git a/zone/mob_appearance.cpp b/zone/mob_appearance.cpp index 4f6b2b509..49c90c4fb 100644 --- a/zone/mob_appearance.cpp +++ b/zone/mob_appearance.cpp @@ -345,32 +345,16 @@ uint32 NPC::GetEquippedItemFromTextureSlot(uint8 material_slot) const void Mob::SendArmorAppearance(Client *one_client) { - /** - * one_client of 0 means sent to all clients - * - * Despite the fact that OP_NewSpawn and OP_ZoneSpawns include the - * armor being worn and its mats, the client doesn't update the display - * on arrival of these packets reliably. - * - * Send Wear changes if mob is a PC race and item is an armor slot. - * The other packets work for primary/secondary. - */ - LogMobAppearance("[{}]", GetCleanName()); - if (IsPlayerRace(race)) { - if (!IsClient()) { - for (uint8 slot_id = 0; slot_id <= EQ::textures::materialCount; ++slot_id) { - const auto item = database.GetItem(GetEquippedItemFromTextureSlot(slot_id)); - if (item) { - SendWearChange(slot_id, one_client); - } - } - } - } - for (uint8 slot_id = 0; slot_id <= EQ::textures::materialCount; ++slot_id) { - if (GetTextureProfileMaterial(slot_id)) { + bool should_send = GetTextureProfileMaterial(slot_id) != 0; + + if (!should_send && IsPlayerRace(race) && !IsClient()) { + should_send = database.GetItem(GetEquippedItemFromTextureSlot(slot_id)) != nullptr; + } + + if (should_send) { SendWearChange(slot_id, one_client); } } diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index e99028737..c22465abe 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -1520,9 +1520,6 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove } ); caster->SendAppearancePacket(AppearanceType::Size, static_cast(caster->GetTarget()->GetSize())); - - for (int x = EQ::textures::textureBegin; x <= EQ::textures::LastTintableTexture; x++) - caster->SendWearChange(x); } break; } @@ -4354,10 +4351,6 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses) } ); - for (int x = EQ::textures::textureBegin; x <= EQ::textures::LastTintableTexture; x++) { - SendWearChange(x); - } - break; } @@ -10397,25 +10390,6 @@ void Mob::SetProcLimitTimer(int32 base_spell_id, uint32 proc_reuse_time, int pro } } -void Mob::SendIllusionWearChange(Client* c) { - - /* - We send this to client on Client::CompleteConnect() to properly update textures of - other mobs in zone with illusions on them. - */ - if (!c) { - return; - } - - if (!spellbonuses.Illusion && !itembonuses.Illusion && !aabonuses.Illusion) { - return; - } - - for (int x = EQ::textures::textureBegin; x <= EQ::textures::LastTintableTexture; x++) { - SendWearChange(x, c); - } -} - void Mob::ApplyIllusionToCorpse(int32 spell_id, Corpse* new_corpse) { //Transfers most illusions over to the corpse upon death @@ -10560,10 +10534,6 @@ void Mob::ApplySpellEffectIllusion(int32 spell_id, Mob *caster, int buffslot, in SendAppearancePacket(AppearanceType::Size, race_size); } - for (int x = EQ::textures::textureBegin; x <= EQ::textures::LastTintableTexture; x++) { - SendWearChange(x); - } - if (buffslot != -1) { if ( caster == this &&