Skip to content

Commit

Permalink
Northrend/Sholazar: Add weather setting to q.12537
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Oct 1, 2023
1 parent 2394c3a commit 076d62a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/game/AI/ScriptDevAI/scripts/northrend/world_northrend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ void world_map_northrend::OnCreatureCreate(Creature* creature)

void world_map_northrend::SetData(uint32 /*uiType*/, uint32 /*uiData*/) {}

void world_map_northrend::SetData64(uint32 data, uint64 value)
{
switch (data)
{
case 12537: // Lightning Definitely Strikes Twice
if (value) // 1 turn on weather
instance->SetZoneWeather(0, 4306, 5, 1.f);
else // 0 turn off weather
instance->SetZoneWeather(0, 4306, 0, 0.f);
break;
}
}

void world_map_northrend::SetDalaranCooldownTime(ObjectGuid playerGuid)
{
m_dalaranAreatriggerCooldown.emplace(playerGuid, instance->GetCurrentClockTime());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct world_map_northrend : public ScriptedMap
void OnCreatureCreate(Creature* creature) override;

void SetData(uint32 /*uiType*/, uint32 /*uiData*/) override;
void SetData64(uint32 data, uint64 value) override;

void SetDalaranCooldownTime(ObjectGuid playerGuid);
bool IsDalaranCooldownForPlayer(ObjectGuid playerGuid) const;
Expand Down

0 comments on commit 076d62a

Please sign in to comment.