summaryrefslogblamecommitdiffstats
path: root/src/Items/ItemMilk.h
blob: 3c069286cd0b3afd1fe74d1a7ab32eba8b13f170 (plain) (tree)
1
2
3
4
5
6
7
8
9


            



 
                                                  
 

                                   
         
                           
 
                                                                   
         
                                     

                            
 
                                                                               
         
                               
                                               


                                                    
                                                                                       
                 


                            

#pragma once





class cItemMilkHandler final : public cItemHandler
{
	using Super = cItemHandler;

  public:
	using Super::Super;

	virtual bool IsDrinkable(short a_ItemDamage) const override
	{
		UNUSED(a_ItemDamage);
		return true;
	}

	virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) const override
	{
		UNUSED(a_Item);
		a_Player->ClearEntityEffects();

		if (!a_Player->IsGameModeCreative())
		{
			a_Player->ReplaceOneEquippedItemTossRest(cItem(E_ITEM_BUCKET));
		}
		return true;
	}
};