Jump to content

[Patch][8298] SpellSpecific Triggered Boosts


Auntie Mangos

Recommended Posts

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

  • * Sanctified Retribution and Swift Retribution are triggered for auras other than Retribution Aura, and Improved Concentration Aura and Devotion Aura are triggered for all paladin auras
    * If you applied this patch (or through some other method, disabled/removed/made mangos ignore the cooldown on the triggered spells of Aspect of the Dragonhawk/Presences), Aspect of the Dragonhawk's dodge bonus, Frost Presence's health bonus, and Unholy Presence's movement speed boost are correctly cast
    * Also fixed incorrect/hackish (or replaced with another hack, depending on your perspective :P) removal of the warrior's Blood Frenzy debuff. This is a more logical place to have the debuff removed, and now it checks if Rend is still active when Deep Wounds is removed, or vice versa, before removing Blood Frenzy.
    * and fixed some SpellSpecific checks that were needlessly complicated.

For which repository revision was the patch created?

8198

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

Frost Presence - http://getmangos.eu/community/viewtopic.php?id=7751&highlight=frost+presence

Aspect of the Dragonhawk - http://getmangos.eu/community/viewtopic.php?id=5918&highlight=aspect+of+the+dragonhawk

didn't find any others

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

Myself

Patch

I wrote a new method, Aura::HandleSpellSpecificBoosts, modeled after HandleShapeshiftBoosts, to add these hidden triggered auras because the effects are very similar.

Personally, I think that "boosts" have more to do with SpellSpecific (for lack of a better term that unites Paladin Auras, Hunter Aspects, Warrior Stances, Druid Forms, and Death Knight Presences) than SPELL_AURA_MOD_SHAPESHIFT. So ideally, I think that HandleShapeshiftBoosts could be merged into HandleSpellSpecificBoosts. Or maybe a new definition should be created for these spells first.

Link to comment
Share on other sites

  • 39 years later...

Get crash every 20-30 min.

#0  Aura::HandleSpellSpecificBoosts (this=0x9d47950, apply=<value optimized out>) at ../../../src/game/Object.h:182
       in ../../../src/game/Object.h
#0  Aura::HandleSpellSpecificBoosts (this=0x9d47950, apply=<value optimized out>) at ../../../src/game/Object.h:182
       spellSpec = <value optimized out>
       caster = (class Unit *) 0xb394310
       spellId = 30069
       spellId2 = 30070
#1  0x00000000007352a2 in Unit::RemoveAura (this=0x9eacff0, i=@0x4305eca0, mode=AURA_REMOVE_BY_DEFAULT) at ../../../src/game/Unit.cpp:4068
       Aur = (class Aura *) 0x9d47950
       AurSpellInfo = (const SpellEntry *) 0x7f3d7b33dfb4
       statue = (class Totem *) 0x0
       caster_channeled = false
#2  0x00000000007404bb in Unit::_UpdateSpells (this=0x9eacff0, time=229) at ../../../src/game/Unit.cpp:3093
       i = {_M_node = 0x110f9d60}
#3  0x000000000074065a in Unit::Update (this=0x9eacff0, p_time=229) at ../../../src/game/Unit.cpp:195
No locals.
#4  0x0000000000696741 in Player::Update (this=0x9eacff0, p_time=229) at ../../../src/game/Player.cpp:1103
       now = <value optimized out>
       pet = <value optimized out>
#5  0x00000000005d90df in Map::Update (this=0x7f3d6284c8a0, t_diff=@0x4305f01c) at ../../../src/game/Map.cpp:581
       plr = (class Player *) 0x7f3d4e137960
       updater = {i_timeDiff = 229}
       grid_object_update = {i_visitor = @0x4305ef90}
       world_object_update = {i_visitor = @0x4305ef90}
       __PRETTY_FUNCTION__ = "virtual void Map::Update(const uint32&)"
#6  0x00000000007b9a27 in MapInstanced::Update (this=0x7f3d628326f0, t=@0x4305f01c) at ../../../src/game/MapInstanced.cpp:63
       i = {<std::tr1::__detail::_Hashtable_iterator_base<std::Pair<const unsigned int, Map*>, false>> = {_M_cur_node = 0x7f3d616e8290,
   _M_cur_bucket = 0x7f3d616e8200}, <No data fields>}
#7  0x00000000005ea6c8 in MapManager::Update (this=0x7f3d74289f80, diff=<value optimized out>) at ../../../src/game/MapManager.cpp:262
No locals.
#8  0x0000000000754d03 in World::Update (this=0x7f3d80023760, diff=229) at ../../../src/game/World.cpp:1649
       autobroadcaston = 0
