Jump to content

[exploit]Penance


Auntie Mangos

Recommended Posts

+ {

+ if (Unit* caster = GetCaster())

+ caster->CastSpell(target, triggeredSpellInfo, true, NULL, this, casterGUID);

+ return;

+ }

I won't work, it's like for mage arcane missiles, it's fine if you are alone and only with one mob around but when you're in raid or surrounded by many mobs you'll get an odd behaviour while casting: wrong target message o cast on another target or cast to caster itself too.

The problem is well described here: -spell-target-type-77"]spell target type 77

the only way I found to make penance and arcane missile usable was using the channelling target:

if (Unit* caster = GetCaster())

{

if(uint64 target_guid = caster->GetChannelObjectGUID())

if( IS_UNIT_GUID(target_guid))

if(Unit* target = ObjectAccessor::GetUnit(*caster, target_guid))

caster->CastSpell(target, trigger_spell_id, true, NULL, this, casterGUID);

}

obviously this is another hack since the real problem is the current (bad) implementation of target type 77.

Link to comment
Share on other sites

  • 39 years later...

Mangos Version:8456

http://www.wowhead.com/?spell=53007

How it SHOULD work: Launches a volley of holy light at the target, causing 375 Holy damage to an enemy, or 1484 to 1676 healing to an ally instantly and every 1 sec for 2 sec.

How it DOES work: can heal another person even across the map, unlimited range

ok, first activate the auto-cast with the alt (esc, interface, combat, auto cast, alt :D)

tell your friend that is far

select your friend is in your party, press the alt key and use penance

also works with NPC, select a npc that this remote and press alt and use penance

sorry my english :S

Link to comment
Share on other sites

  • 2 months later...

bugs:

* healing effect of penance has TARGET_SINGLE_ENEMY and SPELL_EFFECT_HEAL what is weird for me and disabling spell cast on friendly units

* penance effects are triggered, current default trigger system forces target to cast final spell on itself, so there is no animation effect of launching light balls between caster and target.

* dummy spell handles force cast (CastSpell(,,true)) which makes penance invurnable to Silence

ugly hack but it has to be done somewhere.

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 0797939..1a3c60b 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4353,7 +4353,9 @@ SpellCastResult Spell::CheckCast(bool strict)
                        target_friendly = m_caster->IsFriendlyTo(target);
                    }

-                    if(target_friendly)
+                    // Penance negative target hack
+                    if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0001000000000000) && m_spellInfo->EffectImplicitTargetA[k] == TARGET_SINGLE_ENEMY){}
+                    else if (target_friendly)
                        return SPELL_FAILED_BAD_TARGETS;

                    explicit_target_mode = true;
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 7d420bd..12b41dc 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2268,6 +2268,20 @@ void Aura::TriggerSpell()
                target->CastCustomSpell(target, trigger_spell_id, &mana, NULL, NULL, true, NULL, this);
                return;
            }
+            // Penance effects
+            case 47758:
+            case 47757:
+            case 53001:
+            case 52986:
+            case 53002:
+            case 52987:
+            case 53003:
+            case 52988:
+            {
+                if (Unit* caster = GetCaster())
+                    caster->CastSpell(target, triggeredSpellInfo, true, NULL, this, casterGUID);
+                return;
+            }
        }
    }

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index d173c23..f26312c 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1680,9 +1680,9 @@ void Spell::EffectDummy(uint32 i)
                        return;
                }
                if (m_caster->IsFriendlyTo(unitTarget))
-                    m_caster->CastSpell(unitTarget, heal, true);
+                    m_caster->CastSpell(unitTarget, heal, false);
                else
-                    m_caster->CastSpell(unitTarget, hurt, true);
+                    m_caster->CastSpell(unitTarget, hurt, false);
                return;
            }
            break;

SQL with coeff

INSERT INTO spell_bonus_data VALUES
('47666','0.229','0','0','Penance - dmg effect'),
('47750','0.537','0','0','Penance - heal effect'),
('52983','0.537','0','0','Penance - heal effect'),
('52984','0.537','0','0','Penance - heal effect'),
('52985','0.537','0','0','Penance - heal effect'),
('52998','0.229','0','0','Penance - dmg effect'),
('52999','0.229','0','0','Penance - dmg effect'),
('53000','0.229','0','0','Penance - dmgl effect');

i noticed also that spellcoeff is stored in DBC unk_320_4[1] like for +1k other spells maybe this is the way modifier shuld be implemented?

Link to comment
Share on other sites

  • 2 weeks later...
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