Core/Spell: fix SendSpellMiss requiring caster Unit

(cherry picked from commit 7f947646f9)
This commit is contained in:
ariel-
2018-03-10 19:51:36 -03:00
committed by Shauren
parent a2ea26816e
commit 60ff73eeba
5 changed files with 12 additions and 12 deletions

View File

@@ -21,7 +21,7 @@
#include "BattlefieldMgr.h"
#include "CellImpl.h"
#include "CinematicMgr.h"
#include "CombatLogPacketsCommon.h"
#include "CombatLogPackets.h"
#include "Common.h"
#include "Creature.h"
#include "GameTime.h"
@@ -2429,6 +2429,15 @@ SpellMissInfo WorldObject::SpellHitResult(Unit* victim, SpellInfo const* spellIn
return SPELL_MISS_NONE;
}
void WorldObject::SendSpellMiss(Unit* target, uint32 spellID, SpellMissInfo missInfo)
{
WorldPackets::CombatLog::SpellMissLog spellMissLog;
spellMissLog.SpellID = spellID;
spellMissLog.Caster = GetGUID();
spellMissLog.Entries.emplace_back(target->GetGUID(), missInfo);
SendMessageToSet(spellMissLog.Write(), true);
}
FactionTemplateEntry const* WorldObject::GetFactionTemplateEntry() const
{
FactionTemplateEntry const* entry = sFactionTemplateStore.LookupEntry(GetFaction());