summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemPotion.h
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-06-09 02:17:30 +0200
committerarchshift <admin@archshift.com>2014-06-17 20:39:20 +0200
commit68011a004a83adc793f0df563cc924c5a2b7dddc (patch)
treede7b6cb0d1d9e2d41feb3abb853a49d03e1ebfbd /src/Items/ItemPotion.h
parentItemHandler: changed IsDrinkable() to take a short argument (diff)
downloadcuberite-68011a004a83adc793f0df563cc924c5a2b7dddc.tar
cuberite-68011a004a83adc793f0df563cc924c5a2b7dddc.tar.gz
cuberite-68011a004a83adc793f0df563cc924c5a2b7dddc.tar.bz2
cuberite-68011a004a83adc793f0df563cc924c5a2b7dddc.tar.lz
cuberite-68011a004a83adc793f0df563cc924c5a2b7dddc.tar.xz
cuberite-68011a004a83adc793f0df563cc924c5a2b7dddc.tar.zst
cuberite-68011a004a83adc793f0df563cc924c5a2b7dddc.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemPotion.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/Items/ItemPotion.h b/src/Items/ItemPotion.h
index c2441fa48..40748d71c 100644
--- a/src/Items/ItemPotion.h
+++ b/src/Items/ItemPotion.h
@@ -123,12 +123,7 @@ public:
Vector3d Speed = a_Player->GetLookVector() * 7;
short potion_damage = a_Item.m_ItemDamage;
- cSplashPotionEntity *Projectile = new cSplashPotionEntity(a_Player, Pos.x, Pos.y, Pos.z, &Speed,
- GetEntityEffectType(potion_damage),
- cEntityEffect(GetEntityEffectDuration(potion_damage),
- GetEntityEffectIntensity(potion_damage),
- a_Player),
- GetPotionName(potion_damage));
+ cSplashPotionEntity *Projectile = new cSplashPotionEntity(a_Player, Pos.x, Pos.y, Pos.z, &Speed, GetEntityEffectType(potion_damage), cEntityEffect(GetEntityEffectDuration(potion_damage), GetEntityEffectIntensity(potion_damage), a_Player), GetPotionName(potion_damage));
if (Projectile == NULL)
{
return false;
@@ -152,10 +147,7 @@ public:
{
// 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(potion_damage), cEntityEffect(GetEntityEffectDuration(potion_damage), GetEntityEffectIntensity(potion_damage), a_Player));
a_Player->GetInventory().RemoveOneEquippedItem();
a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE);
return true;