Some misc cleansup.

This commit is contained in:
hondacrx
2023-10-06 17:33:20 -04:00
parent 85f37f6edf
commit ccb5341c21
13 changed files with 30 additions and 42 deletions
+1 -1
View File
@@ -672,7 +672,7 @@ namespace Game
{
Unit caster = Global.ObjAccessor.GetUnit(GetPlayer(), packet.Guid);
Spell spell = caster ? caster.GetCurrentSpell(CurrentSpellTypes.Generic) : null;
if (!spell || spell.m_spellInfo.Id != packet.SpellID || spell.m_castId != packet.CastID || !spell.m_targets.HasDst() || !spell.m_targets.HasSrc())
if (spell == null || spell.m_spellInfo.Id != packet.SpellID || spell.m_castId != packet.CastID || !spell.m_targets.HasDst() || !spell.m_targets.HasSrc())
return;
Position pos = spell.m_targets.GetSrcPos();
+2 -2
View File
@@ -476,10 +476,10 @@ namespace Game
trader.ModifyMoney(-(long)his_trade.GetMoney());
trader.ModifyMoney((long)my_trade.GetMoney());
if (my_spell)
if (my_spell != null)
my_spell.Prepare(my_targets);
if (his_spell)
if (his_spell != null)
his_spell.Prepare(his_targets);
// cleanup