1
This commit is contained in:
parent
2a1eea9d32
commit
ecc44f822b
@ -16,6 +16,7 @@ class RoomAgent;
|
||||
class TeamAgent;
|
||||
class TargetAgent;
|
||||
class MasterAgent;
|
||||
class TeammateAgent;
|
||||
class HeroAgent : public BaseAgent
|
||||
{
|
||||
public:
|
||||
@ -121,6 +122,7 @@ public:
|
||||
TeamAgent* team_agent = nullptr;
|
||||
MasterAgent* master_agent = nullptr;
|
||||
TargetAgent* current_target_agent = nullptr;
|
||||
TeammateAgent* current_teammate_agent = nullptr;
|
||||
float task_param0 = 0.0f;
|
||||
float task_param1 = 0.0f;
|
||||
float task_param2 = 0.0f;
|
||||
|
20
server/gameserver/teammate_agent.cc
Normal file
20
server/gameserver/teammate_agent.cc
Normal file
@ -0,0 +1,20 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include "teammate_agent.h"
|
||||
#include "room.h"
|
||||
|
||||
#include "creature.h"
|
||||
|
||||
TeammateAgent::TeammateAgent():BaseAgent()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
TeammateAgent::~TeammateAgent()
|
||||
{
|
||||
}
|
||||
|
||||
Room* TeammateAgent::GetRoom()
|
||||
{
|
||||
return owner_->room;
|
||||
}
|
21
server/gameserver/teammate_agent.h
Normal file
21
server/gameserver/teammate_agent.h
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "base_agent.h"
|
||||
|
||||
#include "creature.h"
|
||||
|
||||
class TeammateAgent : public BaseAgent
|
||||
{
|
||||
public:
|
||||
TeammateAgent();
|
||||
|
||||
virtual ~TeammateAgent();
|
||||
|
||||
BEHAVIAC_DECLARE_AGENTTYPE(TeammateAgent, BaseAgent)
|
||||
|
||||
virtual Room* GetRoom() override;
|
||||
|
||||
private:
|
||||
CreatureWeakPtr target_;
|
||||
Creature* owner_ = nullptr;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user