1
This commit is contained in:
parent
d8c7c19dd5
commit
2433141484
@ -13,10 +13,11 @@
|
||||
|
||||
void SprintBuff::Activate()
|
||||
{
|
||||
if (meta->_int_param5) {
|
||||
owner->IncDisableMoveDirTimes();
|
||||
}
|
||||
|
||||
if (caster_.Get()->IsPlayer()) {
|
||||
if (meta->_int_param5) {
|
||||
owner->IncDisableMoveDirTimes();
|
||||
}
|
||||
{
|
||||
int old_times = owner->GetDisableMoveDirTimes();
|
||||
owner->SetDisableMoveDirTimes(0);
|
||||
@ -131,6 +132,21 @@ void SprintBuff::Activate()
|
||||
},
|
||||
&xtimer_attacher);
|
||||
}
|
||||
ProcSkill();
|
||||
}
|
||||
|
||||
void SprintBuff::Deactivate()
|
||||
{
|
||||
if (meta->_int_param5) {
|
||||
owner->DecDisableMoveDirTimes();
|
||||
}
|
||||
if (owner->AsHuman()) {
|
||||
owner->AsHuman()->last_shot_frameno_ = owner->room->GetFrameNo() + SERVER_FRAME_RATE;
|
||||
}
|
||||
}
|
||||
|
||||
void SprintBuff::ProcSkill()
|
||||
{
|
||||
if (skill_meta) {
|
||||
switch (skill_meta->GetMagicId()) {
|
||||
case MAGIC_YMCZ:
|
||||
@ -147,13 +163,3 @@ void SprintBuff::Activate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SprintBuff::Deactivate()
|
||||
{
|
||||
if (meta->_int_param5) {
|
||||
owner->DecDisableMoveDirTimes();
|
||||
}
|
||||
if (owner->AsHuman()) {
|
||||
owner->AsHuman()->last_shot_frameno_ = owner->room->GetFrameNo() + SERVER_FRAME_RATE;
|
||||
}
|
||||
}
|
||||
|
@ -9,4 +9,7 @@ class SprintBuff : public Buff
|
||||
virtual void Activate() override;
|
||||
virtual void Deactivate() override;
|
||||
|
||||
private:
|
||||
void ProcSkill();
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user