Item weight was being downcast to uint8 which impacted any item with weight over 255. For SoD, SoF, and UF, prior to sending item info to the client we now cap weight at 255 to ensure the item remains heavy instead of being made (in most cases), super light.

This commit is contained in:
Tim DeLong
2016-01-26 16:44:11 -05:00
parent b4b28e5eb8
commit 52541c6532
5 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -2945,7 +2945,8 @@ namespace SoF
memset(&ibs, 0, sizeof(SoF::structs::ItemBodyStruct));
ibs.id = item->ID;
ibs.weight = item->Weight;
// weight is uint8 in the struct, and some weights exceed that, so capping at 255.
ibs.weight = (item->Weight > 255) ? 255 : item->Weight;
ibs.norent = item->NoRent;
ibs.nodrop = item->NoDrop;
ibs.attune = item->Attuneable;