mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/Event: Change Midsummer Music to search grid only
This commit is contained in:
@@ -1358,30 +1358,23 @@ public:
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_MM_START_MUSIC:
|
||||
{
|
||||
if (!IsHolidayActive(HOLIDAY_FIRE_FESTIVAL))
|
||||
break;
|
||||
|
||||
Map::PlayerList const &players = go->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
case EVENT_MM_START_MUSIC:
|
||||
{
|
||||
if (Player* player = itr->GetSource())
|
||||
if (!IsHolidayActive(HOLIDAY_FIRE_FESTIVAL))
|
||||
break;
|
||||
|
||||
std::deque<Player*> playersNearby;
|
||||
go->GetPlayerListInGrid(playersNearby, go->GetMap()->GetVisibilityRange());
|
||||
for (Player* player : playersNearby)
|
||||
{
|
||||
if (player->GetTeamId() == TEAM_HORDE)
|
||||
{
|
||||
go->PlayDirectMusic(EVENTMIDSUMMERFIREFESTIVAL_H, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
go->PlayDirectMusic(EVENTMIDSUMMERFIREFESTIVAL_A, player);
|
||||
}
|
||||
}
|
||||
_events.ScheduleEvent(EVENT_MM_START_MUSIC, 5000); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
|
||||
break;
|
||||
}
|
||||
|
||||
_events.ScheduleEvent(EVENT_MM_START_MUSIC, 5000); // Every 5 second's SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user