mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
Merge commit 'origin/master' into 320
This commit is contained in:
commit
87930a6d07
35 changed files with 719 additions and 467 deletions
|
|
@ -1187,21 +1187,19 @@ void Spell::EffectDummy(uint32 i)
|
|||
return;
|
||||
|
||||
// immediately finishes the cooldown on Frost spells
|
||||
const PlayerSpellMap& sp_list = ((Player *)m_caster)->GetSpellMap();
|
||||
for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
|
||||
const SpellCooldowns& cm = ((Player *)m_caster)->GetSpellCooldownMap();
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
|
||||
{
|
||||
if (itr->second->state == PLAYERSPELL_REMOVED)
|
||||
continue;
|
||||
|
||||
uint32 classspell = itr->first;
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(classspell);
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
|
||||
if( spellInfo->SpellFamilyName == SPELLFAMILY_MAGE &&
|
||||
(GetSpellSchoolMask(spellInfo) & SPELL_SCHOOL_MASK_FROST) &&
|
||||
spellInfo->Id != 11958 && GetSpellRecoveryTime(spellInfo) > 0 )
|
||||
{
|
||||
((Player*)m_caster)->RemoveSpellCooldown(classspell, true);
|
||||
((Player*)m_caster)->RemoveSpellCooldown((itr++)->first, true);
|
||||
}
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -1436,14 +1434,15 @@ void Spell::EffectDummy(uint32 i)
|
|||
return;
|
||||
|
||||
//immediately finishes the cooldown on certain Rogue abilities
|
||||
const PlayerSpellMap& sp_list = ((Player *)m_caster)->GetSpellMap();
|
||||
for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
|
||||
const SpellCooldowns& cm = ((Player *)m_caster)->GetSpellCooldownMap();
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
|
||||
{
|
||||
uint32 classspell = itr->first;
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(classspell);
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
|
||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && (spellInfo->SpellFamilyFlags & UI64LIT(0x0000024000000860)))
|
||||
((Player*)m_caster)->RemoveSpellCooldown(classspell,true);
|
||||
((Player*)m_caster)->RemoveSpellCooldown((itr++)->first,true);
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -1487,14 +1486,15 @@ void Spell::EffectDummy(uint32 i)
|
|||
return;
|
||||
|
||||
//immediately finishes the cooldown for hunter abilities
|
||||
const PlayerSpellMap& sp_list = ((Player *)m_caster)->GetSpellMap();
|
||||
for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
|
||||
const SpellCooldowns& cm = ((Player*)m_caster)->GetSpellCooldownMap();
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
|
||||
{
|
||||
uint32 classspell = itr->first;
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(classspell);
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
|
||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && spellInfo->Id != 23989 && GetSpellRecoveryTime(spellInfo) > 0 )
|
||||
((Player*)m_caster)->RemoveSpellCooldown(classspell,true);
|
||||
((Player*)m_caster)->RemoveSpellCooldown((itr++)->first,true);
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -2317,7 +2317,7 @@ void Spell::EffectUnlearnSpecialization( uint32 i )
|
|||
|
||||
_player->removeSpell(spellToUnlearn);
|
||||
|
||||
sLog.outDebug( "Spell: Player %u have unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow() );
|
||||
sLog.outDebug( "Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow() );
|
||||
}
|
||||
|
||||
void Spell::EffectPowerDrain(uint32 i)
|
||||
|
|
@ -3320,7 +3320,7 @@ void Spell::EffectLearnSpell(uint32 i)
|
|||
uint32 spellToLearn = ((m_spellInfo->Id==SPELL_ID_GENERIC_LEARN) || (m_spellInfo->Id==SPELL_ID_GENERIC_LEARN_PET)) ? damage : m_spellInfo->EffectTriggerSpell[i];
|
||||
player->learnSpell(spellToLearn,false);
|
||||
|
||||
sLog.outDebug( "Spell: Player %u have learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow() );
|
||||
sLog.outDebug( "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow() );
|
||||
}
|
||||
|
||||
void Spell::EffectDispel(uint32 i)
|
||||
|
|
@ -4327,24 +4327,30 @@ void Spell::EffectWeaponDmg(uint32 i)
|
|||
spell_bonus += m_caster->CalculateDamage (OFF_ATTACK, normalized);
|
||||
}
|
||||
// Devastate bonus and sunder armor refresh
|
||||
else if(m_spellInfo->SpellVisual[0] == 671 && m_spellInfo->SpellIconID == 1508)
|
||||
else if(m_spellInfo->SpellVisual[0] == 12295 && m_spellInfo->SpellIconID == 1508)
|
||||
{
|
||||
uint32 stack = 0;
|
||||
// Need refresh all Sunder Armor auras from this caster
|
||||
Unit::AuraMap& suAuras = unitTarget->GetAuras();
|
||||
SpellEntry const *spellInfo;
|
||||
for(Unit::AuraMap::iterator itr = suAuras.begin(); itr != suAuras.end(); ++itr)
|
||||
{
|
||||
SpellEntry const *spellInfo = (*itr).second->GetSpellProto();
|
||||
spellInfo = (*itr).second->GetSpellProto();
|
||||
if( spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR &&
|
||||
(spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000004000)) &&
|
||||
(*itr).second->GetCasterGUID() == m_caster->GetGUID())
|
||||
{
|
||||
(*itr).second->RefreshAura();
|
||||
stack = (*itr).second->GetStackAmount();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (stack)
|
||||
spell_bonus += stack * CalculateDamage(2, unitTarget);
|
||||
if (!stack || stack < spellInfo->StackAmount)
|
||||
// Devastate causing Sunder Armor Effect
|
||||
// and no need to cast over max stack amount
|
||||
m_caster->CastSpell(unitTarget, 58567, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue