Restructured cSplashPotionEntity code.

The callback doesn't need declaration in the header.
Renamed PotionName to PotionParticleType.
This commit is contained in:
madmaxoft
2014-07-15 22:41:42 +02:00
parent f5259d7651
commit cc452f51c8
5 changed files with 103 additions and 71 deletions
+1 -1
View File
@@ -613,7 +613,7 @@ void cNBTChunkSerializer::AddProjectileEntity(cProjectileEntity * a_Projectile)
m_Writer.AddInt("EffectDuration", (Int16)Potion->GetEntityEffect().GetDuration());
m_Writer.AddShort("EffectIntensity", Potion->GetEntityEffect().GetIntensity());
m_Writer.AddDouble("EffectDistanceModifier", Potion->GetEntityEffect().GetDistanceModifier());
m_Writer.AddInt("PotionName", Potion->GetPotionName());
m_Writer.AddInt("PotionName", Potion->GetPotionParticleType());
}
case cProjectileEntity::pkGhastFireball:
{
+1 -1
View File
@@ -1681,7 +1681,7 @@ void cWSSAnvil::LoadSplashPotionFromNBT(cEntityList & a_Entities, const cParsedN
SplashPotion->SetEntityEffectType((cEntityEffect::eType) a_NBT.FindChildByName(a_TagIdx, "EffectType"));
SplashPotion->SetEntityEffect(cEntityEffect(EffectDuration, EffectIntensity, EffectDistanceModifier));
SplashPotion->SetPotionName(a_NBT.FindChildByName(a_TagIdx, "PotionName"));
SplashPotion->SetPotionParticleType(a_NBT.FindChildByName(a_TagIdx, "PotionName"));
// Store the new splash potion in the entities list:
a_Entities.push_back(SplashPotion.release());