Jump to content

[patch] Raise Dead script effect


Auntie Mangos

Recommended Posts

Hey there!

This is my try to make the DK-spell "Raise Dead" (http://www.wowhead.com/?spell=46584) work.

Patch "Raise Dead": http://github.com/pasdVn/mangos/commit/352859fadbd61e421b86c477e85f6767e49575a1

The spell itself is no big deal, but the handling of the infinite cooldown (cooldown will only start if pet dies or is unsummoned), that is currently just supportet for aura spells in mangos. Problem is, that the client does not display the cooldown correct, if you send the cooldown event of the summon spell (that is not the original casted spell with the script effect) although they have a shared cooldown. It only does, if you directly cast a summon spell (in this case you see the cooldown correctly at all 3 cooldown sharing spells, if you learned them all, ofc...). Sollution is for now to send cd event for the script-effect-spell as well (hack).

Patch infinite CD for summonig spells: http://github.com/pasdVn/mangos/commit/60a5b618c707014ed57ffb32fc228cb2aac56b21

Two more notes:

  • * summonig of the temporary guardian pet (that means without Master of Ghouls) will only work if you apply TARGET_RANDOM_NEARBY_DEST fix first (or you are very close (0.5m) to a harmful unit^^)
    * learning Master of Ghouls to summon a controllable pet will only work if you have some runic power while learning this talent, becuase it -whyever- requires 1 point -.-
Link to comment
Share on other sites

  • 40 years later...

Yes, of course. Cooldown event will be send on pet death or unsummon (what comes earlier). Problem is, that the spell you are casting, is not the one that summons the pet, meaning, that the cooldownevent is not sended for the spell you originally castet, but a triggered one. In fact this should not be a problem, because those 3 spells have a shared cooldown (see here), but client does not act as expected (show the cooldown at the original casted spell as well). I solved this by additionally send a cooldown package for the cast-spell.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

maybe something like this would do the thing?

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 4aa95a5..11a8cac 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -6532,8 +6532,8 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
                    }

                    // check if "Glyph of Raise Dead" ,corpse- or "Corpse Dust" is available
-                    bool canCast = p_caster->CanNoReagentCast(m_spellInfo) || FindCorpseUsing<MaNGOS::RaiseDeadObjectCheck>();
+                    bool canCast =  p_caster->CanNoReagentCast(m_spellInfo) || unitTarget->isDead() && unitTarget->GetCreatureType()==CREATURE_TYPE_HUMANOID;
                    if (!canCast && p_caster->HasItemCount(37201,1))
                    {
                        p_caster->DestroyItemCount(37201, 1, true);
                        canCast = true;
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index b04cf54..46ea551 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -463,9 +463,6 @@ WorldObject* Spell::FindCorpseUsing()
    return result;
}

-// explicitly instantiate for use in SpellEffects.cpp
-template WorldObject* Spell::FindCorpseUsing<MaNGOS::RaiseDeadObjectCheck>();
-
void Spell::FillTargetMap()
{
    // TODO: ADD the correct target FILLS!!!!!!

Link to comment
Share on other sites

No No :P

We have to use this object searcher to find the corpse. Ther have been some changes in [9510] that makes this class not fit to the tempalte of FindCorpseUsing (we need a Unit, no player). As this class is in fact not used, nobody noticed it. For any reason I am not abled to comment on commits at github currently :-/

I updated the patch in first post.

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

Pet.cpp

SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
                                                           // this enables popup window (pet dismiss, cancel)

+            // DK ghouls have energy
+            if (cinfo->family == CREATURE_FAMILY_GHOUL)
+                setPowerType(POWER_ENERGY);

           break;
       case HUNTER_PET:
           SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100);

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...
  • 3 weeks later...

Hi! I've tried to apply the patch to revision 10317 and it fails in file GridNotifiers.h:

patching file src/game/GridNotifiers.h

Hunk #1 FAILED at 502.

1 out of 2 hunks FAILED -- saving rejects to file src/game/GridNotifiers.h.rej

The rest of the files apply but offsets are needed:

patching file sql/CUSTOM/21_mangos_DK_ghouls_raise_dead.sql

patching file src/game/GridNotifiers.h

Hunk #1 FAILED at 502.

1 out of 2 hunks FAILED -- saving rejects to file src/game/GridNotifiers.h.rej

patching file src/game/Pet.cpp

patching file src/game/Player.cpp

Hunk #1 succeeded at 17597 (offset -2 lines).

patching file src/game/Spell.cpp

Hunk #2 succeeded at 1547 (offset 6 lines).

Hunk #3 succeeded at 1563 (offset 6 lines).

Hunk #4 succeeded at 3391 (offset -26 lines).

patching file src/game/SpellEffects.cpp

patching file src/game/StatSystem.cpp

patching file src/game/Unit.cpp

Hunk #1 succeeded at 5744 (offset 15 lines).

Hunk #2 succeeded at 5762 (offset 15 lines).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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