mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user