From e289fe4dd7372a029ba85722e3ce99991e9d1d6b Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 13 Jun 2014 11:04:16 +0200 Subject: Changed the AddEntityEffect() params for easier calls. --- src/Items/ItemPotion.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Items/ItemPotion.h') 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; -- cgit v1.2.3