예제 #1
0
 // Token: 0x06000A29 RID: 2601 RVA: 0x00032748 File Offset: 0x00030948
 static BuffMask()
 {
     for (BuffIndex buffIndex = BuffIndex.Slow50; buffIndex < BuffIndex.Count; buffIndex++)
     {
         if (BuffCatalog.GetBuffDef(buffIndex).isElite)
         {
             BuffMask.eliteMask |= 1u << (int)buffIndex;
         }
     }
 }
        private static void Init()
        {
            BuffIndex buffIndex = BuffIndex.Slow50;
            BuffIndex buffCount = (BuffIndex)BuffCatalog.buffCount;

            while (buffIndex < buffCount)
            {
                if (BuffCatalog.GetBuffDef(buffIndex).isElite)
                {
                    BuffMask.eliteMask |= 1UL << (int)buffIndex;
                }
                buffIndex++;
            }
        }
예제 #3
0
 // Token: 0x06000A37 RID: 2615 RVA: 0x00047218 File Offset: 0x00045418
 static BuffCatalog()
 {
     BuffCatalog.RegisterBuff(BuffIndex.ArmorBoost, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffGenericShield",
         buffColor = new Color(0.8392157f, 0.7882353f, 0.227450982f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Slow50, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffSlow50Icon",
         buffColor = new Color(0.917647064f, 0.407843143f, 0.419607848f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.ClayGoo, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffSlow50Icon",
         buffColor = new Color(0.2f, 0.09019608f, 0.09019608f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.AttackSpeedOnCrit, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffAttackSpeedOnCritIcon",
         buffColor = new Color(0.9098039f, 0.5058824f, 0.239215687f),
         canStack  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.BeetleJuice, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffBeetleJuiceIcon",
         buffColor = new Color(0.8392157f, 0.7882353f, 0.227450982f),
         canStack  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.OnFire, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffOnFireIcon",
         buffColor = new Color(0.9137255f, 0.372549027f, 0.1882353f),
         canStack  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.MedkitHeal, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffMedkitHealIcon",
         buffColor = new Color(0.784313738f, 0.9372549f, 0.427450985f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Warbanner, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffWarbannerIcon",
         buffColor = new Color(0.8392157f, 0.7882353f, 0.227450982f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.EnrageAncientWisp, new BuffDef());
     BuffCatalog.RegisterBuff(BuffIndex.Cloak, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffCloakIcon",
         buffColor = new Color(0.3764706f, 0.843137264f, 0.8980392f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.CloakSpeed, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texMovespeedBuffIcon",
         buffColor = new Color(0.3764706f, 0.843137264f, 0.8980392f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.LightningShield, new BuffDef
     {
         iconPath = null
     });
     BuffCatalog.RegisterBuff(BuffIndex.FullCrit, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffFullCritIcon",
         buffColor = new Color(0.8392157f, 0.227450982f, 0.227450982f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.TempestSpeed, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffTempestSpeedIcon",
         buffColor = new Color(0.8392157f, 0.7882353f, 0.227450982f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.EngiShield, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffEngiShieldIcon",
         buffColor = new Color(0.3764706f, 0.843137264f, 0.8980392f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.BugWings, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texMovespeedBuffIcon",
         buffColor = new Color(0.3764706f, 0.843137264f, 0.8980392f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.TeslaField, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffTeslaIcon",
         buffColor = new Color(0.858823538f, 0.533333361f, 0.9843137f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.WarCryBuff, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texWarcryBuffIcon",
         buffColor = new Color(0.827451f, 0.196078435f, 0.09803922f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Slow30, new BuffDef());
     BuffCatalog.RegisterBuff(BuffIndex.EngiTeamShield, new BuffDef());
     BuffCatalog.RegisterBuff(BuffIndex.CommandoBoost, new BuffDef());
     BuffCatalog.RegisterBuff(BuffIndex.GoldEmpowered, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffAttackSpeedOnCritIcon",
         buffColor = new Color(1f, 0.7882353f, 0.05490196f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Immune, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffGenericShield",
         buffColor = new Color(1f, 0.7882353f, 0.05490196f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Cripple, new BuffDef
     {
         iconPath = "Textures/BuffIcons/texBuffCrippleIcon"
     });
     BuffCatalog.RegisterBuff(BuffIndex.Slow80, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffSlow50Icon",
         buffColor = new Color(0.647058845f, 0.870588243f, 0.929411769f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Slow60, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffSlow50Icon",
         buffColor = new Color(0.6784314f, 0.6117647f, 0.4117647f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.AffixRed, new BuffDef
     {
         eliteIndex = EliteIndex.Fire,
         iconPath   = "Textures/BuffIcons/texBuffAffixRed"
     });
     BuffCatalog.RegisterBuff(BuffIndex.AffixBlue, new BuffDef
     {
         eliteIndex = EliteIndex.Lightning,
         iconPath   = "Textures/BuffIcons/texBuffAffixBlue"
     });
     BuffCatalog.RegisterBuff(BuffIndex.NoCooldowns, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texNoCooldownsBuffIcon",
         buffColor = new Color(0.733333349f, 0.545098066f, 0.9764706f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.AffixWhite, new BuffDef
     {
         eliteIndex = EliteIndex.Ice,
         iconPath   = "Textures/BuffIcons/texBuffAffixWhite"
     });
     BuffCatalog.RegisterBuff(BuffIndex.HiddenInvincibility, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffGenericShield",
         buffColor = new Color(0.545098066f, 0.807843149f, 0.8392157f)
     });
     for (BuffIndex buffIndex = BuffIndex.Slow50; buffIndex < BuffIndex.Count; buffIndex++)
     {
         if (BuffCatalog.buffDefs[(int)buffIndex] == null)
         {
             Debug.LogWarningFormat("Unregistered buff {0}!", new object[]
             {
                 Enum.GetName(typeof(BuffIndex), buffIndex)
             });
         }
     }
     BuffCatalog.eliteBuffIndices = (from buffDef in BuffCatalog.buffDefs
                                     where buffDef.isElite
                                     select buffDef.buffIndex).ToArray <BuffIndex>();
 }
        private bool PerformEquipmentAction(EquipmentIndex equipmentIndex)
        {
            if (!NetworkServer.active)
            {
                Debug.LogWarning("[Server] function 'System.Boolean RoR2.EquipmentSlot::PerformEquipmentAction(RoR2.EquipmentIndex)' called on client");
                return(false);
            }
            switch (equipmentIndex)
            {
            case EquipmentIndex.CommandMissile:
                this.remainingMissiles += 12;
                return(true);

            case EquipmentIndex.Saw:
            {
                Vector3 position = base.transform.position;
                Ray     aimRay   = this.GetAimRay();
                bool    crit     = Util.CheckRoll(this.characterBody.crit, this.characterBody.master);
                ProjectileManager.instance.FireProjectile(Resources.Load <GameObject>("Prefabs/Projectiles/Sawmerang"), aimRay.origin, Util.QuaternionSafeLookRotation(aimRay.direction), base.gameObject, this.characterBody.damage, 0f, crit, DamageColorIndex.Default, null, -1f);
                return(true);
            }

            case EquipmentIndex.Fruit:
                if (this.healthComponent)
                {
                    Util.PlaySound("Play_item_use_fruit", base.gameObject);
                    EffectData effectData = new EffectData();
                    effectData.origin = base.transform.position;
                    effectData.SetNetworkedObjectReference(base.gameObject);
                    EffectManager.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/FruitHealEffect"), effectData, true);
                    this.healthComponent.HealFraction(0.5f, default(ProcChainMask));
                    return(true);
                }
                return(true);

            case EquipmentIndex.Meteor:
            {
                MeteorStormController component = UnityEngine.Object.Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/NetworkedObjects/MeteorStorm"), this.characterBody.corePosition, Quaternion.identity).GetComponent <MeteorStormController>();
                component.owner       = base.gameObject;
                component.ownerDamage = this.characterBody.damage;
                component.isCrit      = Util.CheckRoll(this.characterBody.crit, this.characterBody.master);
                NetworkServer.Spawn(component.gameObject);
                return(true);
            }

            case EquipmentIndex.SoulJar:
                return(true);

            case EquipmentIndex.Blackhole:
            {
                Vector3 position2 = base.transform.position;
                Ray     aimRay2   = this.GetAimRay();
                ProjectileManager.instance.FireProjectile(Resources.Load <GameObject>("Prefabs/Projectiles/GravSphere"), position2, Util.QuaternionSafeLookRotation(aimRay2.direction), base.gameObject, 0f, 0f, false, DamageColorIndex.Default, null, -1f);
                return(true);
            }

            case EquipmentIndex.GhostGun:
            {
                GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/NetworkedObjects/GhostGun"), base.transform.position, Quaternion.identity);
                gameObject.GetComponent <GhostGunController>().owner = base.gameObject;
                NetworkServer.Spawn(gameObject);
                return(true);
            }

            case EquipmentIndex.CritOnUse:
                this.characterBody.AddTimedBuff(BuffIndex.FullCrit, 8f);
                return(true);

            case EquipmentIndex.DroneBackup:
            {
                Util.PlaySound("Play_item_use_radio", base.gameObject);
                int   sliceCount = 4;
                float num        = 25f;
                if (NetworkServer.active)
                {
                    float y = Quaternion.LookRotation(this.GetAimRay().direction).eulerAngles.y;
                    float d = 3f;
                    foreach (float num2 in new DegreeSlices(sliceCount, 0.5f))
                    {
                        Quaternion      rotation        = Quaternion.Euler(0f, y + num2, 0f);
                        Quaternion      rotation2       = Quaternion.Euler(0f, y + num2 + 180f, 0f);
                        Vector3         position3       = base.transform.position + rotation * (Vector3.forward * d);
                        CharacterMaster characterMaster = this.SummonMaster(Resources.Load <GameObject>("Prefabs/CharacterMasters/DroneBackupMaster"), position3, rotation2);
                        if (characterMaster)
                        {
                            characterMaster.gameObject.AddComponent <MasterSuicideOnTimer>().lifeTimer = num + UnityEngine.Random.Range(0f, 3f);
                        }
                    }
                }
                this.subcooldownTimer = 0.5f;
                return(true);
            }

            case EquipmentIndex.OrbitalLaser:
            {
                Vector3    position4 = base.transform.position;
                RaycastHit raycastHit;
                if (Physics.Raycast(this.GetAimRay(), out raycastHit, 900f, LayerIndex.world.mask | LayerIndex.defaultLayer.mask))
                {
                    position4 = raycastHit.point;
                }
                GameObject gameObject2 = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("Prefabs/NetworkedObjects/OrbitalLaser"), position4, Quaternion.identity);
                gameObject2.GetComponent <OrbitalLaserController>().ownerBody = this.characterBody;
                NetworkServer.Spawn(gameObject2);
                return(true);
            }

            case EquipmentIndex.BFG:
                this.bfgChargeTimer   = 2f;
                this.subcooldownTimer = 2.2f;
                return(true);

            case EquipmentIndex.Enigma:
            {
                EquipmentIndex equipmentIndex2 = EquipmentCatalog.enigmaEquipmentList[UnityEngine.Random.Range(0, EquipmentCatalog.enigmaEquipmentList.Count - 1)];
                this.PerformEquipmentAction(equipmentIndex2);
                return(true);
            }

            case EquipmentIndex.Jetpack:
            {
                JetpackController jetpackController = JetpackController.FindJetpackController(base.gameObject);
                if (!jetpackController)
                {
                    GameObject gameObject3 = UnityEngine.Object.Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/NetworkedObjects/JetpackController"));
                    jetpackController = gameObject3.GetComponent <JetpackController>();
                    jetpackController.NetworktargetObject = base.gameObject;
                    NetworkServer.Spawn(gameObject3);
                    return(true);
                }
                jetpackController.ResetTimer();
                return(true);
            }

            case EquipmentIndex.Lightning:
            {
                this.UpdateTargets();
                HurtBox hurtBox = this.currentTargetHurtBox;
                if (hurtBox)
                {
                    this.subcooldownTimer = 0.2f;
                    OrbManager.instance.AddOrb(new LightningStrikeOrb
                        {
                            attacker         = base.gameObject,
                            damageColorIndex = DamageColorIndex.Item,
                            damageValue      = this.characterBody.damage * 30f,
                            isCrit           = Util.CheckRoll(this.characterBody.crit, this.characterBody.master),
                            procChainMask    = default(ProcChainMask),
                            procCoefficient  = 1f,
                            target           = hurtBox
                        });
                    this.InvalidateCurrentTarget();
                    return(true);
                }
                return(false);
            }

            case EquipmentIndex.PassiveHealing:
                if (this.passiveHealingFollower)
                {
                    this.UpdateTargets();
                    this.passiveHealingFollower.AssignNewTarget(this.currentTargetBodyObject);
                    this.InvalidateCurrentTarget();
                    return(true);
                }
                return(true);

            case EquipmentIndex.BurnNearby:
                if (this.characterBody)
                {
                    this.characterBody.AddHelfireDuration(8f);
                    return(true);
                }
                return(true);

            case EquipmentIndex.SoulCorruptor:
            {
                this.UpdateTargets();
                HurtBox hurtBox2 = this.currentTargetHurtBox;
                if (!hurtBox2)
                {
                    return(false);
                }
                if (!hurtBox2.healthComponent || hurtBox2.healthComponent.combinedHealthFraction > 0.25f)
                {
                    return(false);
                }
                Util.TryToCreateGhost(hurtBox2.healthComponent.body, this.characterBody, 30);
                hurtBox2.healthComponent.Suicide(base.gameObject, null, DamageType.Generic);
                this.InvalidateCurrentTarget();
                return(true);
            }

            case EquipmentIndex.Scanner:
                NetworkServer.Spawn(UnityEngine.Object.Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/NetworkedObjects/ChestScanner"), this.characterBody.corePosition, Quaternion.identity));
                return(true);

            case EquipmentIndex.CrippleWard:
                NetworkServer.Spawn(UnityEngine.Object.Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/NetworkedObjects/CrippleWard"), this.characterBody.corePosition, Quaternion.identity));
                this.inventory.SetEquipmentIndex(EquipmentIndex.None);
                return(true);

            case EquipmentIndex.Gateway:
                return(this.FireGateway());

            case EquipmentIndex.Tonic:
                this.characterBody.AddTimedBuff(BuffIndex.TonicBuff, EquipmentSlot.tonicBuffDuration);
                if (!Util.CheckRoll(80f, this.characterBody.master))
                {
                    this.characterBody.pendingTonicAfflictionCount++;
                    return(true);
                }
                return(true);

            case EquipmentIndex.QuestVolatileBattery:
                return(false);

            case EquipmentIndex.Cleanse:
            {
                Vector3    corePosition = this.characterBody.corePosition;
                EffectData effectData2  = new EffectData
                {
                    origin = corePosition
                };
                effectData2.SetHurtBoxReference(this.characterBody.mainHurtBox);
                EffectManager.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/CleanseEffect"), effectData2, true);
                BuffIndex buffIndex = BuffIndex.Slow50;
                BuffIndex buffCount = (BuffIndex)BuffCatalog.buffCount;
                while (buffIndex < buffCount)
                {
                    if (BuffCatalog.GetBuffDef(buffIndex).isDebuff)
                    {
                        this.characterBody.ClearTimedBuffs(buffIndex);
                    }
                    buffIndex++;
                }
                DotController.RemoveAllDots(base.gameObject);
                SetStateOnHurt component2 = base.GetComponent <SetStateOnHurt>();
                if (component2)
                {
                    component2.Cleanse();
                }
                float     num3      = 6f;
                float     num4      = num3 * num3;
                TeamIndex teamIndex = this.teamComponent.teamIndex;
                List <ProjectileController> instancesList = InstanceTracker.GetInstancesList <ProjectileController>();
                List <ProjectileController> list          = new List <ProjectileController>();
                int i     = 0;
                int count = instancesList.Count;
                while (i < count)
                {
                    ProjectileController projectileController = instancesList[i];
                    if (projectileController.teamFilter.teamIndex != teamIndex && (projectileController.transform.position - corePosition).sqrMagnitude < num4)
                    {
                        list.Add(projectileController);
                    }
                    i++;
                }
                int j      = 0;
                int count2 = list.Count;
                while (j < count2)
                {
                    ProjectileController projectileController2 = list[j];
                    if (projectileController2)
                    {
                        UnityEngine.Object.Destroy(projectileController2.gameObject);
                    }
                    j++;
                }
                return(true);
            }

            case EquipmentIndex.FireBallDash:
            {
                Ray        aimRay3     = this.GetAimRay();
                GameObject gameObject4 = UnityEngine.Object.Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/NetworkedObjects/FireballVehicle"), aimRay3.origin, Quaternion.LookRotation(aimRay3.direction));
                gameObject4.GetComponent <VehicleSeat>().AssignPassenger(base.gameObject);
                CharacterBody characterBody = this.characterBody;
                NetworkUser   networkUser;
                if (characterBody == null)
                {
                    networkUser = null;
                }
                else
                {
                    CharacterMaster master = characterBody.master;
                    if (master == null)
                    {
                        networkUser = null;
                    }
                    else
                    {
                        PlayerCharacterMasterController playerCharacterMasterController = master.playerCharacterMasterController;
                        networkUser = ((playerCharacterMasterController != null) ? playerCharacterMasterController.networkUser : null);
                    }
                }
                NetworkUser networkUser2 = networkUser;
                if (networkUser2)
                {
                    NetworkServer.SpawnWithClientAuthority(gameObject4, networkUser2.gameObject);
                }
                else
                {
                    NetworkServer.Spawn(gameObject4);
                }
                this.subcooldownTimer = 2f;
                return(true);
            }

            case EquipmentIndex.GainArmor:
                this.characterBody.AddTimedBuff(BuffIndex.ElephantArmorBoost, 5f);
                return(true);
            }
            return(false);
        }
 private static void Init()
 {
     BuffCatalog.nameToBuffIndex.Clear();
     BuffCatalog.buffDefs  = new BuffDef[51];
     BuffCatalog.buffCount = BuffCatalog.buffDefs.Length;
     BuffCatalog.RegisterBuff(BuffIndex.ArmorBoost, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffGenericShield",
         buffColor = new Color(0.8392157f, 0.7882353f, 0.22745098f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Slow50, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffSlow50Icon",
         buffColor = new Color(0.91764706f, 0.40784314f, 0.41960785f),
         isDebuff  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.ClayGoo, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffSlow50Icon",
         buffColor = new Color(0.2f, 0.09019608f, 0.09019608f),
         isDebuff  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.AttackSpeedOnCrit, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffAttackSpeedOnCritIcon",
         buffColor = new Color(0.9098039f, 0.5058824f, 0.23921569f),
         canStack  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.BeetleJuice, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffBeetleJuiceIcon",
         buffColor = new Color(0.8392157f, 0.7882353f, 0.22745098f),
         canStack  = true,
         isDebuff  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.OnFire, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffOnFireIcon",
         buffColor = new Color(0.9137255f, 0.37254903f, 0.1882353f),
         canStack  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.MedkitHeal, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffMedkitHealIcon",
         buffColor = new Color(0.78431374f, 0.9372549f, 0.42745098f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Warbanner, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffWarbannerIcon",
         buffColor = new Color(0.8392157f, 0.7882353f, 0.22745098f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.EnrageAncientWisp, new BuffDef());
     BuffCatalog.RegisterBuff(BuffIndex.Cloak, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffCloakIcon",
         buffColor = new Color(0.3764706f, 0.84313726f, 0.8980392f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.CloakSpeed, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texMovespeedBuffIcon",
         buffColor = new Color(0.3764706f, 0.84313726f, 0.8980392f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.LightningShield, new BuffDef
     {
         iconPath = null
     });
     BuffCatalog.RegisterBuff(BuffIndex.FullCrit, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffFullCritIcon",
         buffColor = new Color(0.8392157f, 0.22745098f, 0.22745098f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.AffixPoison, new BuffDef
     {
         iconPath   = "Textures/BuffIcons/texBuffAffixPoisonIcon",
         eliteIndex = EliteIndex.Poison
     });
     BuffCatalog.RegisterBuff(BuffIndex.EngiShield, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffEngiShieldIcon",
         buffColor = new Color(0.3764706f, 0.84313726f, 0.8980392f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.BugWings, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texMovespeedBuffIcon",
         buffColor = new Color(0.3764706f, 0.84313726f, 0.8980392f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.TeslaField, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffTeslaIcon",
         buffColor = new Color(0.85882354f, 0.53333336f, 0.9843137f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.WarCryBuff, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texWarcryBuffIcon",
         buffColor = new Color(0.827451f, 0.19607843f, 0.09803922f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Slow30, new BuffDef
     {
         isDebuff = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.EngiTeamShield, new BuffDef());
     BuffCatalog.RegisterBuff(BuffIndex.Energized, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffWarHornIcon",
         buffColor = new Color(1f, 0.7882353f, 0.05490196f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.GoldEmpowered, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffAttackSpeedOnCritIcon",
         buffColor = new Color(1f, 0.7882353f, 0.05490196f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Immune, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffGenericShield",
         buffColor = new Color(1f, 0.7882353f, 0.05490196f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Cripple, new BuffDef
     {
         iconPath = "Textures/BuffIcons/texBuffCrippleIcon",
         isDebuff = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.Slow80, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffSlow50Icon",
         buffColor = new Color(0.64705884f, 0.87058824f, 0.92941177f),
         isDebuff  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.Slow60, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffSlow50Icon",
         buffColor = new Color(0.6784314f, 0.6117647f, 0.4117647f),
         isDebuff  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.AffixRed, new BuffDef
     {
         eliteIndex = EliteIndex.Fire,
         iconPath   = "Textures/BuffIcons/texBuffAffixRed"
     });
     BuffCatalog.RegisterBuff(BuffIndex.AffixBlue, new BuffDef
     {
         eliteIndex = EliteIndex.Lightning,
         iconPath   = "Textures/BuffIcons/texBuffAffixBlue"
     });
     BuffCatalog.RegisterBuff(BuffIndex.NoCooldowns, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texNoCooldownsBuffIcon",
         buffColor = new Color(0.73333335f, 0.54509807f, 0.9764706f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.AffixWhite, new BuffDef
     {
         eliteIndex = EliteIndex.Ice,
         iconPath   = "Textures/BuffIcons/texBuffAffixWhite"
     });
     BuffCatalog.RegisterBuff(BuffIndex.AffixHaunted, new BuffDef
     {
         eliteIndex = EliteIndex.Haunted,
         iconPath   = "Textures/BuffIcons/texBuffAffixHaunted"
     });
     BuffCatalog.RegisterBuff(BuffIndex.HiddenInvincibility, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffGenericShield",
         buffColor = new Color(0.54509807f, 0.80784315f, 0.8392157f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.TonicBuff, new BuffDef
     {
         iconPath = "Textures/BuffIcons/texBuffTonicIcon"
     });
     BuffCatalog.RegisterBuff(BuffIndex.HealingDisabled, new BuffDef
     {
         iconPath = "Textures/BuffIcons/texBuffHealingDisabledIcon",
         isDebuff = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.Weak, new BuffDef
     {
         iconPath = "Textures/BuffIcons/texBuffWeakIcon",
         isDebuff = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.Entangle, new BuffDef
     {
         iconPath = "Textures/BuffIcons/texBuffEntangleIcon",
         isDebuff = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.Pulverized, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffPulverizeIcon",
         buffColor = new Color(0.9607843f, 0.62352943f, 0.28627452f),
         isDebuff  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.PulverizeBuildup, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffPulverizeIcon",
         buffColor = new Color(0.61960787f, 0.54901963f, 0.40392157f),
         canStack  = true,
         isDebuff  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.LoaderOvercharged, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffTeslaIcon",
         buffColor = Color.yellow,
         canStack  = false
     });
     BuffCatalog.RegisterBuff(BuffIndex.LoaderPylonPowered, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffTeslaIcon",
         buffColor = Color.yellow,
         canStack  = false
     });
     BuffCatalog.RegisterBuff(BuffIndex.AffixHauntedRecipient, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffCloakIcon",
         buffColor = new Color(0.3764706f, 0.84313726f, 0.8980392f)
     });
     BuffCatalog.RegisterBuff(BuffIndex.Deafened, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffCloakIcon",
         buffColor = Color.gray
     });
     BuffCatalog.RegisterBuff(BuffIndex.Intangible, new BuffDef
     {
         iconPath  = null,
         buffColor = Color.gray
     });
     BuffCatalog.RegisterBuff(BuffIndex.ElephantArmorBoost, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffElephantArmorBoostIcon",
         buffColor = Color.white
     });
     BuffCatalog.RegisterBuff(BuffIndex.NullifyStack, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffNullifyStackIcon",
         buffColor = new Color(0.5176471f, 0.34117648f, 0.70980394f),
         isDebuff  = true,
         canStack  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.Nullified, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffNullifiedIcon",
         buffColor = new Color(0.79607844f, 0.4745098f, 0.8352941f),
         isDebuff  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.MeatRegenBoost, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffRegenBoostIcon",
         buffColor = new Color(0.78431374f, 0.9372549f, 0.42745098f),
         isDebuff  = false,
         canStack  = false
     });
     BuffCatalog.RegisterBuff(BuffIndex.NullSafeZone, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffNullifiedIcon",
         buffColor = new Color(0.79607844f, 0.4745098f, 0.8352941f),
         isDebuff  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.Bleeding, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffBleedingIcon",
         buffColor = new Color(0.67058825f, 0.16862746f, 0.16862746f, 1f),
         canStack  = true
     });
     BuffCatalog.RegisterBuff(BuffIndex.Poisoned, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texBuffBleedingIcon",
         buffColor = new Color(0.7882353f, 0.9490196f, 0.3019608f),
         canStack  = false
     });
     BuffCatalog.RegisterBuff(BuffIndex.WhipBoost, new BuffDef
     {
         iconPath  = "Textures/BuffIcons/texMovespeedBuffIcon",
         buffColor = new Color(0.3764706f, 0.84313726f, 0.8980392f)
     });
     for (BuffIndex buffIndex = BuffIndex.Slow50; buffIndex < BuffIndex.Count; buffIndex++)
     {
         if (BuffCatalog.buffDefs[(int)buffIndex] == null)
         {
             Debug.LogWarningFormat("Unregistered buff {0}!", new object[]
             {
                 buffIndex.ToString()
             });
         }
     }
     BuffCatalog.modHelper.CollectAndRegisterAdditionalEntries(ref BuffCatalog.buffDefs);
     BuffCatalog.buffCount        = BuffCatalog.buffDefs.Length;
     BuffCatalog.eliteBuffIndices = (from buffDef in BuffCatalog.buffDefs
                                     where buffDef.isElite
                                     select buffDef.buffIndex).ToArray <BuffIndex>();
 }