Jump to content

[patch]Converting Sentry [44997]

Guest Mordred

Recommended Posts


- Spell Converting Sentry do not remove corpse of the creature so you can complete whole quest with one killed creature.


- 7641 SD2 988

From 1a673ef5aa3891c5cccbb2752855101072276c65 Mon Sep 17 00:00:00 2001
From: Mordred <[email protected]>
Date: Thu, 9 Apr 2009 10:50:55 +0200
Subject: [PATCH] Remove dead corpse to prevent repeating on the same creature [spell 44997]

src/game/SpellEffects.cpp |    8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index b3de2d7..fddfc83 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1062,8 +1062,12 @@ void Spell::EffectDummy(uint32 i)
                case 44997:                                 // Converting Sentry
-                    //Converted Sentry Credit
-                    m_caster->CastSpell(m_caster, 45009, true);
+                    // Remove dead corpse to prevent repeating on the same creature
+                    if(!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
+                        return;
+                    Creature* creatureTarget = (Creature*)unitTarget;
+                    creatureTarget->RemoveCorpse();
                case 45030:                                 // Impale Emissary

Spell 45009 removed, beacause it is implemented in AI of Converted Sentry and also this spell has EffectImplicitTargetA == TARGET_MASTER.

Link to comment
Share on other sites

  • 3 weeks later...
probably when spell script target is NPCs corpse it should be despawned after successful cast. I can't immagin situation where it should't happen.

It start to get offtopic, but i also agree the patch is "wrong". Meaning, it's not wrong to remove corpse, but we must find a better way to determine when corpse must be removed instead of adding explicit RemoveCorpse() for each spellId that are expected to do it.

A few similar examples where corpse always removed is when gathered (Skinned, Gathered (mining, herbalism, engineering, gas extraction)), so the theory about certain spells should also remove corpse if creature is dead is very likely.

However, there are other spell that does not have implicitTargetA/B==38 that are also expected to remove corpse.

I have made a small list of example spells (and a few notes) in http://www.scriptdev2.com/project.php?issueid=187

Link to comment
Share on other sites

  • 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