// Send the new weather to all players in the zone bool Weather::SendWeatherForPlayersInZone(Map const* _map) { NormalizeGrade(); WorldPacket data(SMSG_WEATHER, 4 + 4 + 4 + 1); data << uint32(m_type); data << float(m_grade); data << uint32(GetSound()); // 1.12 soundid data << uint8(0); // 1 = instant change, 0 = smooth change ///- Send the weather packet to all players in this zone if (!_map->SendToPlayersInZone(data, m_zone)) return false; ///- Log the event LogWeatherState(GetWeatherState()); return true; }
// Send the new weather to all players in the zone bool Weather::SendWeatherForPlayersInZone(Map const* _map) { NormalizeGrade(); WeatherState state = GetWeatherState(); WorldPacket data(SMSG_WEATHER, 4 + 4 + 1); data << uint32(state); data << float(m_grade); data << uint8(0); // 1 = instant change, 0 = smooth change ///- Send the weather packet to all players in this zone if (!_map->SendToPlayersInZone(&data, m_zone)) return false; ///- Log the event LogWeatherState(state); sEluna->OnChange(this, m_zone, state, m_grade); return true; }