265 {
267 int item_count = GetInventory().GetCargo().GetItemCount();
268 int pelt_count = 0;
269 int lime_amount = Math.Floor(lime.GetQuantity()/GameConstants.BAREL_LIME_PER_PELT);
270
271
272 for (int i = 0; i < item_count; i++)
273 {
274 item = GetInventory().GetCargo().GetItem(i);
275 if ( item.IsPeltBase() )
276 {
277 pelt_count =
g_Game.ConfigGetInt(
"cfgVehicles " + item.GetType() +
" peltGain");
278 if ( pelt_count <= lime_amount )
279 {
280 TanLeatherLambda lambda = new TanLeatherLambda(item, "TannedLeather", player, pelt_count);
281 lambda.SetTransferParams(true, true, true);
282 player.ServerReplaceItemWithNew(lambda);
283
284 lime_amount -= pelt_count;
285 if ( lime_amount <= 0 )
286 {
287 lime.Delete();
288 break;
289 }
290 }
291 }
292 }
293 if ( lime )
294 {
295 lime.
SetQuantity(lime_amount*GameConstants.BAREL_LIME_PER_PELT);
296 }
297 if ( pelt_count > 0 )
298 {
300 }
301 }
void Lock(float actiontime)
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)