Exemplo n.º 1
0
        public bool IsValid(EAccountState state)
        {
            // General check
            if (Account != null && Account.AccountState != state)
            {
                return(false);
            }

            // Login checks
            if (state == EAccountState.Login)
            {
            }
            // Char checks
            if (state == EAccountState.Char)
            {
            }
            // World checks
            if (state == EAccountState.World)
            {
                if (Account == null)
                {
                    return(false);
                }
                if (Account.ActiveChar == null)
                {
                    return(false);
                }
                return(true);
            }

            return(true);
        }
Exemplo n.º 2
0
 public Account(bool addToWorld)
     : base(DatabaseID.Zero, addToWorld)
 {
     Chars        = new DualDictionary <WorldID, Character>();
     AccountState = EAccountState.None;
 }
Exemplo n.º 3
0
		public bool IsValid(EAccountState state) {
			// General check
			if (Account != null && Account.AccountState != state) {
				return false;
			}

			// Login checks
			if (state == EAccountState.Login) {
			}
			// Char checks
			if (state == EAccountState.Char) {
			}
			// World checks
			if (state == EAccountState.World) {
				if (Account == null) {
					return false;
				}
				if (Account.ActiveChar == null) {
					return false;
				}
				return true;
			}

			return true;
		}
Exemplo n.º 4
0
		public Account(bool addToWorld)
			: base(DatabaseID.Zero, addToWorld) {
			Chars = new DualDictionary<WorldID, Character>();
			AccountState = EAccountState.None;
		}