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:
@@ -155,9 +155,9 @@ namespace Game.AI
|
||||
me.SendAIReaction(AiReaction.Alert);
|
||||
|
||||
// Face the unit (stealthed player) and set distracted state for 5 seconds
|
||||
me.SetFacingTo(me.GetAngle(who.GetPositionX(), who.GetPositionY()), true);
|
||||
me.StopMoving();
|
||||
me.GetMotionMaster().MoveDistract(5 * Time.InMilliseconds);
|
||||
me.StopMoving();
|
||||
me.SetFacingTo(me.GetAngle(who));
|
||||
}
|
||||
|
||||
// Called for reaction at stopping attack at no attackers or targets
|
||||
@@ -193,7 +193,7 @@ namespace Game.AI
|
||||
|
||||
void SetGazeOn(Unit target)
|
||||
{
|
||||
if (me.IsValidAttackTarget(target))
|
||||
if (me.IsValidAttackTarget(target) && target != me.GetVictim())
|
||||
{
|
||||
if (!me.IsFocusing(null, true))
|
||||
AttackStart(target);
|
||||
@@ -217,7 +217,7 @@ namespace Game.AI
|
||||
Unit victim = me.SelectVictim();
|
||||
if (victim != null)
|
||||
{
|
||||
if (!me.IsFocusing(null, true))
|
||||
if (!me.IsFocusing(null, true) && victim != me.GetVictim())
|
||||
AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,7 @@ namespace Game.AI
|
||||
i_victimGuid = victim.GetGUID();
|
||||
|
||||
// attack
|
||||
me.SetInFront(victim); // client change orientation by self
|
||||
me.CastSpell(victim, me.ToTotem().GetSpell(), false);
|
||||
me.CastSpell(victim, me.ToTotem().GetSpell());
|
||||
}
|
||||
else
|
||||
i_victimGuid.Clear();
|
||||
|
||||
@@ -385,7 +385,6 @@ namespace Game.AI
|
||||
public virtual void QuestSelect(Player player, Quest quest) { }
|
||||
public virtual void QuestComplete(Player player, Quest quest) { }
|
||||
public virtual void QuestReward(Player player, Quest quest, uint opt) { }
|
||||
public virtual bool OnDummyEffect(Unit caster, uint spellId, int effIndex) { return false; }
|
||||
public virtual void OnGameEvent(bool start, ushort eventId) { }
|
||||
|
||||
public static AISpellInfoType[] AISpellInfo;
|
||||
|
||||
@@ -811,12 +811,6 @@ namespace Game.AI
|
||||
GetScript().ProcessEventsFor(SmartEvents.RewardQuest, player, quest.Id, opt);
|
||||
}
|
||||
|
||||
public override bool OnDummyEffect(Unit caster, uint spellId, int effIndex)
|
||||
{
|
||||
GetScript().ProcessEventsFor(SmartEvents.DummyEffect, caster, spellId, (uint)effIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void SetCombatMove(bool on)
|
||||
{
|
||||
if (mCanCombatMove == on)
|
||||
|
||||
@@ -641,15 +641,6 @@ namespace Game.AI
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case SmartEvents.DummyEffect:
|
||||
{
|
||||
if (!IsSpellValid(e, e.Event.dummy.spell))
|
||||
return false;
|
||||
|
||||
if (e.Event.dummy.effIndex > 2)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case SmartEvents.IsBehindTarget:
|
||||
{
|
||||
if (!IsMinMaxValid(e, e.Event.behindTarget.cooldownMin, e.Event.behindTarget.cooldownMax))
|
||||
@@ -1579,7 +1570,7 @@ namespace Game.AI
|
||||
{
|
||||
{ SmartEvents.UpdateIc, SmartScriptTypeMaskId.Creature + SmartScriptTypeMaskId.TimedActionlist },
|
||||
{ SmartEvents.UpdateOoc, SmartScriptTypeMaskId.Creature + SmartScriptTypeMaskId.Gameobject + SmartScriptTypeMaskId.Instance },
|
||||
{ SmartEvents.HealthPct, SmartScriptTypeMaskId.Creature },
|
||||
{ SmartEvents.HealthPct, SmartScriptTypeMaskId.Creature },
|
||||
{ SmartEvents.ManaPct, SmartScriptTypeMaskId.Creature },
|
||||
{ SmartEvents.Aggro, SmartScriptTypeMaskId.Creature },
|
||||
{ SmartEvents.Kill, SmartScriptTypeMaskId.Creature },
|
||||
@@ -1643,7 +1634,7 @@ namespace Game.AI
|
||||
{ SmartEvents.JustCreated, SmartScriptTypeMaskId.Creature + SmartScriptTypeMaskId.Gameobject },
|
||||
{ SmartEvents.GossipHello, SmartScriptTypeMaskId.Creature + SmartScriptTypeMaskId.Gameobject },
|
||||
{ SmartEvents.FollowCompleted, SmartScriptTypeMaskId.Creature },
|
||||
{ SmartEvents.DummyEffect, SmartScriptTypeMaskId.Spell },
|
||||
{ SmartEvents.Unused66, SmartScriptTypeMaskId.None },
|
||||
{ SmartEvents.IsBehindTarget, SmartScriptTypeMaskId.Creature },
|
||||
{ SmartEvents.GameEventStart, SmartScriptTypeMaskId.Creature + SmartScriptTypeMaskId.Gameobject },
|
||||
{ SmartEvents.GameEventEnd, SmartScriptTypeMaskId.Creature + SmartScriptTypeMaskId.Gameobject },
|
||||
|
||||
@@ -3624,13 +3624,6 @@ namespace Game.AI
|
||||
ProcessAction(e, unit, var0, var1);
|
||||
break;
|
||||
}
|
||||
case SmartEvents.DummyEffect:
|
||||
{
|
||||
if (e.Event.dummy.spell != var0 || e.Event.dummy.effIndex != var1)
|
||||
return;
|
||||
ProcessAction(e, unit, var0, var1);
|
||||
break;
|
||||
}
|
||||
case SmartEvents.GameEventStart:
|
||||
case SmartEvents.GameEventEnd:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user