hondacrx
2021-12-07 20:42:47 -05:00
parent b7e4c2fd76
commit c37e1c9f7d
17 changed files with 91 additions and 46 deletions
+2 -2
View File
@@ -689,9 +689,9 @@ namespace Game.AI
GetScript().ProcessEventsFor(SmartEvents.ReceiveEmote, player, (uint)emoteId);
}
public override void IsSummonedBy(Unit summoner)
public override void IsSummonedBy(WorldObject summoner)
{
GetScript().ProcessEventsFor(SmartEvents.JustSummoned, summoner);
GetScript().ProcessEventsFor(SmartEvents.JustSummoned, summoner.ToUnit(), 0, 0, false, null, summoner.ToGameObject());
}
public override void DamageDealt(Unit victim, ref uint damage, DamageEffectType damageType)
+3 -3
View File
@@ -2944,7 +2944,7 @@ namespace Game.AI
TempSummon tempSummon = _me.ToTempSummon();
if (tempSummon)
{
Unit summoner = tempSummon.GetSummoner();
WorldObject summoner = tempSummon.GetSummoner();
if (summoner)
charmerOrOwnerGuid = summoner.GetGUID();
}
@@ -2953,7 +2953,7 @@ namespace Game.AI
if (charmerOrOwnerGuid.IsEmpty())
charmerOrOwnerGuid = _me.GetCreatorGUID();
Unit owner = Global.ObjAccessor.GetUnit(_me, charmerOrOwnerGuid);
WorldObject owner = Global.ObjAccessor.GetWorldObject(_me, charmerOrOwnerGuid);
if (owner != null)
targets.Add(owner);
}
@@ -2967,7 +2967,7 @@ namespace Game.AI
// Get owner of owner
if (e.Target.owner.useCharmerOrOwner != 0 && !targets.Empty())
{
Unit owner = targets.First().ToUnit();
WorldObject owner = targets.First();
targets.Clear();
Unit unitBase = Global.ObjAccessor.GetUnit(owner, owner.GetCharmerOrOwnerGUID());