Exemplo n.º 1
0
        public bool RecoverEnd(bool timeChk)
        {
            if (timeChk && !this.IsRecoverEndTime())
            {
                return(false);
            }
            if (this.State != NdockStates.RESTORE)
            {
                return(false);
            }
            Mem_ship ship = Comm_UserDatas.Instance.User_ship.get_Item(this.Ship_id);

            ship.NdockRecovery(this);
            this.Ship_id      = 0;
            this.Item1        = 0;
            this.Item3        = 0;
            this.State        = NdockStates.EMPTY;
            this.StartTime    = 0;
            this.CompleteTime = 0;
            if (!Enumerable.Any <Mem_deck>(Comm_UserDatas.Instance.User_deck.get_Values(), (Mem_deck x) => x.Ship.Find(ship.Rid) != -1))
            {
                if (timeChk)
                {
                    ship.BlingSet(this.Area_id);
                }
                else
                {
                    ship.BlingWait(this.Area_id, Mem_ship.BlingKind.WaitDeck);
                }
            }
            return(true);
        }
Exemplo n.º 2
0
        public bool RecoverEnd(bool timeChk)
        {
            if (timeChk && !IsRecoverEndTime())
            {
                return(false);
            }
            if (State != NdockStates.RESTORE)
            {
                return(false);
            }
            Mem_ship ship = Comm_UserDatas.Instance.User_ship[Ship_id];

            ship.NdockRecovery(this);
            Ship_id      = 0;
            Item1        = 0;
            Item3        = 0;
            State        = NdockStates.EMPTY;
            StartTime    = 0;
            CompleteTime = 0;
            if (!Comm_UserDatas.Instance.User_deck.Values.Any((Mem_deck x) => x.Ship.Find(ship.Rid) != -1))
            {
                if (timeChk)
                {
                    ship.BlingSet(Area_id);
                }
                else
                {
                    ship.BlingWait(Area_id, Mem_ship.BlingKind.WaitDeck);
                }
            }
            return(true);
        }
        private bool setBlingShip(int ship_rid, int area_id, int deck_rid)
        {
            Mem_ship mem_ship = null;

            if (!Comm_UserDatas.Instance.User_ship.TryGetValue(ship_rid, ref mem_ship))
            {
                return(false);
            }
            mem_ship.BlingWait(area_id, Mem_ship.BlingKind.WaitDeck);
            return(true);
        }