Exemplo n.º 1
0
        public PatcherService(Session session) : base("/patcher")
        {
            this.session  = session;
            this.settings = GetSettings <Settings>();

            gameState = new PatcherState {
                Phase = PatcherPhase.PATCHING
            };
            launcherState = new PatcherState {
                Phase = PatcherPhase.PATCHING
            };

            Session.Init.ContinueWith(t => OnInitialized());
        }
Exemplo n.º 2
0
        //public static WorldInvocationState DetermineInvocationState(Interactor intr) {
        //	if (IsClientState(intr, ClientState.InWorld)) {
        //		if (Screen.ImageSearch(intr, "InvocationReady").Found) {
        //			return WorldInvocationState.Ready;
        //		} else if (Screen.ImageSearch(intr, "InvocationNotReady").Found) {
        //			return WorldInvocationState.NotReady;
        //		} else {
        //			return WorldInvocationState.Unknown;
        //		}
        //          } else {
        //		return WorldInvocationState.None;
        //	}
        //}


        //play button
        //login
        //none


        public static bool IsPatcherState(Interactor intr, PatcherState desiredState)
        {
            switch (desiredState)
            {
            case PatcherState.PlayButton:
                return(Screen.ImageSearch(intr, "PatcherPlayButton").Found);

            case PatcherState.LogIn:
                return(Screen.ImageSearch(intr, "PatcherLoginButtonPart").Found);

            case PatcherState.None:
                return(DeterminePatcherState(intr) == PatcherState.None);
            }
            return(false);
        }
Exemplo n.º 3
0
        private static string GetStatus(PatcherState state, string description)
        {
            switch (state)
            {
            case PatcherState.None:
                return(string.Empty);

            case PatcherState.LoadingPatcherData:
                return("Loading data...");

            case PatcherState.LoadingPatcherConfiguration:
                return("Loading configuration...");

            case PatcherState.WaitingForUserDecision:
                return(string.Empty);

            case PatcherState.StartingApp:
                return("Starting application...");

            case PatcherState.UpdatingApp:
                return(description);
            }
            return(string.Empty);
        }
Exemplo n.º 4
0
 //public static WorldInvocationState DetermineInvocationState(Interactor intr) {
 //    if (IsClientState(intr, ClientState.InWorld)) {
 //        if (Screen.ImageSearch(intr, "InvocationReady").Found) {
 //            return WorldInvocationState.Ready;
 //        } else if (Screen.ImageSearch(intr, "InvocationNotReady").Found) {
 //            return WorldInvocationState.NotReady;
 //        } else {
 //            return WorldInvocationState.Unknown;
 //        }
 //          } else {
 //        return WorldInvocationState.None;
 //    }
 //}
 //play button
 //login
 //none
 public static bool IsPatcherState(Interactor intr, PatcherState desiredState)
 {
     switch (desiredState) {
         case PatcherState.PlayButton:
             return Screen.ImageSearch(intr, "PatcherPlayButton").Found;
         case PatcherState.LogIn:
             return Screen.ImageSearch(intr, "PatcherLoginButtonPart").Found;
         case PatcherState.None:
             return DeterminePatcherState(intr) == PatcherState.None;
     }
     return false;
 }