mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 22:56:37 +00:00
Update for a couple of things...
- secondary material slot on self spawn (inc. pet) - instant update of prim/sec weapon ornamentations
This commit is contained in:
+13
-5
@@ -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<uint16>(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<uint16>(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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user