From e27a5db409fe1d71c42235609a9fe06020b6201b Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 3 Jul 2013 13:56:11 +0000 Subject: Empty buckets replace fluid buckets on use and vice versa (patch contributed by Mgueydan) Fixes FS #277. API change: added an optional parameter to cItemGrid:AddItem(), cItemGrid:AddItems(), cInventory:AddItem() and cInventory:AddItems() git-svn-id: http://mc-server.googlecode.com/svn/trunk@1643 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Items/ItemBucket.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/Items/ItemBucket.h') diff --git a/source/Items/ItemBucket.h b/source/Items/ItemBucket.h index 4792fa62d..e4adc98b8 100644 --- a/source/Items/ItemBucket.h +++ b/source/Items/ItemBucket.h @@ -90,7 +90,7 @@ public: // Give new bucket, filled with fluid: cItem Item(NewItem, 1); - a_Player->GetInventory().AddItem(Item); + a_Player->GetInventory().AddItem(Item, true, true); // Remove water / lava block a_Player->GetWorld()->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0); @@ -136,7 +136,7 @@ public: return false; } cItem Item(E_ITEM_BUCKET, 1); - if (!a_Player->GetInventory().AddItem(Item)) + if (!a_Player->GetInventory().AddItem(Item,true,true)) { return false; } @@ -157,4 +157,4 @@ public: return true; } -}; \ No newline at end of file +}; -- cgit v1.2.3