Jump to content

[FIX] Soulstone Rank 7


Guest aerione_alt

Recommended Posts

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

This fix makes Rank 7 of the warlock spell Soulstone work properly.

* For which repository revision was the patch created?

Created for 7205

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

Haven't seen a thread, but easily testable by anyone, just cast the last rank of soulstone and kill yourself, you will not get a "Use Soulstone" option.

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

Just myself.

Sorry, having trouble with Git Patches, couldn't create a working patch using Windows Git bash. Here is the fix:

Previously (broken rank 7 soulstone):

in Player.cpp ( uint32 Player::GetResurrectionSpellId() )

uint32 Player::GetResurrectionSpellId()
{
   // search priceless resurrection possibilities
   uint32 prio = 0;
   uint32 spell_id = 0;
   AuraList const& dummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
   for(AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
   {
       // Soulstone Resurrection                           // prio: 3 (max, non death persistent)
       if( prio < 2 && (*itr)->GetSpellProto()->SpellVisual[0] == 99 && (*itr)->GetSpellProto()->SpellIconID == 92 )
       {
           switch((*itr)->GetId())
           {
               case 20707: spell_id =  3026; break;        // rank 1
               case 20762: spell_id = 20758; break;        // rank 2
               case 20763: spell_id = 20759; break;        // rank 3
               case 20764: spell_id = 20760; break;        // rank 4
               case 20765: spell_id = 20761; break;        // rank 5
               case 27239: spell_id = 27240; break;        // rank 6
               default:
                   sLog.outError("Unhandled spell %%u: S.Resurrection",(*itr)->GetId());
                   continue;
           }

With fix:

uint32 Player::GetResurrectionSpellId()
{
   // search priceless resurrection possibilities
   uint32 prio = 0;
   uint32 spell_id = 0;
   AuraList const& dummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
   for(AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
   {
       // Soulstone Resurrection                           // prio: 3 (max, non death persistent)
       if( prio < 2 && (*itr)->GetSpellProto()->SpellVisual[0] == 99 && (*itr)->GetSpellProto()->SpellIconID == 92 )
       {
           switch((*itr)->GetId())
           {
               case 20707: spell_id =  3026; break;        // rank 1
               case 20762: spell_id = 20758; break;        // rank 2
               case 20763: spell_id = 20759; break;        // rank 3
               case 20764: spell_id = 20760; break;        // rank 4
               case 20765: spell_id = 20761; break;        // rank 5
               case 27239: spell_id = 27240; break;        // rank 6
               [b]case 47883: spell_id = 47882; break;        // rank 7[/b]
               default:
                   sLog.outError("Unhandled spell %%u: S.Resurrection",(*itr)->GetId());
                   continue;
           }

Link to comment
Share on other sites

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index e05d48a..c705c4b 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -18747,6 +18747,7 @@ uint32 Player::GetResurrectionSpellId()
                case 20764: spell_id = 20760; break;        // rank 4
                case 20765: spell_id = 20761; break;        // rank 5
                case 27239: spell_id = 27240; break;        // rank 6
+                case 47883: spell_id = 47882; break;        // rank 7
                default:
                    sLog.outError("Unhandled spell %%u: S.Resurrection",(*itr)->GetId());
                    continue;

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