mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
Fix (temp) for bot-related appearance packets with id '0'
This commit is contained in:
parent
59ad6012b1
commit
e12e1c0d9b
@ -3490,16 +3490,20 @@ EQEmu::ItemInstance* Bot::GetBotItem(uint32 slotID) {
|
|||||||
|
|
||||||
// Adds the specified item it bot to the NPC equipment array and to the bot inventory collection.
|
// Adds the specified item it bot to the NPC equipment array and to the bot inventory collection.
|
||||||
void Bot::BotAddEquipItem(int slot, uint32 id) {
|
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) {
|
if(slot > 0 && id > 0) {
|
||||||
uint8 materialFromSlot = EQEmu::InventoryProfile::CalcMaterialFromSlot(slot);
|
uint8 materialFromSlot = EQEmu::InventoryProfile::CalcMaterialFromSlot(slot);
|
||||||
|
|
||||||
if (materialFromSlot != EQEmu::textures::materialInvalid) {
|
if (materialFromSlot != EQEmu::textures::materialInvalid) {
|
||||||
equipment[slot] = id; // npc has more than just material slots. Valid material should mean valid inventory index
|
equipment[slot] = id; // npc has more than just material slots. Valid material should mean valid inventory index
|
||||||
|
if (GetID()) // temp hack fix
|
||||||
SendWearChange(materialFromSlot);
|
SendWearChange(materialFromSlot);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateEquipmentLight();
|
UpdateEquipmentLight();
|
||||||
if (UpdateActiveLight())
|
if (UpdateActiveLight())
|
||||||
|
if (GetID()) // temp hack fix
|
||||||
SendAppearancePacket(AT_Light, GetActiveLightType());
|
SendAppearancePacket(AT_Light, GetActiveLightType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user