Jump to content

Lightguard

Members
  • Posts

    208
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Lightguard

  1. Probably we could include Attributes too to ensure that we don't get false positves. ::Edit:: Nm, whole stacking has to be redone for that. Takes time.
  2. Well, thinking about it for a while i've come to this conclusion: (Should also be applied to other functions probably) Basically, this modification checks for three simple things: ApplyAuraName[0] Spellfamily and Spellfamilyflags. These values seem to be the same in spells that's stacking we're trying to control. If anyone finds any problem with it, please report it. (The auras listed here are just examples, that's not complete yet) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 7ef35a5..5001392 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -255,14 +255,21 @@ bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1,SpellSpecific s } } -bool IsSingleFromSpellSpecificRanksPerTarget(SpellSpecific spellId_spec, SpellSpecific i_spellId_spec) +bool IsSingleFromSpellSpecificRanksPerTarget(SpellEntry const* spellInfo_1, SpellEntry const* spellInfo_2) { - switch(spellId_spec) + AuraType spellAura_1 = spellInfo_1->ApplyAuraName[0]; + AuraType spellAura_2 = spellInfo_2->ApplyAuraName[0]; + switch(spellAura_1) { - case SPELL_BLESSING: - case SPELL_AURA: - case SPELL_CURSE: - return spellId_spec==i_spellId_spec; + case SPELL_AURA_MOD_ATTACK_POWER: + case SPELL_AURA_MOD_STAT: + case SPELL_AURA_MOD_RESISTANCE: + case SPELL_AURA_MOD_INCREASE_HEALTH: + case SPELL_AURA_MOD_POWER_REGEN: + case SPELL_AURA_MOD_REGEN: + case SPELL_AURA_MOD_TARGET_RESISTANCE: + case SPELL_AURA_MOD_HEALING_DONE: + return spellAura_1==spellAura_2; default: return false; } @@ -1061,6 +1068,11 @@ bool SpellMgr::IsRankSpellDueToSpell(SpellEntry const *spellInfo_1,uint32 spellI if(!spellInfo_1 || !spellInfo_2) return false; if(spellInfo_1->Id == spellId_2) return false; + if(spellInfo_1->EffectApplyAuraName[0] == spellInfo_2->EffectApplyAuraName[0] && + spellInfo_1->SpellFamilyName == spellInfo_2->SpellFamilyName && + spellInfo_1->SpellFamilyFlags == spellInfo_2->SpellFamilyFlags) + return true; + return GetFirstSpellInChain(spellInfo_1->Id)==GetFirstSpellInChain(spellId_2); } diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index d026ccb..b39845d 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -146,7 +146,7 @@ inline bool IsLootCraftingSpell(SpellEntry const *spellInfo) int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2); bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1,SpellSpecific spellSpec2); -bool IsSingleFromSpellSpecificRanksPerTarget(SpellSpecific spellId_spec, SpellSpecific i_spellId_spec); +bool IsSingleFromSpellSpecificRanksPerTarget(SpellEntry const* spellInfo_1, SpellEntry const* spellInfo_2); bool IsPassiveSpell(uint32 spellId); inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 739f05c..e6af916 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3561,7 +3561,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur) SpellSpecific i_spellId_spec = GetSpellSpecific(i_spellId); bool is_sspc = IsSingleFromSpellSpecificPerCaster(spellId_spec,i_spellId_spec); - bool is_sspt = IsSingleFromSpellSpecificRanksPerTarget(spellId_spec,i_spellId_spec); + bool is_sspt = IsSingleFromSpellSpecificRanksPerTarget(spellProto,i_spellProto); if( is_sspc && Aur->GetCasterGUID() == (*i).second->GetCasterGUID() ) { Patchfile List of * Blessing of Might created with this check List of * of the Wild created with this check
  3. Well, i don't play on off, the only thing i've know was that our players told me you see. Anyway, it doesn't matter. This can be modified this way, and i'll do it in the next few days...
  4. Hm, that would change the whole thing. And make all the patches made before, just useless...
  5. Yeah pally lesser/greater are still stacking, that's what we've been discussing. I added the warrior shouts to the last patch. (1 line...)
  6. That i don't know and currently have no possibilty to test it. But, another requested thing was shaman totem stack. This patch would do it. ::Edit:: Added warrior shouts. diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 7ef35a5..bdb4efa 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -203,6 +203,9 @@ SpellSpecific GetSpellSpecific(uint32 spellId) if (IsElementalShield(spellInfo)) return SPELL_ELEMENTAL_SHIELD; + if (spellInfo->Attributes == 320) + return SPELL_TOTEM_AURA; + break; } @@ -262,6 +265,8 @@ bool IsSingleFromSpellSpecificRanksPerTarget(SpellSpecific spellId_spec, SpellSp case SPELL_BLESSING: case SPELL_AURA: case SPELL_CURSE: + case SPELL_TOTEM_AURA: + case SPELL_POSITIVE_SHOUT: return spellId_spec==i_spellId_spec; default: return false; diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index d026ccb..d79828d 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -96,7 +96,8 @@ enum SpellSpecific SPELL_BATTLE_ELIXIR = 14, SPELL_GUARDIAN_ELIXIR = 15, SPELL_FLASK_ELIXIR = 16, - SPELL_PRESENCE = 17 + SPELL_PRESENCE = 17, + SPELL_TOTEM_AURA = 18 }; SpellSpecific GetSpellSpecific(uint32 spellId); Patchfile List of affected totem spells
  7. Well, you cannot dispell or right click or anything the dummy that triggers spell_area.
  8. The other way would be adding it after the AUTH_OK packet sent when being removed from queue. I have that patch too if that's better.
  9. That was simply unworkable. (Please read my name again.)
  10. UPDATE spell_proc_event SET SpellFamilyMask0=0, SpellFamilyMask1=1096, SpellFamilyMask2=0 WHERE entry=46915; (Bloodsurge proc) We could add this too. Afaik there's already a row for it so we just update that.
  11. Ok, the totem i understand now thank you. Paladin auras do not stack. I'll add it this weekend sometime, but only if the other patch posted is reviewed.
  12. I'd like to do that too, but that requires more general and effecient checks. But it would free us from these stack hacks.
  13. Well, i don't think that the spelliconid check will be enough but if the problem still exists after this, find the spells removing it. diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index f333db8..61d0549 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1215,6 +1215,9 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons break; } + // Dragonmaw Illusion + if(spellInfo_1->SpellIconID == 1691 && spellInfo_2->SpellIconID == 1691) + return false; } break; case SPELLFAMILY_MAGE: Patchfile
  14. I think we should add a new field to spell_area that we could name quest_completed. Probably other quests will need it too. Actully i'm using a little hack in Player::UpdateZoneDependentAuras that works this way. Opinions?
  15. Nope. That would be too easy. Go to old hillsbrad and then go back to netherwing. Or use a battlestandard. These are the iconid based problems.
  16. Confirmed. It is a spellstack problem with ~30 other spells with different problems, so i solved it the hacky way rather...
  17. I hope the addition fixes Kapetejib's problem for me it did. But ProjectX could you please give more details on yours?
  18. 2 1 2 1 2 1 diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 1f6a746..bd4cd9d 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1064,6 +1064,19 @@ bool SpellMgr::IsRankSpellDueToSpell(SpellEntry const *spellInfo_1,uint32 spellI if(!spellInfo_1 || !spellInfo_2) return false; if(spellInfo_1->Id == spellId_2) return false; + SpellChainMap::const_iterator itr_1 = mSpellChains.find(spellInfo_1->Id); + SpellChainMap::const_iterator itr_2 = mSpellChains.find(spellId_2); + if(itr_1 != mSpellChains.end() && itr_2 != mSpellChains.end()) + { + if(uint32 reqSpell1 = itr_1->second.req) + if(GetFirstSpellInChain(reqSpell1) == GetFirstSpellInChain(spellId_2)) + return true; + + if(uint32 reqSpell2 = itr_2->second.req) + if(GetFirstSpellInChain(reqSpell2) == GetFirstSpellInChain(spellInfo_1->Id)) + return true; + } + return GetFirstSpellInChain(spellInfo_1->Id)==GetFirstSpellInChain(spellId_2); } Patchfile Any suggestions to simplify it are welcome.
  19. We have to find a unique property of the shaman totems, and then add it to the function. It's simple, just another case.
×
×
  • 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