mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: fire MIRROR_TIMER_START and MIRROR_TIMER_STOP events
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Fire MIRROR_TIMER_START with type, value, maxValue, scale, and paused args when breath/fatigue/fire timers begin. Fire MIRROR_TIMER_STOP with type when they end. Timer types: 0=fatigue, 1=breath, 2=fire. Used by timer bar addons to display breath/fatigue countdown overlays.
This commit is contained in:
parent
774f9bf214
commit
5ee2b55f4b
1 changed files with 7 additions and 0 deletions
|
|
@ -2275,6 +2275,11 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
mirrorTimers_[type].scale = scale;
|
mirrorTimers_[type].scale = scale;
|
||||||
mirrorTimers_[type].paused = (paused != 0);
|
mirrorTimers_[type].paused = (paused != 0);
|
||||||
mirrorTimers_[type].active = true;
|
mirrorTimers_[type].active = true;
|
||||||
|
if (addonEventCallback_)
|
||||||
|
addonEventCallback_("MIRROR_TIMER_START", {
|
||||||
|
std::to_string(type), std::to_string(value),
|
||||||
|
std::to_string(maxV), std::to_string(scale),
|
||||||
|
paused ? "1" : "0"});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -2285,6 +2290,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
if (type < 3) {
|
if (type < 3) {
|
||||||
mirrorTimers_[type].active = false;
|
mirrorTimers_[type].active = false;
|
||||||
mirrorTimers_[type].value = 0;
|
mirrorTimers_[type].value = 0;
|
||||||
|
if (addonEventCallback_)
|
||||||
|
addonEventCallback_("MIRROR_TIMER_STOP", {std::to_string(type)});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue