

Lightguard
Members-
Posts
208 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Everything posted by Lightguard
-
I know this bug, but i don't know how to reproduce it. Probably we could try to remove all auras before removing spririt of redemption, or prevent receiving healing during the effect.
-
2 1 2 1 2 1 diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 124448f..f3d5d4c 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -255,6 +255,19 @@ bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2) } } +bool IsSingleFromSpellSpecificRanksPerTarget(uint32 spellId_spec, uint32 i_spellId_spec) +{ + switch(spellId_spec) + { + case SPELL_BLESSING: + case SPELL_AURA: + case SPELL_CURSE: + return spellId_spec==i_spellId_spec; + default: + return false; + } +} + bool IsPositiveTarget(uint32 targetA, uint32 targetB) { // non-positive targets diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 2f0a6af..f4c6ff8 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -146,6 +146,7 @@ inline bool IsLootCraftingSpell(SpellEntry const *spellInfo) int32 CompareAuraRanks(uint32 spellId_1, uint32 effIndex_1, uint32 spellId_2, uint32 effIndex_2); bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2); +bool IsSingleFromSpellSpecificRanksPerTarget(uint32 spellId_spec, uint32 i_spellId_spec); bool IsPassiveSpell(uint32 spellId); inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 839ebe2..9b4f867 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3561,6 +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); if( is_sspc && Aur->GetCasterGUID() == (*i).second->GetCasterGUID() ) { @@ -3582,6 +3583,25 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur) else next = m_Auras.begin(); } + else if( is_sspt && Aur->GetCasterGUID() != (*i).second->GetCasterGUID() && spellmgr.IsRankSpellDueToSpell(spellProto, i_spellId) ) + { + // cannot remove higher rank + if(CompareAuraRanks(spellId, effIndex, i_spellId, i_effIndex) < 0) + return false; + + // Its a parent aura (create this aura in ApplyModifier) + if ((*i).second->IsInUse()) + { + sLog.outError("Aura (Spell %u Effect %u) is in process but attempt removed at aura (Spell %u Effect %u) adding, need add stack rule for Unit::RemoveNoStackAurasDueToAura", i->second->GetId(), i->second->GetEffIndex(),Aur->GetId(), Aur->GetEffIndex()); + continue; + } + RemoveAurasDueToSpell(i_spellId); + + if( m_Auras.empty() ) + break; + else + next = m_Auras.begin(); + } else if( !is_sspc && spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId) ) { // Its a parent aura (create this aura in ApplyModifier) Patchfile
-
Forgt to update patchfile, sorry, updated.
-
Well the damage effect should cancel stealth anyways, but probably you're right. Updated patch.
-
Well, long forgotten, my first patch Probably this solution will be better. It should solve both earthbind totem and distract problems without sideeffects. Patch was created for revision 7475 diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 712f976..908a6ed 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1100,7 +1100,8 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) return; } - unit->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + if(m_spellInfo->Effect[0] != SPELL_EFFECT_DISTRACT && m_spellInfo->SpellIconID != 686) + unit->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); if( !(m_spellInfo->AttributesEx & SPELL_ATTR_EX_NO_INITIAL_AGGRO) ) { Patchfile
-
Ah you're right, i forgot it doesn't have the dbc values for that Updated first post.
-
Hm, you might be right, i check the whole thing again:) ::Edit:: You're right, i'm sorry:) Then the first patch was working:)
-
Simple, effective, and a really good example of team work, and discussion. ::Edit:: I hope i'm not wrong:D || || \\/
-
Yeah, i just tried to consolidate it a bit:D Didn't test it)
-
I modified the patch above, it should fix both problems now. ::Edit:: Tested, works for both.
-
SpellFamilyFlags: 1073741824 ---> FFFFFFFFC0000000 Lol, i just realized the empty flags, does reflective shield work??
-
I tried to clear it a bit: diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 25372e5..603c587 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2369,6 +2369,39 @@ void Spell::cast(bool skipCheck) SetExecutedCurrently(false); } +void Spell::CastReplenishmentToParty(Unit* caster, int32 SpellId, int MembersToAffect) +{ + Group *pGroup = NULL; + + if (caster->GetTypeId() == TYPEID_PLAYER) + pGroup = ((Player*)caster)->GetGroup(); + + class PrioritizeMana + { + public:int operator()( const Player* x, const Player* y ) const { + return ((x->GetPower(POWER_MANA)/x->GetMaxPower(POWER_MANA) * 100) < (y->GetPower(POWER_MANA)/y->GetMaxPower(POWER_MANA)*100)); + } + + Top10 manaUsers; + if( pGroup) + { + for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + { + Player* Target = itr->getSource(); + if(caster->GetGUID() != Target->GetGUID() && Target->getPowerType() == POWER_MANA && !Target->isDead()) + manaUsers.push(Target); + } + + for(int countera=0; ( !manaUsers.empty() ) && countera<MembersToAffect;++countera) + { + Player* Target = manaUsers.top(); + manaUsers.pop(); + if(caster->GetGUID() != Target->GetGUID()) + caster->CastSpell(Target,SpellId,true,NULL,NULL,caster->GetGUID()); + } + } +}; + void Spell::handle_immediate() { // start channeling if applicable diff --git a/src/game/Spell.h b/src/game/Spell.h index 2b70422..fe5b356 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -207,6 +207,7 @@ enum SpellState #define SPELL_SPELL_CHANNEL_UPDATE_INTERVAL (1*IN_MILISECONDS) typedef std::multimap<uint64, uint64> SpellTargetTimeMap; +typedef std::Priority_queue<Player*, std::vector<Player*>, PrioritizeMana> Top10; class Spell {
-
2 1 2 1 2 1 diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 0d79bde..e610563 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1724,7 +1724,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe case SPELLFAMILY_PRIEST: { // Reflective Shield - if (spellProto->SpellFamilyFlags == 0x1) + if (spellProto->SpellFamilyFlags == 0x1 && spellProto->SpellIconID == 566) { if (pVictim == this) break; Patchfile Note: Reflective Shield has no SpellFamilyFlags that's why i used SpellIconID.
-
True, and this will never change no matter how much you know:)
-
2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 [/size] 1[/url] [/size]
-
The main idea is good:) But, 1. Whatever you do, you should not use hard-coded spellids if there's any other solution, or not everywhere. 2. Using the variables provided by the class, or even dbc values would make it more dynamic, and less hacky. 3. Using random selection is incorrect here, as i think, we should iterate through the group, and select 10 with the lowest power, that needs an ordering what's probably the hardest in this spell. This is just my opinion, maybe other can give you better advices.
-
Before anyone would ask what is this: + else if(!apply && m_removeMode != AURA_REMOVE_BY_DEFAULT) + m_target-> RemoveAurasDueToSpell(50322); This is required to remove the 'triggered' spell if the 'triggering' is removed with not default remove mode.
-
Ehh, sorry i can't read, i thought he quoted the last post, by that i meant that it should be solvedby a new procflag (Aura remove) or somehow in HandleDummyAuraProc.
-
Becuse there's a difference between testing alone, and testing with 2.5k ppl online.
-
Under review... patches. Ask to Devs
Lightguard replied to Auntie Mangos's topic in OldGeneral discussion
All of you are somewhat right, but be optimistic, at least we don't have to update our patches as no changs are made to this part of the spell system. -
Tested on live server, workable, no side effects.
-
2 1 2 1 2 1 diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 478c1ae..242aa4c 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2314,6 +2314,26 @@ void Aura::HandleAuraDummy(bool apply, bool Real) ((Player*)m_target)->AddSpellMod(m_spellmod, apply); return; } + //Druid, Survival Instincts + if(GetSpellProto()->SpellIconID == 3707 && GetSpellProto()->SpellVisual[0] == 2758) + { + if(!m_target) + return; + + if(m_target->m_form != FORM_CAT || + m_target->m_form != FORM_BEAR || + m_target->m_form != FORM_DIREBEAR) + return; + + if(apply) + { + int32 bp0 = int32(m_target->GetMaxHealth() * m_modifier.m_amount / 100); + m_target->CastCustomSpell(m_target, 50322, &bp0, NULL, NULL, true); + } + else if(!apply && m_removeMode != AURA_REMOVE_BY_DEFAULT) + m_target-> RemoveAurasDueToSpell(50322); + return; + } break; } case SPELLFAMILY_HUNTER: Patchfile
-
21 2 1 2 1 diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index b9151f3..7001899 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -372,7 +372,7 @@ void Spell::EffectSchoolDMG(uint32 effect_idx) damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100); } // Shield Slam - else if(m_spellInfo->SpellFamilyFlags & 0x100000000LL) + else if(m_spellInfo->SpellFamilyFlags & 0x0000020000000000LL) damage += int32(m_caster->GetShieldBlockValue()); // Victory Rush else if(m_spellInfo->SpellFamilyFlags & 0x10000000000LL) Patchfile
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions

You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®