TC Ports:

Core/Misc: 522f537048 followup (https://github.com/TrinityCore/TrinityCore/commit/9a57e95f102a9d35ac8416d02e24c0dddbc755ed)
Core/CreatureAI: b6b0353bff followup (https://github.com/TrinityCore/TrinityCore/commit/5d411e0b21b1f1a4653d274d9b1cc7fef17f232b)
Core/Spell: move creature focus (https://github.com/TrinityCore/TrinityCore/commit/8c12f36915b2fddd48a5e4c9244c2b0498a64ae9)
Core/Unit: 2170541a51 followup (https://github.com/TrinityCore/TrinityCore/commit/2d4549023a6655d19671f7f7e6b4f7c9b71ae632)
Core/Misc: cleanup SetInFront uses (https://github.com/TrinityCore/TrinityCore/commit/104e745edfb89f95e34cad7840eae0b6e183bf94)
Core/Unit: 229444b74a follow-up (https://github.com/TrinityCore/TrinityCore/commit/6a96addadd5dea633b3066b8d0427302ba514364)
Core/Unit: revert 3ea46e57af (https://github.com/TrinityCore/TrinityCore/commit/a46286a803b41b375ed9352858c742626bb85720)
Core/Scripts: remove OnDummyEffect hook/sOnDummyEffect ai hook (https://github.com/TrinityCore/TrinityCore/commit/1929ca3aa14f6cd83ea3ac9d7e8c0e2ed0e87a26)
Core/Entities: moved PetAura handling to Player where it belongs (https://github.com/TrinityCore/TrinityCore/commit/4f6d38fe9d5c07e6e8eb88e517af71b6cdc4f9f8)
Core/Spells: Fixed Chilled to the Bone (https://github.com/TrinityCore/TrinityCore/commit/08635c740a7ee04da9b0cd5045075a9432121b06)
Core/Spell: implement pvp trinket immunity against Judgement of Justice (https://github.com/TrinityCore/TrinityCore/commit/05ba662d5daaa3428cc01cdaa3794bf5a073ef17)
This commit is contained in:
hondacrx
2020-05-19 14:49:37 -04:00
parent efe2cb66e7
commit 2fc4e3e71f
27 changed files with 139 additions and 166 deletions
+6 -11
View File
@@ -3812,7 +3812,7 @@ namespace Game.Spells
[AuraEffectHandler(AuraType.ModMeleeRangedHaste2)]
void HandleModMeleeRangedSpeedPct(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag((AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat)))
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat))
return;
//! ToDo: Haste auras with the same handler _CAN'T_ stack together
@@ -4223,16 +4223,16 @@ namespace Game.Spells
Unit caster = GetCaster();
if (mode.HasAnyFlag(AuraEffectHandleModes.Real))
// pet auras
if (target.GetTypeId() == TypeId.Player && mode.HasAnyFlag(AuraEffectHandleModes.Real))
{
// pet auras
PetAura petSpell = Global.SpellMgr.GetPetAura(GetId(), m_effIndex);
if (petSpell != null)
{
if (apply)
target.AddPetAura(petSpell);
target.ToPlayer().AddPetAura(petSpell);
else
target.RemovePetAura(petSpell);
target.ToPlayer().RemovePetAura(petSpell);
}
}
@@ -5332,12 +5332,7 @@ namespace Game.Spells
}
}
else
{
Creature c = target.ToCreature();
if (c == null || caster == null || !Global.ScriptMgr.OnDummyEffect(caster, GetId(), GetEffIndex(), target.ToCreature()) ||
!c.GetAI().OnDummyEffect(caster, GetId(), GetEffIndex()))
Log.outDebug(LogFilter.Spells, "AuraEffect.HandlePeriodicTriggerSpellAuraTick: Spell {0} has non-existent spell {1} in EffectTriggered[{2}] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
}
Log.outDebug(LogFilter.Spells, "AuraEffect.HandlePeriodicTriggerSpellAuraTick: Spell {0} has non-existent spell {1} in EffectTriggered[{2}] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
}
void HandlePeriodicTriggerSpellWithValueAuraTick(Unit target, Unit caster)
+12 -11
View File
@@ -2436,17 +2436,6 @@ namespace Game.Spells
else
m_casttime = m_spellInfo.CalcCastTime(m_caster.GetLevel(), this);
if (m_caster.IsTypeId(TypeId.Unit) && !m_caster.HasUnitFlag(UnitFlags.PlayerControlled)) // _UNIT actually means creature. for some reason.
{
if (!(m_spellInfo.IsNextMeleeSwingSpell() || IsAutoRepeat() || _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.IgnoreSetFacing)))
{
if (m_targets.GetObjectTarget() && m_caster != m_targets.GetObjectTarget())
m_caster.ToCreature().FocusTarget(this, m_targets.GetObjectTarget());
else if (m_spellInfo.HasAttribute(SpellAttr5.DontTurnDuringCast))
m_caster.ToCreature().FocusTarget(this, null);
}
}
// don't allow channeled spells / spells with cast time to be casted while moving
// exception are only channeled spells that have no casttime and SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING
// (even if they are interrupted on moving, spells with almost immediate effect get to have their effect processed before movement interrupter kicks in)
@@ -2463,6 +2452,18 @@ namespace Game.Spells
}
}
// focus if not controlled creature
if (m_caster.GetTypeId() == TypeId.Unit && !m_caster.HasUnitFlag(UnitFlags.PlayerControlled))
{
if (!(m_spellInfo.IsNextMeleeSwingSpell() || IsAutoRepeat() || _triggeredCastFlags.HasAnyFlag(TriggerCastFlags.IgnoreSetFacing)))
{
if (m_targets.GetObjectTarget() && m_caster != m_targets.GetObjectTarget())
m_caster.ToCreature().FocusTarget(this, m_targets.GetObjectTarget());
else if (m_spellInfo.HasAttribute(SpellAttr5.DontTurnDuringCast))
m_caster.ToCreature().FocusTarget(this, null);
}
}
// set timer base at cast time
ReSetTimer();
+10 -16
View File
@@ -306,25 +306,19 @@ namespace Game.Spells
}
// pet auras
PetAura petSpell = Global.SpellMgr.GetPetAura(m_spellInfo.Id, (byte)effIndex);
if (petSpell != null)
if (m_caster.GetTypeId() == TypeId.Player)
{
m_caster.AddPetAura(petSpell);
return;
PetAura petSpell = Global.SpellMgr.GetPetAura(m_spellInfo.Id, (byte)effIndex);
if (petSpell != null)
{
m_caster.ToPlayer().AddPetAura(petSpell);
return;
}
}
// normal DB scripted effect
Log.outDebug(LogFilter.Spells, "Spell ScriptStart spellid {0} in EffectDummy({1})", m_spellInfo.Id, effIndex);
m_caster.GetMap().ScriptsStart(ScriptsType.Spell, (uint)((int)m_spellInfo.Id | (int)(effIndex << 24)), m_caster, unitTarget);
// Script based implementation. Must be used only for not good for implementation in core spell effects
// So called only for not proccessed cases
if (gameObjTarget)
Global.ScriptMgr.OnDummyEffect(m_caster, m_spellInfo.Id, effIndex, gameObjTarget);
else if (unitTarget && unitTarget.IsTypeId(TypeId.Unit))
Global.ScriptMgr.OnDummyEffect(m_caster, m_spellInfo.Id, effIndex, unitTarget.ToCreature());
else if (itemTarget)
Global.ScriptMgr.OnDummyEffect(m_caster, m_spellInfo.Id, effIndex, itemTarget);
}
[SpellEffectHandler(SpellEffectName.TriggerSpell)]
@@ -1957,11 +1951,11 @@ namespace Game.Spells
if (unitTarget.HasUnitState(UnitState.Confused | UnitState.Stunned | UnitState.Fleeing))
return;
unitTarget.SetFacingTo(unitTarget.GetAngle(destTarget));
unitTarget.ClearUnitState(UnitState.Moving);
if (unitTarget.IsTypeId(TypeId.Unit))
unitTarget.GetMotionMaster().MoveDistract((uint)(damage * Time.InMilliseconds));
unitTarget.StopMoving();
unitTarget.SetFacingTo(unitTarget.GetAngle(destTarget));
}
[SpellEffectHandler(SpellEffectName.Pickpocket)]
+5 -2
View File
@@ -2304,11 +2304,14 @@ namespace Game.Spells
{
switch (Id)
{
case 42292: // PvP trinket
case 59752: // Every Man for Himself
mechanicImmunityMask |= (uint)Mechanics.ImmuneToMovementImpairmentAndLossControlMask;
immuneInfo.AuraTypeImmune.Add(AuraType.UseNormalMovementSpeed);
break;
case 34471: // The Beast Within
case 19574: // Bestial Wrath
case 42292: // PvP trinket
case 46227: // Medallion of Immunity
case 59752: // Every Man for Himself
case 53490: // Bullheaded
case 65547: // PvP Trinket
case 134946: // Supremacy of the Alliance
+4
View File
@@ -2976,6 +2976,10 @@ namespace Game.Entities
break;
case 69846: // Frost Bomb
spellInfo.Speed = 0.0f; // This spell's summon happens instantly
break;
case 70106: // Chilled to the Bone
spellInfo.AttributesEx3 |= SpellAttr3.NoDoneBonus;
spellInfo.AttributesEx6 |= SpellAttr6.NoDonePctDamageMods;
break;
case 71614: // Ice Lock
spellInfo.Mechanic = Mechanics.Stun;