private void DoReadPlanetElectroUpdate()
        {
            int LPLanet = FReader.ReadInt32();
            int LEnergy = FReader.ReadInt32();

            PlanetByUID(LPLanet).UpdateEnergy(LEnergy);
        }
    // Оповещение о доступности созвездия
    private void ReadPlanetarAvailable()
    {
        int LPlanetarID = FReader.ReadInt32();
        int LErrorCode  = FReader.ReadInt32();

        SWEShared.UIPanelAuth.PlanetarAvailable(LPlanetarID, LErrorCode);
    }
        private void DoReadPlanetSubscriptionChanged()
        {
            int  LPLanet     = FReader.ReadInt32();
            bool LSubscribed = FReader.ReadBoolean();

            PlanetByUID(LPLanet).UpdateSubscription(LSubscribed);
        }
        private void DoReadShipCreate()
        {
            int     tmpUID     = FReader.ReadInt32();
            Landing tmpLanding = LandingByUID(tmpUID);

            /* пересмотреть логику */
            if (tmpLanding.Ship != null)
            {
                return;
            }
            Player   LOwner    = SSHShared.FindPlayer(FReader.ReadInt32());
            ShipType LShipType = (ShipType)FReader.ReadInt32();
            Ship     LShip     = new Ship(tmpUID, LOwner, tmpLanding, LShipType)
            {
                State          = (ShipState)FReader.ReadInt32(),
                Mode           = (ShipMode)FReader.ReadInt32(),
                AttachedPlanet = PlanetByUID(FReader.ReadInt32()),
                Count          = FReader.ReadInt32(),
                HP             = FReader.ReadInt32(),
                Fuel           = FReader.ReadInt32(),
                IsCapture      = FReader.ReadBoolean(),
                IsAutoTarget   = FReader.ReadBoolean(),
            };

            LShip.Allocate();
        }
        private void DoReadPlanetBattleUpdate()
        {
            int  LPLanet   = FReader.ReadInt32();
            bool LInBattle = FReader.ReadBoolean();

            PlanetByUID(LPLanet).UpdateBattle(LInBattle);
        }
        private void DoReadPlanetModulesUpdate()
        {
            int LPLanet = FReader.ReadInt32();
            int LCount  = FReader.ReadInt32();

            PlanetByUID(LPLanet).UpdateModulesCount(LCount);
        }
        private void DoReadShipRemove()
        {
            int  LUID     = FReader.ReadInt32();
            bool LDestroy = FReader.ReadBoolean();

            LandingByUID(LUID).Ship.Delete(LDestroy);
        }
        private void DoReadPlanetStorageClear()
        {
            int LPlanet = FReader.ReadInt32();
            int LIndex  = FReader.ReadInt32();

            Engine.UIPlanetDetails.Storage.Clear(LPlanet, LIndex);
        }
        private void DoReadPlanetStateTime()
        {
            int LPlanet = FReader.ReadInt32();
            int LTime   = FReader.ReadInt32();

            PlanetByUID(LPlanet).UpdateTimer(LTime);
        }
Beispiel #10
0
        private void DoReadPlanetTradePathUpdate()
        {
            int    LPLanet = FReader.ReadInt32();
            Planet LTarget = PlanetByUID(FReader.ReadInt32());

            PlanetByUID(LPLanet).UpdateTradePath(LTarget);
        }
Beispiel #11
0
        private void DoReadPlanetStateUpdate()
        {
            int         LPlanet      = FReader.ReadInt32();
            PlanetState LPlanetState = (PlanetState)FReader.ReadInt32();

            PlanetByUID(LPlanet).UpdateState(LPlanetState);
        }
Beispiel #12
0
        private void DoReadPlanetOwnerChanged()
        {
            int LPlanetUID = FReader.ReadInt32();
            int LOwner     = FReader.ReadInt32();

            PlanetByUID(LPlanetUID).UpdateOwner(LOwner);
        }
Beispiel #13
0
        private void DoReadShipRefill()
        {
            int LUID  = FReader.ReadInt32();
            int LFuel = FReader.ReadInt32();

            LandingByUID(LUID).Ship.UpdateFuel(LFuel);
        }
Beispiel #14
0
        private void DoReadPortalClose()
        {
            Planet LSource = PlanetByUID(FReader.ReadInt32());

            // Закроем портал
            LSource.PortalClose();
        }
Beispiel #15
0
        private void DoReadPlayerStorageResize()
        {
            int LStorageSize = FReader.ReadInt32();

            Engine.Player.StorageLevel = LStorageSize;
            Engine.UIPlayerDetails.Storage.Resize(LStorageSize, false);
        }
Beispiel #16
0
        private void DoReadPortalUpdate()
        {
            Planet LSource = PlanetByUID(FReader.ReadInt32());
            int    LLimit  = FReader.ReadInt32();

            // Обновим портал
            LSource.PortalUpdate(LLimit);
        }
Beispiel #17
0
        private void DoReadShipTimerUpdate()
        {
            int LUID     = FReader.ReadInt32();
            int LTimer   = FReader.ReadInt32();
            int LSeconds = FReader.ReadInt32();

            LandingByUID(LUID).Ship.UpdateTimer(LTimer, LSeconds);
        }
