Skip to content

Commit

Permalink
fix(Scripts/Kalimdor): Cavern of Time custodian escort quest group co…
Browse files Browse the repository at this point in the history
…mpletion (azerothcore#20355)

* cast quest credit on group members

* refactor group event

* Revert "refactor group event"

This reverts commit 36dff97.
  • Loading branch information
sogladev authored Nov 2, 2024
1 parent 72f4b7c commit 94ba32e
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/server/scripts/Kalimdor/zone_tanaris.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,28 @@ class npc_custodian_of_time : public CreatureScript
break;
case 24:
Talk(WHISPER_CUSTODIAN_14, player);
DoCast(player, 34883);
// below here is temporary workaround, to be removed when spell works properly
player->AreaExploredOrEventHappens(10277);
if (Group* group = player->GetGroup())
{
for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
{
Player* player = itr->GetSource();

// for any leave or dead (with not released body) group member at appropriate distance
if (player && player->IsAtGroupRewardDistance(me) && !player->GetCorpse())
DoCast(player, 34883); // QID 10277

}
}
else
{
DoCast(player, 34883); // QID 10277
}
break;
}
}
}

void MoveInLineOfSight(Unit* who) override

{
if (HasEscortState(STATE_ESCORT_ESCORTING))
return;
Expand Down

0 comments on commit 94ba32e

Please sign in to comment.