Merge branch 'master' of https://github.com/Chaplain/TrinityCore
This commit is contained in:
Executable → Regular
+7
-27
@@ -1930,7 +1930,7 @@ void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool ext
|
|||||||
return; // ignore ranged case
|
return; // ignore ranged case
|
||||||
|
|
||||||
// melee attack spell casted at main hand attack only - no normal melee dmg dealt
|
// melee attack spell casted at main hand attack only - no normal melee dmg dealt
|
||||||
if (attType == BASE_ATTACK && m_currentSpells[CURRENT_MELEE_SPELL])
|
if (attType == BASE_ATTACK && m_currentSpells[CURRENT_MELEE_SPELL] && !extra)
|
||||||
m_currentSpells[CURRENT_MELEE_SPELL]->cast();
|
m_currentSpells[CURRENT_MELEE_SPELL]->cast();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1955,15 +1955,14 @@ void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool ext
|
|||||||
sLog->outStaticDebug("AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
|
sLog->outStaticDebug("AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
|
||||||
GetGUIDLow(), victim->GetGUIDLow(), victim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
|
GetGUIDLow(), victim->GetGUIDLow(), victim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!extra && m_extraAttacks)
|
void Unit::HandleProcExtraAttackFor(Unit* victim)
|
||||||
|
{
|
||||||
|
while (m_extraAttacks)
|
||||||
{
|
{
|
||||||
while(m_extraAttacks)
|
AttackerStateUpdate(victim, BASE_ATTACK, true);
|
||||||
{
|
--m_extraAttacks;
|
||||||
AttackerStateUpdate(victim, BASE_ATTACK, true);
|
|
||||||
if (m_extraAttacks > 0)
|
|
||||||
--m_extraAttacks;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8761,25 +8760,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sword Specialization
|
|
||||||
if (auraSpellInfo->SpellFamilyName == SPELLFAMILY_GENERIC && auraSpellInfo->SpellIconID == 1462 && procSpell)
|
|
||||||
{
|
|
||||||
if (Player* plr = ToPlayer())
|
|
||||||
{
|
|
||||||
if (cooldown && plr->HasSpellCooldown(16459))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// this required for attacks like Mortal Strike
|
|
||||||
plr->RemoveSpellCooldown(procSpell->Id);
|
|
||||||
|
|
||||||
CastSpell(victim, procSpell->Id, true);
|
|
||||||
|
|
||||||
if (cooldown)
|
|
||||||
plr->AddSpellCooldown(16459, 0, time(NULL) + cooldown);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Blade Barrier
|
// Blade Barrier
|
||||||
if (auraSpellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && auraSpellInfo->SpellIconID == 85)
|
if (auraSpellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && auraSpellInfo->SpellIconID == 85)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1455,6 +1455,7 @@ class Unit : public WorldObject
|
|||||||
|
|
||||||
void CalculateMeleeDamage(Unit* pVictim, uint32 damage, CalcDamageInfo* damageInfo, WeaponAttackType attackType = BASE_ATTACK);
|
void CalculateMeleeDamage(Unit* pVictim, uint32 damage, CalcDamageInfo* damageInfo, WeaponAttackType attackType = BASE_ATTACK);
|
||||||
void DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss);
|
void DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss);
|
||||||
|
void HandleProcExtraAttackFor(Unit* victim);
|
||||||
|
|
||||||
void CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType = BASE_ATTACK, bool crit = false);
|
void CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType = BASE_ATTACK, bool crit = false);
|
||||||
void DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss);
|
void DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss);
|
||||||
|
|||||||
@@ -3421,6 +3421,10 @@ void Spell::_handle_finish_phase()
|
|||||||
if (m_comboPointGain)
|
if (m_comboPointGain)
|
||||||
m_caster->m_movedPlayer->GainSpellComboPoints(m_comboPointGain);
|
m_caster->m_movedPlayer->GainSpellComboPoints(m_comboPointGain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_caster->m_extraAttacks && GetSpellInfo()->HasEffect(SPELL_EFFECT_ADD_EXTRA_ATTACKS))
|
||||||
|
m_caster->HandleProcExtraAttackFor(m_caster->getVictim());
|
||||||
|
|
||||||
// TODO: trigger proc phase finish here
|
// TODO: trigger proc phase finish here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user