diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2022-01-14 19:21:10 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2022-01-14 20:43:29 +0100 |
commit | da0fdbe113e9b3a5254822a20a8ca2595cd661cb (patch) | |
tree | b12753160572310ac7a6878319cca5afe728e2d6 /src/Mobs/Monster.cpp | |
parent | eblockface (diff) | |
download | cuberite-da0fdbe113e9b3a5254822a20a8ca2595cd661cb.tar cuberite-da0fdbe113e9b3a5254822a20a8ca2595cd661cb.tar.gz cuberite-da0fdbe113e9b3a5254822a20a8ca2595cd661cb.tar.bz2 cuberite-da0fdbe113e9b3a5254822a20a8ca2595cd661cb.tar.lz cuberite-da0fdbe113e9b3a5254822a20a8ca2595cd661cb.tar.xz cuberite-da0fdbe113e9b3a5254822a20a8ca2595cd661cb.tar.zst cuberite-da0fdbe113e9b3a5254822a20a8ca2595cd661cb.zip |
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r-- | src/Mobs/Monster.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index c6f786eac..e05264f9f 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -1511,7 +1511,7 @@ void cMonster::RightClickFeed(cPlayer & a_Player) void cMonster::AddRandomDropItem(cItems & a_Drops, unsigned int a_Min, unsigned int a_Max, short a_Item, short a_ItemHealth) { auto Count = GetRandomProvider().RandInt(a_Min, a_Max); - char MaxStackSize = cItem(a_Item).GetMaxStackSize(); + auto MaxStackSize = static_cast<unsigned int>(cItem(a_Item).GetMaxStackSize()); while (Count > MaxStackSize) { a_Drops.emplace_back(a_Item, MaxStackSize, a_ItemHealth); @@ -1531,7 +1531,7 @@ void cMonster::AddRandomUncommonDropItem(cItems & a_Drops, float a_Chance, short { if (GetRandomProvider().RandBool(a_Chance / 100.0)) { - a_Drops.emplace_back(a_Item, char(1), a_ItemHealth); + a_Drops.emplace_back(a_Item, static_cast<char>(1), a_ItemHealth); } } |