*Cleanups and obsolete spell handlers remove.
--HG-- branch : trunk
This commit is contained in:
@@ -25,13 +25,13 @@
|
|||||||
// HP, citadel, ramparts, blood furnace, shattered halls, mag's lair
|
// HP, citadel, ramparts, blood furnace, shattered halls, mag's lair
|
||||||
const uint32 OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum] = { 3483, 3563, 3562, 3713, 3714, 3836 };
|
const uint32 OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum] = { 3483, 3563, 3562, 3713, 3714, 3836 };
|
||||||
|
|
||||||
#define AllianceBuff 32071
|
enum OutdoorPvPHPSpells
|
||||||
|
{
|
||||||
#define HordeBuff 32049
|
AlliancePlayerKillReward = 32155,
|
||||||
|
HordePlayerKillReward = 32158,
|
||||||
const uint32 AlliancePlayerKillReward = 32155;
|
AllianceBuff = 32071,
|
||||||
|
HordeBuff = 32049
|
||||||
const uint32 HordePlayerKillReward = 32158;
|
};
|
||||||
|
|
||||||
enum OutdoorPvPHPTowerType{
|
enum OutdoorPvPHPTowerType{
|
||||||
HP_TOWER_BROKEN_HILL = 0,
|
HP_TOWER_BROKEN_HILL = 0,
|
||||||
|
|||||||
@@ -22,15 +22,14 @@
|
|||||||
// TODO: "sometimes" set to neutral
|
// TODO: "sometimes" set to neutral
|
||||||
|
|
||||||
#include "OutdoorPvPImpl.h"
|
#include "OutdoorPvPImpl.h"
|
||||||
|
enum OutdoorPvPNASpells
|
||||||
|
{
|
||||||
|
NA_KILL_TOKEN_ALLIANCE = 33005,
|
||||||
|
NA_KILL_TOKEN_HORDE = 33004,
|
||||||
|
NA_CAPTURE_BUFF = 33795 // strength of the halaani
|
||||||
|
};
|
||||||
// kill credit for pks
|
// kill credit for pks
|
||||||
const uint32 NA_CREDIT_MARKER = 24867;
|
const uint32 NA_CREDIT_MARKER = 24867;
|
||||||
|
|
||||||
const uint32 NA_KILL_TOKEN_ALLIANCE = 33005;
|
|
||||||
const uint32 NA_KILL_TOKEN_HORDE = 33004;
|
|
||||||
|
|
||||||
const uint32 NA_CAPTURE_BUFF = 33795; // strength of the halaani
|
|
||||||
|
|
||||||
const uint32 NA_GUARDS_MAX = 15;
|
const uint32 NA_GUARDS_MAX = 15;
|
||||||
|
|
||||||
const uint32 NA_BUFF_ZONE = 3518;
|
const uint32 NA_BUFF_ZONE = 3518;
|
||||||
|
|||||||
@@ -21,13 +21,13 @@
|
|||||||
|
|
||||||
#include "OutdoorPvPImpl.h"
|
#include "OutdoorPvPImpl.h"
|
||||||
|
|
||||||
const uint32 SI_SILITHYST_FLAG_GO_SPELL = 29518;
|
enum OutdoorPvPSISpells
|
||||||
|
{
|
||||||
const uint32 SI_SILITHYST_FLAG = 29519;
|
SI_SILITHYST_FLAG_GO_SPELL = 29518,
|
||||||
|
SI_SILITHYST_FLAG = 29519,
|
||||||
const uint32 SI_TRACES_OF_SILITHYST = 29534;
|
SI_TRACES_OF_SILITHYST = 29534,
|
||||||
|
SI_CENARION_FAVOR = 30754
|
||||||
const uint32 SI_CENARION_FAVOR = 30754;
|
};
|
||||||
|
|
||||||
const uint32 SI_MAX_RESOURCES = 200;
|
const uint32 SI_MAX_RESOURCES = 200;
|
||||||
|
|
||||||
|
|||||||
+14
-10
@@ -25,20 +25,24 @@
|
|||||||
const uint32 OutdoorPvPZMBuffZonesNum = 5;
|
const uint32 OutdoorPvPZMBuffZonesNum = 5;
|
||||||
// the buff is cast in these zones
|
// the buff is cast in these zones
|
||||||
const uint32 OutdoorPvPZMBuffZones[OutdoorPvPZMBuffZonesNum] = {3521,3607,3717,3715,3716};
|
const uint32 OutdoorPvPZMBuffZones[OutdoorPvPZMBuffZonesNum] = {3521,3607,3717,3715,3716};
|
||||||
// cast on the players of the controlling faction
|
|
||||||
#define ZM_CAPTURE_BUFF 33779 // twin spire blessing
|
|
||||||
// spell that the field scout casts on the player to carry the flag
|
|
||||||
const uint32 ZM_BATTLE_STANDARD_A = 32430;
|
|
||||||
// spell that the field scout casts on the player to carry the flag
|
|
||||||
const uint32 ZM_BATTLE_STANDARD_H = 32431;
|
|
||||||
// linked when the central tower is controlled
|
// linked when the central tower is controlled
|
||||||
const uint32 ZM_GRAVEYARD_ZONE = 3521;
|
const uint32 ZM_GRAVEYARD_ZONE = 3521;
|
||||||
// linked when the central tower is controlled
|
// linked when the central tower is controlled
|
||||||
const uint32 ZM_GRAVEYARD_ID = 969;
|
const uint32 ZM_GRAVEYARD_ID = 969;
|
||||||
// token create spell
|
|
||||||
const uint32 ZM_AlliancePlayerKillReward = 32155;
|
enum OutdoorPvPZMSpells
|
||||||
// token create spell
|
{
|
||||||
const uint32 ZM_HordePlayerKillReward = 32158;
|
// cast on the players of the controlling faction
|
||||||
|
ZM_CAPTURE_BUFF = 33779, // twin spire blessing
|
||||||
|
// spell that the field scout casts on the player to carry the flag
|
||||||
|
ZM_BATTLE_STANDARD_A = 32430,
|
||||||
|
// spell that the field scout casts on the player to carry the flag
|
||||||
|
ZM_BATTLE_STANDARD_H = 32431,
|
||||||
|
// token create spell
|
||||||
|
ZM_AlliancePlayerKillReward = 32155,
|
||||||
|
// token create spell
|
||||||
|
ZM_HordePlayerKillReward = 32158
|
||||||
|
};
|
||||||
|
|
||||||
// banners 182527, 182528, 182529, gotta check them ingame
|
// banners 182527, 182528, 182529, gotta check them ingame
|
||||||
const go_type ZM_Banner_A = { 182527,530,253.54,7083.81,36.7728,-0.017453,0,0,0.008727,-0.999962 };
|
const go_type ZM_Banner_A = { 182527,530,253.54,7083.81,36.7728,-0.017453,0,0,0.008727,-0.999962 };
|
||||||
|
|||||||
@@ -209,12 +209,6 @@ enum ItemQualities
|
|||||||
|
|
||||||
#define MAX_ITEM_QUALITY 8
|
#define MAX_ITEM_QUALITY 8
|
||||||
|
|
||||||
enum SpellCategory
|
|
||||||
{
|
|
||||||
SPELL_CATEGORY_FOOD = 11,
|
|
||||||
SPELL_CATEGORY_DRINK = 59,
|
|
||||||
};
|
|
||||||
|
|
||||||
// ***********************************
|
// ***********************************
|
||||||
// Spell Attributes definitions
|
// Spell Attributes definitions
|
||||||
// ***********************************
|
// ***********************************
|
||||||
|
|||||||
+6
-3
@@ -4179,9 +4179,12 @@ void Spell::TakeRunePower()
|
|||||||
{
|
{
|
||||||
if (plr->GetBaseRune(i) != RUNE_DEATH)
|
if (plr->GetBaseRune(i) != RUNE_DEATH)
|
||||||
{
|
{
|
||||||
|
// Death Rune Mastery
|
||||||
if ((*itr)->GetSpellProto()->SpellIconID != 2622)
|
if ((*itr)->GetSpellProto()->SpellIconID != 2622)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// Blood of the North
|
||||||
|
// Reaping
|
||||||
else if ((*itr)->GetSpellProto()->SpellIconID != 3041 &&
|
else if ((*itr)->GetSpellProto()->SpellIconID != 3041 &&
|
||||||
(*itr)->GetSpellProto()->SpellIconID != 22)
|
(*itr)->GetSpellProto()->SpellIconID != 22)
|
||||||
continue;
|
continue;
|
||||||
@@ -4731,7 +4734,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||||||
else if(m_spellInfo->SpellIconID == 156) // Holy Shock
|
else if(m_spellInfo->SpellIconID == 156) // Holy Shock
|
||||||
{
|
{
|
||||||
// spell different for friends and enemies
|
// spell different for friends and enemies
|
||||||
// hart version required facing
|
// hurt version required facing
|
||||||
if(m_targets.getUnitTarget() && !m_caster->IsFriendlyTo(m_targets.getUnitTarget()) && !m_caster->HasInArc( M_PI, m_targets.getUnitTarget() ))
|
if(m_targets.getUnitTarget() && !m_caster->IsFriendlyTo(m_targets.getUnitTarget()) && !m_caster->HasInArc( M_PI, m_targets.getUnitTarget() ))
|
||||||
return SPELL_FAILED_UNIT_NOT_INFRONT;
|
return SPELL_FAILED_UNIT_NOT_INFRONT;
|
||||||
}
|
}
|
||||||
@@ -4744,7 +4747,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||||||
else if (m_spellInfo->Id == 19938) // Awaken Peon
|
else if (m_spellInfo->Id == 19938) // Awaken Peon
|
||||||
{
|
{
|
||||||
Unit *unit = m_targets.getUnitTarget();
|
Unit *unit = m_targets.getUnitTarget();
|
||||||
if(!unit || !unit->HasAura(17743, 0))
|
if(!unit || !unit->HasAura(17743))
|
||||||
return SPELL_FAILED_BAD_TARGETS;
|
return SPELL_FAILED_BAD_TARGETS;
|
||||||
}
|
}
|
||||||
else if (m_spellInfo->Id == 52264) // Deliver Stolen Horse
|
else if (m_spellInfo->Id == 52264) // Deliver Stolen Horse
|
||||||
@@ -5224,7 +5227,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
|
|||||||
|
|
||||||
SpellCastResult Spell::CheckCasterAuras() const
|
SpellCastResult Spell::CheckCasterAuras() const
|
||||||
{
|
{
|
||||||
// spells totally immuned to caster auras ( wsg flag drop, give marks etc
|
// spells totally immuned to caster auras ( wsg flag drop, give marks etc)
|
||||||
if(m_spellInfo->AttributesEx6& SPELL_ATTR_EX6_IGNORE_CASTER_AURAS)
|
if(m_spellInfo->AttributesEx6& SPELL_ATTR_EX6_IGNORE_CASTER_AURAS)
|
||||||
return SPELL_CAST_OK;
|
return SPELL_CAST_OK;
|
||||||
|
|
||||||
|
|||||||
@@ -339,7 +339,6 @@ class Spell
|
|||||||
void EffectAddExtraAttacks(uint32 i);
|
void EffectAddExtraAttacks(uint32 i);
|
||||||
void EffectSpiritHeal(uint32 i);
|
void EffectSpiritHeal(uint32 i);
|
||||||
void EffectSkinPlayerCorpse(uint32 i);
|
void EffectSkinPlayerCorpse(uint32 i);
|
||||||
void EffectSummonDemon(uint32 i);
|
|
||||||
void EffectStealBeneficialBuff(uint32 i);
|
void EffectStealBeneficialBuff(uint32 i);
|
||||||
void EffectUnlearnSpecialization(uint32 i);
|
void EffectUnlearnSpecialization(uint32 i);
|
||||||
void EffectHealPct(uint32 i);
|
void EffectHealPct(uint32 i);
|
||||||
|
|||||||
+47
-75
@@ -944,6 +944,9 @@ void Aura::ApplyAllModifiers(bool apply, bool Real)
|
|||||||
|
|
||||||
void Aura::HandleAuraSpecificMods(bool apply)
|
void Aura::HandleAuraSpecificMods(bool apply)
|
||||||
{
|
{
|
||||||
|
//********************
|
||||||
|
// MODS AT AURA APPLY
|
||||||
|
//********************
|
||||||
if (apply)
|
if (apply)
|
||||||
{
|
{
|
||||||
if(m_spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
|
if(m_spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
|
||||||
@@ -1009,7 +1012,29 @@ void Aura::HandleAuraSpecificMods(bool apply)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Gronn Lord's Grasp, becomes stoned
|
||||||
|
else if (GetId() == 33572)
|
||||||
|
{
|
||||||
|
if (GetStackAmount() >= 5 && !m_target->HasAura(33652))
|
||||||
|
m_target->CastSpell(m_target, 33652, true);
|
||||||
}
|
}
|
||||||
|
// Heroic Fury (remove Intercept cooldown)
|
||||||
|
else if(GetId() == 60970 && m_target->GetTypeId() == TYPEID_PLAYER )
|
||||||
|
{
|
||||||
|
((Player*)m_target)->RemoveSpellCooldown(20252, true);
|
||||||
|
}
|
||||||
|
// Demonic Circle
|
||||||
|
else if (GetId() == 48020 && m_target->GetTypeId() == TYPEID_PLAYER )
|
||||||
|
{
|
||||||
|
GameObject* obj = m_target->GetGameObject(48018);
|
||||||
|
if (obj)
|
||||||
|
((Player*)m_target)->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//*******************************
|
||||||
|
// MODS AT AURA APPLY AND REMOVE
|
||||||
|
//*******************************
|
||||||
|
|
||||||
// Aura Mastery Triggered Spell Handler
|
// Aura Mastery Triggered Spell Handler
|
||||||
// If apply Concentration Aura -> trigger -> apply Aura Mastery Immunity
|
// If apply Concentration Aura -> trigger -> apply Aura Mastery Immunity
|
||||||
@@ -1034,6 +1059,23 @@ void Aura::HandleAuraSpecificMods(bool apply)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bestial Wrath
|
||||||
|
if (GetSpellProto()->Id == 19574)
|
||||||
|
{
|
||||||
|
// The Beast Within cast on owner if talent present
|
||||||
|
if ( Unit* owner = m_target->GetOwner() )
|
||||||
|
{
|
||||||
|
// Search talent
|
||||||
|
if (owner->HasAura(34692))
|
||||||
|
{
|
||||||
|
if (apply)
|
||||||
|
owner->CastSpell(owner, 34471, true, 0, GetPartAura(0));
|
||||||
|
else
|
||||||
|
owner->RemoveAurasDueToSpell(34471);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (GetSpellSpecific(m_spellProto->Id) == SPELL_PRESENCE)
|
if (GetSpellSpecific(m_spellProto->Id) == SPELL_PRESENCE)
|
||||||
{
|
{
|
||||||
AuraEffect *bloodPresenceAura=0; // healing by damage done
|
AuraEffect *bloodPresenceAura=0; // healing by damage done
|
||||||
@@ -2057,20 +2099,6 @@ void AuraEffect::TriggerSpell()
|
|||||||
// trigger_spell_id not set and unknown effect triggered in this case, ignoring for while
|
// trigger_spell_id not set and unknown effect triggered in this case, ignoring for while
|
||||||
case 768:
|
case 768:
|
||||||
return;
|
return;
|
||||||
// Frenzied Regeneration
|
|
||||||
case 22842:
|
|
||||||
case 26999:
|
|
||||||
{
|
|
||||||
int32 LifePerRage = GetAmount();
|
|
||||||
|
|
||||||
int32 lRage = m_target->GetPower(POWER_RAGE);
|
|
||||||
if(lRage > 100) // rage stored as rage*10
|
|
||||||
lRage = 100;
|
|
||||||
m_target->ModifyPower(POWER_RAGE, -lRage);
|
|
||||||
int32 FRTriggerBasePoints = int32(lRage*LifePerRage/10);
|
|
||||||
m_target->CastCustomSpell(m_target,22845,&FRTriggerBasePoints,NULL,NULL,true,NULL,this);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2434,7 +2462,7 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount)
|
|||||||
case 46308: // Burning Winds casted only at creatures at spawn
|
case 46308: // Burning Winds casted only at creatures at spawn
|
||||||
m_target->CastSpell(m_target,47287,true,NULL,this);
|
m_target->CastSpell(m_target,47287,true,NULL,this);
|
||||||
return;
|
return;
|
||||||
case 52173: // Coyote Spirit Despawn Aura
|
case 52172: // Coyote Spirit Despawn Aura
|
||||||
case 60244: // Blood Parrot Despawn Aura
|
case 60244: // Blood Parrot Despawn Aura
|
||||||
m_target->CastSpell((Unit*)NULL, GetAmount(), true, NULL, this);
|
m_target->CastSpell((Unit*)NULL, GetAmount(), true, NULL, this);
|
||||||
return;
|
return;
|
||||||
@@ -3018,15 +3046,8 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun
|
|||||||
{
|
{
|
||||||
// get furor proc chance
|
// get furor proc chance
|
||||||
int32 FurorChance = 0;
|
int32 FurorChance = 0;
|
||||||
Unit::AuraEffectList const& mDummy = m_target->GetAurasByType(SPELL_AURA_DUMMY);
|
if(AuraEffect const * dummy = m_target->GetDummyAura(SPELLFAMILY_DRUID, 238, 0))
|
||||||
for(Unit::AuraEffectList::const_iterator i = mDummy.begin(); i != mDummy.end(); ++i)
|
FurorChance = dummy->GetAmount();
|
||||||
{
|
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 238)
|
|
||||||
{
|
|
||||||
FurorChance = (*i)->GetAmount();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GetMiscValue() == FORM_CAT)
|
if (GetMiscValue() == FORM_CAT)
|
||||||
{
|
{
|
||||||
@@ -4082,16 +4103,6 @@ void AuraEffect::HandleAuraModDecreaseSpeed(bool apply, bool Real, bool changeAm
|
|||||||
if(!Real && !changeAmount)
|
if(!Real && !changeAmount)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (apply)
|
|
||||||
{
|
|
||||||
// Gronn Lord's Grasp, becomes stoned
|
|
||||||
if (GetId() == 33572)
|
|
||||||
{
|
|
||||||
if (GetParentAura()->GetStackAmount() >= 5 && !m_target->HasAura(33652))
|
|
||||||
m_target->CastSpell(m_target, 33652, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_target->UpdateSpeed(MOVE_RUN, true);
|
m_target->UpdateSpeed(MOVE_RUN, true);
|
||||||
m_target->UpdateSpeed(MOVE_SWIM, true);
|
m_target->UpdateSpeed(MOVE_SWIM, true);
|
||||||
m_target->UpdateSpeed(MOVE_FLIGHT, true);
|
m_target->UpdateSpeed(MOVE_FLIGHT, true);
|
||||||
@@ -4199,29 +4210,8 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeA
|
|||||||
|
|
||||||
m_target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,GetMiscValue(),apply);
|
m_target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,GetMiscValue(),apply);
|
||||||
|
|
||||||
// Bestial Wrath
|
|
||||||
if (GetSpellProto()->Id == 19574)
|
|
||||||
{
|
|
||||||
// The Beast Within cast on owner if talent present
|
|
||||||
if ( Unit* owner = m_target->GetOwner() )
|
|
||||||
{
|
|
||||||
// Search talent
|
|
||||||
if (owner->GetAuraEffect(34692, 0))
|
|
||||||
{
|
|
||||||
if (apply)
|
|
||||||
owner->CastSpell(owner, 34471, true, 0, this);
|
|
||||||
else
|
|
||||||
owner->RemoveAurasDueToSpell(34471);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Heroic Fury (remove Intercept cooldown)
|
|
||||||
else if( apply && GetId() == 60970 && m_target->GetTypeId() == TYPEID_PLAYER )
|
|
||||||
{
|
|
||||||
((Player*)m_target)->RemoveSpellCooldown(20252, true);
|
|
||||||
}
|
|
||||||
// Demonic Empowerment -- voidwalker -- missing movement impairing effects immunity
|
// Demonic Empowerment -- voidwalker -- missing movement impairing effects immunity
|
||||||
else if (GetId() == 54508)
|
if (GetId() == 54508)
|
||||||
{
|
{
|
||||||
if (apply)
|
if (apply)
|
||||||
m_target->RemoveMovementImpairingAuras();
|
m_target->RemoveMovementImpairingAuras();
|
||||||
@@ -4229,18 +4219,6 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeA
|
|||||||
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,SPELL_AURA_MOD_ROOT,apply);
|
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,SPELL_AURA_MOD_ROOT,apply);
|
||||||
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,SPELL_AURA_MOD_DECREASE_SPEED,apply);
|
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,SPELL_AURA_MOD_DECREASE_SPEED,apply);
|
||||||
}
|
}
|
||||||
// Demonic Circle
|
|
||||||
else if (GetId() == 48020)
|
|
||||||
{
|
|
||||||
if (m_target->GetTypeId() != TYPEID_PLAYER)
|
|
||||||
return;
|
|
||||||
if (apply)
|
|
||||||
{
|
|
||||||
GameObject* obj = m_target->GetGameObject(48018);
|
|
||||||
if (obj)
|
|
||||||
((Player*)m_target)->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AuraEffect::HandleAuraModEffectImmunity(bool apply, bool Real, bool /*changeAmount*/)
|
void AuraEffect::HandleAuraModEffectImmunity(bool apply, bool Real, bool /*changeAmount*/)
|
||||||
@@ -4341,7 +4319,7 @@ void AuraEffect::HandleAuraProcTriggerSpell(bool apply, bool Real, bool /*change
|
|||||||
{
|
{
|
||||||
SpellModifier *mod = new SpellModifier;
|
SpellModifier *mod = new SpellModifier;
|
||||||
mod->op = SPELLMOD_EFFECT2;
|
mod->op = SPELLMOD_EFFECT2;
|
||||||
mod->value = (GetId() == 51466) ? 5 : 10;
|
mod->value = m_target->CalculateSpellDamage(GetSpellProto(), 1, GetSpellProto()->EffectBasePoints[1], m_target);
|
||||||
mod->type = SPELLMOD_FLAT;
|
mod->type = SPELLMOD_FLAT;
|
||||||
mod->spellId = GetId();
|
mod->spellId = GetId();
|
||||||
mod->mask[1] = 0x0004000;
|
mod->mask[1] = 0x0004000;
|
||||||
@@ -6356,11 +6334,6 @@ void AuraEffect::PeriodicTick()
|
|||||||
// eating anim
|
// eating anim
|
||||||
m_target->HandleEmoteCommand(EMOTE_ONESHOT_EAT);
|
m_target->HandleEmoteCommand(EMOTE_ONESHOT_EAT);
|
||||||
}
|
}
|
||||||
else if( GetId() == 20577 )
|
|
||||||
{
|
|
||||||
// cannibalize anim
|
|
||||||
m_target->HandleEmoteCommand(EMOTE_STATE_CANNIBALIZE);
|
|
||||||
}
|
|
||||||
// Butchery
|
// Butchery
|
||||||
else if (m_spellProto->SpellFamilyName==SPELLFAMILY_DEATHKNIGHT
|
else if (m_spellProto->SpellFamilyName==SPELLFAMILY_DEATHKNIGHT
|
||||||
&& m_spellProto->SpellIconID==2664)
|
&& m_spellProto->SpellIconID==2664)
|
||||||
@@ -6431,7 +6404,6 @@ void AuraEffect::PeriodicDummyTick()
|
|||||||
case 34291:
|
case 34291:
|
||||||
case 43182:
|
case 43182:
|
||||||
case 43183:
|
case 43183:
|
||||||
case 43706:
|
|
||||||
case 46755:
|
case 46755:
|
||||||
case 49472: // Drink Coffee
|
case 49472: // Drink Coffee
|
||||||
case 57073:
|
case 57073:
|
||||||
|
|||||||
+62
-167
@@ -669,34 +669,6 @@ void Spell::EffectDummy(uint32 i)
|
|||||||
m_caster->DealDamage(casttarget, damage, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, spellInfo, false);
|
m_caster->DealDamage(casttarget, damage, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, spellInfo, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Encapsulate Voidwalker
|
|
||||||
case 29364:
|
|
||||||
{
|
|
||||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT || ((Creature*)unitTarget)->isPet()) return;
|
|
||||||
|
|
||||||
GameObject* pGameObj = new GameObject;
|
|
||||||
|
|
||||||
if (!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), 181574, unitTarget->GetMap(), unitTarget->GetPhaseMask(),
|
|
||||||
unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(),
|
|
||||||
unitTarget->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY))
|
|
||||||
{
|
|
||||||
delete pGameObj;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pGameObj->SetRespawnTime(0);
|
|
||||||
pGameObj->SetOwnerGUID(m_caster->GetGUID());
|
|
||||||
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
|
|
||||||
pGameObj->SetSpellId(m_spellInfo->Id);
|
|
||||||
|
|
||||||
unitTarget->GetMap()->Add(pGameObj);
|
|
||||||
|
|
||||||
WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8);
|
|
||||||
data << uint64(pGameObj->GetGUID());
|
|
||||||
m_caster->SendMessageToSet(&data,true);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Demon Broiled Surprise
|
// Demon Broiled Surprise
|
||||||
case 43723:
|
case 43723:
|
||||||
{
|
{
|
||||||
@@ -1416,25 +1388,16 @@ void Spell::EffectDummy(uint32 i)
|
|||||||
|
|
||||||
int32 mana = damage;
|
int32 mana = damage;
|
||||||
// Improved Life Tap mod
|
// Improved Life Tap mod
|
||||||
Unit::AuraEffectList const& auraDummy = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
|
if (AuraEffect const * aurEff = m_caster->GetDummyAura(SPELLFAMILY_WARLOCK, 208, 0))
|
||||||
for(Unit::AuraEffectList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr)
|
mana = (aurEff->GetAmount() + 100)* mana / 100;
|
||||||
{
|
|
||||||
if((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (*itr)->GetSpellProto()->SpellIconID == 208)
|
|
||||||
mana = ((*itr)->GetAmount() + 100)* mana / 100;
|
|
||||||
}
|
|
||||||
m_caster->CastCustomSpell(unitTarget, 31818, &mana, NULL, NULL, true);
|
m_caster->CastCustomSpell(unitTarget, 31818, &mana, NULL, NULL, true);
|
||||||
|
|
||||||
// Mana Feed
|
// Mana Feed
|
||||||
int32 manaFeedVal = 0;
|
int32 manaFeedVal = 0;
|
||||||
Unit::AuraEffectList const& mod = m_caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
|
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARLOCK, 1982, 0))
|
||||||
for(Unit::AuraEffectList::const_iterator itr = mod.begin(); itr != mod.end(); ++itr)
|
manaFeedVal = aurEff->GetAmount();
|
||||||
{
|
|
||||||
if((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (*itr)->GetSpellProto()->SpellIconID == 1982)
|
|
||||||
{
|
|
||||||
manaFeedVal = (*itr)->GetAmount();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(manaFeedVal > 0)
|
if(manaFeedVal > 0)
|
||||||
{
|
{
|
||||||
manaFeedVal = manaFeedVal * mana / 100;
|
manaFeedVal = manaFeedVal * mana / 100;
|
||||||
@@ -2933,6 +2896,9 @@ void Spell::EffectEnergize(uint32 i)
|
|||||||
case 31930: // Judgements of the Wise
|
case 31930: // Judgements of the Wise
|
||||||
case 63375: // Improved Stormstrike
|
case 63375: // Improved Stormstrike
|
||||||
damage = damage * unitTarget->GetCreateMana() / 100;
|
damage = damage * unitTarget->GetCreateMana() / 100;
|
||||||
|
case 48542: // Revitalize
|
||||||
|
damage = damage * unitTarget->GetMaxPower(power) / 100;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2946,12 +2912,6 @@ void Spell::EffectEnergize(uint32 i)
|
|||||||
if(unitTarget->GetMaxPower(power) == 0)
|
if(unitTarget->GetMaxPower(power) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Spells which use pct of max mana, but have wrong effect
|
|
||||||
if (m_spellInfo->Id == 48542)
|
|
||||||
{
|
|
||||||
damage = damage * unitTarget->GetMaxPower(power) / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_caster->EnergizeBySpell(unitTarget, m_spellInfo->Id, damage, power);
|
m_caster->EnergizeBySpell(unitTarget, m_spellInfo->Id, damage, power);
|
||||||
|
|
||||||
// Mad Alchemist's Potion
|
// Mad Alchemist's Potion
|
||||||
@@ -4305,7 +4265,8 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
|
|||||||
else if(m_spellInfo->SpellFamilyFlags[1] & 0x40000)
|
else if(m_spellInfo->SpellFamilyFlags[1] & 0x40000)
|
||||||
{
|
{
|
||||||
// 50% more damage with daggers
|
// 50% more damage with daggers
|
||||||
if (Item* item = ((Player*)m_caster)->GetWeaponForAttack(m_attackType))
|
if(m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||||
|
if (Item* item = ((Player*)m_caster)->GetWeaponForAttack(m_attackType, true))
|
||||||
if (item->GetProto()->SubClass == ITEM_SUBCLASS_WEAPON_DAGGER)
|
if (item->GetProto()->SubClass == ITEM_SUBCLASS_WEAPON_DAGGER)
|
||||||
totalDamagePercentMod *= 1.5f;
|
totalDamagePercentMod *= 1.5f;
|
||||||
}
|
}
|
||||||
@@ -4363,7 +4324,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
|
|||||||
case SPELLFAMILY_DRUID:
|
case SPELLFAMILY_DRUID:
|
||||||
{
|
{
|
||||||
// Mangle (Cat): CP
|
// Mangle (Cat): CP
|
||||||
if(m_spellInfo->SpellFamilyFlags.IsEqual(0,0x00000400))
|
if(m_spellInfo->SpellFamilyFlags[1] & 0x400)
|
||||||
{
|
{
|
||||||
if(m_caster->GetTypeId()==TYPEID_PLAYER)
|
if(m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||||
((Player*)m_caster)->AddComboPoints(unitTarget,1, this);
|
((Player*)m_caster)->AddComboPoints(unitTarget,1, this);
|
||||||
@@ -4669,9 +4630,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
// Dispelling Analysis
|
// Dispelling Analysis
|
||||||
case 37028:
|
case 37028:
|
||||||
{
|
{
|
||||||
if (unitTarget->HasAura(36904))
|
|
||||||
unitTarget->RemoveAurasDueToSpell(36904);
|
unitTarget->RemoveAurasDueToSpell(36904);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case 45204: // Clone Me!
|
case 45204: // Clone Me!
|
||||||
@@ -4789,22 +4748,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
m_caster->CastSpell(unitTarget, 22682, true);
|
m_caster->CastSpell(unitTarget, 22682, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Summon Black Qiraji Battle Tank
|
|
||||||
case 26656:
|
|
||||||
{
|
|
||||||
if(!unitTarget)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Prevent stacking of mounts
|
|
||||||
unitTarget->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
|
||||||
|
|
||||||
// Two separate mounts depending on area id (allows use both in and out of specific instance)
|
|
||||||
if (unitTarget->GetAreaId() == 3428)
|
|
||||||
unitTarget->CastSpell(unitTarget, 25863, false);
|
|
||||||
else
|
|
||||||
unitTarget->CastSpell(unitTarget, 26655, false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Piccolo of the Flaming Fire
|
// Piccolo of the Flaming Fire
|
||||||
case 17512:
|
case 17512:
|
||||||
{
|
{
|
||||||
@@ -4818,9 +4761,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
{
|
{
|
||||||
if(!unitTarget)
|
if(!unitTarget)
|
||||||
return;
|
return;
|
||||||
// It is said that removing effects by script should include dispel resist mods
|
unitTarget->RemoveMovementImpairingAuras();
|
||||||
unitTarget->RemoveAurasByTypeWithDispel(SPELL_AURA_MOD_ROOT, this);
|
|
||||||
unitTarget->RemoveAurasByTypeWithDispel(SPELL_AURA_MOD_DECREASE_SPEED, this);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Decimate
|
// Decimate
|
||||||
@@ -4857,26 +4798,10 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
case 30918:
|
case 30918:
|
||||||
{
|
{
|
||||||
// Removes snares and roots.
|
// Removes snares and roots.
|
||||||
uint32 mechanic_mask = (1<<MECHANIC_ROOT) | (1<<MECHANIC_SNARE);
|
unitTarget->RemoveMovementImpairingAuras();
|
||||||
Unit::AuraMap& Auras = unitTarget->GetAuras();
|
|
||||||
for(Unit::AuraMap::iterator iter = Auras.begin(), next; iter != Auras.end();)
|
|
||||||
{
|
|
||||||
Aura *aur = iter->second;
|
|
||||||
if (!aur->IsPositive()) //only remove negative spells
|
|
||||||
{
|
|
||||||
// check for mechanic mask
|
|
||||||
if(GetAllSpellMechanicMask(aur->GetSpellProto()) & mechanic_mask)
|
|
||||||
{
|
|
||||||
unitTarget->RemoveAura(iter);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
iter++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
iter++;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Tidal Surge
|
||||||
case 38358:
|
case 38358:
|
||||||
if(unitTarget)
|
if(unitTarget)
|
||||||
m_caster->CastSpell(unitTarget, 38353, true);
|
m_caster->CastSpell(unitTarget, 38353, true);
|
||||||
@@ -4930,6 +4855,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Mug Transformation
|
||||||
case 41931:
|
case 41931:
|
||||||
{
|
{
|
||||||
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||||
@@ -4975,7 +4901,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
if(!unitTarget)
|
if(!unitTarget)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(unitTarget->HasAura(46394)) // spell of Brutallus - Burn
|
|
||||||
unitTarget->RemoveAurasDueToSpell(46394);
|
unitTarget->RemoveAurasDueToSpell(46394);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -5027,6 +4952,43 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Death Knight Initiate Visual
|
||||||
|
case 51519:
|
||||||
|
{
|
||||||
|
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
|
||||||
|
return;
|
||||||
|
|
||||||
|
uint32 iTmpSpellId = 0;
|
||||||
|
switch (unitTarget->GetDisplayId())
|
||||||
|
{
|
||||||
|
case 25369: iTmpSpellId = 51552; break; // bloodelf female
|
||||||
|
case 25373: iTmpSpellId = 51551; break; // bloodelf male
|
||||||
|
case 25363: iTmpSpellId = 51542; break; // draenei female
|
||||||
|
case 25357: iTmpSpellId = 51541; break; // draenei male
|
||||||
|
case 25361: iTmpSpellId = 51537; break; // dwarf female
|
||||||
|
case 25356: iTmpSpellId = 51538; break; // dwarf male
|
||||||
|
case 25372: iTmpSpellId = 51550; break; // forsaken female
|
||||||
|
case 25367: iTmpSpellId = 51549; break; // forsaken male
|
||||||
|
case 25362: iTmpSpellId = 51540; break; // gnome female
|
||||||
|
case 25359: iTmpSpellId = 51539; break; // gnome male
|
||||||
|
case 25355: iTmpSpellId = 51534; break; // human female
|
||||||
|
case 25354: iTmpSpellId = 51520; break; // human male
|
||||||
|
case 25360: iTmpSpellId = 51536; break; // nightelf female
|
||||||
|
case 25358: iTmpSpellId = 51535; break; // nightelf male
|
||||||
|
case 25368: iTmpSpellId = 51544; break; // orc female
|
||||||
|
case 25364: iTmpSpellId = 51543; break; // orc male
|
||||||
|
case 25371: iTmpSpellId = 51548; break; // tauren female
|
||||||
|
case 25366: iTmpSpellId = 51547; break; // tauren male
|
||||||
|
case 25370: iTmpSpellId = 51545; break; // troll female
|
||||||
|
case 25365: iTmpSpellId = 51546; break; // troll male
|
||||||
|
default: return;
|
||||||
|
}
|
||||||
|
|
||||||
|
unitTarget->CastSpell(unitTarget, iTmpSpellId, true);
|
||||||
|
Creature* npc = (Creature*)unitTarget;
|
||||||
|
npc->LoadEquipment(npc->GetEquipmentId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Emblazon Runeblade
|
// Emblazon Runeblade
|
||||||
case 51770:
|
case 51770:
|
||||||
{
|
{
|
||||||
@@ -5251,19 +5213,22 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
{
|
{
|
||||||
uint32 itemtype;
|
uint32 itemtype;
|
||||||
uint32 rank = 0;
|
uint32 rank = 0;
|
||||||
Unit::AuraEffectList const& mDummyAuras = unitTarget->GetAurasByType(SPELL_AURA_DUMMY);
|
|
||||||
for(Unit::AuraEffectList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i)
|
// Improved Healthstone
|
||||||
|
if (AuraEffect const * aurEff = unitTarget->GetDummyAura(SPELLFAMILY_WARLOCK, 284, 0))
|
||||||
{
|
{
|
||||||
if((*i)->GetId() == 18692)
|
if(aurEff->GetId() == 18692)
|
||||||
{
|
{
|
||||||
rank = 1;
|
rank = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if((*i)->GetId() == 18693)
|
else if(aurEff->GetId() == 18693)
|
||||||
{
|
{
|
||||||
rank = 2;
|
rank = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
sLog.outError("Unknown rank of Improved Healthstone id: %f", aurEff->GetId());
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32 const itypes[8][3] = {
|
static uint32 const itypes[8][3] = {
|
||||||
@@ -5511,43 +5476,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
{
|
{
|
||||||
switch(m_spellInfo->Id)
|
switch(m_spellInfo->Id)
|
||||||
{
|
{
|
||||||
// Death Knight Initiate Visual
|
|
||||||
case 51519:
|
|
||||||
{
|
|
||||||
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint32 iTmpSpellId = 0;
|
|
||||||
switch (unitTarget->GetDisplayId())
|
|
||||||
{
|
|
||||||
case 25369: iTmpSpellId = 51552; break; // bloodelf female
|
|
||||||
case 25373: iTmpSpellId = 51551; break; // bloodelf male
|
|
||||||
case 25363: iTmpSpellId = 51542; break; // draenei female
|
|
||||||
case 25357: iTmpSpellId = 51541; break; // draenei male
|
|
||||||
case 25361: iTmpSpellId = 51537; break; // dwarf female
|
|
||||||
case 25356: iTmpSpellId = 51538; break; // dwarf male
|
|
||||||
case 25372: iTmpSpellId = 51550; break; // forsaken female
|
|
||||||
case 25367: iTmpSpellId = 51549; break; // forsaken male
|
|
||||||
case 25362: iTmpSpellId = 51540; break; // gnome female
|
|
||||||
case 25359: iTmpSpellId = 51539; break; // gnome male
|
|
||||||
case 25355: iTmpSpellId = 51534; break; // human female
|
|
||||||
case 25354: iTmpSpellId = 51520; break; // human male
|
|
||||||
case 25360: iTmpSpellId = 51536; break; // nightelf female
|
|
||||||
case 25358: iTmpSpellId = 51535; break; // nightelf male
|
|
||||||
case 25368: iTmpSpellId = 51544; break; // orc female
|
|
||||||
case 25364: iTmpSpellId = 51543; break; // orc male
|
|
||||||
case 25371: iTmpSpellId = 51548; break; // tauren female
|
|
||||||
case 25366: iTmpSpellId = 51547; break; // tauren male
|
|
||||||
case 25370: iTmpSpellId = 51545; break; // troll female
|
|
||||||
case 25365: iTmpSpellId = 51546; break; // troll male
|
|
||||||
default: return;
|
|
||||||
}
|
|
||||||
|
|
||||||
unitTarget->CastSpell(unitTarget, iTmpSpellId, true);
|
|
||||||
Creature* npc = (Creature*)unitTarget;
|
|
||||||
npc->LoadEquipment(npc->GetEquipmentId());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Dreaming Glory
|
// Dreaming Glory
|
||||||
case 28698:
|
case 28698:
|
||||||
{
|
{
|
||||||
@@ -5572,7 +5500,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
|
|
||||||
// don't overwrite an existing aura
|
// don't overwrite an existing aura
|
||||||
for(uint8 i = 0; i < 5; ++i)
|
for(uint8 i = 0; i < 5; ++i)
|
||||||
if(unitTarget->HasAuraEffect(spellid + i, 0))
|
if(unitTarget->HasAura(spellid + i))
|
||||||
return;
|
return;
|
||||||
unitTarget->CastSpell(unitTarget, spellid+urand(0, 4), true);
|
unitTarget->CastSpell(unitTarget, spellid+urand(0, 4), true);
|
||||||
break;
|
break;
|
||||||
@@ -5620,7 +5548,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
if(!unitTarget)
|
if(!unitTarget)
|
||||||
return;
|
return;
|
||||||
// remove shields, will still display immune to damage part
|
// remove shields, will still display immune to damage part
|
||||||
unitTarget->RemoveAurasWithMechanic(1<<MECHANIC_IMMUNE_SHIELD);
|
unitTarget->RemoveAurasWithMechanic(1<<MECHANIC_IMMUNE_SHIELD, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -6717,39 +6645,6 @@ void Spell::EffectSkill(uint32 /*i*/)
|
|||||||
sLog.outDebug("WORLD: SkillEFFECT");
|
sLog.outDebug("WORLD: SkillEFFECT");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::EffectSummonDemon(uint32 i)
|
|
||||||
{
|
|
||||||
float radius = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
|
|
||||||
|
|
||||||
int32 amount = damage > 0 ? damage : 1;
|
|
||||||
|
|
||||||
for(uint32 count = 0; count < amount; ++count)
|
|
||||||
{
|
|
||||||
float px, py, pz;
|
|
||||||
GetSummonPosition(i, px, py, pz, radius, count);
|
|
||||||
|
|
||||||
int32 duration = GetSpellDuration(m_spellInfo);
|
|
||||||
|
|
||||||
Creature* Charmed = m_caster->SummonCreature(m_spellInfo->EffectMiscValue[i], px, py, pz, m_caster->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,duration);
|
|
||||||
if (!Charmed) // something fatal, not attempt more
|
|
||||||
return;
|
|
||||||
|
|
||||||
// might not always work correctly, maybe the creature that dies from CoD casts the effect on itself and is therefore the caster?
|
|
||||||
Charmed->SetLevel(m_caster->getLevel());
|
|
||||||
|
|
||||||
// TODO: Add damage/mana/hp according to level
|
|
||||||
|
|
||||||
if (m_spellInfo->EffectMiscValue[i] == 89) // Inferno summon
|
|
||||||
{
|
|
||||||
// Enslave demon effect, without mana cost and cooldown
|
|
||||||
m_caster->CastSpell(Charmed, 20882, true); // FIXME: enslave does not scale with level, level 62+ minions cannot be enslaved
|
|
||||||
|
|
||||||
// Inferno effect
|
|
||||||
Charmed->CastSpell(Charmed, 22703, true, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* There is currently no need for this effect. We handle it in BattleGround.cpp
|
/* There is currently no need for this effect. We handle it in BattleGround.cpp
|
||||||
If we would handle the resurrection here, the spiritguide would instantly disappear as the
|
If we would handle the resurrection here, the spiritguide would instantly disappear as the
|
||||||
player revives, and so we wouldn't see the spirit heal visual effect on the npc.
|
player revives, and so we wouldn't see the spirit heal visual effect on the npc.
|
||||||
|
|||||||
+11
-14
@@ -50,7 +50,6 @@ SpellMgr::SpellMgr()
|
|||||||
case SPELL_EFFECT_SUMMON_OBJECT_SLOT3: //106
|
case SPELL_EFFECT_SUMMON_OBJECT_SLOT3: //106
|
||||||
case SPELL_EFFECT_SUMMON_OBJECT_SLOT4: //107
|
case SPELL_EFFECT_SUMMON_OBJECT_SLOT4: //107
|
||||||
case SPELL_EFFECT_SUMMON_DEAD_PET: //109
|
case SPELL_EFFECT_SUMMON_DEAD_PET: //109
|
||||||
//case SPELL_EFFECT_SUMMON_DEMON: //112 not 303
|
|
||||||
case SPELL_EFFECT_TRIGGER_SPELL_2: //151 ritual of summon
|
case SPELL_EFFECT_TRIGGER_SPELL_2: //151 ritual of summon
|
||||||
EffectTargetType[i] = SPELL_REQUIRE_DEST;
|
EffectTargetType[i] = SPELL_REQUIRE_DEST;
|
||||||
break;
|
break;
|
||||||
@@ -408,7 +407,7 @@ AuraState GetSpellAuraState(SpellEntry const * spellInfo)
|
|||||||
{
|
{
|
||||||
// Seals
|
// Seals
|
||||||
if (IsSealSpell(spellInfo))
|
if (IsSealSpell(spellInfo))
|
||||||
return (AURA_STATE_JUDGEMENT);
|
return AURA_STATE_JUDGEMENT;
|
||||||
|
|
||||||
// Conflagrate aura state on Immolate and Shadowflame
|
// Conflagrate aura state on Immolate and Shadowflame
|
||||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK &&
|
if (spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK &&
|
||||||
@@ -416,35 +415,35 @@ AuraState GetSpellAuraState(SpellEntry const * spellInfo)
|
|||||||
((spellInfo->SpellFamilyFlags[0] & 4) ||
|
((spellInfo->SpellFamilyFlags[0] & 4) ||
|
||||||
// Shadowflame
|
// Shadowflame
|
||||||
(spellInfo->SpellFamilyFlags[2] & 2)))
|
(spellInfo->SpellFamilyFlags[2] & 2)))
|
||||||
return (AURA_STATE_CONFLAGRATE);
|
return AURA_STATE_CONFLAGRATE;
|
||||||
|
|
||||||
// Faerie Fire (druid versions)
|
// Faerie Fire (druid versions)
|
||||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && spellInfo->SpellFamilyFlags[0] & 0x400)
|
if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && spellInfo->SpellFamilyFlags[0] & 0x400)
|
||||||
return (AURA_STATE_FAERIE_FIRE);
|
return AURA_STATE_FAERIE_FIRE;
|
||||||
|
|
||||||
// Sting (hunter's pet ability)
|
// Sting (hunter's pet ability)
|
||||||
if (spellInfo->Category == 1133)
|
if (spellInfo->Category == 1133)
|
||||||
return (AURA_STATE_FAERIE_FIRE);
|
return AURA_STATE_FAERIE_FIRE;
|
||||||
|
|
||||||
// Victorious
|
// Victorious
|
||||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR && spellInfo->SpellFamilyFlags[1] & 0x00040000)
|
if (spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR && spellInfo->SpellFamilyFlags[1] & 0x00040000)
|
||||||
return (AURA_STATE_WARRIOR_VICTORY_RUSH);
|
return AURA_STATE_WARRIOR_VICTORY_RUSH;
|
||||||
|
|
||||||
// Swiftmend state on Regrowth & Rejuvenation
|
// Swiftmend state on Regrowth & Rejuvenation
|
||||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && spellInfo->SpellFamilyFlags[0] & 0x50 )
|
if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && spellInfo->SpellFamilyFlags[0] & 0x50 )
|
||||||
return (AURA_STATE_SWIFTMEND);
|
return AURA_STATE_SWIFTMEND;
|
||||||
|
|
||||||
// Deadly poison aura state
|
// Deadly poison aura state
|
||||||
if(spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && spellInfo->SpellFamilyFlags[0] & 0x10000)
|
if(spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && spellInfo->SpellFamilyFlags[0] & 0x10000)
|
||||||
return (AURA_STATE_DEADLY_POISON);
|
return AURA_STATE_DEADLY_POISON;
|
||||||
|
|
||||||
// Enrage aura state
|
// Enrage aura state
|
||||||
if(spellInfo->Dispel == DISPEL_ENRAGE)
|
if(spellInfo->Dispel == DISPEL_ENRAGE)
|
||||||
return (AURA_STATE_ENRAGE);
|
return AURA_STATE_ENRAGE;
|
||||||
|
|
||||||
// Bleeding aura state
|
// Bleeding aura state
|
||||||
if (GetAllSpellMechanicMask(spellInfo) & 1<<MECHANIC_BLEED)
|
if (GetAllSpellMechanicMask(spellInfo) & 1<<MECHANIC_BLEED)
|
||||||
return (AURA_STATE_BLEEDING);
|
return AURA_STATE_BLEEDING;
|
||||||
|
|
||||||
if(GetSpellSchoolMask(spellInfo) & SPELL_SCHOOL_MASK_FROST)
|
if(GetSpellSchoolMask(spellInfo) & SPELL_SCHOOL_MASK_FROST)
|
||||||
{
|
{
|
||||||
@@ -452,10 +451,7 @@ AuraState GetSpellAuraState(SpellEntry const * spellInfo)
|
|||||||
{
|
{
|
||||||
if (spellInfo->EffectApplyAuraName[i]==SPELL_AURA_MOD_STUN
|
if (spellInfo->EffectApplyAuraName[i]==SPELL_AURA_MOD_STUN
|
||||||
|| spellInfo->EffectApplyAuraName[i]==SPELL_AURA_MOD_ROOT)
|
|| spellInfo->EffectApplyAuraName[i]==SPELL_AURA_MOD_ROOT)
|
||||||
{
|
return AURA_STATE_FROZEN;
|
||||||
return (AURA_STATE_FROZEN);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AURA_STATE_NONE;
|
return AURA_STATE_NONE;
|
||||||
@@ -3649,6 +3645,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
|||||||
case 42384: // Brutal Swipe
|
case 42384: // Brutal Swipe
|
||||||
case 45150: // Meteor Slash
|
case 45150: // Meteor Slash
|
||||||
case 64422: case 64688: // Sonic Screech
|
case 64422: case 64688: // Sonic Screech
|
||||||
|
// ONLY SPELLS WITH SPELLFAMILY_GENERIC and EFFECT_SCHOOL_DAMAGE
|
||||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_SHARE_DAMAGE;
|
mSpellCustomAttr[i] |= SPELL_ATTR_CU_SHARE_DAMAGE;
|
||||||
break;
|
break;
|
||||||
case 59725: // Improved Spell Reflection - aoe aura
|
case 59725: // Improved Spell Reflection - aoe aura
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ enum SpellCategories
|
|||||||
SPELLCATEGORY_HEALTH_MANA_POTIONS = 4,
|
SPELLCATEGORY_HEALTH_MANA_POTIONS = 4,
|
||||||
SPELLCATEGORY_DEVOUR_MAGIC = 12,
|
SPELLCATEGORY_DEVOUR_MAGIC = 12,
|
||||||
SPELLCATEGORY_JUDGEMENT = 1210, // Judgement (seal trigger)
|
SPELLCATEGORY_JUDGEMENT = 1210, // Judgement (seal trigger)
|
||||||
|
SPELLCATEGORY_FOOD = 11,
|
||||||
|
SPELLCATEGORY_DRINK = 59,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SpellDisableTypes
|
enum SpellDisableTypes
|
||||||
|
|||||||
+3
-22
@@ -553,7 +553,7 @@ void Unit::RemoveAurasWithFamily(uint32 family, uint32 familyFlag1, uint32 famil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::RemoveAurasWithMechanic(uint32 mechanic_mask, uint32 except)
|
void Unit::RemoveAurasWithMechanic(uint32 mechanic_mask, AuraRemoveMode removemode, uint32 except)
|
||||||
{
|
{
|
||||||
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
|
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
|
||||||
{
|
{
|
||||||
@@ -561,7 +561,7 @@ void Unit::RemoveAurasWithMechanic(uint32 mechanic_mask, uint32 except)
|
|||||||
{
|
{
|
||||||
if(GetAllSpellMechanicMask(iter->second->GetSpellProto()) & mechanic_mask)
|
if(GetAllSpellMechanicMask(iter->second->GetSpellProto()) & mechanic_mask)
|
||||||
{
|
{
|
||||||
RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL);
|
RemoveAura(iter, removemode);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4220,24 +4220,6 @@ void Unit::RemoveAurasByType(AuraType auraType, uint64 casterGUID, Aura * except
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::RemoveAurasByTypeWithDispel(AuraType auraType, Spell * spell)
|
|
||||||
{
|
|
||||||
std::queue < std::pair < uint32, uint64 > > remove_list;
|
|
||||||
|
|
||||||
for (AuraEffectList::iterator iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end();++iter)
|
|
||||||
{
|
|
||||||
if(GetDispelChance((*iter)->GetCaster(), (*iter)->GetId()))
|
|
||||||
{
|
|
||||||
remove_list.push(std::make_pair((*iter)->GetId(), (*iter)->GetCasterGUID() ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(;remove_list.size();remove_list.pop())
|
|
||||||
{
|
|
||||||
RemoveAura(remove_list.front().first, remove_list.front().second, AURA_REMOVE_BY_ENEMY_SPELL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Unit::RemoveNotOwnSingleTargetAuras(uint32 newPhase)
|
void Unit::RemoveNotOwnSingleTargetAuras(uint32 newPhase)
|
||||||
{
|
{
|
||||||
// single target auras from other casters
|
// single target auras from other casters
|
||||||
@@ -5910,8 +5892,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
|||||||
case 47570:
|
case 47570:
|
||||||
case 47569:
|
case 47569:
|
||||||
{
|
{
|
||||||
RemoveAurasByTypeWithDispel(SPELL_AURA_MOD_ROOT);
|
RemoveMovementImpairingAuras();
|
||||||
RemoveAurasByTypeWithDispel(SPELL_AURA_MOD_DECREASE_SPEED);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Rapture
|
// Rapture
|
||||||
|
|||||||
+1
-2
@@ -1449,7 +1449,6 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
|||||||
void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit *stealer);
|
void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit *stealer);
|
||||||
void RemoveAurasDueToItemSpell(Item* castItem,uint32 spellId);
|
void RemoveAurasDueToItemSpell(Item* castItem,uint32 spellId);
|
||||||
void RemoveAurasByType(AuraType auraType, uint64 casterGUID = 0, Aura * except=NULL, bool negative = true, bool positive = true);
|
void RemoveAurasByType(AuraType auraType, uint64 casterGUID = 0, Aura * except=NULL, bool negative = true, bool positive = true);
|
||||||
void RemoveAurasByTypeWithDispel(AuraType auraType, Spell * spell = NULL);
|
|
||||||
void RemoveNotOwnSingleTargetAuras(uint32 newPhase = 0x0);
|
void RemoveNotOwnSingleTargetAuras(uint32 newPhase = 0x0);
|
||||||
|
|
||||||
void RemoveSpellsCausingAura(AuraType auraType);
|
void RemoveSpellsCausingAura(AuraType auraType);
|
||||||
@@ -1458,7 +1457,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
|||||||
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except = NULL);
|
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except = NULL);
|
||||||
void RemoveAurasWithFamily(uint32 family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID);
|
void RemoveAurasWithFamily(uint32 family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID);
|
||||||
void RemoveMovementImpairingAuras();
|
void RemoveMovementImpairingAuras();
|
||||||
void RemoveAurasWithMechanic(uint32 mechanic_mask, uint32 except=0);
|
void RemoveAurasWithMechanic(uint32 mechanic_mask, AuraRemoveMode removemode = AURA_REMOVE_BY_DEFAULT, uint32 except=0);
|
||||||
void RemoveAllAuras();
|
void RemoveAllAuras();
|
||||||
void RemoveArenaAuras(bool onleave = false);
|
void RemoveArenaAuras(bool onleave = false);
|
||||||
void RemoveAllAurasOnDeath();
|
void RemoveAllAurasOnDeath();
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const uint32 WintergraspFaction[2] = {1732, 1735};
|
|||||||
|
|
||||||
const uint32 WG_KEEP_CM = 0; //Need data
|
const uint32 WG_KEEP_CM = 0; //Need data
|
||||||
const uint32 WG_RULERS_BUFF = 52108;
|
const uint32 WG_RULERS_BUFF = 52108;
|
||||||
//some cosmetics :D
|
//some cosmetics :
|
||||||
const uint32 WG_VICTORY_AURA = 60044;
|
const uint32 WG_VICTORY_AURA = 60044;
|
||||||
|
|
||||||
enum OutdoorPvP_WG_Sounds
|
enum OutdoorPvP_WG_Sounds
|
||||||
|
|||||||
Reference in New Issue
Block a user