fix(Scripts): Midsummer Music Range (#12248)
* fix(Scripts): Midsummer Music Range * Refactor iterating nearby players Co-authored-by: Nefertumm <nefertum.dev@protonmail.com> * Update go_scripts.cpp * Update go_scripts.cpp Co-authored-by: Nefertumm <nefertum.dev@protonmail.com>
This commit is contained in:
parent
2fd98c2bbc
commit
7df342b41c
1 changed files with 11 additions and 11 deletions
|
|
@ -821,19 +821,19 @@ public:
|
|||
if (!IsHolidayActive(HOLIDAY_FIRE_FESTIVAL))
|
||||
break;
|
||||
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
std::list<Player*> targets;
|
||||
Acore::AnyPlayerInObjectRangeCheck check(me, me->GetVisibilityRange(), false);
|
||||
Acore::PlayerListSearcherWithSharedVision<Acore::AnyPlayerInObjectRangeCheck> searcher(me, targets, check);
|
||||
Cell::VisitWorldObjects(me, searcher, me->GetVisibilityRange());
|
||||
for (Player* player : targets)
|
||||
{
|
||||
if (Player* player = itr->GetSource())
|
||||
if (player->GetTeamId() == TEAM_HORDE)
|
||||
{
|
||||
if (player->GetTeamId() == TEAM_HORDE)
|
||||
{
|
||||
me->PlayDirectMusic(EVENTMIDSUMMERFIREFESTIVAL_H, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->PlayDirectMusic(EVENTMIDSUMMERFIREFESTIVAL_A, player);
|
||||
}
|
||||
me->PlayDirectMusic(EVENTMIDSUMMERFIREFESTIVAL_H, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->PlayDirectMusic(EVENTMIDSUMMERFIREFESTIVAL_A, player);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue