mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +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
|
|
@ -507,6 +507,13 @@ public:
|
|||
float getGameTime() const { return gameTime_; }
|
||||
float getTimeSpeed() const { return timeSpeed_; }
|
||||
|
||||
// Weather state (updated by SMSG_WEATHER)
|
||||
// weatherType: 0=clear, 1=rain, 2=snow, 3=storm/fog
|
||||
uint32_t getWeatherType() const { return weatherType_; }
|
||||
float getWeatherIntensity() const { return weatherIntensity_; }
|
||||
bool isRaining() const { return weatherType_ == 1 && weatherIntensity_ > 0.05f; }
|
||||
bool isSnowing() const { return weatherType_ == 2 && weatherIntensity_ > 0.05f; }
|
||||
|
||||
// Player skills
|
||||
const std::map<uint32_t, PlayerSkill>& getPlayerSkills() const { return playerSkills_; }
|
||||
const std::string& getSkillName(uint32_t skillId) const;
|
||||
|
|
@ -1538,6 +1545,10 @@ private:
|
|||
float timeSpeed_ = 0.0166f; // Time scale (default: 1 game day = 1 real hour)
|
||||
void handleLoginSetTimeSpeed(network::Packet& packet);
|
||||
|
||||
// ---- Weather state (SMSG_WEATHER) ----
|
||||
uint32_t weatherType_ = 0; // 0=clear, 1=rain, 2=snow, 3=storm
|
||||
float weatherIntensity_ = 0.0f; // 0.0 to 1.0
|
||||
|
||||
// ---- Player skills ----
|
||||
std::map<uint32_t, PlayerSkill> playerSkills_;
|
||||
std::unordered_map<uint32_t, std::string> skillLineNames_;
|
||||
|
|
|
|||
|
|
@ -358,6 +358,9 @@ enum class LogicalOpcode : uint16_t {
|
|||
SMSG_ARENA_ERROR,
|
||||
MSG_INSPECT_ARENA_TEAMS,
|
||||
|
||||
// ---- Weather ----
|
||||
SMSG_WEATHER,
|
||||
|
||||
// ---- Emotes ----
|
||||
CMSG_EMOTE,
|
||||
SMSG_EMOTE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue