Fixed indentations, removed redundant init code in SplashPotionEntity.cpp
parent
0298d34406
commit
60d4a16514
|
@ -38,7 +38,7 @@ cEntityEffect::eType cEntityEffect::GetPotionEffectType(short a_ItemDamage)
|
||||||
case 0x0d: return cEntityEffect::effWaterBreathing;
|
case 0x0d: return cEntityEffect::effWaterBreathing;
|
||||||
case 0x0e: return cEntityEffect::effInvisibility;
|
case 0x0e: return cEntityEffect::effInvisibility;
|
||||||
|
|
||||||
// No effect potions
|
// No effect potions
|
||||||
case 0x00:
|
case 0x00:
|
||||||
case 0x07:
|
case 0x07:
|
||||||
case 0x0b: // Will be potion of leaping in 1.8
|
case 0x0b: // Will be potion of leaping in 1.8
|
||||||
|
|
|
@ -44,8 +44,7 @@ public:
|
||||||
static cEntityEffect::eType GetPotionEffectType(short a_ItemDamage);
|
static cEntityEffect::eType GetPotionEffectType(short a_ItemDamage);
|
||||||
|
|
||||||
|
|
||||||
/** Retrieves the intensity level from the potion's damage value.
|
/** Retrieves the intensity level from the potion's damage value. Returns 0 for level I potions, 1 for level II potions. */
|
||||||
Returns 0 for level I potions, 1 for level II potions. */
|
|
||||||
static short GetPotionEffectIntensity(short a_ItemDamage);
|
static short GetPotionEffectIntensity(short a_ItemDamage);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -75,9 +75,6 @@ cSplashPotionEntity::cSplashPotionEntity(
|
||||||
cItem a_Item
|
cItem a_Item
|
||||||
) :
|
) :
|
||||||
super(pkSplashPotion, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25),
|
super(pkSplashPotion, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25),
|
||||||
m_EntityEffectType(cEntityEffect::effNoEffect),
|
|
||||||
m_EntityEffect(cEntityEffect()),
|
|
||||||
m_PotionColor(0),
|
|
||||||
m_DestroyTimer(-1)
|
m_DestroyTimer(-1)
|
||||||
{
|
{
|
||||||
SetSpeed(a_Speed);
|
SetSpeed(a_Speed);
|
||||||
|
|
|
@ -63,9 +63,11 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
a_Player->AddEntityEffect(cEntityEffect::GetPotionEffectType(PotionDamage),
|
a_Player->AddEntityEffect(
|
||||||
cEntityEffect::GetPotionEffectDuration(PotionDamage),
|
cEntityEffect::GetPotionEffectType(PotionDamage),
|
||||||
cEntityEffect::GetPotionEffectIntensity(PotionDamage));
|
cEntityEffect::GetPotionEffectDuration(PotionDamage),
|
||||||
|
cEntityEffect::GetPotionEffectIntensity(PotionDamage)
|
||||||
|
);
|
||||||
a_Player->GetInventory().RemoveOneEquippedItem();
|
a_Player->GetInventory().RemoveOneEquippedItem();
|
||||||
a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE);
|
a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue