mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Merge pull request #496 from daerath/master
(Fix for) Item weights being downcast to uint8
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user