This commit is contained in:
aozhiwei 2023-06-17 10:50:55 +08:00
parent 951ad8b1e2
commit e1c0fa6612
2 changed files with 32 additions and 6 deletions

View File

@ -167,9 +167,19 @@ void CallFuncBuff::Activate()
owner->room->frame_event.AddHpChg(owner->GetWeakPtrRef());
}
break;
case BuffCallFunc_e::kSummonCarSpecPoint:
case BuffCallFunc_e::kSummonCarSpecPointAnyOper:
{
SummonCarSpecPoint();
SummonCarSpecPoint(0);
}
break;
case BuffCallFunc_e::kSummonCarSpecPointTeamOper:
{
SummonCarSpecPoint(1);
}
break;
case BuffCallFunc_e::kSummonCarSpecPointOnlyOper:
{
SummonCarSpecPoint(2);
}
break;
default:
@ -876,7 +886,21 @@ void CallFuncBuff::ProcAddMaxHp()
}
}
void CallFuncBuff::SummonCarSpecPoint()
void CallFuncBuff::SummonCarSpecPoint(int oper_type)
{
float delay_time = meta->GetBuffParam2(this);
int oper = meta->GetBuffParam3(this);
float x = meta->GetBuffParam4(this);
float y = meta->GetBuffParam5(this);
float z = meta->GetBuffParam6(this);
owner->room->xtimer.SetTimeoutWpEx
(
delay_time / FRAME_RATE_MS,
[room = owner->room, delay_time, oper_type, oper, x, y, z]
(int event, const a8::Args* args) mutable
{
if (a8::TIMER_DELETE_EVENT == event) {
}
},
&owner->room->xtimer_attacher_);
}

View File

@ -27,7 +27,9 @@ A8_DECLARE_CLASS_ENUM(BuffCallFunc_e, int,
kDecSkillCd = 27,
kRefreshHp = 28,
kAddMaxHp = 29,
kSummonCarSpecPoint = 30
kSummonCarSpecPointAnyOper = 30,
kSummonCarSpecPointTeamOper = 31,
kSummonCarSpecPointOnlyOper = 32,
);
@ -57,7 +59,7 @@ class CallFuncBuff : public Buff
void SummonObstacleSpecDistance();
void ClearSummonObstacle();
void DecSkillCd();
void SummonCarSpecPoint();
void SummonCarSpecPoint(int oper_type);
float hold_param2_ = 0.0;
Weapon* hold_weapon_ = nullptr;