1
This commit is contained in:
parent
1ab1f274ee
commit
76945abb1b
@ -1008,7 +1008,7 @@ void Buff::ProcMachineGun()
|
||||
{
|
||||
owner->room->xtimer.ModifyTimer
|
||||
(remover_timer,
|
||||
skill_meta->number_meta->float_time * 1000 / FRAME_RATE_MS);
|
||||
skill_meta->number_meta->float_time * 1000 * 10/ FRAME_RATE_MS);
|
||||
}
|
||||
break;
|
||||
case MAGIC_HJHX:
|
||||
@ -1016,6 +1016,7 @@ void Buff::ProcMachineGun()
|
||||
owner->room->xtimer.ModifyTimer
|
||||
(remover_timer,
|
||||
skill_meta->number_meta->float_time * 1000 / FRAME_RATE_MS);
|
||||
owner->GetTrigger()->DispatchEvent(kStartSwitchWeaponBuffEvent, {this});
|
||||
}
|
||||
break;
|
||||
case MAGIC_FG:
|
||||
@ -1108,6 +1109,7 @@ void Buff::ProcMachineGun()
|
||||
|
||||
void Buff::ProcRemoveMachineGun()
|
||||
{
|
||||
owner->GetTrigger()->DispatchEvent(kEndSwitchWeaponBuffEvent, {this});
|
||||
RecoverHoldWeapons();
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
|
||||
std::weak_ptr<EventHandlerPtr> AddListener(int event_id, CommonCbProc cb);
|
||||
void RemoveEventHandler(std::weak_ptr<EventHandlerPtr> handler_ptr);
|
||||
void DispatchEvent(int event_id, const std::vector<std::any>& params);
|
||||
|
||||
private:
|
||||
void TraverseCondBuffs(int cond, std::function<void (Buff*, bool&)> func);
|
||||
@ -81,7 +82,7 @@ public:
|
||||
void TryAddBuffs(int cond, std::vector<int>& buffids);
|
||||
void AddBuffs(int cond, std::vector<int>& buffids);
|
||||
void RemoveBuffs(int cond, std::vector<int>& buffids);
|
||||
void DispatchEvent(int event_id, const std::vector<std::any>& params);
|
||||
|
||||
|
||||
private:
|
||||
Creature* owner_ = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user