Core/Conditions: Added CONDITION_SCENARIO_STEP

Port From (https://github.com/TrinityCore/TrinityCore/commit/5002e5d3524eab201c6c219cd60a9f7d6188ed54)
This commit is contained in:
hondacrx
2022-06-01 17:06:38 -04:00
parent b68bbda363
commit a99d430a9c
4 changed files with 37 additions and 1 deletions
+10 -1
View File
@@ -8537,9 +8537,18 @@ namespace Game.Spells
{
Unit unitCaster = spell.GetCaster().ToUnit();
if (unitCaster != null)
{
unitCaster.AtTargetAttacked(unit, spell.m_spellInfo.HasInitialAggro());
if (spell.m_spellInfo.HasAttribute(SpellAttr6.TapsImmediately))
{
Creature targetCreature = unit.ToCreature();
if (targetCreature != null)
if (!targetCreature.HasLootRecipient() && unitCaster.IsPlayer())
targetCreature.SetLootRecipient(unitCaster);
}
}
if (!spell.m_spellInfo.HasAttribute(SpellAttr3.DoNotTriggerTargetStand) && !unit.IsStandState())
if (!spell.m_spellInfo.HasAttribute(SpellAttr3.DoNotTriggerTargetStand) && !unit.IsStandState())
unit.SetStandState(UnitStandStateType.Stand);
}