1
0

Implemented the FireResistence potion effects.

This not only provides fire resistence, but also prevents blaze fireballs.
See #2556
This commit is contained in:
bibo38
2015-10-31 16:24:45 +01:00
parent 9c270d522c
commit 73b8be0fef
6 changed files with 37 additions and 8 deletions

View File

@@ -61,6 +61,15 @@ void cPawn::KilledBy(TakeDamageInfo & a_TDI)
bool cPawn::IsFireproof(void) const
{
return super::IsFireproof() || HasEntityEffect(cEntityEffect::effFireResistance);
}
void cPawn::AddEntityEffect(cEntityEffect::eType a_EffectType, int a_Duration, short a_Intensity, double a_DistanceModifier)
{
// Check if the plugins allow the addition:
@@ -98,6 +107,15 @@ void cPawn::RemoveEntityEffect(cEntityEffect::eType a_EffectType)
bool cPawn::HasEntityEffect(cEntityEffect::eType a_EffectType) const
{
return m_EntityEffects.find(a_EffectType) != m_EntityEffects.end();
}
void cPawn::ClearEntityEffects()
{
// Iterate through this entity's applied effects