2020-04-04 11:13:41 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ItemFood.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-13 12:38:06 -04:00
|
|
|
class cItemRawChickenHandler:
|
2020-04-04 11:13:41 -04:00
|
|
|
public cItemFoodHandler
|
|
|
|
{
|
2020-04-13 12:38:06 -04:00
|
|
|
using Super = cItemFoodHandler;
|
2020-04-04 11:13:41 -04:00
|
|
|
|
|
|
|
public:
|
2020-04-13 12:38:06 -04:00
|
|
|
|
|
|
|
cItemRawChickenHandler():
|
|
|
|
Super(E_ITEM_RAW_CHICKEN, FoodInfo(2, 1.2))
|
2020-04-04 11:13:41 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
|
|
|
|
{
|
2020-04-13 12:38:06 -04:00
|
|
|
if (!Super::EatItem(a_Player, a_Item))
|
2020-04-04 11:13:41 -04:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (GetRandomProvider().RandBool(0.3))
|
|
|
|
{
|
|
|
|
a_Player->AddEntityEffect(cEntityEffect::effHunger, 600, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|