From 50d2fc34ecc2c9e2481188d8ac10c8ad8e02303e Mon Sep 17 00:00:00 2001 From: QAston Date: Wed, 25 Feb 2009 19:35:44 +0100 Subject: *Fix forbearance. *Fix new ranks of Holy Nova. *Fix Imp. holy concentration. --HG-- branch : trunk --- src/game/Unit.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 92bf97e9e02..ce22eca1854 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4332,6 +4332,9 @@ Aura* Unit::GetAura(AuraType type, uint32 family, uint32 familyFlag1, uint32 fam bool Unit::HasAura(uint32 spellId) const { + //Special case for non existing spell + if (spellId==61988) + return HasAura(61987) || HasAura(25771); for (int i = 0; i < 3 ; ++i) { AuraMap::const_iterator iter = m_Auras.find(spellEffectPair(spellId, i)); -- cgit v1.2.3 From 64540eff85465fca81121cc3de85fecc7315cf3e Mon Sep 17 00:00:00 2001 From: QAston Date: Wed, 25 Feb 2009 21:15:38 +0100 Subject: *Fix bug with spellproc. *Fix bug with bloodthirst healing. --HG-- branch : trunk --- src/game/SpellMgr.cpp | 7 ++++--- src/game/SpellMgr.h | 1 - src/game/Unit.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index f312329192c..5498c802f87 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1044,8 +1044,9 @@ void SpellMgr::LoadSpellProcEvents() spe.schoolMask = fields[1].GetUInt32(); spe.spellFamilyName = fields[2].GetUInt32(); - spe.spellFamilyMask = (uint64)fields[3].GetUInt32()|((uint64)fields[4].GetUInt32()<<32); - spe.spellFamilyMask2= fields[5].GetUInt32(); + spe.spellFamilyMask[0] = fields[3].GetUInt32(); + spe.spellFamilyMask[1] = fields[4].GetUInt32(); + spe.spellFamilyMask[2] = fields[5].GetUInt32(); spe.procFlags = fields[6].GetUInt32(); spe.procEx = fields[7].GetUInt32(); spe.ppmRate = fields[8].GetFloat(); @@ -1155,7 +1156,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP return false; // spellFamilyName is Ok need check for spellFamilyMask if present - if(spellProcEvent->spellFamilyMask || spellProcEvent->spellFamilyMask2) + if(spellProcEvent->spellFamilyMask) { if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags ) == 0) return false; diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 2fe81a3e98b..119dbed9eb8 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -615,7 +615,6 @@ struct SpellProcEventEntry uint32 schoolMask; // if nonzero - bit mask for matching proc condition based on spell candidate's school: Fire=2, Mask=1<<(2-1)=2 uint32 spellFamilyName; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyNamer value flag96 spellFamilyMask; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags (like auras 107 and 108 do) - uint32 spellFamilyMask2; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags2 (like auras 107 and 108 do) uint32 procFlags; // bitmask for matching proc event uint32 procEx; // proc Extend info (see ProcFlagsEx) float ppmRate; // for melee (ranged?) damage spells - proc rate per minute. if zero, falls back to flat chance from Spell.dbc diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ce22eca1854..55779378428 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6937,7 +6937,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB // Bloodthirst (($m/100)% of max health) case 23880: { - basepoints0 = int32(GetMaxHealth() * triggerAmount / 10000); + basepoints0 = int32(GetMaxHealth() * triggerAmount / 100); break; } // Shamanistic Rage triggered spell -- cgit v1.2.3 From aa39b07c5e0c17ddcc744bb5bde5d89fb7d7f4f0 Mon Sep 17 00:00:00 2001 From: QAston Date: Thu, 26 Feb 2009 17:09:12 +0100 Subject: *Fix auras display when unit dies. *Fix Freezing trap diminishing return. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 6 ------ src/game/SpellMgr.cpp | 2 +- src/game/Unit.cpp | 31 +++++++++++++++++++------------ src/game/Unit.h | 1 + 4 files changed, 21 insertions(+), 19 deletions(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index fe16e488b3d..d31ec2ff553 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -459,12 +459,6 @@ m_updated(false), m_isRemovedOnShapeLost(true), m_in_use(false) Aura::~Aura() { - //Delete references to aura - if(GetAuraSlot() < MAX_AURAS && m_target && m_target->GetVisibleAura(GetAuraSlot())) - { - AuraSlotEntry * entry = m_target->GetVisibleAura(GetAuraSlot()); - entry->m_slotAuras[GetEffIndex()]=NULL; - } } AreaAura::AreaAura(SpellEntry const* spellproto, uint32 eff, int32 *currentBasePoints, Unit *target, diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 5498c802f87..95a52acf57c 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2884,7 +2884,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto if (mechanic & (1< Date: Thu, 26 Feb 2009 18:24:00 +0100 Subject: *Fix bloodsurge proc. --HG-- branch : trunk --- sql/updates/1570_world.sql | 3 +++ src/game/Unit.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 sql/updates/1570_world.sql (limited to 'src/game/Unit.cpp') diff --git a/sql/updates/1570_world.sql b/sql/updates/1570_world.sql new file mode 100644 index 00000000000..8c4f15fb3e2 --- /dev/null +++ b/sql/updates/1570_world.sql @@ -0,0 +1,3 @@ +-- Bloodsurge +DELETE FROM `spell_proc_event` WHERE `entry` IN (46915); +INSERT INTO `spell_proc_event` VALUES (46915, 0x00, 6, 0x00000040, 0x00000404, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 4e24fa723c7..33192206232 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -253,7 +253,7 @@ void Unit::Update( uint32 p_time ) i_motionMaster.UpdateMotion(p_time); } -void UpdateAuras() +void Unit::UpdateAuras() { const uint64& auramask = GetAuraUpdateMask(); if (auramask) -- cgit v1.2.3 From 9772db0903eeb9c035c77f3a85fcf99b789ea3ae Mon Sep 17 00:00:00 2001 From: QAston Date: Thu, 26 Feb 2009 22:10:29 +0100 Subject: *Fix Lava Lash. *Fix Seal of Corruption. --HG-- branch : trunk --- src/game/Item.cpp | 7 ++++++- src/game/SpellEffects.cpp | 10 +++++----- src/game/Unit.cpp | 9 +++++++++ 3 files changed, 20 insertions(+), 6 deletions(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 85df92f998b..ea8d77076eb 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -756,7 +756,12 @@ bool Item::IsFitToSpellRequirements(SpellEntry const* spellInfo) const if(spellInfo->EquippedItemInventoryTypeMask != 0) // 0 == any inventory type { - if((spellInfo->EquippedItemInventoryTypeMask & (1 << proto->InventoryType)) == 0) + // Special case - accept weapon type for main and offhand requirements + if(proto->InventoryType == INVTYPE_WEAPON && + (spellInfo->EquippedItemInventoryTypeMask & (1 << INVTYPE_WEAPONMAINHAND) || + spellInfo->EquippedItemInventoryTypeMask & (1 << INVTYPE_WEAPONOFFHAND))) + return true; + else if ((spellInfo->EquippedItemInventoryTypeMask & (1 << proto->InventoryType)) == 0) return false; // inventory type not present in mask } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index fbee149152a..469f3f45357 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -620,23 +620,23 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) } case SPELLFAMILY_PALADIN: { - // Judgement of Vengeance ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance on the target - if((m_spellInfo->SpellFamilyFlags[1] & 0x8) && m_spellInfo->SpellIconID==2292) + // Judgement of Vengeance/Corruption ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance/Blood Corruption on the target + if((m_spellInfo->SpellFamilyFlags[1] & 0x800) && m_spellInfo->SpellIconID==2292) { float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK); int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) + m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget); damage+=int32(ap * 0.14f) + int32(holy * 22 / 100); - // Get stack of Holy Vengeance on the target added by caster + // Get stack of Holy Vengeance/Blood Corruption on the target added by caster uint32 stacks = 0; Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); for(Unit::AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr) - if((*itr)->GetId() == 31803 && (*itr)->GetCasterGUID()==m_caster->GetGUID()) + if(((*itr)->GetId() == 31803 || (*itr)->GetId() == 53742) && (*itr)->GetCasterGUID()==m_caster->GetGUID()) { stacks = (*itr)->GetStackAmount(); break; } - // + 10% for each application of Holy Vengeance on the target + // + 10% for each application of Holy Vengeance/Blood Corruption on the target if(stacks) damage += damage * stacks * 10 /100; } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 33192206232..ae54615e4fc 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5795,6 +5795,15 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 31803; break; } + // Seal of Corruption + case 53736: + { + if(effIndex != 0) // effect 1,2 used by seal unleashing code + return false; + + triggered_spell_id = 53742; + break; + } // Spiritual Attunement case 31785: case 33776: -- cgit v1.2.3