From 683e2d667930f498e165b09d4623435d7d0ef3bb Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Mon, 5 Oct 2020 14:07:00 -0700 Subject: [PATCH] Updates mobile lift requests (#273) Bumps release version --- Projects/Server/Mobiles/Mobile.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Projects/Server/Mobiles/Mobile.cs b/Projects/Server/Mobiles/Mobile.cs index 2039dc217..c858a9c2a 100644 --- a/Projects/Server/Mobiles/Mobile.cs +++ b/Projects/Server/Mobiles/Mobile.cs @@ -5605,24 +5605,14 @@ namespace Server item.Spawner = null; } - if (amount == 0) - { - amount = 1; - } - - if (amount > item.Amount) - { - amount = item.Amount; - } + amount = Math.Clamp(amount, 1, item.Amount); var oldAmount = item.Amount; - // item.Amount = amount; //Set in LiftItemDupe if (amount < oldAmount) { LiftItemDupe(item, amount); } - // item.Dupe( oldAmount - amount ); var map = from.Map;