Jump to content

[10566][PATCH] Insta Kill Log


Recommended Posts

Posted

What bug does the patch fix? What features does the patch add?

Add the Spell Insta Kill Log

For which repository revision was the patch created?

8432

Who has been writing this patch? Please include either forum user names or email addresses.

Me

With this patch , players sould see when someone uses a spell with InstaKIll effect.

This is the patch

From 1d53c97fa8044ed1ddf895ef66eb962fc8c2a206 Mon Sep 17 00:00:00 2001
From: unknown <Administrator@.(none)>
Date: Sat, 29 Aug 2009 05:48:50 -0700
Subject: [PATCH] Spell Insta Kill Log

---
src/game/SpellEffects.cpp |    5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index a52d573..91649dd 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -282,6 +282,11 @@ void Spell::EffectInstaKill(uint32 /*i*/)
    if(m_caster == unitTarget)                              // prevent interrupt message
        finish();

+    WorldPacket data(SMSG_SPELLINSTAKILLLOG, (8+8+4));
+    data << uint64(m_caster->GetTypeId() != TYPEID_GAMEOBJECT ? m_caster->GetGUID() : 0); //Caster GUID
+    data << uint64(unitTarget->GetGUID());  //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.6.2.msysgit.0.186.gf7512

I added a check in GameObject caster case knowning that mangos actually doesn't support gameobject as caster, but in official server when caster is a gameobject caster guid is 0 , I dont know why. So i added it for further support.

Greetings, Opterman

  • 3 weeks later...
  • 11 months later...
  • 3 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use