From 250b8eb652a57dcbdff4af7b6efb9c2554b45798 Mon Sep 17 00:00:00 2001 From: x12xx12x <44411062+12xx12@users.noreply.github.com> Date: Fri, 26 Nov 2021 00:51:47 +0100 Subject: Fixed Compiler Warnings --- src/Mobs/Monster.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Mobs/Monster.cpp') diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 3193f97ae..0ebf30554 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -1510,8 +1510,8 @@ 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); - auto MaxStackSize = static_cast(cItem(a_Item).GetMaxStackSize()); + auto Count = GetRandomProvider().RandInt(a_Min, a_Max); + char MaxStackSize = ItemHandler(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, 1, a_ItemHealth); + a_Drops.emplace_back(a_Item, char(1), a_ItemHealth); } } -- cgit v1.2.3