refactor(Core/Scripts): Spell To Scripts (#9718)

This commit is contained in:
IntelligentQuantum
2021-12-21 17:43:45 +03:30
committed by GitHub
parent 838c88f45a
commit 11a734bf2b
6 changed files with 103 additions and 31 deletions

View File

@@ -343,37 +343,6 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
damage /= count; // divide to all targets
}
switch (m_spellInfo->Id) // better way to check unknown
{
// Consumption
case 28865:
damage = (m_caster->GetMap()->ToInstanceMap()->GetDifficulty() == REGULAR_DIFFICULTY ? 2750 : 4250);
break;
// percent from health with min
case 25599: // Thundercrash
{
damage = unitTarget->GetHealth() / 2;
if (damage < 200)
damage = 200;
break;
}
// arcane charge. must only affect demons (also undead?)
case 45072:
{
if (unitTarget->GetCreatureType() != CREATURE_TYPE_DEMON
&& unitTarget->GetCreatureType() != CREATURE_TYPE_UNDEAD)
return;
break;
}
// Gargoyle Strike
case 51963:
{
// about +4 base spell dmg per level
damage = (m_caster->getLevel() - 60) * 4 + 60;
break;
}
}
break;
}
case SPELLFAMILY_WARRIOR: