3 override void CreateActionComponent()
11 const int DEFAULT_CONSUMED_QUANTITY = 1;
21 int GetConsumedQuantity()
26 override bool HasProneException()
31 override bool HasTarget()
36 override void CreateConditionComponents()
44 return super.ActionCondition(player, target, item) && player.CanEatAndDrink();
47 override void OnExecuteServer(
ActionData action_data)
51 if (player && action_data.m_MainItem)
52 player.Consume(action_data.m_MainItem, GetConsumedQuantity(),
EConsumeType.ITEM_SINGLE_TIME);
55 override void OnEndServer(
ActionData action_data)
57 if (action_data.m_MainItem && (action_data.m_MainItem.GetQuantity() <= 0))
58 action_data.m_MainItem.SetQuantity(0);
61 action_data.m_Player.SetBloodyHandsPenalty();