Ejemplo n.º 1
0
 private void ConvertToLocation(U4Location location, byte lat, byte lon)
 {
     location.Lat1  = (char)((lat / 16) + 'A');
     location.Lat2  = (char)((lat % 16) + 'A');
     location.Long1 = (char)((lon / 16) + 'A');
     location.Long2 = (char)((lon % 16) + 'A');
 }
Ejemplo n.º 2
0
        public Ultima4Data(IFile file = null)
        {
            Characters    = new Ultima4CharacterData[8];
            Characters[0] = new Ultima4CharacterData();
            m_numberOfCharactersInParty = 0;

            Spells   = new BoundedIntArray(26, 0, 99);
            Reagents = new BoundedIntArray(8, 0, 99);
            Armor    = new BoundedIntArray(8, 0, 99);
            Weapons  = new BoundedIntArray(16, 0, 99);

            m_food     = new BoundedInt(0, 9999);
            m_gold     = new BoundedInt(0, 9999);
            m_torches  = new BoundedInt(0, 99);
            m_gems     = new BoundedInt(0, 99);
            m_keys     = new BoundedInt(0, 99);
            m_sextants = new BoundedInt(0, 99);

            Skull = false;
            Horn  = false;
            Wheel = false;

            Candle = false;
            Book   = false;
            Bell   = false;

            KeyOfLove    = false;
            KeyOfTruth   = false;
            KeyOfCourage = false;

            m_moves  = new BoundedInt(0, 99999999);
            Location = new U4Location();

            Stones  = new bool[8];
            Runes   = new bool[8];
            Virtues = new BoundedIntArray(8, 0, 99);

            CurrentTransportation = U4Transportation.Foot;

            RawFile = null;

            if (file == null)
            {
                File = new File();
            }
            else
            {
                File = file;
            }
        }