From 9e8361976b6b0dc4c62ef48a4744ba1f59fe4346 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 13 Jun 2014 02:41:43 -0700 Subject: Entity Effects: Clarified user, added it to AddEntityEffect Added second AddEntityEffect with a pass-by-value of the class. --- src/Items/ItemPotion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Items') diff --git a/src/Items/ItemPotion.h b/src/Items/ItemPotion.h index 70a926cad..853ed53a8 100644 --- a/src/Items/ItemPotion.h +++ b/src/Items/ItemPotion.h @@ -146,7 +146,7 @@ public: virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override { // Called when potion is a drinkable potion - a_Player->AddEntityEffect(GetEntityEffectType(a_Item->m_ItemDamage), GetEntityEffectDuration(a_Item->m_ItemDamage), GetEntityEffectIntensity(a_Item->m_ItemDamage)); + a_Player->AddEntityEffect(GetEntityEffectType(a_Item->m_ItemDamage), GetEntityEffectDuration(a_Item->m_ItemDamage), GetEntityEffectIntensity(a_Item->m_ItemDamage), a_Player); a_Player->GetInventory().RemoveOneEquippedItem(); a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE); return true; -- cgit v1.2.3