This commit is contained in:
aozhiwei 2023-10-14 10:34:57 +08:00
parent fbcc2df714
commit c03312d644
2 changed files with 19 additions and 0 deletions

View File

@ -306,3 +306,18 @@ Room* HeroAgent::GetRoom()
{ {
return owner_->room; return owner_->room;
} }
bool HeroAgent::HasFlag(int tag)
{
return a8::HasBitFlag(flags_, tag);
}
void HeroAgent::SetFlag(int tag)
{
a8::SetBitFlag(flags_, tag);
}
void HeroAgent::UnSetFlag(int tag)
{
a8::UnSetBitFlag(flags_, tag);
}

View File

@ -52,6 +52,9 @@ public:
bool HasBuffEffect(int effect_id); bool HasBuffEffect(int effect_id);
bool IsNearGas(float range); bool IsNearGas(float range);
bool MasterInRange(float range); bool MasterInRange(float range);
bool HasFlag(int tag);
void SetFlag(int tag);
void UnSetFlag(int tag);
behaviac::EBTStatus SearchEnemy(float range); behaviac::EBTStatus SearchEnemy(float range);
@ -98,5 +101,6 @@ public:
private: private:
Creature* owner_ = nullptr; Creature* owner_ = nullptr;
bool bullet_trace_mode_ = false; bool bullet_trace_mode_ = false;
long long flags_ = 0;
std::map<int, int> dyn_hash_; std::map<int, int> dyn_hash_;
}; };