1
This commit is contained in:
parent
8433dd75a9
commit
c2586b87e9
@ -682,11 +682,9 @@ int Creature::TryAddBuff(Creature* caster, int buff_id)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Creature::TryDelayAddBuff(Creature* caster, int buff_id, int time)
|
std::weak_ptr<a8::XTimerPtr> Creature::TryDelayAddBuff(Creature* caster, int buff_id, int time)
|
||||||
{
|
{
|
||||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
xtimer_list* timer = room->xtimer.AddDeadLineTimerAndAttach
|
||||||
if (buff_meta) {
|
|
||||||
room->xtimer.AddDeadLineTimerAndAttach
|
|
||||||
(
|
(
|
||||||
time / FRAME_RATE_MS,
|
time / FRAME_RATE_MS,
|
||||||
a8::XParams()
|
a8::XParams()
|
||||||
@ -703,7 +701,7 @@ void Creature::TryDelayAddBuff(Creature* caster, int buff_id, int time)
|
|||||||
},
|
},
|
||||||
&xtimer_attacher.timer_list_
|
&xtimer_attacher.timer_list_
|
||||||
);
|
);
|
||||||
}
|
return room->xtimer.GetTimerPtr(timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Creature::TryAddBuffWithTarget(Creature* caster, int buff_id)
|
int Creature::TryAddBuffWithTarget(Creature* caster, int buff_id)
|
||||||
|
@ -136,7 +136,7 @@ class Creature : public MoveableEntity
|
|||||||
bool no_check_immune = false);
|
bool no_check_immune = false);
|
||||||
bool IsImmuneBuffEffect(int buff_effect);
|
bool IsImmuneBuffEffect(int buff_effect);
|
||||||
int MustBeAddBuff(Creature* caster, int buff_id);
|
int MustBeAddBuff(Creature* caster, int buff_id);
|
||||||
void TryDelayAddBuff(Creature* caster, int buff_id, int time);
|
std::weak_ptr<a8::XTimerPtr> TryDelayAddBuff(Creature* caster, int buff_id, int time);
|
||||||
int TryAddBuff(Creature* caster, int buff_id);
|
int TryAddBuff(Creature* caster, int buff_id);
|
||||||
int TryAddBuffWithTarget(Creature* caster, int buff_id);
|
int TryAddBuffWithTarget(Creature* caster, int buff_id);
|
||||||
void RemoveBuffById(int buff_id);
|
void RemoveBuffById(int buff_id);
|
||||||
|
2
third_party/a8engine
vendored
2
third_party/a8engine
vendored
@ -1 +1 @@
|
|||||||
Subproject commit feaf1958a808725df7a2b0ede65c2733965064cd
|
Subproject commit cf4607dd902bcca2ec8e849b51a1968ffb2dc0ca
|
Loading…
x
Reference in New Issue
Block a user