Core/Spells: rework part 5: GameObject casting
Port From (https://github.com/TrinityCore/TrinityCore/commit/962f6d7988b9003e550f6745be7cff812e9d8efa)
This commit is contained in:
@@ -1118,9 +1118,9 @@ namespace Game.AI
|
||||
GetScript().ProcessEventsFor(SmartEvents.RewardQuest, player, quest.Id, opt, false, null, me);
|
||||
}
|
||||
|
||||
public override void Destroyed(Player player, uint eventId)
|
||||
public override void Destroyed(WorldObject attacker, uint eventId)
|
||||
{
|
||||
GetScript().ProcessEventsFor(SmartEvents.Death, player, eventId, 0, false, null, me);
|
||||
GetScript().ProcessEventsFor(SmartEvents.Death, attacker != null ? attacker.ToUnit() : null, eventId, 0, false, null, me);
|
||||
}
|
||||
|
||||
public override void SetData(uint id, uint value) { SetData(id, value, null); }
|
||||
|
||||
@@ -490,7 +490,7 @@ namespace Game.AI
|
||||
_me.CastSpell(target.ToUnit(), e.Action.cast.spell, new CastSpellExtraArgs(triggerFlag));
|
||||
}
|
||||
else if (_go)
|
||||
_go.CastSpell(target.ToUnit(), e.Action.cast.spell, triggerFlag);
|
||||
_go.CastSpell(target.ToUnit(), e.Action.cast.spell, new CastSpellExtraArgs(triggerFlag));
|
||||
}
|
||||
else
|
||||
Log.outDebug(LogFilter.ScriptsAi, "Spell {0} not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: {1} Entry: {2} Type: {3}) already has the aura",
|
||||
|
||||
Reference in New Issue
Block a user