mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-23 19:52:25 +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:
parent
f39244acca
commit
55e856d5fe
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user