This commit is contained in:
aozhiwei 2023-10-26 10:50:29 +08:00
parent 0a929504c6
commit f0e9712b6c
2 changed files with 14 additions and 0 deletions

View File

@ -3538,3 +3538,9 @@ void Creature::ClearIgnoreTarget()
DelIgnoreTarget(id);
}
}
void Creature::SetLastAttacker(CreatureWeakPtr& attacker)
{
last_attacker_ = attacker;
last_beattack_frameno_ = room->GetFrameNo();
}

View File

@ -374,6 +374,10 @@ class Creature : public MoveableEntity
void DelIgnoreTarget(int target_uniid);
bool IsIgnoreTarget(int target_uniid);
void ClearIgnoreTarget();
void SetLastAttacker(CreatureWeakPtr& attacker);
CreatureWeakPtr& GetLastAttacker() { return last_attacker_; }
long long GetLastBeAttackFrameNo() { return last_beattack_frameno_; }
int GetLastAttackerReviveTimes() { return last_attacker_revive_times_; }
protected:
virtual void OnBuffRemove(Buff& buff);
@ -461,6 +465,10 @@ private:
std::map<int, a8::XTimerWp> ignore_target_hash_;
CreatureWeakPtr last_attacker_;
int last_attacker_revive_times_ = 0;
long long last_beattack_frameno_;
friend class Buff;
friend class AddInventoryBuff;
friend class BePullBuff;