mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Scripts: Implemented virtual function DoCastSpellOnPlayers (self-explanatory) and CheckRequiredBosses checking states of other bosses before allowing combat with selected one
Scripts/Icecrown Citadel: Added checks to prevent skipping bosses
This commit is contained in:
@@ -379,6 +379,17 @@ void InstanceScript::DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
|
||||
pPlayer->RemoveAurasDueToSpell(spell);
|
||||
}
|
||||
|
||||
// Cast spell on all players in instance
|
||||
void InstanceScript::DoCastSpellOnPlayers(uint32 spell)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = instance->GetPlayers();
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* player = i->getSource())
|
||||
player->CastSpell(player, spell, true);
|
||||
}
|
||||
|
||||
bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= NULL*/, uint32 /*miscvalue1*/ /*= 0*/)
|
||||
{
|
||||
sLog->outError("Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
|
||||
|
||||
Reference in New Issue
Block a user