Jump to content

[8063][patch] Summon Water Elemental fix


Guest bobaz

Recommended Posts

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

Fixes problem with Summon Water Elemental spell. Now, the spell should be working.

For which repository revision was the patch created?

8044+

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

Me - Dr Bobaz, thanks to Ike3 and Skirnir

diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index f07ec80..8392167 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -2373,7 +2373,7 @@ enum SummonType
     SUMMON_TYPE_WILD        = 64,
     SUMMON_TYPE_POSESSED    = 65,
     SUMMON_TYPE_DEMON       = 66,
-     SUMMON_TYPE_SUMMON      = 67,
+   SUMMON_TYPE_SUMMON      = 1561, 
     SUMMON_TYPE_TOTEM_SLOT2 = 81,

It's accualy Skirnir's diff, I just changed it for Summon Water Elemental spell. Just for notice.

Link to comment
Share on other sites

yes. You're right. So, here's a bigger patch, well it sounds little like a hack, but if you want player's Summon Water Elemental working, and NPC's spells using "67" it should solve the problem:

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

Fixes problem with Summon Water Elemental spell. Now, the spell should be working.

For which repository revision was the patch created?

8044+

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

Me - Dr Bobaz, thanks to Ike3(for Summon Water Elemental type), Skirnir (for the method) and laise (for advice)

file src/game/ShardedDefines.h
@@ -2358,11 +2358,12 @@ enum SummonType
    SUMMON_TYPE_GUARDIAN    = 61,
    SUMMON_TYPE_TOTEM_SLOT1 = 63,
    SUMMON_TYPE_WILD        = 64,
    SUMMON_TYPE_POSESSED    = 65,
    SUMMON_TYPE_DEMON       = 66,
    SUMMON_TYPE_SUMMON      = 67,
+    SUMMON_TYPE_SUMMON2      = 1561,
    SUMMON_TYPE_TOTEM_SLOT2 = 81,
    SUMMON_TYPE_TOTEM_SLOT3 = 82,
    SUMMON_TYPE_TOTEM_SLOT4 = 83,
    SUMMON_TYPE_TOTEM       = 121,
    SUMMON_TYPE_UNKNOWN3    = 181,

