Jump to content

Lightguard

Members
  • Posts

    208
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Lightguard

  1. The conversation is pointless. It was already explained.
  2. Well i fixed the missing Unit:: tags, and tested it myself on 7692 http://www.wowhead.com/?spell=29723 - Sudden Death worked http://www.wowhead.com/?spell=56636 - Taste for Blood worked http://www.wowhead.com/?spell=57499 - Warbringer not worked but needs aura 275 (NYI) ofc the side effects have to be implemented somewhere else. (Probably a new function.??)
  3. I think the casting part could be solved this way (didn't test it yet, based on dbc data) but the other things could only be implemented in other functions diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index b8c0f80..013f3b0 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3667,6 +3667,27 @@ SpellCastResult Spell::CheckCast(bool strict) if(bg->GetStatus() == STATUS_WAIT_LEAVE) return SPELL_FAILED_DONT_REPORT; + // SpellAura 262 & 263 + Unit::AuraList const& prohibitAuras = m_caster->GetAurasByType(SPELL_AURA_ALLOW_ONLY_ABILITY); + for(Unit::AuraList::const_iterator itr = prohibitAuras.begin(); itr != prohibitAuras.end(); ++itr) + { + for (int i=0; i<3 ; ++i) + { + if (!(*itr)->isAffectedOnSpell(m_spellInfo)) + return SPELL_FAILED_CASTER_AURASTATE; // Don't allow cast + } + } + + Unit::AuraList const& allowAuras = m_caster->GetAurasByType(SPELL_AURA_262); + for(Unit::AuraList::const_iterator itr = allowAuras.begin(); itr != allowAuras.end(); ++itr) + { + for (int i=0; i<3 ; ++i) + { + if ((*itr)->isAffectedOnSpell(m_spellInfo)) + return SPELL_CAST_OK; // Allow cast + } + } + // only check at first call, Stealth auras are already removed at second call // for now, ignore triggered spells if( strict && !m_IsTriggeredSpell) @@ -5839,4 +5860,4 @@ void Spell::FillRaidOrPartyHealthPriorityTargets( UnitList &TagUnitMap, Unit* me TagUnitMap.push_back(healthQueue.top().getUnit()); healthQueue.pop(); } -} \\ No newline at end of file +}
  4. Well, it is kinda hard to solve taking in account this part of SpellAuras: void Aura::SetStackAmount(uint8 stackAmount) { if (stackAmount != m_stackAmount) { Unit *target = GetTarget(); Unit *caster = GetCaster(); if (!target || !caster) return; m_stackAmount = stackAmount; int32 amount = m_stackAmount * caster->CalculateSpellDamage(m_spellProto, m_effIndex, m_currentBasePoints, target); // Reapply if amount change if (amount!=m_modifier.m_amount) { ApplyModifier(false, true); m_modifier.m_amount = amount; ApplyModifier(true, true); } } RefreshAura(); } If the already stacked amount = the new amount then it does not run the required function again so that the bleed effect removing part does not run again Any ideas? Solving it may be really hacky i think:/
  5. Hm, sounds fun I'll take a look at it:)
  6. 2 1 2 1 2 1 diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index fba21e7..cc03510 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5168,6 +5168,26 @@ void Aura::HandleModDamagePercentDone(bool apply, bool Real) m_target->ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT,m_modifier.m_amount/100.0f,apply); } + // Hunger for Blood + // "If used while a Bleed effect is afflicting you, it will attempt to remove it and refund 15 energy." + if(apply) + { + if (m_spellProto->SpellFamilyName == SPELLFAMILY_GENERIC && m_spellProto->SpellIconID == 2961) + { + Unit::AuraList const& bleedAuras = m_target->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); + for(Unit::AuraList::const_iterator itr = bleedAuras.begin(); itr != bleedAuras.end(); ++itr) + { + SpellEntry const *i_spellInfo = (*itr)->GetSpellProto(); + if(GetAllSpellMechanicMask(i_spellInfo) & (1<<MECHANIC_BLEED)) + { + m_target->RemoveAurasDueToSpell(i_spellInfo->Id); + m_target->CastSpell(m_target, 58155, true); + break; // It should remove only one effect + } + } + } + } + // Skip non magic case for speedup if((m_modifier.m_miscvalue & SPELL_SCHOOL_MASK_MAGIC) == 0) return; Patchfile
  7. I can confirm, it's working correctly. Thank you.
  8. You're right, i updated last patch with limitation.
  9. Based on the suggestion of Vladimir, this should fit to everyone's needs... diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index c60809e..3249b65 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3541,10 +3541,10 @@ void Aura::HandleModStealth(bool apply, bool Real) } } - // Master of Subtlety Unit::AuraList const& mDummyAuras = pTarget->GetAurasByType(SPELL_AURA_DUMMY); for(Unit::AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i) { + // Master of Subtlety if ((*i)->GetSpellProto()->SpellIconID == 2114) { if (apply) @@ -3554,6 +3554,18 @@ void Aura::HandleModStealth(bool apply, bool Real) } else pTarget->CastSpell(pTarget,31666,true); + continue; + } + // Overkill + if ((*i)->GetId() == 58426 && GetSpellProto()->SpellFamilyFlags & 0x0000000000400000LL) + { + if (apply) + { + pTarget->CastSpell(m_target, 58427, true); + pTarget->RemoveAurasDueToSpell(58428); + } + else + pTarget->CastSpell(m_target, 58428, true); break; } } @@ -4196,6 +4208,12 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real) m_target->RemoveAurasDueToSpell(31665); break; } + // Overkill + if (spell->Id == 58428 && !apply) + { + m_target->RemoveAurasDueToSpell(58427); + break; + } break; } case SPELLFAMILY_HUNTER: diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 7fd3d1a..ebf22b7 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1371,6 +1371,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons return false; } + //Overkill + if( spellInfo_1->SpellIconID == 2285 && spellInfo_2->SpellIconID == 2285 ) + return false; + // Garrote -> Garrote-Silence (multi-family check) if( spellInfo_1->SpellIconID == 498 && spellInfo_2->SpellIconID == 498 && spellInfo_2->SpellVisual[0] == 0 ) return false; Patchfile
  10. I'm using a tempfix for that until someone can figure out correctly the new way of determining form requirement.
  11. Still unexplained:D If you know a better way, post it. I don't understand what're trying to point out. :confused: ::Edit:: Ok, i see. In this view the whole shapeshiftboost part should be redone, but you cannot create such general checks, or it will be too hacky.
  12. case FORM_STEALTH: + if(m_target->HasAura(58426)) + { + uint32 OverkillspellId; + uint32 OverkillspellId2; + } + break; case FORM_CREATURECAT: This is the only part that could mean 1 less check. That i would agree. btw. Overkill has only 1 dummy no ranks, i don't really see what you mean...
  13. It has only those ids hard-coded that are really required, and this is the way the spell should work.
  14. Incorrect. @@ -5363,6 +5378,11 @@ void Aura::HandleShapeshiftBoosts(bool apply) m_target->RemoveAurasDueToSpell(spellId); m_target->RemoveAurasDueToSpell(spellId2); The master shapeshifter commit isn't incorrect, but hacky.
  15. This might be better. diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index c60809e..3b43a57 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -4196,6 +4196,12 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real) m_target->RemoveAurasDueToSpell(31665); break; } + // Overkill + if (spell->Id == 58428 && !apply) + { + m_target->RemoveAurasDueToSpell(58427); + break; + } break; } case SPELLFAMILY_HUNTER: @@ -5245,6 +5251,8 @@ void Aura::HandleShapeshiftBoosts(bool apply) uint32 spellId = 0; uint32 spellId2 = 0; uint32 HotWSpellId = 0; + uint32 OverkillspellId; + uint32 OverkillspellId2; switch(GetModifier()->m_miscvalue) { @@ -5307,6 +5315,9 @@ void Aura::HandleShapeshiftBoosts(bool apply) case FORM_GHOUL: case FORM_SHADOW: case FORM_STEALTH: + OverkillspellId = 58427; + OverkillspellId2 = 58428; + break; case FORM_CREATURECAT: case FORM_CREATUREBEAR: spellId = 0; @@ -5356,6 +5367,10 @@ void Aura::HandleShapeshiftBoosts(bool apply) } } } + //Overkill + if (OverkillspellId) + if(m_target->HasAura(58426,0)) + m_target->CastSpell(m_target, OverkillspellId, true); } } else @@ -5363,6 +5378,11 @@ void Aura::HandleShapeshiftBoosts(bool apply) m_target->RemoveAurasDueToSpell(spellId); m_target->RemoveAurasDueToSpell(spellId2); + //Overkill + if (OverkillspellId2) + if(m_target->HasAura(58426,0)) + m_target->CastSpell(m_target, OverkillspellId2, true); + Unit::AuraMap& tAuras = m_target->GetAuras(); for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end() { diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 7fd3d1a..ebf22b7 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1371,6 +1371,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons return false; } + //Overkill + if( spellInfo_1->SpellIconID == 2285 && spellInfo_2->SpellIconID == 2285 ) + return false; + // Garrote -> Garrote-Silence (multi-family check) if( spellInfo_1->SpellIconID == 498 && spellInfo_2->SpellIconID == 498 && spellInfo_2->SpellVisual[0] == 0 ) return false; Patchfile
  16. Ok, finally this is correct. diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index b3de2d7..7b7d04d 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4986,6 +4986,18 @@ void Spell::EffectScriptEffect(uint32 effIndex) DoCreateItem( effIndex, itemtype ); return; } + // Everlasting Affliction + case 47422: + { + Unit::AuraMap& suAuras = unitTarget->GetAuras(); + for(Unit::AuraMap::iterator itr = suAuras.begin(); itr != suAuras.end(); ++itr) + { + SpellEntry const *spellInfo = (*itr).second->GetSpellProto(); + if(spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && spellInfo->SpellFamilyFlags & 0x0000000000000002LL) + (*itr).second->RefreshAura(); + } + return; + } } break; } Patchfile
  17. Whooo, another old patch That was long ago but good that you've made me remeber it.
  18. Afaik it recieves bonus from attack power...
  19. Spellfamilyflags change a lot while spelliconid stays. But you're somewhat right, i see flags everywhere too...
  20. "2" - This patch would fix the bug that Everlasting Affliction effindex 0 doesn't work. "2" - 7641 "2" - Didn't find any. diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index b3de2d7..53f0392 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4986,6 +4986,20 @@ void Spell::EffectScriptEffect(uint32 effIndex) DoCreateItem( effIndex, itemtype ); return; } + // Everlasting Affliction + case 47422: + { + Unit::AuraMap& afAuras = unitTarget->GetAuras(); + for(Unit::AuraMap::iterator itr = afAuras.begin(); itr != afAuras.end(); ++itr) + { + SpellEntry const *spellInfo = (*itr).second->GetSpellProto(); + if(spellInfo->SpellIconID == 313 || + spellInfo->SpellIconID == 152 || + spellInfo->SpellIconID == 2039) + (*itr).second->RefreshAura(); + } + return; + } } break; } Patchfile
  21. "All criticals against you" that no longer defines that it has to be a spell. This is the actual reason of modifying the spell.
  22. "2" - This patch would fix the bug that Eye for an Eye can proc only on spellcrits. "2" - 7614 "2" - Didn't find any. diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 24d9ca6..ff526be 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4447,7 +4447,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu case 25988: { // prevent damage back from weapon special attacks - if (!procSpell || procSpell->DmgClass != SPELL_DAMAGE_CLASS_MAGIC ) + if (!procSpell) return false; // return damage % to attacker but < 50% own total health Patchfile
×
×
  • 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