69 lines
1.6 KiB
C++
69 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include "weakptr.h"
|
|
|
|
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;
|
|
list_head effect_entry;
|
|
list_head depend_entry;
|
|
|
|
Buff();
|
|
void Initialize();
|
|
int GetLeftTime();
|
|
int GetLastingTime();
|
|
bool NeedSync(Human* hum);
|
|
void FillMFBuff(cs::MFBuff* buff_pb);
|
|
bool FreezeOperate();
|
|
CreatureWeakPtr& GetCaster();
|
|
void SetCaster(Creature* caster);
|
|
|
|
void ProcDelayAddBuff(Creature* caster);
|
|
void ProcIntervalAddBuff(Creature* caster);
|
|
void ProcBatchAddBuff(Creature* caster);
|
|
void ProcSummonHero(Creature* caster);
|
|
void ProcBeRecycle(Creature* caster);
|
|
void ProcBecome(Creature* caster);
|
|
void ProcRemoveBecome(Creature* caster);
|
|
void ProcDriver(Creature* caster);
|
|
void ProcRemoveDriver(Creature* caster);
|
|
void ProcPassenger(Creature* caster);
|
|
void ProcRemovePassenger(Creature* caster);
|
|
void ProcSprint(Creature* caster);
|
|
void ProcSeletTargetWithSelfPos(Creature* caster);
|
|
void ProcTurnOver(Creature* caster);
|
|
void ProcPullToWalkable();
|
|
|
|
private:
|
|
void InternalTimerAddBuff(Creature* caster);
|
|
void RecoverHoldWeapons(Creature* caster);
|
|
|
|
private:
|
|
int hold_curr_weapon_idx_ = 0;
|
|
std::list<Weapon> hold_weapons_;
|
|
CreatureWeakPtr caster_;
|
|
};
|