mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10566] Implement SMSG_SPELLINSTAKILLLOG
Signed-off-by: DasBlub <dasblub@gmail.com>
This commit is contained in:
parent
f8a0f1f9e4
commit
a9231eee98
2 changed files with 11 additions and 3 deletions
|
|
@ -266,12 +266,20 @@ void Spell::EffectResurrectNew(SpellEffectIndex eff_idx)
|
|||
|
||||
void Spell::EffectInstaKill(SpellEffectIndex /*eff_idx*/)
|
||||
{
|
||||
if( !unitTarget || !unitTarget->isAlive() )
|
||||
if (!unitTarget || !unitTarget->isAlive())
|
||||
return;
|
||||
|
||||
if(m_caster == unitTarget) // prevent interrupt message
|
||||
if (m_caster == unitTarget) // prevent interrupt message
|
||||
finish();
|
||||
|
||||
WorldObject* caster = GetCastingObject(); // we need the original casting object
|
||||
|
||||
WorldPacket data(SMSG_SPELLINSTAKILLLOG, (8+8+4));
|
||||
data << (caster && caster->GetTypeId() != TYPEID_GAMEOBJECT ? m_caster->GetObjectGuid() : ObjectGuid()); // Caster GUID
|
||||
data << unitTarget->GetObjectGuid(); // Victim GUID
|
||||
data << uint32(m_spellInfo->Id);
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
|
||||
m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10565"
|
||||
#define REVISION_NR "10566"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue