25 virtual ~
cPawn() override;
28 virtual
void Tick(
std::chrono::milliseconds a_Dt,
cChunk & a_Chunk) override;
48 void AddEntityEffect(
cEntityEffect::eType a_EffectType,
int a_EffectDurationTicks,
short a_EffectIntensity,
double a_DistanceModifier = 1);
virtual bool IsFireproof(void) const override
double m_LastGroundHeight
void RemoveEntityEffect(cEntityEffect::eType a_EffectType)
Removes a currently applied entity effect.
virtual void Destroyed() override
void NoLongerTargetingMe(cMonster *a_Monster)
Remove the monster from the list of monsters targeting this pawn.
bool HasEntityEffect(cEntityEffect::eType a_EffectType) const
Returns true, if the entity effect is currently applied.
void AddEntityEffect(cEntityEffect::eType a_EffectType, int a_EffectDurationTicks, short a_EffectIntensity, double a_DistanceModifier=1)
Applies an entity effect.
cEntityEffect * GetEntityEffect(cEntityEffect::eType a_EffectType)
Returns the entity effect, if it is currently applied or nullptr if not.
virtual void HandleAir(void) override
Called in each tick to handle air-related processing i.e.
virtual void HandleFalling(void)
virtual void ResetPosition(Vector3d a_NewPosition) override
Set the entities position and last sent position.
virtual bool IsInvisible() const override
std::map< cEntityEffect::eType, std::unique_ptr< cEntityEffect > > tEffectMap
tEffectMap m_EntityEffects
std::vector< cMonster * > m_TargetingMe
A list of all monsters that are targeting this pawn.
#define CLASS_PROTODEF(classname)
void TargetingMe(cMonster *a_Monster)
Add the monster to the list of monsters targeting this pawn.
void StopEveryoneFromTargetingMe()
Tells all pawns which are targeting us to stop targeting us.
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
virtual void KilledBy(TakeDamageInfo &a_TDI) override
Called when the health drops below zero.
std::map< cEntityEffect::eType, cEntityEffect * > GetEntityEffects()
Returns all entity effects.
void ClearEntityEffects(void)
Removes all currently applied entity effects (used when drinking milk)