mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
fix(Scripts/IcecrownCitadel): Fix ICC buff not being reapplied after … (#15407)
This commit is contained in:
@@ -612,6 +612,35 @@ void InstanceScript::DoCastSpellOnPlayers(uint32 spell)
|
||||
player->CastSpell(player, spell, true);
|
||||
}
|
||||
|
||||
void InstanceScript::DoCastSpellOnPlayer(Player* player, uint32 spell, bool includePets /*= false*/, bool includeControlled /*= false*/)
|
||||
{
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
player->CastSpell(player, spell, true);
|
||||
|
||||
if (!includePets)
|
||||
return;
|
||||
|
||||
for (uint8 itr2 = 0; itr2 < MAX_SUMMON_SLOT; ++itr2)
|
||||
{
|
||||
ObjectGuid summonGUID = player->m_SummonSlot[itr2];
|
||||
if (!summonGUID.IsEmpty())
|
||||
if (Creature* summon = instance->GetCreature(summonGUID))
|
||||
summon->CastSpell(player, spell, true);
|
||||
}
|
||||
|
||||
if (!includeControlled)
|
||||
return;
|
||||
|
||||
for (auto itr2 = player->m_Controlled.begin(); itr2 != player->m_Controlled.end(); ++itr2)
|
||||
{
|
||||
if (Unit* controlled = *itr2)
|
||||
if (controlled->IsInWorld() && controlled->GetTypeId() == TYPEID_UNIT)
|
||||
controlled->CastSpell(player, spell, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= nullptr*/, uint32 /*miscvalue1*/ /*= 0*/)
|
||||
{
|
||||
LOG_ERROR("scripts.ai", "Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map {} not have implementation for achievement criteria {}",
|
||||
|
||||
Reference in New Issue
Block a user