示例#1
0
 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();
     }
 }
示例#2
0
        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();
            }
        }
示例#3
0
        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();
            }
        }
示例#4
0
文件: Hotspot.cs 项目: haeal/ACE
        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();
            }
        }