1
This commit is contained in:
parent
e6d8312199
commit
b0a2bbada0
@ -127,6 +127,10 @@ void Buff::InternalTimerAddBuff()
|
||||
Creature* receiver = (Creature*)param.sender.GetUserData();
|
||||
SkillCasterState* caster_state = (SkillCasterState*)param.param1.GetUserData();
|
||||
if (caster_state->caster.Get()) {
|
||||
std::shared_ptr<Ability> old_context_ability = receiver->context_ability;
|
||||
a8::Vec2 old_context_pos = receiver->context_pos;
|
||||
receiver->context_pos = receiver->GetPos();
|
||||
|
||||
int buff_id = param.param2;
|
||||
MetaData::Skill* skill = (MetaData::Skill*)param.param3.GetUserData();
|
||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
||||
@ -137,6 +141,9 @@ void Buff::InternalTimerAddBuff()
|
||||
receiver->AddBuff(caster_state->caster.Get(), buff_meta, 1, skill);
|
||||
caster_state->caster.Get()->RecoverSkillCasterState(&old_caster_state);
|
||||
}
|
||||
|
||||
receiver->context_pos = old_context_pos;
|
||||
receiver->context_ability = old_context_ability;
|
||||
}
|
||||
};
|
||||
auto timer_after_func =
|
||||
|
@ -3190,7 +3190,7 @@ void Human::OnBuffRemove(Buff& buff)
|
||||
--camouflage_move_addition_;
|
||||
}
|
||||
if (buff.meta->int_param3 != 0) {
|
||||
-camouflage_aiming_addition_;
|
||||
--camouflage_aiming_addition_;
|
||||
}
|
||||
camouflage_move_addition_ = std::max(camouflage_move_addition_, 0);
|
||||
camouflage_aiming_addition_ = std::max(camouflage_aiming_addition_, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user