Core/Scripts: Start work on cleaning up scripts.

This commit is contained in:
hondacrx
2021-03-04 15:30:56 -05:00
parent cfca764568
commit 9318cf2781
15 changed files with 2998 additions and 2137 deletions
+5 -6
View File
@@ -461,7 +461,7 @@ namespace Scripts.Spells.Quest
void HandleDummy(uint effIndex)
{
Unit target = GetExplTargetUnit();
Unit target = GetHitUnit();
if (target)
if (target.IsTypeId(TypeId.Unit) && target.HasAura(SpellIds.ForceShieldArcanePurpleX3))
// Make sure nobody else is channeling the same target
@@ -553,7 +553,7 @@ namespace Scripts.Spells.Quest
Creature target = GetHitCreature();
if (target)
{
uint spellId = 0;
uint spellId;
switch (target.GetEntry())
{
case CreatureIds.Scavengebot004a8:
@@ -841,11 +841,10 @@ namespace Scripts.Spells.Quest
void HandleDummy(uint effIndex)
{
Player caster = GetCaster().ToPlayer();
Creature target = GetHitCreature();
if (target)
if (target != null)
{
if (target && !target.HasAura(SpellIds.Flames))
if (!target.HasAura(SpellIds.Flames))
{
caster.KilledMonsterCredit(CreatureIds.VillagerKillCredit);
target.CastSpell(target, SpellIds.Flames, true);
@@ -1559,7 +1558,7 @@ namespace Scripts.Spells.Quest
void HandleDummy(uint effIndex)
{
uint spellId = 0;
uint spellId;
switch (GetHitCreature().GetEntry())
{