예제 #1
0
        public AiBrain(CreatureEntity entity)
        {
            this.entity = entity;

            var moveTemplates = CreatureMovementTemplates.Where(ways => ways.entry == entity.Template.Entry).ToList();

            if (moveTemplates.Count != 0)
            {
                moveTemplates.ForEach(way => waypoints.Add(new Waypoint()
                {
                    PointIndex = way.point, Point = new Vector3(way.position_x, way.position_y, way.position_z)
                }));
            }
            else
            {
                var creatureMovements = CreatureMovements.Where(ways => ways.id == entity.Creature.id).ToList();
                creatureMovements.ForEach(way => waypoints.Add(new Waypoint()
                {
                    PointIndex = way.point, Point = new Vector3(way.position_x, way.position_y, way.position_z)
                }));
            }

            SetNextWaypoint();
        }
예제 #2
0
 public CreaturePacketBuilder(CreatureEntity entity)
 {
     this.entity = entity;
 }