aozhiwei 9c122135cf 1
2021-04-12 17:38:39 +08:00

44 lines
844 B
C++

#pragma once
namespace MetaData
{
struct Player;
struct Equip;
struct Dress;
struct Skill;
struct Tank;
struct Buff;
}
namespace cs
{
class MFBuff;
}
class Human;
class Creature;
class Buff
{
public:
Creature* owner = nullptr;
MetaData::Buff* meta = nullptr;
MetaData::Skill* skill_meta = nullptr;
a8::XTimerAttacher xtimer_attacher;
long long add_frameno = 0;
int skill_lv = 0;
int GetLeftTime();
int GetLastingTime();
bool NeedSync(Human* hum);
void FillMFBuff(cs::MFBuff* buff_pb);
void ProcDelayAddBuff(Creature* caster);
void ProcIntervalAddBuff(Creature* caster);
void ProcBatchAddBuff(Creature* caster);
void ProcSummonHero(Creature* caster);
void ProcBeRecycle(Creature* caster);
private:
void InternalTimerAddBuff(Creature* caster);
};