Core/Spells&GOs: Fix Ritual of Doom.
Thanks QAston and Shocker for helping. Closes #2535
This commit is contained in:
1 parent
e70676a8f6
commit
791acfebac
4 files changed
+97
-52
No files matched your search
@@ -1393,6 +1393,21 @@ void GameObject::Use(Unit* user)
|
||||
triggered = true;
|
||||
}
|
||||
|
||||
// Cast casterTargetSpell at a random GO user
|
||||
// on the current DB there is only one gameobject that uses this (Ritual of Doom)
|
||||
// and its required target number is 1 (outter for loop will run once)
|
||||
if (info->summoningRitual.casterTargetSpell && info->summoningRitual.casterTargetSpell != 1) // No idea why this field is a bool in some cases
|
||||
{
|
||||
for (int i = 0; i < info->summoningRitual.casterTargetSpellTargets; i++)
|
||||
{
|
||||
std::set<uint32>::const_iterator itr = m_unique_users.begin();
|
||||
std::advance(itr, rand() % m_unique_users.size());
|
||||
|
||||
if (Unit* target = Unit::GetUnit(*this, uint64(*itr)))
|
||||
spellCaster->CastSpell(target, info->summoningRitual.casterTargetSpell, true);
|
||||
}
|
||||
}
|
||||
|
||||
// finish owners spell
|
||||
if (owner)
|
||||
owner->FinishSpell(CURRENT_CHANNELED_SPELL);
|
||||
|
||||
@@ -419,6 +419,7 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex)
|
||||
damage = unitTarget->CountPctFromMaxHealth(50);
|
||||
break;
|
||||
}
|
||||
case 20625: // Ritual of Doom Sacrifice
|
||||
case 29142: // Eyesore Blaster
|
||||
case 35139: // Throw Boom's Doom
|
||||
case 55269: // Deathly Stare
|
||||
|
||||
@@ -3095,6 +3095,7 @@ void SpellMgr::LoadDbcDataCorrections()
|
||||
case 51852: // The Eye of Acherus (no spawn in phase 2 in db)
|
||||
spellInfo->EffectMiscValue[0] |= 1;
|
||||
break;
|
||||
case 18541: // Ritual of Doom Effect (temp hack, current targeting system requires implicit targets to be set. Was target_dest_caster)
|
||||
case 51904: // Summon Ghouls On Scarlet Crusade (core does not know the triggered spell is summon spell)
|
||||
spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user