[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
+9 -9
View File
@@ -3851,17 +3851,17 @@ namespace UF
ob.write((const char*)&evotop, sizeof(UF::structs::EvolvingItem));
}
//ORNAMENT IDFILE / ICON -
int ornamentationAugtype = RuleI(Character, OrnamentationAugmentType);
uint16 ornaIcon = 0;
if (inst->GetOrnamentationAug(ornamentationAugtype)) {
const EQ::ItemData *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
ornaIcon = aug_weap->Icon;
uint16 ornament_icon = 0;
const auto augment = inst->GetOrnamentationAugment();
ob.write(aug_weap->IDFile, strlen(aug_weap->IDFile));
if (augment) {
const auto augment_item = augment->GetItem();
ornament_icon = augment_item->Icon;
ob.write(augment_item->IDFile, strlen(augment_item->IDFile));
}
else if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon()) {
ornaIcon = inst->GetOrnamentationIcon();
ornament_icon = inst->GetOrnamentationIcon();
char tmp[30]; memset(tmp, 0x0, 30); sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
ob.write(tmp, strlen(tmp));
@@ -3870,7 +3870,7 @@ namespace UF
UF::structs::ItemSerializationHeaderFinish hdrf;
hdrf.ornamentIcon = ornaIcon;
hdrf.ornamentIcon = ornament_icon;
hdrf.unknown060 = 0; //This is Always 0.. or it breaks shit..
hdrf.unknown061 = 0; //possibly ornament / special ornament
hdrf.isCopied = 0; //Flag for item to be 'Copied'