file src/game/spell.cpp
@@ -4229,11 +4229,12 @@ SpellCastResult Spell::CheckCast(bool strict)
                switch(m_spellInfo->EffectMiscValueB[i])
                {
                    case SUMMON_TYPE_POSESSED:
                    case SUMMON_TYPE_POSESSED2:
                    case SUMMON_TYPE_DEMON:
                    case SUMMON_TYPE_SUMMON:
+                     case SUMMON_TYPE_SUMMON2:
                    {
                        if(m_caster->GetPetGUID())
                            return SPELL_FAILED_ALREADY_HAVE_SUMMON;

                        if(m_caster->GetCharmGUID())

file src/game/SpellEffects.cpp
@@ -3210,10 +3210,11 @@ void Spell::EffectSummonType(uint32 i)
            break;
        case SUMMON_TYPE_DEMON:
            EffectSummonDemon(i);
            break;
        case SUMMON_TYPE_SUMMON:
+         case SUMMON_TYPE_SUMMON2:
            EffectSummon(i);
            break;
        case SUMMON_TYPE_CRITTER:
        case SUMMON_TYPE_CRITTER2:
        case SUMMON_TYPE_CRITTER3:

Edit to match laise suggestions

Link to comment
Share on other sites

why change summon 67 name? just add new one ,

check cast is not needed - effect summon already have a check for pet existence, don't add new case with same method, it should be like -

  
  case SUMMON_TYPE_SUMMON:
  case SUMMON_TYPE_SUMMON2:
            EffectSummon(i);
            break;

and maybe a better describing name for a new summon type

Link to comment
Share on other sites

file src/game/ShardedDefines.h
@@ -2358,11 +2358,12 @@ enum SummonType
    SUMMON_TYPE_GUARDIAN    = 61,
    SUMMON_TYPE_TOTEM_SLOT1 = 63,
    SUMMON_TYPE_WILD        = 64,
    SUMMON_TYPE_POSESSED    = 65,
    SUMMON_TYPE_DEMON       = 66,
    SUMMON_TYPE_SUMMON      = 67,
+    SUMMON_TYPE_SUMMON2      = 1561,
    SUMMON_TYPE_TOTEM_SLOT2 = 81,
    SUMMON_TYPE_TOTEM_SLOT3 = 82,
    SUMMON_TYPE_TOTEM_SLOT4 = 83,
    SUMMON_TYPE_TOTEM       = 121,
    SUMMON_TYPE_UNKNOWN3    = 181,

file src/game/spell.cpp
@@ -4229,11 +4229,12 @@ SpellCastResult Spell::CheckCast(bool strict)
                switch(m_spellInfo->EffectMiscValueB[i])
                {
                    case SUMMON_TYPE_POSESSED:
                    case SUMMON_TYPE_POSESSED2:
                    case SUMMON_TYPE_DEMON:
                    case SUMMON_TYPE_SUMMON:
+                     case SUMMON_TYPE_SUMMON2:
                    {
                        if(m_caster->GetPetGUID())
                            return SPELL_FAILED_ALREADY_HAVE_SUMMON;

                        if(m_caster->GetCharmGUID())

file src/game/SpellEffects.cpp
@@ -3210,10 +3210,11 @@ void Spell::EffectSummonType(uint32 i)
            break;
        case SUMMON_TYPE_DEMON:
            EffectSummonDemon(i);
            break;
        case SUMMON_TYPE_SUMMON:
+         case SUMMON_TYPE_SUMMON2:
            EffectSummon(i);
            break;
        case SUMMON_TYPE_CRITTER:
        case SUMMON_TYPE_CRITTER2:
        case SUMMON_TYPE_CRITTER3:

Maybe it an "hack" but work it perfectly ^^ ;)*

Thanks

Link to comment
Share on other sites

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

Fixes problem with Summon Water Elemental spell. Now, the spell should be working. I hope, last and final version of it :).

For which repository revision was the patch created?

8044+

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

Me - Dr Bobaz, thanks to Ike3(for Summon Water Elemental type), Skirnir (for the method) and laise (for advice)

file src/game/ShardedDefines.h
@@ -2372,10 +2372,11 @@ enum SummonType
    SUMMON_TYPE_CRITTER3    = 307,
    SUMMON_TYPE_UNKNOWN5    = 409,
    SUMMON_TYPE_UNKNOWN2    = 427,
    SUMMON_TYPE_POSESSED2   = 428,
    SUMMON_TYPE_GUARDIAN2   = 1161,
+    SUMMON_TYPE_ELEMENTAL   = 1561,
    SUMMON_TYPE_FORCE_OF_NATURE = 1562
};

enum ResponseCodes
{

file src/game/Spell.cpp
@@ -4229,10 +4229,11 @@ SpellCastResult Spell::CheckCast(bool strict)
                switch(m_spellInfo->EffectMiscValueB[i])
                {
                    case SUMMON_TYPE_POSESSED:
                    case SUMMON_TYPE_POSESSED2:
                    case SUMMON_TYPE_DEMON:
+                    case SUMMON_TYPE_ELEMENTAL:
                    case SUMMON_TYPE_SUMMON:
                    {
                        if(m_caster->GetPetGUID())
                            return SPELL_FAILED_ALREADY_HAVE_SUMMON;

file src/game/SpellEffects.cpp
@@ -3178,10 +3178,11 @@ void Spell::EffectSummonType(uint32 i)
            break;
        case SUMMON_TYPE_DEMON:
            EffectSummonDemon(i);
            break;
        case SUMMON_TYPE_SUMMON:
+        case SUMMON_TYPE_ELEMENTAL:
            EffectSummon(i);
            break;
        case SUMMON_TYPE_CRITTER:
        case SUMMON_TYPE_CRITTER2:
        case SUMMON_TYPE_CRITTER3:

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