mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8959] Implement talent 15318 and ranks and move talent 44745 and ranks code.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
aad9e12a70
commit
39c16a8510
2 changed files with 72 additions and 29 deletions
|
|
@ -5897,7 +5897,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
||||||
|
|
||||||
void Aura::HandleSpellSpecificBoosts(bool apply)
|
void Aura::HandleSpellSpecificBoosts(bool apply)
|
||||||
{
|
{
|
||||||
bool at_remove = false; // if spell must be casted at aura remove
|
bool cast_at_remove = false; // if spell must be casted at aura remove
|
||||||
uint32 spellId1 = 0;
|
uint32 spellId1 = 0;
|
||||||
uint32 spellId2 = 0;
|
uint32 spellId2 = 0;
|
||||||
uint32 spellId3 = 0;
|
uint32 spellId3 = 0;
|
||||||
|
|
@ -5905,6 +5905,33 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
|
||||||
|
|
||||||
switch(GetSpellProto()->SpellFamilyName)
|
switch(GetSpellProto()->SpellFamilyName)
|
||||||
{
|
{
|
||||||
|
case SPELLFAMILY_MAGE:
|
||||||
|
{
|
||||||
|
// Ice Barrier
|
||||||
|
if (m_spellProto->SpellIconID == 32)
|
||||||
|
{
|
||||||
|
if (!apply && (m_removeMode == AURA_REMOVE_BY_DISPEL || (m_removeMode == AURA_REMOVE_BY_DEFAULT && !GetModifier()->m_amount)))
|
||||||
|
{
|
||||||
|
Unit::AuraList const& dummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
|
for(Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
|
||||||
|
{
|
||||||
|
// Shattered Barrier
|
||||||
|
if ((*itr)->GetSpellProto()->SpellIconID == 2945)
|
||||||
|
{
|
||||||
|
cast_at_remove = true;
|
||||||
|
// first rank have 50% chance
|
||||||
|
if ((*itr)->GetId() != 44745 || roll_chance_i(50))
|
||||||
|
spellId1 = 55080;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
case SPELLFAMILY_WARRIOR:
|
case SPELLFAMILY_WARRIOR:
|
||||||
{
|
{
|
||||||
if(!apply)
|
if(!apply)
|
||||||
|
|
@ -5927,10 +5954,10 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_WARLOCK:
|
case SPELLFAMILY_WARLOCK:
|
||||||
if(!apply)
|
|
||||||
{
|
|
||||||
// Fear
|
// Fear
|
||||||
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000040000000000))
|
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000040000000000))
|
||||||
|
{
|
||||||
|
if(!apply)
|
||||||
{
|
{
|
||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
if(!caster)
|
if(!caster)
|
||||||
|
|
@ -5943,7 +5970,7 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
|
||||||
// Improved Fear
|
// Improved Fear
|
||||||
if (dummyEntry->SpellFamilyName == SPELLFAMILY_WARLOCK && dummyEntry->SpellIconID == 98)
|
if (dummyEntry->SpellFamilyName == SPELLFAMILY_WARLOCK && dummyEntry->SpellIconID == 98)
|
||||||
{
|
{
|
||||||
at_remove = true;
|
cast_at_remove = true;
|
||||||
switch((*itr)->GetModifier()->m_amount)
|
switch((*itr)->GetModifier()->m_amount)
|
||||||
{
|
{
|
||||||
// Rank 1
|
// Rank 1
|
||||||
|
|
@ -5955,16 +5982,43 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_PRIEST:
|
case SPELLFAMILY_PRIEST:
|
||||||
|
{
|
||||||
|
// Shadow Word: Pain (need visual check fro skip improvement talent) or Vampiric Touch
|
||||||
|
if (m_spellProto->SpellIconID == 234 && m_spellProto->SpellVisual[0] || m_spellProto->SpellIconID == 2213)
|
||||||
|
{
|
||||||
|
if (!apply && m_removeMode == AURA_REMOVE_BY_DISPEL)
|
||||||
|
{
|
||||||
|
Unit* caster = GetCaster();
|
||||||
|
if(!caster)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Unit::AuraList const& dummyAuras = caster->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
|
for(Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
|
||||||
|
{
|
||||||
|
// Shadow Affinity
|
||||||
|
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_PRIEST
|
||||||
|
&& (*itr)->GetSpellProto()->SpellIconID == 178)
|
||||||
|
{
|
||||||
|
// custom cast code
|
||||||
|
int32 basepoints0 = (*itr)->GetModifier()->m_amount * caster->GetCreateMana() / 100;
|
||||||
|
caster->CastCustomSpell(caster, 64103, &basepoints0, NULL, NULL, true, NULL, this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch(GetId())
|
switch(GetId())
|
||||||
{
|
{
|
||||||
// Dispersion mana reg and immunity
|
|
||||||
case 47585:
|
|
||||||
spellId1 = 60069; // Dispersion
|
|
||||||
spellId2 = 63230; // Dispersion
|
|
||||||
break;
|
|
||||||
// Abolish Disease (remove 1 more poison effect with Body and Soul)
|
// Abolish Disease (remove 1 more poison effect with Body and Soul)
|
||||||
case 552:
|
case 552:
|
||||||
{
|
{
|
||||||
|
|
@ -5991,10 +6045,16 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
|
||||||
spellId1 = 64134; // Body and Soul (periodic dispel effect)
|
spellId1 = 64134; // Body and Soul (periodic dispel effect)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Dispersion mana reg and immunity
|
||||||
|
case 47585:
|
||||||
|
spellId1 = 60069; // Dispersion
|
||||||
|
spellId2 = 63230; // Dispersion
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case SPELLFAMILY_ROGUE:
|
case SPELLFAMILY_ROGUE:
|
||||||
// Sprint (skip non player casted spells by category)
|
// Sprint (skip non player casted spells by category)
|
||||||
if (GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000040) && GetSpellProto()->Category == 44)
|
if (GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000040) && GetSpellProto()->Category == 44)
|
||||||
|
|
@ -6103,7 +6163,7 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
|
||||||
// prevent aura deletion, specially in multi-boost case
|
// prevent aura deletion, specially in multi-boost case
|
||||||
SetInUse(true);
|
SetInUse(true);
|
||||||
|
|
||||||
if (apply || at_remove)
|
if (apply || cast_at_remove)
|
||||||
{
|
{
|
||||||
if (spellId1)
|
if (spellId1)
|
||||||
m_target->CastSpell(m_target, spellId1, true, NULL, this);
|
m_target->CastSpell(m_target, spellId1, true, NULL, this);
|
||||||
|
|
@ -6403,23 +6463,6 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Ice Barrier (remove effect from Shattered Barrier)
|
|
||||||
if (m_spellProto->SpellIconID == 32 && m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE)
|
|
||||||
{
|
|
||||||
if (!((m_removeMode == AURA_REMOVE_BY_DEFAULT && !m_modifier.m_amount) || m_removeMode == AURA_REMOVE_BY_DISPEL))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (m_target->HasAura(44745,0)) // Shattered Barrier, rank 1
|
|
||||||
{
|
|
||||||
if(roll_chance_i(50))
|
|
||||||
m_target->CastSpell(m_target, 55080, true, NULL, this);
|
|
||||||
}
|
|
||||||
else if (m_target->HasAura(54787,0)) // Shattered Barrier, rank 2
|
|
||||||
{
|
|
||||||
m_target->CastSpell(m_target, 55080, true, NULL, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (caster &&
|
if (caster &&
|
||||||
// Power Word: Shield
|
// Power Word: Shield
|
||||||
m_spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && m_spellProto->Mechanic == MECHANIC_SHIELD &&
|
m_spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && m_spellProto->Mechanic == MECHANIC_SHIELD &&
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8958"
|
#define REVISION_NR "8959"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue