summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemPotion.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-06-13 11:04:16 +0200
committerarchshift <admin@archshift.com>2014-06-17 20:39:21 +0200
commite289fe4dd7372a029ba85722e3ce99991e9d1d6b (patch)
tree1bc8ad0d0aa8a7e8685a53bddb0730c4a82122a4 /src/Items/ItemPotion.h
parentEntity Effect: Separates total duration and ticks of activity (diff)
downloadcuberite-e289fe4dd7372a029ba85722e3ce99991e9d1d6b.tar
cuberite-e289fe4dd7372a029ba85722e3ce99991e9d1d6b.tar.gz
cuberite-e289fe4dd7372a029ba85722e3ce99991e9d1d6b.tar.bz2
cuberite-e289fe4dd7372a029ba85722e3ce99991e9d1d6b.tar.lz
cuberite-e289fe4dd7372a029ba85722e3ce99991e9d1d6b.tar.xz
cuberite-e289fe4dd7372a029ba85722e3ce99991e9d1d6b.tar.zst
cuberite-e289fe4dd7372a029ba85722e3ce99991e9d1d6b.zip
Diffstat (limited to 'src/Items/ItemPotion.h')
-rw-r--r--src/Items/ItemPotion.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Items/ItemPotion.h b/src/Items/ItemPotion.h
index 200c13cab..70a926cad 100644
--- a/src/Items/ItemPotion.h
+++ b/src/Items/ItemPotion.h
@@ -146,8 +146,7 @@ public:
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
{
// Called when potion is a drinkable potion
- short potion_damage = a_Item->m_ItemDamage;
- a_Player->AddEntityEffect(GetEntityEffectType(potion_damage), cEntityEffect(GetEntityEffectDuration(potion_damage), GetEntityEffectIntensity(potion_damage), a_Player));
+ a_Player->AddEntityEffect(GetEntityEffectType(a_Item->m_ItemDamage), GetEntityEffectDuration(a_Item->m_ItemDamage), GetEntityEffectIntensity(a_Item->m_ItemDamage));
a_Player->GetInventory().RemoveOneEquippedItem();
a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE);
return true;