mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-20 23:01:36 -04:00
Core/Spells: Use SpellDifficulty.dbc to check casterAuraSpell, excludeCasterAuraSpell, targetAuraSpell and excludeTargetAuraSpell
Scripts/Icecrown Citadel: Fixed Mutated Abomination not being able to eat ooze on heroic mode Scripts/Icecrown Citadel: Removed some obsolete code Closes #523, #1447
This commit is contained in:
@@ -8016,7 +8016,7 @@ bool ObjectMgr::CheckDeclinedNames(std::wstring w_ownname, DeclinedName const& n
|
||||
|
||||
if (mainpart != GetMainPartOfName(wname, i+1))
|
||||
x = false;
|
||||
|
||||
|
||||
if (w_ownname != wname)
|
||||
y = false;
|
||||
}
|
||||
|
||||
@@ -4767,9 +4767,9 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
|
||||
// Note: spell 62473 requres casterAuraSpell = triggering spell
|
||||
if (m_spellInfo->casterAuraSpell && !m_caster->HasAura(m_spellInfo->casterAuraSpell))
|
||||
if (m_spellInfo->casterAuraSpell && !m_caster->HasAura(sSpellMgr->GetSpellIdForDifficulty(m_spellInfo->casterAuraSpell, m_caster)))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
if (m_spellInfo->excludeCasterAuraSpell && m_caster->HasAura(m_spellInfo->excludeCasterAuraSpell))
|
||||
if (m_spellInfo->excludeCasterAuraSpell && m_caster->HasAura(sSpellMgr->GetSpellIdForDifficulty(m_spellInfo->excludeCasterAuraSpell, m_caster)))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
|
||||
if (reqCombat && m_caster->isInCombat() && IsNonCombatSpell(m_spellInfo))
|
||||
@@ -4798,10 +4798,10 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if (!m_IsTriggeredSpell && m_spellInfo->TargetAuraStateNot && target->HasAuraState(AuraState(m_spellInfo->TargetAuraStateNot), m_spellInfo, m_caster))
|
||||
return SPELL_FAILED_TARGET_AURASTATE;
|
||||
|
||||
if (m_spellInfo->targetAuraSpell && !target->HasAura(m_spellInfo->targetAuraSpell))
|
||||
if (m_spellInfo->targetAuraSpell && !target->HasAura(sSpellMgr->GetSpellIdForDifficulty(m_spellInfo->targetAuraSpell, m_caster)))
|
||||
return SPELL_FAILED_TARGET_AURASTATE;
|
||||
|
||||
if (m_spellInfo->excludeTargetAuraSpell && target->HasAura(m_spellInfo->excludeTargetAuraSpell))
|
||||
if (m_spellInfo->excludeTargetAuraSpell && target->HasAura(sSpellMgr->GetSpellIdForDifficulty(m_spellInfo->excludeTargetAuraSpell, m_caster)))
|
||||
return SPELL_FAILED_TARGET_AURASTATE;
|
||||
|
||||
if (!m_IsTriggeredSpell && target == m_caster && m_spellInfo->AttributesEx & SPELL_ATTR1_CANT_TARGET_SELF)
|
||||
@@ -6549,9 +6549,9 @@ bool Spell::CheckTarget(Unit* target, uint32 eff)
|
||||
}
|
||||
|
||||
// Check Aura spell req (need for AoE spells)
|
||||
if (m_spellInfo->targetAuraSpell && !target->HasAura(m_spellInfo->targetAuraSpell))
|
||||
if (m_spellInfo->targetAuraSpell && !target->HasAura(sSpellMgr->GetSpellIdForDifficulty(m_spellInfo->targetAuraSpell, m_caster)))
|
||||
return false;
|
||||
if (m_spellInfo->excludeTargetAuraSpell && target->HasAura(m_spellInfo->excludeTargetAuraSpell))
|
||||
if (m_spellInfo->excludeTargetAuraSpell && target->HasAura(sSpellMgr->GetSpellIdForDifficulty(m_spellInfo->excludeTargetAuraSpell, m_caster)))
|
||||
return false;
|
||||
|
||||
// Check targets for not_selectable unit flag and remove
|
||||
|
||||
@@ -4053,11 +4053,6 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_DEST;
|
||||
++count;
|
||||
break;
|
||||
// this is here until targetAuraSpell and alike support SpellDifficulty.dbc
|
||||
case 70459: // Ooze Eruption Search Effect (Professor Putricide)
|
||||
spellInfo->targetAuraSpell = 0;
|
||||
++count;
|
||||
break;
|
||||
// THIS IS HERE BECAUSE COOLDOWN ON CREATURE PROCS IS NOT IMPLEMENTED
|
||||
case 71604: // Mutated Strength (Professor Putricide)
|
||||
case 72673: // Mutated Strength (Professor Putricide)
|
||||
|
||||
@@ -1051,46 +1051,60 @@ class SpellMgr
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Spell Difficulty data
|
||||
SpellEntry const* GetSpellForDifficultyFromSpell(SpellEntry const* spell, Unit* Caster)
|
||||
uint32 GetSpellIdForDifficulty(uint32 spellId, Unit* caster) const
|
||||
{
|
||||
//spell never can be NULL in this case!
|
||||
if (!Caster || !Caster->GetMap() || !Caster->GetMap()->IsDungeon())
|
||||
return spell;
|
||||
if (!sSpellStore.LookupEntry(spellId))
|
||||
return spellId;
|
||||
|
||||
uint32 mode = uint32(Caster->GetMap()->GetSpawnMode());
|
||||
if (!caster || !caster->GetMap() || !caster->GetMap()->IsDungeon())
|
||||
return spellId;
|
||||
|
||||
uint32 mode = uint32(caster->GetMap()->GetSpawnMode());
|
||||
if (mode >= MAX_DIFFICULTY)
|
||||
{
|
||||
sLog->outError("GetSpellForDifficultyFromSpell: Incorrect Difficulty for spell %u.", spell->Id);
|
||||
return spell;//return source spell
|
||||
sLog->outError("SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId);
|
||||
return spellId; //return source spell
|
||||
}
|
||||
uint32 SpellDiffId = GetSpellDifficultyId(spell->Id);
|
||||
if (!SpellDiffId)
|
||||
return spell;//return source spell, it has only REGULAR_DIFFICULTY
|
||||
|
||||
SpellDifficultyEntry const *SpellDiff = sSpellDifficultyStore.LookupEntry(SpellDiffId);
|
||||
if (!SpellDiff)
|
||||
uint32 difficultyId = GetSpellDifficultyId(spellId);
|
||||
if (!difficultyId)
|
||||
return spellId; //return source spell, it has only REGULAR_DIFFICULTY
|
||||
|
||||
SpellDifficultyEntry const *difficultyEntry = sSpellDifficultyStore.LookupEntry(difficultyId);
|
||||
if (!difficultyEntry)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "GetSpellForDifficultyFromSpell: SpellDifficultyEntry not found for spell %u. This Should never happen.", spell->Id);
|
||||
return spell;//return source spell
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId);
|
||||
return spellId; //return source spell
|
||||
}
|
||||
if (SpellDiff->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC)
|
||||
|
||||
if (difficultyEntry->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "GetSpellForDifficultyFromSpell: spell %u mode %u spell is NULL, using mode %u", spell->Id, mode, mode-2);
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is NULL, using mode %u", spellId, mode, mode - 2);
|
||||
mode -= 2;
|
||||
}
|
||||
if (SpellDiff->SpellID[mode] <= 0)
|
||||
|
||||
if (difficultyEntry->SpellID[mode] <= 0)
|
||||
{
|
||||
sLog->outErrorDb("GetSpellForDifficultyFromSpell: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spell->Id, mode);
|
||||
return spell;
|
||||
sLog->outErrorDb("SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spellId, mode);
|
||||
return spellId;
|
||||
}
|
||||
SpellEntry const* newSpell = sSpellStore.LookupEntry(uint32(SpellDiff->SpellID[mode]));
|
||||
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: spellid for spell %u in mode %u is %d", spellId, mode, difficultyEntry->SpellID[mode]);
|
||||
return uint32(difficultyEntry->SpellID[mode]);
|
||||
}
|
||||
|
||||
// Spell Difficulty data
|
||||
SpellEntry const* GetSpellForDifficultyFromSpell(SpellEntry const* spell, Unit* caster) const
|
||||
{
|
||||
uint32 newSpellId = GetSpellIdForDifficulty(spell->Id, caster);
|
||||
SpellEntry const* newSpell = sSpellStore.LookupEntry(newSpellId);
|
||||
if (!newSpell)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "GetSpellForDifficultyFromSpell: spell %u not found in SpellStore. Check spelldifficulty_dbc!", SpellDiff->SpellID[mode]);
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellForDifficultyFromSpell: spell %u not found in sSpellStore. Check spelldifficulty_dbc!", newSpellId);
|
||||
return spell;
|
||||
}
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "GetSpellForDifficultyFromSpell: spellid for spell %u in mode %u is %u ", spell->Id, mode, newSpell->Id);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellForDifficultyFromSpell: Spell id for instance mode is %u (original %u)", newSpell->Id, spell->Id);
|
||||
return newSpell;
|
||||
}
|
||||
|
||||
@@ -1353,7 +1367,7 @@ class SpellMgr
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
uint32 GetSpellDifficultyId(uint32 spellId)
|
||||
uint32 GetSpellDifficultyId(uint32 spellId) const
|
||||
{
|
||||
SpellDifficultySearcherMap::const_iterator i = mSpellDifficultySearcherMap.find(spellId);
|
||||
return i == mSpellDifficultySearcherMap.end() ? 0 : (*i).second;
|
||||
|
||||
@@ -513,9 +513,8 @@ class spell_blood_queen_vampiric_bite : public SpellScriptLoader
|
||||
if (GetCaster()->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
SpellEntry const* spell = sSpellStore.LookupEntry(SPELL_FRENZIED_BLOODTHIRST);
|
||||
spell = sSpellMgr->GetSpellForDifficultyFromSpell(spell, GetCaster());
|
||||
GetCaster()->RemoveAura(spell->Id, 0, 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_FRENZIED_BLOODTHIRST, GetCaster());
|
||||
GetCaster()->RemoveAura(spellId, 0, 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR, true);
|
||||
// Presence of the Darkfallen buff on Blood-Queen
|
||||
if (GetCaster()->GetMap()->IsHeroic())
|
||||
|
||||
@@ -1188,7 +1188,7 @@ class spell_deathbringer_blood_nova_targeting : public SpellScriptLoader
|
||||
|
||||
// set the upper cap
|
||||
if (targetsAtRange < minTargets)
|
||||
targetsAtRange = std::min<uint32>(unitList.size()-1, minTargets);
|
||||
targetsAtRange = std::min<uint32>(unitList.size() - 1, minTargets);
|
||||
|
||||
std::list<Unit*>::iterator itr = unitList.begin();
|
||||
std::advance(itr, urand(0, targetsAtRange));
|
||||
|
||||
@@ -351,17 +351,18 @@ class spell_festergut_pungent_blight : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_festergut_pungent_blight_SpellScript);
|
||||
|
||||
bool Load()
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(uint32(GetEffectValue()));
|
||||
if (!spellInfo || GetCaster()->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
// Get Inhaled Blight id for our difficulty
|
||||
spellInfo = sSpellMgr->GetSpellForDifficultyFromSpell(spellInfo, GetCaster());
|
||||
uint32 blightId = sSpellMgr->GetSpellIdForDifficulty(uint32(GetEffectValue()), GetCaster());
|
||||
|
||||
// ...and remove it
|
||||
GetCaster()->RemoveAurasDueToSpell(spellInfo->Id);
|
||||
GetCaster()->RemoveAurasDueToSpell(blightId);
|
||||
GetCaster()->ToCreature()->AI()->Talk(EMOTE_PUNGENT_BLIGHT);
|
||||
}
|
||||
|
||||
@@ -431,15 +432,16 @@ class spell_festergut_blighted_spores : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load()
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
void ExtraEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetCaster()->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
SpellEntry const* inoculated = sSpellStore.LookupEntry(SPELL_INOCULATED);
|
||||
inoculated = sSpellMgr->GetSpellForDifficultyFromSpell(inoculated, GetCaster());
|
||||
uint32 inoculatedId = sSpellMgr->GetSpellIdForDifficulty(SPELL_INOCULATED, GetCaster());
|
||||
uint32 currStack = 0;
|
||||
if (Aura const* inoculate = GetTarget()->GetAura(inoculated->Id))
|
||||
if (Aura const* inoculate = GetTarget()->GetAura(inoculatedId))
|
||||
currStack = inoculate->GetStackAmount();
|
||||
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_INOCULATED, true);
|
||||
|
||||
@@ -334,17 +334,15 @@ class boss_professor_putricide : public CreatureScript
|
||||
case PHASE_COMBAT_2:
|
||||
{
|
||||
SpellEntry const* spell = sSpellStore.LookupEntry(SPELL_CREATE_CONCOCTION);
|
||||
spell = sSpellMgr->GetSpellForDifficultyFromSpell(spell, me);
|
||||
DoCast(me, SPELL_CREATE_CONCOCTION);
|
||||
events.ScheduleEvent(EVENT_PHASE_TRANSITION, GetSpellCastTime(spell)+100);
|
||||
events.ScheduleEvent(EVENT_PHASE_TRANSITION, GetSpellCastTime(sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)) + 100);
|
||||
break;
|
||||
}
|
||||
case PHASE_COMBAT_3:
|
||||
{
|
||||
SpellEntry const* spell = sSpellStore.LookupEntry(SPELL_GUZZLE_POTIONS);
|
||||
spell = sSpellMgr->GetSpellForDifficultyFromSpell(spell, me);
|
||||
DoCast(me, SPELL_GUZZLE_POTIONS);
|
||||
events.ScheduleEvent(EVENT_PHASE_TRANSITION, GetSpellCastTime(spell)+100);
|
||||
events.ScheduleEvent(EVENT_PHASE_TRANSITION, GetSpellCastTime(sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)) + 100);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -869,9 +867,8 @@ class spell_putricide_expunged_gas : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
int32 dmg = 0;
|
||||
SpellEntry const* bloat = sSpellStore.LookupEntry(SPELL_GASEOUS_BLOAT);
|
||||
bloat = sSpellMgr->GetSpellForDifficultyFromSpell(bloat, GetCaster());
|
||||
if (Aura* gasBloat = GetTargetUnit()->GetAura(bloat->Id))
|
||||
uint32 bloatId = sSpellMgr->GetSpellIdForDifficulty(SPELL_GASEOUS_BLOAT, GetCaster());
|
||||
if (Aura* gasBloat = GetTargetUnit()->GetAura(bloatId))
|
||||
{
|
||||
uint32 stack = gasBloat->GetStackAmount();
|
||||
int32 const mod = (GetCaster()->GetMap()->GetSpawnMode() & 1) ? 1500 : 1250;
|
||||
@@ -1026,12 +1023,11 @@ class spell_putricide_ooze_eruption_searcher : public SpellScriptLoader
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
SpellEntry const* adhesive = sSpellStore.LookupEntry(SPELL_VOLATILE_OOZE_ADHESIVE);
|
||||
adhesive = sSpellMgr->GetSpellForDifficultyFromSpell(adhesive, GetCaster());
|
||||
if (GetHitUnit()->HasAura(adhesive->Id))
|
||||
uint32 adhesiveId = sSpellMgr->GetSpellIdForDifficulty(SPELL_VOLATILE_OOZE_ADHESIVE, GetCaster());
|
||||
if (GetHitUnit()->HasAura(adhesiveId))
|
||||
{
|
||||
GetCaster()->CastSpell(GetHitUnit(), SPELL_OOZE_ERUPTION, true);
|
||||
GetHitUnit()->RemoveAurasDueToSpell(adhesive->Id, GetCaster()->GetGUID(), 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
GetHitUnit()->RemoveAurasDueToSpell(adhesiveId, GetCaster()->GetGUID(), 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1108,21 +1104,21 @@ class spell_putricide_unbound_plague : public SpellScriptLoader
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
SpellEntry const* plague = sSpellMgr->GetSpellForDifficultyFromSpell(sSpellStore.LookupEntry(SPELL_UNBOUND_PLAGUE), GetCaster());
|
||||
SpellEntry const* searcher = sSpellMgr->GetSpellForDifficultyFromSpell(sSpellStore.LookupEntry(SPELL_UNBOUND_PLAGUE_SEARCHER), GetCaster());
|
||||
uint32 plagueId = sSpellMgr->GetSpellIdForDifficulty(SPELL_UNBOUND_PLAGUE, GetCaster());
|
||||
uint32 searcherId = sSpellMgr->GetSpellIdForDifficulty(SPELL_UNBOUND_PLAGUE_SEARCHER, GetCaster());
|
||||
|
||||
if (!GetHitUnit()->HasAura(plague->Id))
|
||||
if (!GetHitUnit()->HasAura(plagueId))
|
||||
{
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
{
|
||||
if (Aura* oldPlague = GetCaster()->GetAura(plague->Id, professor->GetGUID()))
|
||||
if (Aura* oldPlague = GetCaster()->GetAura(plagueId, professor->GetGUID()))
|
||||
{
|
||||
if (Aura* newPlague = professor->AddAura(plague->Id, GetHitUnit()))
|
||||
if (Aura* newPlague = professor->AddAura(plagueId, GetHitUnit()))
|
||||
{
|
||||
newPlague->SetMaxDuration(oldPlague->GetDuration());
|
||||
newPlague->SetDuration(oldPlague->GetDuration());
|
||||
oldPlague->Remove();
|
||||
GetCaster()->RemoveAurasDueToSpell(searcher->Id);
|
||||
GetCaster()->RemoveAurasDueToSpell(searcherId);
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_PLAGUE_SICKNESS, true);
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_UNBOUND_PLAGUE_PROTECTION, true);
|
||||
professor->CastSpell(GetHitUnit(), SPELL_UNBOUND_PLAGUE_SEARCHER, true);
|
||||
|
||||
@@ -159,25 +159,6 @@ class boss_rotface : public CreatureScript
|
||||
// don't enter combat
|
||||
}
|
||||
|
||||
Unit* GetAuraEffectTriggerTarget(uint32 spellId, uint8 /*effIndex*/)
|
||||
{
|
||||
if (spellId == SPELL_SLIME_SPRAY)
|
||||
{
|
||||
for (std::list<uint64>::iterator itr = summons.begin(); itr != summons.end();)
|
||||
{
|
||||
Creature *summon = Unit::GetCreature(*me, *itr);
|
||||
if (!summon)
|
||||
summons.erase(itr++);
|
||||
else if (summon->GetEntry() == NPC_OOZE_SPRAY_STALKER)
|
||||
return summon;
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() || !CheckInRoom())
|
||||
@@ -195,11 +176,9 @@ class boss_rotface : public CreatureScript
|
||||
case EVENT_SLIME_SPRAY:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
|
||||
{
|
||||
Position pos;
|
||||
target->GetPosition(&pos);
|
||||
DoSummon(NPC_OOZE_SPRAY_STALKER, pos, 8000, TEMPSUMMON_TIMED_DESPAWN);
|
||||
DoSummon(NPC_OOZE_SPRAY_STALKER, *target, 8000, TEMPSUMMON_TIMED_DESPAWN);
|
||||
Talk(EMOTE_SLIME_SPRAY);
|
||||
DoCastAOE(SPELL_SLIME_SPRAY);
|
||||
DoCast(me, SPELL_SLIME_SPRAY);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_SLIME_SPRAY, 20000);
|
||||
break;
|
||||
|
||||
@@ -323,17 +323,17 @@ class boss_sindragosa : public CreatureScript
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellEntry const* spell)
|
||||
{
|
||||
if (SpellEntry const* buffet = sSpellMgr->GetSpellForDifficultyFromSpell(sSpellStore.LookupEntry(70127), me))
|
||||
if (buffet->Id == spell->Id)
|
||||
if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(70127, me))
|
||||
if (spellId == spell->Id)
|
||||
if (Aura const* mysticBuffet = target->GetAura(spell->Id))
|
||||
_mysticBuffetStack = std::max<uint8>(_mysticBuffetStack, mysticBuffet->GetStackAmount());
|
||||
|
||||
// Frost Infusion
|
||||
if (Player* player = target->ToPlayer())
|
||||
{
|
||||
if (SpellEntry const* breath = sSpellMgr->GetSpellForDifficultyFromSpell(sSpellStore.LookupEntry(_isThirdPhase ? SPELL_FROST_BREATH_P2 : SPELL_FROST_BREATH_P1), me))
|
||||
if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(_isThirdPhase ? SPELL_FROST_BREATH_P2 : SPELL_FROST_BREATH_P1, me))
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_FROST_INFUSION) != QUEST_STATUS_REWARDED && breath->Id == spell->Id)
|
||||
if (player->GetQuestStatus(QUEST_FROST_INFUSION) != QUEST_STATUS_REWARDED && spellId == spell->Id)
|
||||
{
|
||||
if (Item* shadowsEdge = player->GetWeaponForAttack(BASE_ATTACK, true))
|
||||
{
|
||||
|
||||
@@ -914,7 +914,7 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
SetDespawnAtEnd(false);
|
||||
SetDespawnAtFar(false);
|
||||
_isEventActive = false;
|
||||
_isEventDone = false;
|
||||
_isEventDone = _instance->GetBossState(DATA_SISTER_SVALNA) == DONE;
|
||||
_didUnderTenPercentText = false;
|
||||
}
|
||||
|
||||
@@ -939,7 +939,7 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
_isEventDone = true;
|
||||
// Load Grid with Sister Svalna
|
||||
me->GetMap()->LoadGrid(4356.71f, 2484.33f);
|
||||
if (Creature* svalna = me->FindNearestCreature(NPC_SISTER_SVALNA, 333.0f, true))
|
||||
if (Creature* svalna = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_SISTER_SVALNA)))
|
||||
svalna->AI()->DoAction(ACTION_START_GAUNTLET);
|
||||
Talk(SAY_CROK_INTRO_1);
|
||||
_events.ScheduleEvent(EVENT_ARNATH_INTRO_2, 7000);
|
||||
@@ -953,7 +953,7 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
else if (action == ACTION_RESET_EVENT)
|
||||
{
|
||||
_isEventActive = false;
|
||||
_isEventDone = false;
|
||||
_isEventDone = _instance->GetBossState(DATA_SISTER_SVALNA) == DONE;
|
||||
me->setActive(false);
|
||||
_aliveTrash.clear();
|
||||
_currentWPid = 0;
|
||||
|
||||
Reference in New Issue
Block a user