game2006/server/gameserver/teammate_agent.h
aozhiwei 5704658ab5 1
2023-11-21 15:55:07 +08:00

38 lines
733 B
C++

#pragma once
#include "base_agent.h"
#include "creature.h"
class TeammateAgent : public BaseAgent
{
public:
TeammateAgent();
virtual ~TeammateAgent();
BEHAVIAC_DECLARE_AGENTTYPE(TeammateAgent, 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;
};