diff options
author | QAston <none@none> | 2009-03-14 16:20:04 +0100 |
---|---|---|
committer | QAston <none@none> | 2009-03-14 16:20:04 +0100 |
commit | 076ccce8c16b60f84f635cdb85795aba63c0c863 (patch) | |
tree | 203f9ac0c486e6f6b56918bd7a8465e796d8007d | |
parent | 4a0bb67f8373afdbac8e54596b5f7936ed94acc7 (diff) |
*Fix glyph of aspect of the monkey.
*Fix aspect of the dragonhawk.
*Turn off combat log for some periodic auras when power regenerated is full.
--HG--
branch : trunk
-rw-r--r-- | sql/updates/1886_world.sql | 6 | ||||
-rw-r--r-- | sql/updates/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 39 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 24 |
5 files changed, 65 insertions, 7 deletions
diff --git a/sql/updates/1886_world.sql b/sql/updates/1886_world.sql new file mode 100644 index 00000000000..d682101ff6f --- /dev/null +++ b/sql/updates/1886_world.sql @@ -0,0 +1,6 @@ +INSERT INTO `spell_linked_spell` VALUES (61847, 61848, 2, 'Aspect of te dragonhawk'); +INSERT INTO `spell_linked_spell` VALUES (61846, 61848, 2, 'Aspect of te dragonhawk'); + +-- Glyph of Aspect of the Monkey +REPLACE INTO `spell_proc_event` VALUES (13163, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000010, 0.000000, 0.000000, 0); +REPLACE INTO `spell_proc_event` VALUES (61848, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000010, 0.000000, 0.000000, 0); diff --git a/sql/updates/CMakeLists.txt b/sql/updates/CMakeLists.txt index dc5d2c1f557..8cd388d7b97 100644 --- a/sql/updates/CMakeLists.txt +++ b/sql/updates/CMakeLists.txt @@ -81,4 +81,5 @@ INSTALL(FILES 1857_world.sql 1881_world.sql 1884_world.sql +1886_world.sql DESTINATION share/trinity/sql/updates)
\ No newline at end of file diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index ff818b7dbc8..20878e0679a 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2239,6 +2239,25 @@ void Aura::HandleAuraDummy(bool apply, bool Real) ((Player*)m_target)->AddSpellMod(m_spellmod, apply); return; } + // Glyph of Aspect of the Monkey + if(m_spellProto->Id==56833) + { + if(apply) + { + // Reduce backfire damage (dot damage) from Shadow Word: Death + SpellModifier *mod = new SpellModifier; + mod->op = SPELLMOD_CHANCE_OF_SUCCESS; + mod->value = 100; + mod->type = SPELLMOD_FLAT; + mod->spellId = GetId(); + mod->mask[2] = 8192; + mod->mask[1] = 0x00000000; + mod->mask[0] = 524288; + m_spellmod = mod; + } + ((Player*)m_target)->AddSpellMod(m_spellmod, apply); + return; + } break; } case SPELLFAMILY_SHAMAN: @@ -5668,6 +5687,9 @@ void Aura::PeriodicTick() if(m_target != pCaster && GetSpellProto()->SpellVisual[0]==163 && !pCaster->isAlive()) return; + if(m_duration ==-1 && m_target->GetHealth()==m_target->GetMaxHealth()) + return; + // ignore non positive values (can be result apply spellmods to aura damage //uint32 amount = GetModifierValuePerStack() > 0 ? GetModifierValuePerStack() : 0; uint32 pdamage = GetModifier()->m_amount > 0 ? GetModifier()->m_amount : 0; @@ -5858,7 +5880,7 @@ void Aura::PeriodicTick() case SPELL_AURA_OBS_MOD_ENERGY: { if(m_modifier.m_miscvalue < 0) - break; + return; Powers power; if (m_modifier.m_miscvalue == POWER_ALL) @@ -5867,7 +5889,10 @@ void Aura::PeriodicTick() power = Powers(m_modifier.m_miscvalue); if(m_target->GetMaxPower(power) == 0) - break; + return; + + if(m_duration ==-1 && m_target->GetPower(power)==m_target->GetMaxPower(power)) + return; uint32 amount = m_modifier.m_amount * m_target->GetMaxPower(power) /100; sLog.outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u", @@ -5893,12 +5918,15 @@ void Aura::PeriodicTick() { // ignore non positive values (can be result apply spellmods to aura damage if(m_modifier.m_amount < 0 || m_modifier.m_miscvalue >= MAX_POWERS) - break; + return; Powers power = Powers(m_modifier.m_miscvalue); if(m_target->GetMaxPower(power) == 0) - break; + return; + + if(m_duration ==-1 && m_target->GetPower(power)==m_target->GetMaxPower(power)) + return; uint32 amount = m_modifier.m_amount; @@ -5938,6 +5966,9 @@ void Aura::PeriodicTick() if(!m_target->isAlive() || m_target->getPowerType() != powerType) return; + if(m_duration ==-1 && m_target->GetPower(powerType)==m_target->GetMaxPower(powerType)) + return; + // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4) if (powerType == POWER_MANA && m_target->GetTypeId() == TYPEID_PLAYER) pdamage -= ((Player*)m_target)->GetSpellCritDamageReduction(pdamage); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 4dd6c2215c6..a976ca04a68 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -378,7 +378,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId) return SPELL_STING; // only hunter aspects have this - if( spellInfo->SpellFamilyFlags[1] & 0x00440000 || spellInfo->SpellFamilyFlags[0] & 0x00380000 || spellInfo->SpellFamilyFlags[2] & 0x00003010) + if( spellInfo->SpellFamilyFlags[1] & 0x00440000 || spellInfo->SpellFamilyFlags[0] & 0x00380000 || spellInfo->SpellFamilyFlags[2] & 0x00001010) return SPELL_ASPECT; if( spellInfo->SpellFamilyFlags[2] & 0x00000002 ) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 303270ee8fe..118636edcc0 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3981,6 +3981,8 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur) SpellSpecific spellId_spec = GetSpellSpecific(spellId); + //bool linked = spellmgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_LINK_AURA? true : false; + AuraMap::iterator i,next; for (i = m_Auras.begin(); i != m_Auras.end(); i = next) { @@ -4017,11 +4019,29 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur) if (i_spellProto->EffectTriggerSpell[j] == spellProto->Id) is_triggered_by_spell = true; - if (is_triggered_by_spell) - continue; + for(int j = 0; j < 3; ++j) + if (i_spellProto->EffectTriggerSpell[j] == spellProto->Id) + is_triggered_by_spell = true; // check if they can stack bool sameCaster = Aur->GetCasterGUID() == (*i).second->GetCasterGUID(); + + /*// Dont remove by stack with linked auras + // Not needed for now + if(sameCaster && linked) + { + if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(spellId + SPELL_LINK_AURA)) + for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr) + if(*itr>0 && *itr==i_spellId) + { + is_triggered_by_spell=true; + break; + } + }*/ + + if (is_triggered_by_spell) + continue; + if(!spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId, sameCaster)) continue; |