Exemple #1
0
        public override void Teleport(MapRecord map)
        {
            if (this.Maps.Contains(map.Id))
            {
                int cost = Costs[Maps.ToList().IndexOf(map.Id)];

                var zaapi = map.GetInteractiveByElementType(106); // IT Type Enum

                ushort cellId = zaapi != null?GetTeleporterCell(map, zaapi) : map.RandomWalkableCell();

                if (this.Character.RemoveKamas(cost))
                {
                    this.Close();
                    this.Character.Teleport(map.Id, cellId);
                }
            }
        }