game2006/server/gameserver/target_agent.h
aozhiwei 19f31f7dea 1
2023-11-04 21:50:12 +08:00

38 lines
734 B
C++

#pragma once
#include "base_agent.h"
#include "creature.h"
class TargetAgent : public BaseAgent
{
public:
TargetAgent();
virtual ~TargetAgent() override;
BEHAVIAC_DECLARE_AGENTTYPE(TargetAgent, BaseAgent)
int GetUniId();
bool IsValid();
bool IsDead();
glm::vec3 GetPos();
float GetHp();
float GetMaxHp();
int GetHeroId();
int GetLevel();
void Abandon(int min_time, int max_time);
float GetShotRange();
void ClearAbandon();
float GetHPRate();
bool HasBuffEffect(int effect_id);
void SetOwner(Creature* owner);
void SetTarget(Creature* target);
virtual Room* GetRoom() override;
private:
CreatureWeakPtr target_;
Creature* owner_ = nullptr;
};