Exemplo n.º 1
0
        public AircraftData(int entityId, int typeId, CampType camp)
            : base(entityId, typeId, camp)
        {
            IDataTable <DRAircraft> dtAircraft = GameEntry.DataTable.GetDataTable <DRAircraft>();
            DRAircraft drAircraft = dtAircraft.GetDataRow(TypeId);

            if (drAircraft == null)
            {
                return;
            }

            m_ThrusterData = new ThrusterData(GameEntry.Entity.GenerateSerialId(), drAircraft.ThrusterId, Id, Camp);

            for (int index = 0, weaponId = 0; (weaponId = drAircraft.GetWeaponIdAt(index)) > 0; index++)
            {
                AttachWeaponData(new WeaponData(GameEntry.Entity.GenerateSerialId(), weaponId, Id, Camp));
            }

            for (int index = 0, armorId = 0; (armorId = drAircraft.GetArmorIdAt(index)) > 0; index++)
            {
                AttachArmorData(new ArmorData(GameEntry.Entity.GenerateSerialId(), armorId, Id, Camp));
            }

            m_DeadEffectId = drAircraft.DeadEffectId;
            m_DeadSoundId  = drAircraft.DeadSoundId;

            HP = m_MaxHP;
        }
Exemplo n.º 2
0
        public AircraftData(int entityId, int typeId, int speed) : base(entityId, typeId)
        {
            IDataTable <DRAircraft> dtAircraft = GameEntry.DataTable.GetDataTable <DRAircraft>();
            DRAircraft drAircraft = dtAircraft.GetDataRow(TypeId);

            if (drAircraft == null)
            {
                return;
            }

            Speed = speed;
        }