#9  0x00000000004e9a53 in WorldRunnable::run (this=<value optimized out>) at ../../../src/mangosd/WorldRunnable.cpp:65
       diff = 229
       realCurrTime = 2620946841
       realPrevTime = <value optimized out>
       prevSleepTime = 99

Link to comment
Share on other sites

Ok, so I switched to using GetCasterGUID() instead of GetCaster()->GetGUID() to fix that null pointer (stupid mistake on my part).

I also switched to using RemoveAurasByCasterSpell so one warrior's bleed effects expiring won't remove another's blood frenzy (whoever owns the debuff is still the last one who applied it).

EDIT: Coding changes; no need to use UI64LIT for SpellFamilyFlags2 and no need to use GetCaster in HandleShapeshiftBoosts (instead, changed to IS_PLAYER_GUID(GetCasterGUID())

EDIT2 (7/26): Added Improved Devotion Aura

Patch

Link to comment
Share on other sites

I add not fully related GetSpellSpecific part (without SPELL_WARRIOR_BLEED) in to [8279]. Thank you.

After more deep review code i not agree that using spell specific is normal way for this.

I think we must use std. switch(spellfaily) and classification by mailymask/spelid/category way..

(note: SPELL_WARRIOR_BLEED more easy and correct tested by mechannic 15 as i think)

This let merge later part of Aura::HandleShapeshiftBoosts at least

Possible i will rewrite this part by self...

Link to comment
Share on other sites

Why need this part? triggered effects as i look not have 47 category...

So that false is returned when a presence is compared with anything at all. It's not explicitly comparing a presence with it's triggered spell, it's comparing a presence with any spell.

Edit: I think I misunderstood, but last I checked, this function was being called and the spells not stacking without this check.

Edit2: Ok sorry, you are right, this part is not needed :P

Also, in _RemoveAura(), I think the

if(IsSpellLastAuraEffect(GetSpellProto(),GetEffIndex()))

is not necessary, because it is within the "if (lastaura)" code block.

Edit: Also, I notice that in some cases, auras are not being removed properly.

Edit2: Specifically, Frost Presence's 10% hp bonus isn't being removed; not sure if there are others.

Link to comment
Share on other sites

  • 2 weeks later...

I tried this patch for 3.1.3 last rev.;

frost presence works good.

aspect of the dragonhawk doesnt works (ap and dodge)

didnt tested the paladin stuff

+

it made the server crash, this messages:

2009-08-12 06:40:40 SQL: DELETE FROM characters WHERE guid = '11'

2009-08-12 06:40:40 SQL ERROR: MySQL server has gone away

2009-08-12 06:40:40 SQL: ROLLBACK

2009-08-12 06:40:40 SQL ERROR: MySQL server has gone away

2009-08-12 06:40:40 SQL: UPDATE characters SET online = 0 WHERE account = '5'

2009-08-12 06:40:40 SQL ERROR: MySQL server has gone away

2009-08-12 06:40:40 SQL: START TRANSACTION

2009-08-12 06:40:40 SQL ERROR: MySQL server has gone away

2009-08-12 06:40:40 SQL: DELETE FROM account_data WHERE account='5' AND type='0'

2009-08-12 06:40:40 SQL ERROR: MySQL server has gone away

2009-08-12 06:40:40 SQL: ROLLBACK

2009-08-12 06:40:40 SQL ERROR: MySQL server has gone away

2009-08-12 06:40:40 SQL: START TRANSACTION

2009-08-12 06:40:40 SQL ERROR: MySQL server has gone away

any news / update about this code ? for rev 9947

Link to comment
Share on other sites

I guess I forgot to write a comment for Improved Concentration Aura in IsNoStackDueToSpell when I added it, so I also forgot the fact that it also needed an exception in INSDTS when the patch was changed to use SpellIcons.

As I said in the head of this topic, Aspect of the Dragonhawk won't work correctly without there being a way to not have a cooldown on the triggered spell. Relogging will give you the dodge bonus because when the triggered spell is cast on login, the player won't have a cooldown on the Aspects spell category...

The best way I could think of is to not add a cooldown on category spells that the player doesn't really have (except when the cast is based on an item) (This also works with freezing arrow)

http://paste2.org/p/375371

EDIT: Though the addition in 8358 prevents Concentration Aura from being deleted when the triggered spell is cast now, I think it's probably better to make a INSDTS exception consistent with the other auras than to use SetInUse, as long as Improved Concentration Aura was the only thing that was breaking.

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