mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
(RoF+) Implemented Armor Ornamentation using Hero's Forge Armor Models. To use, create an ornamentation augment and set the herosforgemodel field in the items table.
(RoF+) Added command #heromodel (#hm for short) - Usage: #heromodel [hero forge model] [ [slot] ] (example: #heromodel 63)
This commit is contained in:
+24
-11
@@ -3816,8 +3816,8 @@ namespace RoF2
|
||||
Equipment[k].material = emu->equipment[k].material;
|
||||
Equipment[k].unknown1 = emu->equipment[k].unknown1;
|
||||
Equipment[k].elitematerial = emu->equipment[k].elitematerial;
|
||||
Equipment[k].material2 = emu->equipment[k].heroforgemodel;
|
||||
Equipment[k].elitematerial = emu->equipment[k].material2;
|
||||
Equipment[k].heroforgemodel = emu->equipment[k].heroforgemodel;
|
||||
Equipment[k].material2 = emu->equipment[k].material2;
|
||||
}
|
||||
|
||||
Buffer += (sizeof(structs::EquipStruct) * 9);
|
||||
@@ -4851,7 +4851,6 @@ namespace RoF2
|
||||
hdr.main_slot = (merchant_slot == 0) ? slot_id.MainSlot : merchant_slot;
|
||||
hdr.sub_slot = (merchant_slot == 0) ? slot_id.SubSlot : 0xffff;
|
||||
hdr.unknown013 = (merchant_slot == 0) ? slot_id.AugSlot : 0xffff;
|
||||
//hdr.unknown013 = 0xffff;
|
||||
hdr.price = inst->GetPrice();
|
||||
hdr.merchant_slot = (merchant_slot == 0) ? 1 : inst->GetMerchantCount();
|
||||
//hdr.merchant_slot = (merchant_slot == 0) ? 1 : 0xffffffff;
|
||||
@@ -4862,8 +4861,8 @@ namespace RoF2
|
||||
hdr.charges = (stackable ? (item->MaxCharges ? 1 : 0) : charges);
|
||||
hdr.inst_nodrop = inst->IsInstNoDrop() ? 1 : 0;
|
||||
hdr.unknown044 = 0;
|
||||
hdr.unknown048 = 0;
|
||||
hdr.unknown052 = 0;
|
||||
hdr.unknown048 = 7300 + Inventory::CalcMaterialFromSlot(slot_id_in); //0;
|
||||
hdr.unknown052 = 7300 + Inventory::CalcMaterialFromSlot(slot_id_in); //0;
|
||||
hdr.isEvolving = item->EvolvingLevel > 0 ? 1 : 0;
|
||||
ss.write((const char*)&hdr, sizeof(RoF2::structs::ItemSerializationHeader));
|
||||
|
||||
@@ -4881,7 +4880,10 @@ namespace RoF2
|
||||
}
|
||||
//ORNAMENT IDFILE / ICON
|
||||
uint16 ornaIcon = 0;
|
||||
if (inst->GetOrnamentationAug(ornamentationAugtype)) {
|
||||
int32 heroModel = 0;
|
||||
/*
|
||||
if (inst->GetOrnamentationAug(ornamentationAugtype))
|
||||
{
|
||||
const Item_Struct *aug_weap = inst->GetOrnamentationAug(ornamentationAugtype)->GetItem();
|
||||
//Mainhand
|
||||
ss.write(aug_weap->IDFile, strlen(aug_weap->IDFile));
|
||||
@@ -4891,8 +4893,16 @@ namespace RoF2
|
||||
ss.write((const char*)&null_term, sizeof(uint8));
|
||||
//Icon
|
||||
ornaIcon = aug_weap->Icon;
|
||||
if (aug_weap->HerosForgeModel > 0)
|
||||
{
|
||||
heroModel = (aug_weap->HerosForgeModel * 100) + Inventory::CalcMaterialFromSlot(slot_id_in);
|
||||
}
|
||||
}
|
||||
else if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon()) {
|
||||
else
|
||||
*/
|
||||
|
||||
if (inst->GetOrnamentationIDFile() && inst->GetOrnamentationIcon())
|
||||
{
|
||||
char tmp[30]; memset(tmp, 0x0, 30); sprintf(tmp, "IT%d", inst->GetOrnamentationIDFile());
|
||||
//Mainhand
|
||||
ss.write(tmp, strlen(tmp));
|
||||
@@ -4901,10 +4911,12 @@ namespace RoF2
|
||||
ss.write(tmp, strlen(tmp));
|
||||
ss.write((const char*)&null_term, sizeof(uint8));
|
||||
ornaIcon = inst->GetOrnamentationIcon();
|
||||
heroModel = inst->GetOrnamentHeroModel(Inventory::CalcMaterialFromSlot(slot_id_in));
|
||||
}
|
||||
else {
|
||||
ss.write((const char*)&null_term, sizeof(uint8)); //no mh
|
||||
ss.write((const char*)&null_term, sizeof(uint8));//no of
|
||||
else
|
||||
{
|
||||
ss.write((const char*)&null_term, sizeof(uint8)); // no main hand Ornamentation
|
||||
ss.write((const char*)&null_term, sizeof(uint8)); // no off hand Ornamentation
|
||||
}
|
||||
|
||||
RoF2::structs::ItemSerializationHeaderFinish hdrf;
|
||||
@@ -4912,12 +4924,13 @@ namespace RoF2
|
||||
hdrf.unknown061 = 0;
|
||||
hdrf.unknown062 = 0;
|
||||
hdrf.unknowna1 = 0xffffffff;
|
||||
hdrf.unknowna2 = 0;
|
||||
hdrf.ornamentHeroModel = heroModel;
|
||||
hdrf.unknown063 = 0;
|
||||
hdrf.unknowna3 = 0;
|
||||
hdrf.unknowna4 = 0xffffffff;
|
||||
hdrf.unknowna5 = 0;
|
||||
hdrf.ItemClass = item->ItemClass;
|
||||
|
||||
ss.write((const char*)&hdrf, sizeof(RoF2::structs::ItemSerializationHeaderFinish));
|
||||
|
||||
if (strlen(item->Name) > 0)
|
||||
|
||||
Reference in New Issue
Block a user