[Bug Fix] Fix Hero's Forge Ingame and Character Select (#4966)

This commit is contained in:
Alex King 2025-07-30 19:39:29 -04:00 committed by GitHub
parent f3232cdc3a
commit 9544e100c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View File

@ -901,9 +901,13 @@ bool WorldDatabase::GetCharSelInventory(
inst->SetCustomDataString(e.custom_data);
}
inst->SetOrnamentIcon(e.ornament_icon);
inst->SetOrnamentationIDFile(e.ornament_idfile);
inst->SetOrnamentHeroModel(e.ornament_hero_model);
if (e.ornament_icon != 0 || e.ornament_idfile != 0 || e.ornament_hero_model != 0) {
inst->SetOrnamentIcon(e.ornament_icon);
inst->SetOrnamentationIDFile(e.ornament_idfile);
inst->SetOrnamentHeroModel(e.ornament_hero_model);
} else if (item->HerosForgeModel > 0) {
inst->SetOrnamentHeroModel(item->HerosForgeModel);
}
inv->PutItem(e.slot_id, *inst);

View File

@ -286,8 +286,8 @@ uint32 Mob::GetHerosForgeModel(uint8 material_slot) const
if (augment) {
item = augment->GetItem();
heros_forge_model = item->HerosForgeModel;
} else if (inst->GetOrnamentHeroModel()) {
heros_forge_model = inst->GetOrnamentHeroModel();
} else if (inst->GetOrnamentHeroModel(material_slot)) {
heros_forge_model = inst->GetOrnamentHeroModel(material_slot);
}
}
}
@ -421,7 +421,7 @@ void Mob::SendWearChange(uint8 material_slot, Client *one_client)
return key;
};
auto dedupe_key = build_key(*w);
auto send_if_changed = [&](Client* client) {
auto& last_key = m_last_seen_wearchange[client->GetID()][material_slot];