From 10ae97e42f991d3f4ece222de7bd089c1d586e78 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 15 Nov 2014 00:54:21 -0500 Subject: [PATCH] Remove scaling hack for SoF --- changelog.txt | 1 + common/patches/sof.cpp | 5 +++-- common/patches/sof_structs.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index b0866ec17..00d72188b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Secrets: Identified object size and solidtype as flags. Exported them as functio demonstar55: Don't use the hack for charms that doesn't work on RoF demonstar55: UF too demonstar55: Tit +demonstar55: SoF == 11/13/2014 == Kayen: Implemented target type (44) 'Beams' (which projects an AE infront of caster with a specified length and width). diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index 2075fd142..a9b8d6e26 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -2519,7 +2519,7 @@ namespace SoF std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary); - const Item_Struct *item = inst->GetItem(); + const Item_Struct *item = inst->GetUnscaledItem(); //_log(NET__ERROR, "Serialize called for: %s", item->Name); SoF::structs::ItemSerializationHeader hdr; hdr.stacksize = stackable ? charges : 1; @@ -2530,7 +2530,7 @@ namespace SoF hdr.slot = (merchant_slot == 0) ? slot_id : merchant_slot; hdr.price = inst->GetPrice(); hdr.merchant_slot = (merchant_slot == 0) ? 1 : inst->GetMerchantCount(); - hdr.unknown020 = 0; + hdr.scaled_value = inst->IsScaling() ? inst->GetExp() / 100 : 0; hdr.instance_id = (merchant_slot == 0) ? inst->GetSerialNumber() : merchant_slot; hdr.unknown028 = 0; hdr.last_cast_time = ((item->RecastDelay > 1) ? 1212693140 : 0); @@ -2652,6 +2652,7 @@ namespace SoF ibs.SpellShield = item->SpellShield; ibs.Avoidance = item->Avoidance; ibs.Accuracy = item->Accuracy; + ibs.CharmFileID = item->CharmFileID; ibs.FactionAmt1 = item->FactionAmt1; ibs.FactionMod1 = item->FactionMod1; ibs.FactionAmt2 = item->FactionAmt2; diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index 502763d90..a49dc6f25 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -3789,7 +3789,7 @@ struct ItemSerializationHeader uint32 slot; uint32 price; uint32 merchant_slot; //1 if not a merchant item - uint32 unknown020; //0 + uint32 scaled_value; //0 uint32 instance_id; //unique instance id if not merchant item, else is merchant slot uint32 unknown028; //0 uint32 last_cast_time; // Unix Time from PP of last cast for this recast type if recast delay > 0