diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 949cd1db3..a062033fc 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -5491,16 +5491,8 @@ namespace RoF2 ob.write(item->Lore, strlen(item->Lore)); ob.write("\0", 1); - if (inst->GetNewIDFile() > 0) { - char new_id_file[30]; - memset(new_id_file, 0x0, 30); - sprintf(new_id_file, "IT%d", inst->GetNewIDFile()); - ob.write(new_id_file, strlen(new_id_file)); - } - else if (strlen(item->IDFile) > 0) { + if (strlen(item->IDFile) > 0) ob.write(item->IDFile, strlen(item->IDFile)); - } - ob.write("\0", 1); ob.write("\0", 1); diff --git a/zone/client.cpp b/zone/client.cpp index e4b81cdf7..12555cc75 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -9034,7 +9034,8 @@ void Client::SetDevToolsWindowEnabled(bool in_dev_tools_window_enabled) */ void Client::SetPrimaryWeaponOrnamentation(uint32 model_id) { - if (GetItemIDAt(EQEmu::invslot::slotPrimary) > 0) { + auto primary_item = m_inv.GetItem(EQEmu::invslot::slotPrimary); + if (primary_item) { database.QueryDatabase( StringFormat( "UPDATE `inventory` SET `ornamentidfile` = %i WHERE `charid` = %i AND `slotid` = %i", @@ -9043,8 +9044,11 @@ void Client::SetPrimaryWeaponOrnamentation(uint32 model_id) EQEmu::invslot::slotPrimary )); + primary_item->SetOrnamentationIDFile(model_id); + SendItemPacket(EQEmu::invslot::slotPrimary, primary_item, ItemPacketTrade); WearChange(EQEmu::textures::weaponPrimary, static_cast(model_id), 0); - Message(15, "Your primary weapon appearance has been modified, changes will fully take affect next time you zone"); + + Message(15, "Your primary weapon appearance has been modified"); } } @@ -9053,7 +9057,8 @@ void Client::SetPrimaryWeaponOrnamentation(uint32 model_id) */ void Client::SetSecondaryWeaponOrnamentation(uint32 model_id) { - if (GetItemIDAt(EQEmu::invslot::slotSecondary) > 0) { + auto secondary_item = m_inv.GetItem(EQEmu::invslot::slotSecondary); + if (secondary_item) { database.QueryDatabase( StringFormat( "UPDATE `inventory` SET `ornamentidfile` = %i WHERE `charid` = %i AND `slotid` = %i", @@ -9062,7 +9067,10 @@ void Client::SetSecondaryWeaponOrnamentation(uint32 model_id) EQEmu::invslot::slotSecondary )); + secondary_item->SetOrnamentationIDFile(model_id); + SendItemPacket(EQEmu::invslot::slotSecondary, secondary_item, ItemPacketTrade); WearChange(EQEmu::textures::weaponSecondary, static_cast(model_id), 0); - Message(15, "Your secondary weapon appearance has been modified, changes will fully take affect next time you zone"); + + Message(15, "Your secondary weapon appearance has been modified"); } -} \ No newline at end of file +} diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index efaa05e0a..eca721031 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -753,7 +753,7 @@ void Client::CompleteConnect() entity_list.SendUntargetable(this); int x; - for (x = 0; x < 8; x++) { + for (x = EQEmu::textures::textureBegin; x <= EQEmu::textures::LastTexture; x++) { SendWearChange(x); } // added due to wear change above @@ -762,7 +762,7 @@ void Client::CompleteConnect() Mob *pet = GetPet(); if (pet != nullptr) { - for (x = 0; x < 8; x++) { + for (x = EQEmu::textures::textureBegin; x <= EQEmu::textures::LastTexture; x++) { pet->SendWearChange(x); } // added due to wear change above