Jump to content

[Patch] Rogue Talent Honored Among Thieves


Auntie Mangos

Recommended Posts

UPDATED on 01-Dec-2010

Revision of MaNGOS: 10759 with some custom changes, so the diff file may be "tainted" by them ;P

Fix for talent Honored Among Thieves. When anyone in the Rogue's group deals critical damage/heal, also periodic - the rogue gains a combo point for his current victim. Works with >1 rogue in the group with this talent. Cooldown is 1s per rogue with the talent.

Talent rank 1: http://www.wowhead.com/spell=51698

Proc spell: http://www.wowhead.com/spell=52916

Spell adding combo point: http://www.wowhead.com/spell=51699

Patch: http://pastebin.com/Gr6LgKpN

SQL proc event:

-- Honor Among Thieves 
DELETE FROM `spell_chain` WHERE `spell_id` IN (51698, 51700, 51701); 
INSERT INTO `spell_chain` VALUES 
(51698, 0, 51698, 1, 0), 
(51700, 51698, 51698, 2, 0), 
(51701, 51700, 51698, 3, 0);

DELETE FROM `spell_proc_event` WHERE `entry` IN (51698); 
INSERT INTO `spell_proc_event` VALUES 
(51698, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0054110, 0x0040002, 0, 0, 1);

Tested in a group of 2 rogues and a druid, works with melee/spell/healing criticals, also DoT crits and it worked all time, so hunter's ranged crits shouldnt be an exception ;p

Also 1sec. cooldown works, when there's a lot of spamming crits rogue gains only 1 cb point per second as intended.

thanks to przemratajczak for help :)

Link to comment
Share on other sites

  • 40 years later...

Works as intended.

Using UDB 391 even contains the sql part already.

Thank you!

One thing i am not sure about are these logs:

Aura (Spell 52916 Effect 0) is in process but attempt removed at aura (Spell 516

99 Effect 1) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAura

Aura (Spell 52916 Effect 0) is in process but attempt removed at aura (Spell 516

99 Effect 1) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAura

Link to comment
Share on other sites

hm, maybe mechanics of this talent will make it clear somehow:

talent's aura has 100% proc chance, it makes the rogue cast spell=52916 at everyone in his/her group. here we the algorithm: is m_target a rogue? if it is -> check if has talent. if does-> roll chance based on EffectBasePoints. if it is a success, then make m_target cast 51699 on it's current victim.

so, 52916 has 8sec duration. 51699 seems to overwrite the previous aura (because of the same icon id?)

thats my interpretation of the logs ;) should we consider it as a bug?

Link to comment
Share on other sites

when i was testing it i modified my rogue's energy to 9999 and spammed Sinister Strike. I also got some 'bonus cp', so I reverted the patch and... still got those extra cp. so I suppose that it's a problem with global cooldown on spells, or maybe something else. but You say, that You were having those extra cp with crits only. Were they rogue's with the talent crits or someone in rogue's group? When I was testing it in a group, it always granted rogue 1 cp from the talent. The problem existed only when I spammed sinister strike with a lot of energy.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Trying to compile on 10357 gives these errors:

