2014-06-07 16:45:00 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-01-05 06:28:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-07 16:45:00 -04:00
|
|
|
class cItemMilkHandler:
|
|
|
|
public cItemHandler
|
|
|
|
{
|
|
|
|
typedef cItemHandler super;
|
|
|
|
public:
|
|
|
|
cItemMilkHandler():
|
|
|
|
super(E_ITEM_MILK)
|
|
|
|
{
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-06-08 20:06:15 -04:00
|
|
|
virtual bool IsDrinkable(short a_ItemDamage) override
|
2014-06-07 16:45:00 -04:00
|
|
|
{
|
2014-06-08 20:06:15 -04:00
|
|
|
UNUSED(a_ItemDamage);
|
2014-06-07 16:45:00 -04:00
|
|
|
return true;
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-06-07 16:45:00 -04:00
|
|
|
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
|
|
|
|
{
|
2014-06-07 19:32:37 -04:00
|
|
|
UNUSED(a_Item);
|
2014-06-07 16:45:00 -04:00
|
|
|
a_Player->ClearEntityEffects();
|
2014-08-30 06:46:26 -04:00
|
|
|
|
|
|
|
if (!a_Player->IsGameModeCreative())
|
|
|
|
{
|
2020-04-04 11:13:41 -04:00
|
|
|
a_Player->ReplaceOneEquippedItemTossRest(cItem(E_ITEM_BUCKET));
|
2014-08-30 06:46:26 -04:00
|
|
|
}
|
2014-06-07 16:45:00 -04:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|