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;
         }
     }
 }
Ejemplo n.º 2
0
 private static void CrownsOnYellow(On.RoR2.CharacterModel.orig_EnableItemDisplay orig, RoR2.CharacterModel self, ItemIndex itemIndex)
 {
     for (int i = 0; i < NewDefsList.Count; i++)
     {
         if (itemIndex == NewDefsList[i].itemIndex)
         {
             RoR2.DisplayRuleGroup equipmentDisplayRuleGroup = self.itemDisplayRuleSet.GetEquipmentDisplayRuleGroup(OldDefsList[i].equipmentIndex);
             self.InstantiateDisplayRuleGroup(equipmentDisplayRuleGroup, NewDefsList[i].itemIndex, EquipmentIndex.None);
         }
     }
     orig(self, itemIndex);
 }
Ejemplo n.º 3
0
 private static void CrownRemoval(On.RoR2.CharacterModel.orig_DisableItemDisplay orig, RoR2.CharacterModel self, ItemIndex itemIndex)
 {
     for (int i = 0; i < NewDefsList.Count; i++)
     {
         if (itemIndex == NewDefsList[i].itemIndex && self.inventoryEquipmentIndex != OldDefsList[i].equipmentIndex)
         {
             for (int j = self.parentedPrefabDisplays.Count - 1; j >= 0; j--)
             {
                 if (self.parentedPrefabDisplays[j].equipmentIndex == OldDefsList[i].equipmentIndex)
                 {
                     self.parentedPrefabDisplays[j].Undo();
                     self.parentedPrefabDisplays.RemoveAt(j);
                 }
             }
             for (int k = self.limbMaskDisplays.Count - 1; k >= 0; k--)
             {
                 if (self.limbMaskDisplays[k].equipmentIndex == OldDefsList[i].equipmentIndex)
                 {
                     self.limbMaskDisplays[k].Undo(self);
                     self.limbMaskDisplays.RemoveAt(k);
                 }
             }
         }
     }
     orig(self, itemIndex);
 }
Ejemplo n.º 4
0
 // Token: 0x06000D3D RID: 3389 RVA: 0x00041F5D File Offset: 0x0004015D
 public void Undo(CharacterModel characterModel)
 {
     characterModel.limbFlagSet.RemoveFlags(this.maskValue);
 }
Ejemplo n.º 5
0
 // Token: 0x06000D3C RID: 3388 RVA: 0x00041F48 File Offset: 0x00040148
 public void Apply(CharacterModel characterModel, LimbFlags mask)
 {
     this.maskValue = mask;
     characterModel.limbFlagSet.AddFlags(mask);
 }