Beispiel #18
0
        private void DoReadPlanetStorageResize()
        {
            int  LPLanet = FReader.ReadInt32();
            int  LSize   = FReader.ReadInt32();
            bool LClear  = FReader.ReadBoolean();

            PlanetByUID(LPLanet).UpdateStorageSize(LSize, LClear);
        }
Beispiel #19
0
        private void DoReadPlanetCoverageUpdate()
        {
            int     LPlanet    = FReader.ReadInt32();
            bool    LIncrement = FReader.ReadBoolean();
            SSHRole LRole      = (SSHRole)FReader.ReadInt32();

            PlanetByUID(LPlanet).UpdateCoverage(LIncrement, LRole);
        }
Beispiel #20
0
        private void DoReadPlanetVisibilityUpdate()
        {
            int  LPlanet    = FReader.ReadInt32();
            bool LHardLight = FReader.ReadBoolean();
            bool LIncrement = FReader.ReadBoolean();

            PlanetByUID(LPlanet).UpdateVisibility(LHardLight, LIncrement);
        }
Beispiel #21
0
        private void DoReadLowGravityUpdate()
        {
            Planet LSource  = PlanetByUID(FReader.ReadInt32());
            bool   LEnabled = FReader.ReadBoolean();

            // Включим или выключим гравитационный потенциал
            LSource.LowGravity(LEnabled);
        }
Beispiel #22
0
        private void DoReadShipFlight()
        {
            Ship LShip  = LandingByUID(FReader.ReadInt32()).Ship;
            int  LState = FReader.ReadInt32();
            int  LMode  = FReader.ReadInt32();

            LShip.UpdateState((ShipState)LState, (ShipMode)LMode);
        }
Beispiel #23
0
        private void DoReadPlanetCaptureUpdate()
        {
            int     LPLanet       = FReader.ReadInt32();
            int     LCaptureValue = FReader.ReadInt32();
            SSHRole LCaptureRole  = (SSHRole)FReader.ReadInt32();

            PlanetByUID(LPLanet).UpdateCapture(LCaptureValue, LCaptureRole);
        }
Beispiel #24
0
        private void DoReadPlayerStorageUpdate()
        {
            int LSlot  = FReader.ReadInt32();
            int LResID = FReader.ReadInt32();
            int LCount = FReader.ReadInt32();

            Engine.UIPlayerDetails.Storage.Change(LSlot, LResID, LCount);
        }
Beispiel #25
0
        private void DoReadShipRetarget()
        {
            Ship           LShip        = LandingByUID(FReader.ReadInt32()).Ship;
            ShipWeaponType LWeaponeType = (ShipWeaponType)FReader.ReadInt32();
            Landing        LLanding     = LandingByUID(FReader.ReadInt32());

            LShip.Weapon(LWeaponeType).Retarget(LLanding != null ? LLanding.Ship : null);
        }
Beispiel #26
0
        private void DoReadPlayerHangarUpdate()
        {
            int LSlot     = FReader.ReadInt32();
            int LShipType = FReader.ReadInt32();
            int LCount    = FReader.ReadInt32();

            Engine.UIPlayerDetails.Hangar.UpdateData(LSlot, (ShipType)LShipType, LCount);
        }
Beispiel #27
0
 private void DoReadLoadSystemBegin()
 {
     // Размеры созвездия
     Engine.MapSize.x = FReader.ReadInt32();
     Engine.MapSize.y = FReader.ReadInt32();
     // Установим свойства созвездия
     Engine.SceneManager.Load();
 }
Beispiel #28
0
        private void DoReadShipAttach()
        {
            Ship   LShip       = LandingByUID(FReader.ReadInt32()).Ship;
            Planet LPlanet     = PlanetByUID(FReader.ReadInt32());
            bool   LCapture    = FReader.ReadBoolean();
            bool   LAutoTarget = FReader.ReadBoolean();

            LShip.UpdateAttach(LPlanet, LCapture, LAutoTarget);
        }
Beispiel #29
0
        private void DoReadPlanetBuildingUpdate()
        {
            int LPlanet      = FReader.ReadInt32();
            int LIndex       = FReader.ReadInt32();
            int LBuidingType = FReader.ReadInt32();
            int LLevel       = FReader.ReadInt32();
            int LHP          = FReader.ReadInt32();

            Engine.UIPlanetDetails.Buildings.BuildingUpdate(LPlanet, LIndex, (BuildingType)LBuidingType, LLevel, LHP);
        }
    // Авторизация успешна
    private void DoReadLoginAccept()
    {
        // Обработка команды успешного логина
        string LPassword = DoReadString();

        SSHShared.Player.UID  = FReader.ReadInt32();
        SSHShared.Player.Race = (SSHRace)FReader.ReadInt32();
        SWEShared.UIPanelAuth.SavePassword(LPassword);
        // Подключение к своей планетарке
        SWEShared.SocketWriter.PlanetarAvailable(SWEShared.Player.UID);
    }