Merge pull request #496 from daerath/master

(Fix for) Item weights being downcast to uint8
This commit is contained in:
Uleat
2016-01-26 16:55:54 -05:00
5 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -3623,7 +3623,8 @@ namespace SoD
memset(&ibs, 0, sizeof(SoD::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;
+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;
+2 -1
View File
@@ -3924,7 +3924,8 @@ namespace UF
memset(&ibs, 0, sizeof(UF::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;