mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 00:03:50 +00:00
fix: surface fishing/BG/party/instance/zone notifications in UIError overlay
- Fishing bobber splash: "A fish is on your line!" shown as UIError (time-critical) - SMSG_BATTLEFIELD_PORT_DENIED: shown as UIError - SMSG_INSTANCE_RESET_FAILED: failure reason shown as UIError - SMSG_GROUP_DESTROYED: "Party disbanded" shown as UIError - SMSG_CORPSE_NOT_IN_INSTANCE: shown as UIError - SMSG_ZONE_UNDER_ATTACK: "[Zone] is under attack!" shown as UIError - SMSG_AREA_TRIGGER_MESSAGE: zone/area entry messages shown as UIError
This commit is contained in:
parent
220f1b177c
commit
b22183b000
1 changed files with 7 additions and 0 deletions
|
|
@ -2567,6 +2567,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Opcode::SMSG_CORPSE_NOT_IN_INSTANCE:
|
case Opcode::SMSG_CORPSE_NOT_IN_INSTANCE:
|
||||||
|
addUIError("Your corpse is outside this instance.");
|
||||||
addSystemChatMessage("Your corpse is outside this instance. Release spirit to retrieve it.");
|
addSystemChatMessage("Your corpse is outside this instance. Release spirit to retrieve it.");
|
||||||
break;
|
break;
|
||||||
case Opcode::SMSG_CROSSED_INEBRIATION_THRESHOLD: {
|
case Opcode::SMSG_CROSSED_INEBRIATION_THRESHOLD: {
|
||||||
|
|
@ -3461,6 +3462,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
std::string msg = areaName.empty()
|
std::string msg = areaName.empty()
|
||||||
? std::string("A zone is under attack!")
|
? std::string("A zone is under attack!")
|
||||||
: (areaName + " is under attack!");
|
: (areaName + " is under attack!");
|
||||||
|
addUIError(msg);
|
||||||
addSystemChatMessage(msg);
|
addSystemChatMessage(msg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -3592,6 +3594,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
partyData.members.clear();
|
partyData.members.clear();
|
||||||
partyData.memberCount = 0;
|
partyData.memberCount = 0;
|
||||||
partyData.leaderGuid = 0;
|
partyData.leaderGuid = 0;
|
||||||
|
addUIError("Your party has been disbanded.");
|
||||||
addSystemChatMessage("Your party has been disbanded.");
|
addSystemChatMessage("Your party has been disbanded.");
|
||||||
LOG_INFO("SMSG_GROUP_DESTROYED: party cleared");
|
LOG_INFO("SMSG_GROUP_DESTROYED: party cleared");
|
||||||
break;
|
break;
|
||||||
|
|
@ -4480,6 +4483,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
/*uint32_t len =*/ packet.readUInt32();
|
/*uint32_t len =*/ packet.readUInt32();
|
||||||
std::string msg = packet.readString();
|
std::string msg = packet.readString();
|
||||||
if (!msg.empty()) {
|
if (!msg.empty()) {
|
||||||
|
addUIError(msg);
|
||||||
addSystemChatMessage(msg);
|
addSystemChatMessage(msg);
|
||||||
areaTriggerMsgs_.push_back(msg);
|
areaTriggerMsgs_.push_back(msg);
|
||||||
}
|
}
|
||||||
|
|
@ -4988,6 +4992,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
auto go = std::static_pointer_cast<GameObject>(goEnt);
|
auto go = std::static_pointer_cast<GameObject>(goEnt);
|
||||||
auto* info = getCachedGameObjectInfo(go->getEntry());
|
auto* info = getCachedGameObjectInfo(go->getEntry());
|
||||||
if (info && info->type == 17) { // GO_TYPE_FISHINGNODE
|
if (info && info->type == 17) { // GO_TYPE_FISHINGNODE
|
||||||
|
addUIError("A fish is on your line!");
|
||||||
addSystemChatMessage("A fish is on your line!");
|
addSystemChatMessage("A fish is on your line!");
|
||||||
// Play a distinctive UI sound to alert the player
|
// Play a distinctive UI sound to alert the player
|
||||||
if (auto* renderer = core::Application::getInstance().getRenderer()) {
|
if (auto* renderer = core::Application::getInstance().getRenderer()) {
|
||||||
|
|
@ -5555,6 +5560,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
handleBattlefieldList(packet);
|
handleBattlefieldList(packet);
|
||||||
break;
|
break;
|
||||||
case Opcode::SMSG_BATTLEFIELD_PORT_DENIED:
|
case Opcode::SMSG_BATTLEFIELD_PORT_DENIED:
|
||||||
|
addUIError("Battlefield port denied.");
|
||||||
addSystemChatMessage("Battlefield port denied.");
|
addSystemChatMessage("Battlefield port denied.");
|
||||||
break;
|
break;
|
||||||
case Opcode::MSG_BATTLEGROUND_PLAYER_POSITIONS:
|
case Opcode::MSG_BATTLEGROUND_PLAYER_POSITIONS:
|
||||||
|
|
@ -5650,6 +5656,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
const char* reasonMsg = (reason < 5) ? resetFailReasons[reason] : "Unknown reason.";
|
const char* reasonMsg = (reason < 5) ? resetFailReasons[reason] : "Unknown reason.";
|
||||||
std::string mapLabel = getMapName(mapId);
|
std::string mapLabel = getMapName(mapId);
|
||||||
if (mapLabel.empty()) mapLabel = "instance #" + std::to_string(mapId);
|
if (mapLabel.empty()) mapLabel = "instance #" + std::to_string(mapId);
|
||||||
|
addUIError("Cannot reset " + mapLabel + ": " + reasonMsg);
|
||||||
addSystemChatMessage("Cannot reset " + mapLabel + ": " + reasonMsg);
|
addSystemChatMessage("Cannot reset " + mapLabel + ": " + reasonMsg);
|
||||||
LOG_INFO("SMSG_INSTANCE_RESET_FAILED: mapId=", mapId, " reason=", reason);
|
LOG_INFO("SMSG_INSTANCE_RESET_FAILED: mapId=", mapId, " reason=", reason);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue