From e12e1c0d9b502b3c7c08b0758177104adb352452 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 16 Jul 2018 02:46:00 -0400 Subject: [PATCH] Fix (temp) for bot-related appearance packets with id '0' --- zone/bot.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 75417e677..6d39a7df9 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -3490,17 +3490,21 @@ EQEmu::ItemInstance* Bot::GetBotItem(uint32 slotID) { // Adds the specified item it bot to the NPC equipment array and to the bot inventory collection. void Bot::BotAddEquipItem(int slot, uint32 id) { + // this is being called before bot is assigned an entity id.. + // ..causing packets to be sent out to zone with an id of '0' if(slot > 0 && id > 0) { uint8 materialFromSlot = EQEmu::InventoryProfile::CalcMaterialFromSlot(slot); if (materialFromSlot != EQEmu::textures::materialInvalid) { equipment[slot] = id; // npc has more than just material slots. Valid material should mean valid inventory index - SendWearChange(materialFromSlot); + if (GetID()) // temp hack fix + SendWearChange(materialFromSlot); } UpdateEquipmentLight(); if (UpdateActiveLight()) - SendAppearancePacket(AT_Light, GetActiveLightType()); + if (GetID()) // temp hack fix + SendAppearancePacket(AT_Light, GetActiveLightType()); } }