mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-11 22:51:27 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -20474,10 +20474,10 @@ void Unit::PetSpellFail(SpellInfo const* spellInfo, Unit* target, uint32 result)
|
||||
}
|
||||
}
|
||||
|
||||
int32 Unit::CalculateAOEDamageReduction(int32 damage, uint32 schoolMask, Unit* caster) const
|
||||
int32 Unit::CalculateAOEDamageReduction(int32 damage, uint32 schoolMask, bool npcCaster) const
|
||||
{
|
||||
damage = int32(float(damage) * GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE, schoolMask));
|
||||
if (caster && caster->IsCreature())
|
||||
if (npcCaster)
|
||||
damage = int32(float(damage) * GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE, schoolMask));
|
||||
|
||||
return damage;
|
||||
|
||||
@@ -1187,7 +1187,7 @@ public:
|
||||
uint32 SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack = 1);
|
||||
|
||||
// AOE damages
|
||||
int32 CalculateAOEDamageReduction(int32 damage, uint32 schoolMask, Unit* caster) const;
|
||||
int32 CalculateAOEDamageReduction(int32 damage, uint32 schoolMask, bool npcCaster) const;
|
||||
|
||||
// Armor reduction
|
||||
static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const* spellInfo = nullptr, uint8 effIndex = MAX_SPELL_EFFECTS);
|
||||
|
||||
@@ -6692,9 +6692,17 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
|
||||
damage = Unit::SpellCriticalDamageBonus(caster, m_spellInfo, damage, target);
|
||||
|
||||
// Auras reducing damage from AOE spells
|
||||
if (GetSpellInfo()->Effects[GetEffIndex()].IsAreaAuraEffect() || GetSpellInfo()->Effects[GetEffIndex()].IsTargetingArea() || GetSpellInfo()->Effects[GetEffIndex()].Effect == SPELL_EFFECT_PERSISTENT_AREA_AURA) // some persistent area auras have targets like A=53 B=28
|
||||
if (!GetSpellInfo()->HasAttribute(SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS))
|
||||
{
|
||||
damage = target->CalculateAOEDamageReduction(damage, GetSpellInfo()->SchoolMask, caster);
|
||||
if (GetSpellInfo()->Effects[GetEffIndex()].IsAreaAuraEffect() ||
|
||||
GetSpellInfo()->Effects[GetEffIndex()].IsTargetingArea() ||
|
||||
GetSpellInfo()->Effects[GetEffIndex()].Effect == SPELL_EFFECT_PERSISTENT_AREA_AURA || // some persistent area auras have targets like A=53 B=28
|
||||
GetSpellInfo()->HasAttribute(SPELL_ATTR5_TREAT_AS_AREA_EFFECT) ||
|
||||
GetSpellInfo()->HasAttribute(SPELL_ATTR7_TREAT_AS_NPC_AOE))
|
||||
{
|
||||
bool npcCaster = (caster && !caster->IsControlledByPlayer()) || GetSpellInfo()->HasAttribute(SPELL_ATTR7_TREAT_AS_NPC_AOE);
|
||||
damage = target->CalculateAOEDamageReduction(damage, GetSpellInfo()->SchoolMask, npcCaster);
|
||||
}
|
||||
}
|
||||
|
||||
int32 dmg = damage;
|
||||
|
||||
@@ -8352,7 +8352,8 @@ void Spell::DoAllEffectOnLaunchTarget(TargetInfo& targetInfo, float* multiplier)
|
||||
// Xinef: Area Auras, AoE Targetting spells AND Chain Target spells (cleave etc.)
|
||||
if (m_spellInfo->Effects[i].IsAreaAuraEffect() || m_spellInfo->Effects[i].IsTargetingArea() || (m_spellInfo->Effects[i].ChainTarget > 1 && m_spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MAGIC))
|
||||
{
|
||||
m_damage = unit->CalculateAOEDamageReduction(m_damage, m_spellInfo->SchoolMask, m_caster);
|
||||
bool npcCaster = (m_caster && !m_caster->IsControlledByPlayer()) || GetSpellInfo()->HasAttribute(SPELL_ATTR7_TREAT_AS_NPC_AOE);
|
||||
m_damage = unit->CalculateAOEDamageReduction(m_damage, m_spellInfo->SchoolMask, npcCaster);
|
||||
if (m_caster->IsPlayer())
|
||||
{
|
||||
uint32 targetAmount = m_UniqueTargetInfo.size();
|
||||
|
||||
@@ -4885,6 +4885,25 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
spellInfo->Effects[EFFECT_2].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ENEMY);
|
||||
});
|
||||
|
||||
// Felmyst Strafe (Top)
|
||||
ApplySpellFix({ 45585 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->MaxAffectedTargets = 3;
|
||||
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_70_YARDS);
|
||||
});
|
||||
|
||||
// Felmyst Strafe (Middle, Bottom)
|
||||
ApplySpellFix({ 45633, 45635 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_70_YARDS);
|
||||
});
|
||||
|
||||
// Encapsulate
|
||||
ApplySpellFix({ 45662 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->AttributesEx7 |= SPELL_ATTR7_TREAT_AS_NPC_AOE;
|
||||
});
|
||||
|
||||
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
|
||||
{
|
||||
SpellInfo* spellInfo = mSpellInfoMap[i];
|
||||
|
||||
@@ -50,6 +50,7 @@ enum Spells
|
||||
SPELL_ENRAGE = 46587,
|
||||
SPELL_EMPOWER = 45366,
|
||||
SPELL_DARK_FLAME = 45345,
|
||||
SPELL_FIREBLAST = 45232,
|
||||
|
||||
//Lady Sacrolash spells
|
||||
SPELL_SHADOWFORM = 45455,
|
||||
@@ -78,6 +79,21 @@ struct boss_sacrolash : public BossAI
|
||||
{
|
||||
boss_sacrolash(Creature* creature) : BossAI(creature, DATA_EREDAR_TWINS), _isSisterDead(false) {}
|
||||
|
||||
bool CheckInRoom() override
|
||||
{
|
||||
if (me->GetExactDist2d(me->GetHomePosition()) >= 50.f)
|
||||
{
|
||||
DoCastAOE(SPELL_FIREBLAST, true);
|
||||
|
||||
if (Creature* alythess = instance->GetCreature(DATA_ALYTHESS))
|
||||
alythess->AI()->DoCastAOE(SPELL_FIREBLAST, true);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
DoCastSelf(SPELL_SHADOWFORM, true);
|
||||
@@ -104,7 +120,11 @@ struct boss_sacrolash : public BossAI
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
me->CastSpell(target, SPELL_CONFLAGRATION, false);
|
||||
|
||||
DoCast(target, SPELL_CONFLAGRATION);
|
||||
|
||||
if (Creature* alythess = instance->GetCreature(DATA_ALYTHESS))
|
||||
alythess->AI()->Talk(EMOTE_CONFLAGRATION, target);
|
||||
}, 30s, 35s);
|
||||
}
|
||||
}
|
||||
@@ -190,6 +210,13 @@ struct boss_alythess : public BossAI
|
||||
sacrolash->Respawn(true);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if (who && who->isTargetableForAttack() && me->GetReactState() != REACT_PASSIVE)
|
||||
if (me->Attack(who, false))
|
||||
me->AddThreat(who, 0.0f);
|
||||
}
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
if (param == ACTION_SISTER_DIED)
|
||||
@@ -200,12 +227,16 @@ struct boss_alythess : public BossAI
|
||||
me->CastSpell(me, SPELL_EMPOWER, true);
|
||||
|
||||
scheduler.CancelGroup(GROUP_SPECIAL_ABILITY);
|
||||
ScheduleTimedEvent(20s, [&] {
|
||||
ScheduleTimedEvent(20s, 26s, [&] {
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
DoCast(target, SPELL_SHADOW_NOVA);
|
||||
}, 30s, 35s);
|
||||
|
||||
if (Creature * sacrolash = instance->GetCreature(DATA_SACROLASH))
|
||||
sacrolash->AI()->Talk(EMOTE_SHADOW_NOVA, target);
|
||||
|
||||
}, 20s, 26s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,9 +257,9 @@ struct boss_alythess : public BossAI
|
||||
DoCastSelf(SPELL_PYROGENICS);
|
||||
}, 15s);
|
||||
|
||||
ScheduleTimedEvent(20s, [&] {
|
||||
me->CastCustomSpell(SPELL_FLAME_SEAR, SPELLVALUE_MAX_TARGETS, 5, me, TRIGGERED_NONE);
|
||||
}, 15s);
|
||||
ScheduleTimedEvent(10s, 15s, [&] {
|
||||
me->CastCustomSpell(SPELL_FLAME_SEAR, SPELLVALUE_MAX_TARGETS, urand(4, 5), me, TRIGGERED_NONE);
|
||||
}, 10s, 15s);
|
||||
|
||||
scheduler.Schedule(20s, GROUP_SPECIAL_ABILITY, [this](TaskContext context) {
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
|
||||
@@ -49,6 +49,12 @@ enum Spells
|
||||
SPELL_ENCAPSULATE_CHANNEL = 45661,
|
||||
|
||||
//Flight phase
|
||||
SPELL_TRIGGER_TOP_STRAFE = 45586,
|
||||
SPELL_TRIGGER_MIDDLE_STRAFE = 45622,
|
||||
SPELL_TRIGGER_BOTTOM_STRAFE = 45623,
|
||||
SPELL_STRAFE_TOP = 45585,
|
||||
SPELL_STRAFE_MIDDLE = 45633,
|
||||
SPELL_STRAFE_BOTTOM = 45635,
|
||||
SPELL_SUMMON_DEMONIC_VAPOR = 45391,
|
||||
SPELL_DEMONIC_VAPOR_SPAWN_TRIGGER = 45388, // Triggers visual beam
|
||||
SPELL_DEMONIC_VAPOR_PERIODIC = 45411, // Spawns cloud and deals damage
|
||||
@@ -110,18 +116,17 @@ public:
|
||||
|
||||
bool Execute(uint64 /*execTime*/, uint32 /*diff*/) override
|
||||
{
|
||||
std::list<Creature*> creatureList;
|
||||
_caster->GetCreaturesWithEntryInRange(creatureList, 70.0f, NPC_FOG_TRIGGER);
|
||||
for (auto const& creature : creatureList)
|
||||
switch (_currentLane)
|
||||
{
|
||||
if (_caster->GetExactDist2d(creature) <= 11.0f)
|
||||
{
|
||||
creature->CastSpell(creature, SPELL_FOG_OF_CORRUPTION, true);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!_currentLane && creature->GetPositionX() > 1510.0f)
|
||||
creature->CastSpell(creature, SPELL_FOG_OF_CORRUPTION, true);
|
||||
case 0: // top
|
||||
_caster->CastSpell(_caster, SPELL_STRAFE_TOP, true);
|
||||
break;
|
||||
case 1: // middle
|
||||
_caster->CastSpell(_caster, SPELL_STRAFE_MIDDLE, true);
|
||||
break;
|
||||
case 2: // bottom
|
||||
_caster->CastSpell(_caster, SPELL_STRAFE_BOTTOM, true);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -183,6 +188,12 @@ struct boss_felmyst : public BossAI
|
||||
Talk(YELL_KILL);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_STRAFE_TOP || spell->Id == SPELL_STRAFE_MIDDLE || spell->Id == SPELL_STRAFE_BOTTOM)
|
||||
target->CastSpell(target, SPELL_FOG_OF_CORRUPTION, true);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
@@ -297,15 +308,8 @@ struct boss_felmyst : public BossAI
|
||||
case POINT_LANE:
|
||||
Talk(EMOTE_BREATH);
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(0));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(500));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(1000));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(1500));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(2000));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(2500));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(3000));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(3500));
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(4000));
|
||||
for (uint8 i = 0; i < 16; ++i)
|
||||
me->m_Events.AddEvent(new CorruptTriggers(me, _currentLane), me->m_Events.CalculateTime(i*250));
|
||||
}, 5s);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
|
||||
@@ -450,6 +450,7 @@ struct boss_kiljaeden : public BossAI
|
||||
if (me->GetReactState() == REACT_PASSIVE)
|
||||
return;
|
||||
ScriptedAI::EnterEvadeMode(why);
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
|
||||
@@ -293,7 +293,7 @@ class spell_entropius_void_zone_visual_aura : public AuraScript
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_entropius_void_zone_visual_aura::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_entropius_void_zone_visual_aura::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_entropius_void_zone_visual_aura::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ class spell_dk_death_and_decay : public SpellScript
|
||||
|
||||
// Xinef: include AOE damage reducing auras
|
||||
if (target)
|
||||
damage = target->CalculateAOEDamageReduction(damage, GetSpellInfo()->SchoolMask, caster);
|
||||
damage = target->CalculateAOEDamageReduction(damage, GetSpellInfo()->SchoolMask, false);
|
||||
|
||||
SetHitDamage(damage);
|
||||
}
|
||||
|
||||
@@ -664,7 +664,7 @@ enum SpellAttr7 : uint32
|
||||
SPELL_ATTR7_NO_ATTACK_DODGE = 0x00800000, // TITLE Spell cannot be dodged 23@Attr7 DESCRIPTION Motivate, Mutilate, Shattering Throw
|
||||
SPELL_ATTR7_NO_ATTACK_PARRY = 0x01000000, // TITLE Spell cannot be parried 24@Attr7 DESCRIPTION Motivate, Mutilate, Perform Speech, Shattering Throw
|
||||
SPELL_ATTR7_NO_ATTACK_MISS = 0x02000000, // TITLE Spell cannot be missed 25@Attr7
|
||||
SPELL_ATTR7_TREAT_AS_NPC_AOE = 0x04000000, // TITLE Unknown attribute 26@Attr7
|
||||
SPELL_ATTR7_TREAT_AS_NPC_AOE = 0x04000000, // TITLE Treat as NPC AoE
|
||||
SPELL_ATTR7_BYPASS_NO_RESURRECTION_AURA = 0x08000000, // TITLE Bypasses the prevent resurrection aura
|
||||
SPELL_ATTR7_DO_NOT_COUNT_FOR_PVP_SCOREBOARD = 0x10000000, // TITLE Consolidate in raid buff frame (client only)
|
||||
SPELL_ATTR7_REFLECTION_ONLY_DEFENDS = 0x20000000, // TITLE Unknown attribute 29@Attr7 DESCRIPTION only 69028, 71237
|
||||
|
||||
@@ -1087,7 +1087,7 @@ AC_API_EXPORT EnumText EnumUtils<SpellAttr7>::ToString(SpellAttr7 value)
|
||||
case SPELL_ATTR7_NO_ATTACK_DODGE: return { "SPELL_ATTR7_NO_ATTACK_DODGE", "Spell cannot be dodged 23@Attr7", "Motivate, Mutilate, Shattering Throw" };
|
||||
case SPELL_ATTR7_NO_ATTACK_PARRY: return { "SPELL_ATTR7_NO_ATTACK_PARRY", "Spell cannot be parried 24@Attr7", "Motivate, Mutilate, Perform Speech, Shattering Throw" };
|
||||
case SPELL_ATTR7_NO_ATTACK_MISS: return { "SPELL_ATTR7_NO_ATTACK_MISS", "Spell cannot be missed 25@Attr7", "" };
|
||||
case SPELL_ATTR7_TREAT_AS_NPC_AOE: return { "SPELL_ATTR7_TREAT_AS_NPC_AOE", "Unknown attribute 26@Attr7", "" };
|
||||
case SPELL_ATTR7_TREAT_AS_NPC_AOE: return { "SPELL_ATTR7_TREAT_AS_NPC_AOE", "Treat as NPC AoE", "" };
|
||||
case SPELL_ATTR7_BYPASS_NO_RESURRECTION_AURA: return { "SPELL_ATTR7_BYPASS_NO_RESURRECTION_AURA", "Bypasses the prevent resurrection aura", "" };
|
||||
case SPELL_ATTR7_DO_NOT_COUNT_FOR_PVP_SCOREBOARD: return { "SPELL_ATTR7_DO_NOT_COUNT_FOR_PVP_SCOREBOARD", "Consolidate in raid buff frame (client only)", "" };
|
||||
case SPELL_ATTR7_REFLECTION_ONLY_DEFENDS: return { "SPELL_ATTR7_REFLECTION_ONLY_DEFENDS", "Unknown attribute 29@Attr7", "only 69028, 71237" };
|
||||
|
||||
Reference in New Issue
Block a user