2>Kompilieren...
2>SpellAuras.cpp
2>..\\..\\src\\game\\SpellAuras.cpp(2631) : error C2065: 'm_target': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2631) : error C2227: Links von "->getClass" muss sich ein Zeiger auf Klassen-/Struktur-/Union-/generischen Typ befinden.
2>        Typ ist ''unknown-type''
2>..\\..\\src\\game\\SpellAuras.cpp(2634) : error C2039: 'AuraMap': Ist kein Element von 'Unit'
2>        d:\\development\\mangos testserver\\mangos\\mangos 10357\\src\\game\\Unit.h(1106): Siehe Deklaration von 'Unit'
2>..\\..\\src\\game\\SpellAuras.cpp(2634) : error C2065: 'AuraMap': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2634) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'auras'
2>..\\..\\src\\game\\SpellAuras.cpp(2634) : error C2065: 'auras': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2634) : error C2065: 'm_target': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2634) : error C2227: Links von "->GetAuras" muss sich ein Zeiger auf Klassen-/Struktur-/Union-/generischen Typ befinden.
2>        Typ ist ''unknown-type''
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C3083: "AuraMap": Das Symbol links neben "::" muss ein Typ sein.
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2039: 'iterator': Ist kein Element von 'Unit'
2>        d:\\development\\mangos testserver\\mangos\\mangos 10357\\src\\game\\Unit.h(1106): Siehe Deklaration von 'Unit'
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2065: 'iterator': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'itr'
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2065: 'itr': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2065: 'auras': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2228: Links von ".begin" muss sich eine Klasse/Struktur/Union befinden.
2>        Typ ist ''unknown-type''
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2065: 'itr': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2065: 'auras': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2228: Links von ".end" muss sich eine Klasse/Struktur/Union befinden.
2>        Typ ist ''unknown-type''
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2146: Syntaxfehler: Fehlendes ')' vor Bezeichner 'itr'
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2059: Syntaxfehler: ';'
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2065: 'itr': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2635) : error C2059: Syntaxfehler: ')'
2>..\\..\\src\\game\\SpellAuras.cpp(2636) : error C2143: Syntaxfehler: Es fehlt ';' vor '{'
2>..\\..\\src\\game\\SpellAuras.cpp(2637) : error C2065: 'itr': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2637) : error C2227: Links von "->second" muss sich ein Zeiger auf Klassen-/Struktur-/Union-/generischen Typ befinden.
2>        Typ ist ''unknown-type''
2>..\\..\\src\\game\\SpellAuras.cpp(2637) : error C2227: Links von "->GetSpellProto" muss sich ein Zeiger auf Klassen-/Struktur-/Union-/generischen Typ befinden.
2>..\\..\\src\\game\\SpellAuras.cpp(2642) : error C2065: 'm_target': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2642) : error C2227: Links von "->getVictim" muss sich ein Zeiger auf Klassen-/Struktur-/Union-/generischen Typ befinden.
2>        Typ ist ''unknown-type''
2>..\\..\\src\\game\\SpellAuras.cpp(2643) : error C2065: 'm_target': nichtdeklarierter Bezeichner
2>..\\..\\src\\game\\SpellAuras.cpp(2643) : error C2227: Links von "->CastSpell" muss sich ein Zeiger auf Klassen-/Struktur-/Union-/generischen Typ befinden.
2>        Typ ist ''unknown-type''

Any idea how to fix?

Link to comment
Share on other sites

@@ -2490,6 +2490,22 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
2490    2490                     }
2491    2491                     break;
2492    2492                 }
    2493    +      case SPELLFAMILY_ROGUE:
    2494    +             // Honor Among Thieves 
    2495    +             if (GetSpellProto()->Id == 52916) 
    2496    +             { 
    2497    +                // prevent multiple casting of 51699 
    2498    +                if (GetTarget()->GetGUID() != GetCasterGUID()) 
    2499    +                    return; 
    2500    +                Unit *caster = GetCaster(); 
    2501    +                Unit *unitVictim = NULL; 
    2502    +                if (caster && caster->GetTypeId() == TYPEID_PLAYER) 
    2503    +                    unitVictim = ObjectAccessor::GetUnit(*caster,((Player*)caster)->GetComboTarget()); 
    2504    +                // roll proc chance 
    2505    +                if (unitVictim && roll_chance_i(m_modifier.m_amount)) 
    2506    +                    caster->CastSpell(unitVictim, 51699, true); 
    2507    +             }
    2508    +             break;
2493    2509                 case SPELLFAMILY_WARRIOR:
2494    2510                 {
2495    2511                     // Overpower

Link to comment
Share on other sites

  • 2 weeks later...

I think that it should work like this: http://pastebin.com/Bvj6LheS

implemented searching for ComboTarget, thx to Most_Mangos.

SQL:

DELETE FROM `spell_proc_event` WHERE `entry` IN (51698, 51700, 51701); 
INSERT INTO `spell_proc_event` VALUES 
(51698, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16|256|4096|16384|65536|262144, 2, 0, 0, 0);

since 3.3.x or something like that, there is 1 second cooldown for receiving combo point from this talent, so Cooldown hadled by spell_proc_event database table is outdated. We need to check if the rogue has 51699 Dummy aura (duration 1sec) - this is our cooldown for the talent. every rogue in party has own cooldown which is this dummy aura.

unfortunatelly there are some problems with stacking 52916 and 51699 SpellAuraHolders or something like that and the part with cooldown doesnt work in this patch.

Link to comment
Share on other sites

  • 3 months later...

While it may work, it looks very inefficient.

I'm not sure if the Auras from multiple rogues stack on the individual party members, but assumed they do, you can do some shortcuts.

If you look at the code for "Lock and Load" in Unit::HandleProcTriggerSpellAuraProc() you can see that even though the aura says 100% proc chance, the basepoints give the real chance, so you could try the same:

    switch(trigger_spell_id)
   {
       (...)
       case 52916:
       {
           if (!roll_chance_i(triggerAmount))
               return SPELL_AURA_PROC_FAILED;
           break;
       }

And in Aura::HandleAuraDummy() for 52916, instead of checking if target is a Rogue and search through his auras for the talent, maybe just check if your own aura has been casted by this target.

if "target != GetCaster()" you know this unit is not the rogue that gave you the aura.

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