*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
This commit is contained in:
QAston
2009-03-14 16:20:04 +01:00
parent 4a0bb67f83
commit 076ccce8c1
5 changed files with 65 additions and 7 deletions
+6
View File
@@ -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);
+1
View File
@@ -81,4 +81,5 @@ INSTALL(FILES
1857_world.sql 1857_world.sql
1881_world.sql 1881_world.sql
1884_world.sql 1884_world.sql
1886_world.sql
DESTINATION share/trinity/sql/updates) DESTINATION share/trinity/sql/updates)
+35 -4
View File
@@ -2239,6 +2239,25 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
((Player*)m_target)->AddSpellMod(m_spellmod, apply); ((Player*)m_target)->AddSpellMod(m_spellmod, apply);
return; 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; break;
} }
case SPELLFAMILY_SHAMAN: case SPELLFAMILY_SHAMAN:
@@ -5668,6 +5687,9 @@ void Aura::PeriodicTick()
if(m_target != pCaster && GetSpellProto()->SpellVisual[0]==163 && !pCaster->isAlive()) if(m_target != pCaster && GetSpellProto()->SpellVisual[0]==163 && !pCaster->isAlive())
return; return;
if(m_duration ==-1 && m_target->GetHealth()==m_target->GetMaxHealth())
return;
// ignore non positive values (can be result apply spellmods to aura damage // ignore non positive values (can be result apply spellmods to aura damage
//uint32 amount = GetModifierValuePerStack() > 0 ? GetModifierValuePerStack() : 0; //uint32 amount = GetModifierValuePerStack() > 0 ? GetModifierValuePerStack() : 0;
uint32 pdamage = GetModifier()->m_amount > 0 ? GetModifier()->m_amount : 0; uint32 pdamage = GetModifier()->m_amount > 0 ? GetModifier()->m_amount : 0;
@@ -5858,7 +5880,7 @@ void Aura::PeriodicTick()
case SPELL_AURA_OBS_MOD_ENERGY: case SPELL_AURA_OBS_MOD_ENERGY:
{ {
if(m_modifier.m_miscvalue < 0) if(m_modifier.m_miscvalue < 0)
break; return;
Powers power; Powers power;
if (m_modifier.m_miscvalue == POWER_ALL) if (m_modifier.m_miscvalue == POWER_ALL)
@@ -5867,7 +5889,10 @@ void Aura::PeriodicTick()
power = Powers(m_modifier.m_miscvalue); power = Powers(m_modifier.m_miscvalue);
if(m_target->GetMaxPower(power) == 0) 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; 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", 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 // ignore non positive values (can be result apply spellmods to aura damage
if(m_modifier.m_amount < 0 || m_modifier.m_miscvalue >= MAX_POWERS) if(m_modifier.m_amount < 0 || m_modifier.m_miscvalue >= MAX_POWERS)
break; return;
Powers power = Powers(m_modifier.m_miscvalue); Powers power = Powers(m_modifier.m_miscvalue);
if(m_target->GetMaxPower(power) == 0) 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; uint32 amount = m_modifier.m_amount;
@@ -5938,6 +5966,9 @@ void Aura::PeriodicTick()
if(!m_target->isAlive() || m_target->getPowerType() != powerType) if(!m_target->isAlive() || m_target->getPowerType() != powerType)
return; 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) // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
if (powerType == POWER_MANA && m_target->GetTypeId() == TYPEID_PLAYER) if (powerType == POWER_MANA && m_target->GetTypeId() == TYPEID_PLAYER)
pdamage -= ((Player*)m_target)->GetSpellCritDamageReduction(pdamage); pdamage -= ((Player*)m_target)->GetSpellCritDamageReduction(pdamage);
+1 -1
View File
@@ -378,7 +378,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
return SPELL_STING; return SPELL_STING;
// only hunter aspects have this // 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; return SPELL_ASPECT;
if( spellInfo->SpellFamilyFlags[2] & 0x00000002 ) if( spellInfo->SpellFamilyFlags[2] & 0x00000002 )
+22 -2
View File
@@ -3981,6 +3981,8 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
SpellSpecific spellId_spec = GetSpellSpecific(spellId); SpellSpecific spellId_spec = GetSpellSpecific(spellId);
//bool linked = spellmgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_LINK_AURA? true : false;
AuraMap::iterator i,next; AuraMap::iterator i,next;
for (i = m_Auras.begin(); i != m_Auras.end(); 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) if (i_spellProto->EffectTriggerSpell[j] == spellProto->Id)
is_triggered_by_spell = true; is_triggered_by_spell = true;
if (is_triggered_by_spell) for(int j = 0; j < 3; ++j)
continue; if (i_spellProto->EffectTriggerSpell[j] == spellProto->Id)
is_triggered_by_spell = true;
// check if they can stack // check if they can stack
bool sameCaster = Aur->GetCasterGUID() == (*i).second->GetCasterGUID(); 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)) if(!spellmgr.IsNoStackSpellDueToSpell(spellId, i_spellId, sameCaster))
continue; continue;