Exemplo n.º 1
0
        public override bool Run(CommandParameter commandParam, ref string result)
        {
            try
            {
                QQConnectAuthInfo authInfo = JavaScriptConvert.DeserializeObject <List <QQConnectAuthInfo> >(commandParam.CloudParams)[0];
                if (authInfo != null)
                {
                    DiscuzCloudConfigInfo config = DiscuzCloudConfigs.GetConfig();
                    config.Connectappid  = authInfo.AppId;
                    config.Connectappkey = authInfo.AppKey;

                    DiscuzCloudConfigs.SaveConfig(config);
                    DiscuzCloudConfigs.ResetConfig();
                    result = CloudUtils.GetCloudResponse <bool>(true);
                }
                else
                {
                    result = CloudUtils.GetCloudResponse <bool>(false);
                }
            }
            catch
            {
                result = CloudUtils.GetCloudResponse <bool>(false);
            }
            return(true);
        }
Exemplo n.º 2
0
        public override bool Run(CommandParameter commandParam, ref string result)
        {
            string[] actionList = { "connect", "qqgroup" };
            string   action     = "";

            foreach (string act in actionList)
            {
                if (commandParam.CloudParams.IndexOf(string.Format("\"{0}\"", act)) != -1)
                {
                    action = act;
                    break;
                }
            }
            int enable = commandParam.CloudParams.IndexOf(string.Format("\"{0}\"", "normal")) != -1 ? 1 : 0;

            DiscuzCloudConfigInfo config = DiscuzCloudConfigs.GetConfig();
            bool changed = false;

            switch (action)
            {
            case "connect": config.Connectenabled = enable; changed = true; break;
            }
            if (changed)
            {
                DiscuzCloudConfigs.SaveConfig(config);
                DiscuzCloudConfigs.ResetConfig();
            }
            result = CloudUtils.GetCloudResponse <bool>(true);
            return(true);
        }
 public static void RubyMatUpdate(CharacterBody self)
 {
     if (self && self.inventory)
     {
         EliteIndex equipmentEliteIndex = RoR2.EliteCatalog.GetEquipmentEliteIndex(self.inventory.GetEquipmentIndex());
         if (self && equipmentEliteIndex == EliteIndex.None && self.isElite)
         {
             int itemCount = self.inventory.GetItemCount(Assets.AffixOrangeItemIndex);
             if (itemCount > 0)
             {
                 equipmentEliteIndex = EliteAspectsChanges.AffixOrangeIndex;
             }
         }
         RoR2.CharacterModel characterModelFromCharacterBody = CloudUtils.GetCharacterModelFromCharacterBody(self);
         if (equipmentEliteIndex == EliteAspectsChanges.AffixOrangeIndex && !self.gameObject.GetComponent <DestroyEffectOnBuffEnd>() && characterModelFromCharacterBody)
         {
             DestroyEffectOnBuffEnd destroyEffectOnBuffEnd = self.gameObject.AddComponent <DestroyEffectOnBuffEnd>();
             destroyEffectOnBuffEnd.body = self;
             destroyEffectOnBuffEnd.buff = EliteAspectsChanges.AffixOrangeBuff;
             RoR2.TemporaryOverlay temporaryOverlay = characterModelFromCharacterBody.gameObject.AddComponent <RoR2.TemporaryOverlay>();
             temporaryOverlay.duration              = float.PositiveInfinity;
             temporaryOverlay.alphaCurve            = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
             temporaryOverlay.animateShaderAlpha    = true;
             temporaryOverlay.destroyComponentOnEnd = true;
             temporaryOverlay.originalMaterial      = Cloudburst.Cores.AssetsCore.mainAssetBundle.LoadAsset <Material>("Assets/Cloudburst/753network/Crystallize/Ruby.mat");
             temporaryOverlay.AddToCharacerModel(characterModelFromCharacterBody);
             destroyEffectOnBuffEnd.effect = temporaryOverlay;
         }
     }
 }
Exemplo n.º 4
0
    public virtual void OverrideSkills()
    {
        CloudUtils.CreateEmptySkills(bodyPrefab);
        SkillLocator locator = bodyPrefab.GetComponent <SkillLocator>();

        CreatePrimary(locator, locator.primary.skillFamily);
        CreateSecondary(locator, locator.secondary.skillFamily);
        CreateUtility(locator, locator.utility.skillFamily);
        CreateSpecial(locator, locator.special.skillFamily);
    }
Exemplo n.º 5
0
        public override bool Run(CommandParameter commandParam, ref string result)
        {
            DiscuzCloudConfigInfo config = DiscuzCloudConfigs.GetConfig();

            config.Cloudenabled = 1;
            DiscuzCloudConfigs.SaveConfig(config);
            DiscuzCloudConfigs.ResetConfig();

            result = CloudUtils.GetCloudResponse <bool>(Utils.UrlDecode(commandParam.CloudParams) == "[]");
            return(true);
        }
Exemplo n.º 6
0
 public virtual void RegisterPrefabs()
 {
     CloudUtils.RegisterNewItem(itemDef);
 }
Exemplo n.º 7
0
 public override bool Run(CommandParameter commandParam, ref string result)
 {
     result = CloudUtils.GetCloudResponse <bool>(true);
     return(true);
 }