Jump to content

[fix][9054]Living Bomb final explosion


Auntie Mangos

Recommended Posts

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

Living bomb final Explosion

For which repository revision was the patch created?

8778

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

http://getmangos.eu/community/viewtopic.php?id=6492

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

Me

Data in DBC are wrong now(at least in mine), so I have to hardcode IDs....

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 8af7235..d951819 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2338,6 +2338,21 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
                m_target->CastSpell(m_target, 47287, true, NULL, this);
                return;
            }
+            case 44457:                                     // Living Bomb Rank 1
+            {
+                m_target->CastSpell(m_target,44461, false);	
+                return;
+            }
+            case 55359:                                     // Living Bomb Rank 2
+            {
+                m_target->CastSpell(m_target, 55361, false);	
+                return;
+            }
+            case 55360:                                     // Living Bomb Rank 3
+            {
+                m_target->CastSpell(m_target, 55362, false);
+                return;
+            }
        }

        if (caster && m_removeMode == AURA_REMOVE_BY_DEATH)

Link to comment
Share on other sites

  • 39 years later...
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp

index 6948cbd..a6bb18e 100644

--- a/src/game/SpellAuras.cpp

+++ b/src/game/SpellAuras.cpp

@@ -2456,7 +2456,18 @@ void Aura::HandleAuraDummy(bool apply, bool Real)

break;

}

case SPELLFAMILY_MAGE:

+ {

+ // Living Bomb

+ if (m_spellProto->SpellIconID == 3000 && (m_spellProto->SpellFamilyFlags & UI64LIT(0x2000000000000)))

+ {

+ // Zero duration is equal to AURA_REMOVE_BY_DEFAULT. We can't use it directly, as it is set even

+ // when removing aura from one target due to casting Living Bomb at other.

+ if (caster && !apply && (m_duration == 0 || m_removeMode == AURA_REMOVE_BY_DISPEL))

+ caster->CastSpell(m_target,m_modifier.m_amount,true);

+ return;

+ }

break;

+ }

case SPELLFAMILY_PRIEST:

{

// Pain and Suffering

diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp

index fa0cff1..a20a310 100644

--- a/src/game/SpellMgr.cpp

+++ b/src/game/SpellMgr.cpp

@@ -186,6 +186,9 @@ SpellSpecific GetSpellSpecific(uint32 spellId)

if ((spellInfo->SpellFamilyFlags & UI64LIT(0x1000000)) && spellInfo->EffectApplyAuraName[0]==SPELL_AURA_MOD_CONFUSE)

return SPELL_MAGE_POLYMORPH;

+ if (spellInfo->SpellFamilyFlags & UI64LIT(0x2000000000000))

+ return SPELL_MAGE_BOMB;

+

break;

}

case SPELLFAMILY_WARRIOR:

@@ -288,6 +291,7 @@ bool IsSingleFromSpellSpecificPerTargetPerCaster(SpellSpecific spellSpec1,SpellS

case SPELL_POSITIVE_SHOUT:

case SPELL_JUDGEMENT:

case SPELL_HAND:

+ case SPELL_MAGE_BOMB:

return spellSpec1==spellSpec2;

default:

return false;

@@ -303,6 +307,7 @@ bool IsSingleFromSpellSpecificSpellRanksPerTarget(SpellSpecific spellSpec1,Spell

case SPELL_AURA:

case SPELL_CURSE:

case SPELL_HAND:

+ case SPELL_MAGE_BOMB:

return spellSpec1==spellSpec2;

default:

return false;

@@ -1369,6 +1374,11 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons

case SPELLFAMILY_MAGE:

if( spellInfo_2->SpellFamilyName == SPELLFAMILY_MAGE )

{

+ // Living Bomb & Ignite

+ if( (spellInfo_1->SpellIconID == 3000) && (spellInfo_2->SpellIconID == 937) ||

+ (spellInfo_2->SpellIconID == 3000) && (spellInfo_1->SpellIconID == 937) )

+ return false;

+

// Blizzard & Chilled (and some other stacked with blizzard spells

if( (spellInfo_1->SpellFamilyFlags & UI64LIT(0x80)) && (spellInfo_2->SpellFamilyFlags & UI64LIT(0x100000)) ||

(spellInfo_2->SpellFamilyFlags & UI64LIT(0x80)) && (spellInfo_1->SpellFamilyFlags & UI64LIT(0x100000)) )

diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h

index 236a7f8..298ac81 100644

--- a/src/game/SpellMgr.h

+++ b/src/game/SpellMgr.h

@@ -103,6 +103,7 @@ enum SpellSpecific

SPELL_FOOD = 20,

SPELL_DRINK = 21,

SPELL_FOOD_AND_DRINK = 22,

+ SPELL_MAGE_BOMB = 23,

};

SpellSpecific GetSpellSpecific(uint32 spellId);

yeah this patch is nice :) mangos devs please review this patch :)

Link to comment
Share on other sites

  • 1 month later...

Most code in patch not need

1) it now casted at any target count

2) it can be stacked from diff casters same rank

3) current code without additional checks prevent have more one this spell any ranks at traget.

I think dispel part can be moved to Unit.cpp like
Just need cast target to target with triggered aura pointer that provide caster guid for combat log.

In [9054] in simplifed Astellar's vrsion. Thank you :)

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