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


            



 


                           

                                   
       
 
                           
                                  

         
 
                                                             
         
                                     

                            
 

                                                                         
                               
                                               


                                                    
                                                                                       
                 


                            

#pragma once





class cItemMilkHandler:
	public cItemHandler
{
	using Super = cItemHandler;

public:

	cItemMilkHandler():
		Super(E_ITEM_MILK)
	{
	}

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

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

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