Core/Spell: fix SendSpellMiss requiring caster Unit
Port From (https://github.com/TrinityCore/TrinityCore/commit/60ff73eeba93c7f97abff0eeb504cb4b5ff8a6cd)
This commit is contained in:
@@ -2028,6 +2028,15 @@ namespace Game.Entities
|
|||||||
return SpellMissInfo.None;
|
return SpellMissInfo.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendSpellMiss(Unit target, uint spellID, SpellMissInfo missInfo)
|
||||||
|
{
|
||||||
|
SpellMissLog spellMissLog = new();
|
||||||
|
spellMissLog.SpellID = spellID;
|
||||||
|
spellMissLog.Caster = GetGUID();
|
||||||
|
spellMissLog.Entries.Add(new SpellLogMissEntry(target.GetGUID(), (byte)missInfo));
|
||||||
|
SendMessageToSet(spellMissLog, true);
|
||||||
|
}
|
||||||
|
|
||||||
public FactionTemplateRecord GetFactionTemplateEntry()
|
public FactionTemplateRecord GetFactionTemplateEntry()
|
||||||
{
|
{
|
||||||
var entry = CliDB.FactionTemplateStorage.LookupByKey(GetFaction());
|
var entry = CliDB.FactionTemplateStorage.LookupByKey(GetFaction());
|
||||||
|
|||||||
@@ -2103,14 +2103,6 @@ namespace Game.Entities
|
|||||||
|
|
||||||
SendCombatLogMessage(data);
|
SendCombatLogMessage(data);
|
||||||
}
|
}
|
||||||
public void SendSpellMiss(Unit target, uint spellID, SpellMissInfo missInfo)
|
|
||||||
{
|
|
||||||
SpellMissLog spellMissLog = new();
|
|
||||||
spellMissLog.SpellID = spellID;
|
|
||||||
spellMissLog.Caster = GetGUID();
|
|
||||||
spellMissLog.Entries.Add(new SpellLogMissEntry(target.GetGUID(), (byte)missInfo));
|
|
||||||
SendMessageToSet(spellMissLog, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SendSpellDamageResist(Unit target, uint spellId)
|
void SendSpellDamageResist(Unit target, uint spellId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7700,7 +7700,7 @@ namespace Game.Spells
|
|||||||
if (missInfo != SpellMissInfo.None)
|
if (missInfo != SpellMissInfo.None)
|
||||||
{
|
{
|
||||||
if (missInfo != SpellMissInfo.Miss)
|
if (missInfo != SpellMissInfo.Miss)
|
||||||
spell.GetCaster().ToUnit().SendSpellMiss(unit, spell.m_spellInfo.Id, missInfo);
|
spell.GetCaster().SendSpellMiss(unit, spell.m_spellInfo.Id, missInfo);
|
||||||
spell.m_damage = 0;
|
spell.m_damage = 0;
|
||||||
spell.m_healing = 0;
|
spell.m_healing = 0;
|
||||||
_spellHitTarget = null;
|
_spellHitTarget = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user