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












                                   
                                                               
         
                               




                                                                         
                               





                                                                 

#pragma once

class cItemMilkHandler:
	public cItemHandler
{
	typedef cItemHandler super;
public:
	cItemMilkHandler():
		super(E_ITEM_MILK)
	{
	}
	
	virtual bool IsDrinkable(const cItem * a_Item) override
	{
		UNUSED(a_Item);
		return true;
	}
	
	virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
	{
		UNUSED(a_Item);
		a_Player->ClearEntityEffects();
		a_Player->GetInventory().RemoveOneEquippedItem();
		a_Player->GetInventory().AddItem(E_ITEM_BUCKET);
		return true;
	}
};