diff --git a/Source/Game/Scripting/SpellScript.cs b/Source/Game/Scripting/SpellScript.cs
index 0a2bd5380..fa9147c74 100644
--- a/Source/Game/Scripting/SpellScript.cs
+++ b/Source/Game/Scripting/SpellScript.cs
@@ -649,9 +649,11 @@ namespace Game.Scripting
}
return m_spell.GetCorpseTargetCountForEffect(effect);
}
-
- // methods useable only during spell hit on target, or during spell launch on target:
- // returns: target of current effect if it was Unit otherwise null
+
+ ///
+ /// useable only during spell hit on target, or during spell launch on target
+ ///
+ /// target of current effect if it was Unit otherwise null
public Unit GetHitUnit()
{
if (!IsInTargetHook())
@@ -661,7 +663,11 @@ namespace Game.Scripting
}
return m_spell.unitTarget;
}
- // returns: target of current effect if it was Creature otherwise null
+
+ ///
+ ///
+ ///
+ /// target of current effect if it was Creature otherwise null
public Creature GetHitCreature()
{
if (!IsInTargetHook())
@@ -674,7 +680,11 @@ namespace Game.Scripting
else
return null;
}
- // returns: target of current effect if it was Player otherwise null
+
+ ///
+ ///
+ ///
+ /// target of current effect if it was Player otherwise null
public Player GetHitPlayer()
{
if (!IsInTargetHook())
@@ -687,7 +697,11 @@ namespace Game.Scripting
else
return null;
}
- // returns: target of current effect if it was Item otherwise null
+
+ ///
+ ///
+ ///
+ /// target of current effect if it was Item otherwise null
public Item GetHitItem()
{
if (!IsInTargetHook())
@@ -697,7 +711,11 @@ namespace Game.Scripting
}
return m_spell.itemTarget;
}
- // returns: target of current effect if it was GameObject otherwise null
+
+ ///
+ ///
+ ///
+ /// target of current effect if it was GameObject otherwise null
public GameObject GetHitGObj()
{
if (!IsInTargetHook())
@@ -707,7 +725,25 @@ namespace Game.Scripting
}
return m_spell.gameObjTarget;
}
- // returns: destination of current effect
+
+ ///
+ ///
+ ///
+ /// target of current effect if it was Corpse otherwise nullptr
+ public Corpse GetHitCorpse()
+ {
+ if (!IsInTargetHook())
+ {
+ Log.outError(LogFilter.Scripts, $"Script: `{m_scriptName}` Spell: `{m_scriptSpellId}`: function SpellScript::GetHitCorpse was called, but function has no effect in current hook!");
+ return null;
+ }
+ return m_spell.corpseTarget;
+ }
+
+ ///
+ ///
+ ///
+ /// destination of current effect
public WorldLocation GetHitDest()
{
if (!IsInEffectHook())
@@ -717,6 +753,7 @@ namespace Game.Scripting
}
return m_spell.destTarget;
}
+
// setter/getter for for damage done by spell to target of spell hit
// returns damage calculated before hit, and real dmg done after hit
public int GetHitDamage()