public override void HandleActionOnCollide(ObjectGuid playerId) { if (!playerId.IsPlayer()) { return; } if (!Players.Any(k => k == playerId)) { Players.Add(playerId); } if (ActionLoop == null) { ActionLoop = NextActionLoop; NextActionLoop.EnqueueChain(); } }
public override void OnCollideObject(WorldObject wo) { if (!(wo is Player player)) { return; } if (!Players.Contains(player.Guid)) { Players.Add(player.Guid); } if (ActionLoop == null) { ActionLoop = NextActionLoop; NextActionLoop.EnqueueChain(); } }
public override void OnCollideObject(WorldObject wo) { var player = wo as Player; if (player == null) { return; } if (!Players.Any(k => k == player)) { Players.Add(player); } if (ActionLoop == null) { ActionLoop = NextActionLoop; NextActionLoop.EnqueueChain(); } }
public override void OnCollideObject(WorldObject wo) { if (!(wo is Creature creature)) { return; } if (!AffectsAis && !(wo is Player)) { return; } if (!Creatures.Contains(creature.Guid)) { //Console.WriteLine($"{Name} ({Guid}).OnCollideObject({creature.Name})"); Creatures.Add(creature.Guid); } if (ActionLoop == null) { ActionLoop = NextActionLoop; NextActionLoop.EnqueueChain(); } }