mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
feat: show area trigger messages as screen banners
SMSG_AREA_TRIGGER_MESSAGE events (dungeon enter messages, objective triggers, etc.) were previously only appended to chat. Now they also appear as animated slide-up toasts in the lower-center of the screen: blue-bordered dark panel with light-blue text, 4.5s lifetime with 35ms slide-in/out animation. Up to 4 simultaneous toasts stack vertically. Messages still go to chat as before.
This commit is contained in:
parent
9fe7bbf826
commit
20fef40b7b
4 changed files with 85 additions and 1 deletions
|
|
@ -540,6 +540,15 @@ public:
|
|||
const std::deque<CombatLogEntry>& getCombatLog() const { return combatLog_; }
|
||||
void clearCombatLog() { combatLog_.clear(); }
|
||||
|
||||
// Area trigger messages (SMSG_AREA_TRIGGER_MESSAGE) — drained by UI each frame
|
||||
bool hasAreaTriggerMsg() const { return !areaTriggerMsgs_.empty(); }
|
||||
std::string popAreaTriggerMsg() {
|
||||
if (areaTriggerMsgs_.empty()) return {};
|
||||
std::string msg = areaTriggerMsgs_.front();
|
||||
areaTriggerMsgs_.pop_front();
|
||||
return msg;
|
||||
}
|
||||
|
||||
// Threat
|
||||
struct ThreatEntry {
|
||||
uint64_t victimGuid = 0;
|
||||
|
|
@ -2155,6 +2164,7 @@ private:
|
|||
std::vector<CombatTextEntry> combatText;
|
||||
static constexpr size_t MAX_COMBAT_LOG = 500;
|
||||
std::deque<CombatLogEntry> combatLog_;
|
||||
std::deque<std::string> areaTriggerMsgs_;
|
||||
// unitGuid → sorted threat list (descending by threat value)
|
||||
std::unordered_map<uint64_t, std::vector<ThreatEntry>> threatLists_;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue