mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Implement SMSG_WEATHER and wire real game state (map ID, weather, underwater) to lighting system
This commit is contained in:
parent
60ebb4dc3f
commit
369ad26476
5 changed files with 44 additions and 7 deletions
|
|
@ -1239,6 +1239,19 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
}
|
||||
case Opcode::MSG_RAID_TARGET_UPDATE:
|
||||
break;
|
||||
case Opcode::SMSG_WEATHER: {
|
||||
// Format: uint32 weatherType, float intensity, uint8 isAbrupt
|
||||
if (packet.getSize() - packet.getReadPos() >= 9) {
|
||||
uint32_t wType = packet.readUInt32();
|
||||
float wIntensity = packet.readFloat();
|
||||
/*uint8_t isAbrupt =*/ packet.readUInt8();
|
||||
weatherType_ = wType;
|
||||
weatherIntensity_ = wIntensity;
|
||||
const char* typeName = (wType == 1) ? "Rain" : (wType == 2) ? "Snow" : (wType == 3) ? "Storm" : "Clear";
|
||||
LOG_INFO("Weather changed: type=", wType, " (", typeName, "), intensity=", wIntensity);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Opcode::SMSG_GAMEOBJECT_QUERY_RESPONSE:
|
||||
handleGameObjectQueryResponse(packet);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue