fix(Scripts/BlackwingLair): Chromaggus should cast the same affliction spell among players. (#10644)

Brood Affliction: Bronze should stun players in random intervals.
- CLoses #10584

Co-authored-by: temperrr <temperrr@users.noreply.github.com>
This commit is contained in:
UltraNix
2022-02-15 01:07:46 +01:00
committed by GitHub
parent 4720156e8e
commit 0fea133f09
2 changed files with 7 additions and 2 deletions

View File

@@ -247,12 +247,13 @@ public:
break;
case EVENT_AFFLICTION:
{
uint32 afflictionSpellID = RAND(SPELL_BROODAF_BLUE, SPELL_BROODAF_BLACK, SPELL_BROODAF_RED, SPELL_BROODAF_BRONZE, SPELL_BROODAF_GREEN);
Map::PlayerList const& players = me->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* player = itr->GetSource()->ToPlayer())
{
DoCast(player, RAND(SPELL_BROODAF_BLUE, SPELL_BROODAF_BLACK, SPELL_BROODAF_RED, SPELL_BROODAF_BRONZE, SPELL_BROODAF_GREEN), true);
DoCast(player, afflictionSpellID, true);
if (player->HasAura(SPELL_BROODAF_BLUE) &&
player->HasAura(SPELL_BROODAF_BLACK) &&