Advertisement
Guest User

Vorspire

a guest
Jul 7th, 2009
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. using System;
  2. using System.Collections;
  3.  
  4. using Server;
  5.  
  6. namespace Server.Touring
  7. {
  8.     public struct Destination
  9.     {
  10.         private Map m_Map;
  11.         private Point3D m_Location;
  12.  
  13.         private string
  14.             m_Name,
  15.             m_Description;
  16.  
  17.         private TimeSpan m_Delay;
  18.  
  19.         public Map Map { get { return m_Map; } }
  20.         public Point3D Location { get { return m_Location; } }
  21.  
  22.         public string Name { get { return m_Name; } }
  23.         public string Description { get { return m_Description; } }
  24.  
  25.         public TimeSpan Delay { get { return m_Delay; } }
  26.  
  27.         public Destination(Map map, Point3D location, string name, string description, TimeSpan delay)
  28.         {
  29.             m_Map = map;
  30.             m_Location = location;
  31.             m_Name = name;
  32.             m_Description = description;
  33.             m_Delay = delay;
  34.         }
  35.  
  36.         public bool IsValid()
  37.         {
  38.             return !Server.Spells.SpellHelper.IsInvalid(m_Map, m_Location);
  39.         }
  40.  
  41.         public void DoTeleport(Mobile m)
  42.         {
  43.             if (m != null && !m.Deleted)
  44.             {
  45.                 m.Blessed = true;
  46.                 m.Freeze(m_Delay);
  47.                 m.MoveToWorld(m_Location, m_Map);
  48.                 Tour.DestinationChangedInvoke(new DestinationChangedEventArgs(this, m));
  49.             }
  50.         }
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement