Inheritance: ObservableObject
Beispiel #1
0
        public bool IsWithinRange(MapLocation other, int maxX = 10, int maxY = 10)
        {
            if (!IsSameMap(other))
            return false;

              var deltaX = Math.Abs(X - other.X);
              var deltaY = Math.Abs(Y - other.Y);

              return deltaX <= maxX && deltaY <= maxY;
        }
Beispiel #2
0
 public Player(ClientProcess process)
 {
     this.process = process;
       accessor = new ProcessMemoryAccessor(process.ProcessId, ProcessAccess.Read);
       inventory = new Inventory(this);
       equipment = new EquipmentSet(this);
       skillbook = new Skillbook(this);
       spellbook = new Spellbook(this);
       stats = new PlayerStats(this);
       modifiers = new PlayerModifiers(this);
       location = new MapLocation(this);
       gameClient = new ClientState(this);
 }
Beispiel #3
0
 public bool IsSameMap(MapLocation other)
 {
     return MapNumber == other.MapNumber && string.Equals(MapName, other.MapName, StringComparison.Ordinal);
 }