This commit is contained in:
aozhiwei 2022-10-09 11:49:52 +08:00
parent 9ac5f89cfe
commit 6f05e7b3ee
2 changed files with 3 additions and 0 deletions

View File

@ -2442,6 +2442,7 @@ void Creature::SummonObstacle(Buff* buff, int id, const a8::Vec2& target_pos)
RoomObstacle* obstacle = room->CreateObstacle(id, pos.x, pos.y); RoomObstacle* obstacle = room->CreateObstacle(id, pos.x, pos.y);
if (obstacle) { if (obstacle) {
obstacle->buff_meta = buff->meta; obstacle->buff_meta = buff->meta;
obstacle->skill_meta = buff->skill_meta;
obstacle->master.Attach(this); obstacle->master.Attach(this);
obstacle->SetTeamId(room, team_id); obstacle->SetTeamId(room, team_id);
obstacle->SetMasterId(room, GetUniId()); obstacle->SetMasterId(room, GetUniId());

View File

@ -8,6 +8,7 @@
namespace MetaData namespace MetaData
{ {
struct Buff; struct Buff;
struct Skill;
} }
class Ability; class Ability;
@ -22,6 +23,7 @@ class RoomObstacle : public Obstacle
std::shared_ptr<Ability> context_ability; std::shared_ptr<Ability> context_ability;
bool sweep_lock = false; bool sweep_lock = false;
MetaData::Buff* buff_meta = nullptr; MetaData::Buff* buff_meta = nullptr;
MetaData::Skill* skill_meta = nullptr;
long long born_frameno = 0; long long born_frameno = 0;
virtual ~RoomObstacle() override; virtual ~RoomObstacle() override;