37 lines
868 B
C++
37 lines
868 B
C++
#pragma once
|
|
|
|
#include "trigger.h"
|
|
|
|
struct GraspBuff;
|
|
class Creature;
|
|
class GunGrasp
|
|
{
|
|
public:
|
|
GunGrasp(Creature* owner);
|
|
~GunGrasp();
|
|
|
|
void Clear();
|
|
void InstallTriggers();
|
|
void AddSignet(int id, int count);
|
|
void RemoveSignet(int id, int count);
|
|
bool HasBulletBlockBuff();
|
|
Creature* GetOwner() { return owner_; }
|
|
int GetHeroLv() { return hero_lv_; }
|
|
|
|
private:
|
|
void ProcHit(GraspBuff* buff);
|
|
void ProcKill(GraspBuff* buff);
|
|
void ProcTakeOn(GraspBuff* buff);
|
|
void ProcCond(GraspBuff* buff);
|
|
void ProcHitAndEnd(GraspBuff* buff);
|
|
|
|
int GetSignetCount(int id);
|
|
|
|
private:
|
|
Creature* owner_ = nullptr;
|
|
int hero_lv_ = 0;
|
|
std::vector<std::weak_ptr<EventHandlerPtr>> event_listeners_;
|
|
std::map<int, int> signet_hash_;
|
|
std::array<list_head, (int)GraspBuffTrigger_e::kEnd> grasp_triggers_ = {};
|
|
};
|