[Feature] Make ornamentations work with any augment type (#3281)

* [Feature] Make ornamentations work with any augment type

# Notes
- On Live there are augments that are not type 20/21 and are ornamentations.
- We also only allow a singular augment type to be ornamentation augment types, this will allow you to use any augment type as an ornamentation if it has a proper Hero's Forge model or a non-IT63/non-IT64 idfile.

* Update ruletypes.h

* Update client_packet.cpp

* Update item_instance.cpp

* Cleanup.
This commit is contained in:
Alex King
2023-04-16 10:26:19 -04:00
committed by GitHub
parent 93db35658a
commit fa3a5c7a72
9 changed files with 144 additions and 109 deletions
+7 -6
View File
@@ -5619,7 +5619,6 @@ void Client::ProcessInspectRequest(Client *requestee, Client *requester)
const EQ::ItemData *item = nullptr;
const EQ::ItemInstance *inst = nullptr;
int ornamentation_augment_type = RuleI(Character, OrnamentationAugmentType);
for (int16 L = EQ::invslot::EQUIPMENT_BEGIN; L <= EQ::invslot::EQUIPMENT_END; L++) {
inst = requestee->GetInv().GetItem(L);
@@ -5629,13 +5628,15 @@ void Client::ProcessInspectRequest(Client *requestee, Client *requester)
if (item) {
strcpy(insr->itemnames[L], item->Name);
const EQ::ItemData *aug_item = nullptr;
if (inst->GetOrnamentationAug(ornamentation_augment_type)) {
aug_item = inst->GetOrnamentationAug(ornamentation_augment_type)->GetItem();
const EQ::ItemData *augment_item = nullptr;
const auto augment = inst->GetOrnamentationAugment();
if (augment) {
augment_item = augment->GetItem();
}
if (aug_item) {
insr->itemicons[L] = aug_item->Icon;
if (augment_item) {
insr->itemicons[L] = augment_item->Icon;
} else if (inst->GetOrnamentationIcon()) {
insr->itemicons[L] = inst->GetOrnamentationIcon();
} else {