Ejemplo n.º 1
0
    // Token: 0x06001E05 RID: 7685 RVA: 0x000942F0 File Offset: 0x000924F0
    public static bool TryGetAmmoTypeFromItemClass(AmmoType t, out UberstrikeItemClass itemClass)
    {
        switch (t)
        {
        case AmmoType.Cannon:
            itemClass = UberstrikeItemClass.WeaponCannon;
            return(true);

        case AmmoType.Launcher:
            itemClass = UberstrikeItemClass.WeaponLauncher;
            return(true);

        case AmmoType.Machinegun:
            itemClass = UberstrikeItemClass.WeaponMachinegun;
            return(true);

        case AmmoType.Shotgun:
            itemClass = UberstrikeItemClass.WeaponShotgun;
            return(true);

        case AmmoType.Snipergun:
            itemClass = UberstrikeItemClass.WeaponSniperRifle;
            return(true);

        case AmmoType.Splattergun:
            itemClass = UberstrikeItemClass.WeaponSplattergun;
            return(true);
        }
        itemClass = UberstrikeItemClass.WeaponMachinegun;
        return(false);
    }
Ejemplo n.º 2
0
    // Token: 0x06001E04 RID: 7684 RVA: 0x00094298 File Offset: 0x00092498
    public static bool TryGetAmmoType(UberstrikeItemClass item, out AmmoType t)
    {
        switch (item)
        {
        case UberstrikeItemClass.WeaponMachinegun:
            t = AmmoType.Machinegun;
            return(true);

        case UberstrikeItemClass.WeaponShotgun:
            t = AmmoType.Shotgun;
            return(true);

        case UberstrikeItemClass.WeaponSniperRifle:
            t = AmmoType.Snipergun;
            return(true);

        case UberstrikeItemClass.WeaponCannon:
            t = AmmoType.Cannon;
            return(true);

        case UberstrikeItemClass.WeaponSplattergun:
            t = AmmoType.Splattergun;
            return(true);

        case UberstrikeItemClass.WeaponLauncher:
            t = AmmoType.Launcher;
            return(true);

        default:
            t = AmmoType.Handgun;
            return(false);
        }
    }
Ejemplo n.º 3
0
    // Token: 0x0600000F RID: 15 RVA: 0x00015C88 File Offset: 0x00013E88
    public void TriggerGearAnimation(UberstrikeItemClass itemClass)
    {
        this.ChangeWeaponType((UberstrikeItemClass)0);
        switch (itemClass)
        {
        case UberstrikeItemClass.GearBoots:
            this.gearTrigger = 5;
            break;

        case UberstrikeItemClass.GearHead:
        case UberstrikeItemClass.GearFace:
            this.gearTrigger = 1;
            break;

        case UberstrikeItemClass.GearUpperBody:
        case UberstrikeItemClass.GearHolo:
            this.gearTrigger = 3;
            break;

        case UberstrikeItemClass.GearLowerBody:
            this.gearTrigger = 4;
            break;

        case UberstrikeItemClass.GearGloves:
            this.gearTrigger = 2;
            break;
        }
    }
Ejemplo n.º 4
0
    // Token: 0x06001406 RID: 5126 RVA: 0x00073CEC File Offset: 0x00071EEC
    public GameObject GetDefaultGearItem(UberstrikeItemClass itemClass)
    {
        string defaultGearPrefabName = string.Empty;

        switch (itemClass)
        {
        case UberstrikeItemClass.GearBoots:
            defaultGearPrefabName = "LutzDefaultGearBoots";
            break;

        case UberstrikeItemClass.GearHead:
            defaultGearPrefabName = "LutzDefaultGearHead";
            break;

        case UberstrikeItemClass.GearFace:
            defaultGearPrefabName = "LutzDefaultGearFace";
            break;

        case UberstrikeItemClass.GearUpperBody:
            defaultGearPrefabName = "LutzDefaultGearUpperBody";
            break;

        case UberstrikeItemClass.GearLowerBody:
            defaultGearPrefabName = "LutzDefaultGearLowerBody";
            break;

        case UberstrikeItemClass.GearGloves:
            defaultGearPrefabName = "LutzDefaultGearGloves";
            break;
        }
        GearItem gearItem = UnityItemConfiguration.Instance.UnityItemsDefaultGears.Find((GearItem item) => item.name.Equals(defaultGearPrefabName));

        return((!(gearItem != null)) ? null : gearItem.gameObject);
    }
Ejemplo n.º 5
0
    // Token: 0x06000010 RID: 16 RVA: 0x00015D18 File Offset: 0x00013F18
    public void ChangeWeaponType(UberstrikeItemClass itemClass)
    {
        if (this.Animator != null)
        {
            this.weaponSwitch = true;
            switch (itemClass)
            {
            case UberstrikeItemClass.WeaponMelee:
                this.Animator.SetInteger(AvatarAnimationController.ControlFields.WeaponClass, 1);
                return;

            case UberstrikeItemClass.WeaponMachinegun:
            case UberstrikeItemClass.WeaponCannon:
            case UberstrikeItemClass.WeaponSplattergun:
            case UberstrikeItemClass.WeaponLauncher:
                this.Animator.SetInteger(AvatarAnimationController.ControlFields.WeaponClass, 3);
                return;

            case UberstrikeItemClass.WeaponShotgun:
                this.Animator.SetInteger(AvatarAnimationController.ControlFields.WeaponClass, 4);
                return;

            case UberstrikeItemClass.WeaponSniperRifle:
                this.Animator.SetInteger(AvatarAnimationController.ControlFields.WeaponClass, 2);
                return;
            }
            this.Animator.SetInteger(AvatarAnimationController.ControlFields.WeaponClass, 0);
        }
    }
Ejemplo n.º 6
0
    // Token: 0x06001DF8 RID: 7672 RVA: 0x00093FE4 File Offset: 0x000921E4
    public static void SetStartAmmoForType(UberstrikeItemClass weaponClass, int startAmmoCount)
    {
        if (PlayerDataManager.IsPlayerLoggedIn)
        {
            switch (weaponClass)
            {
            case UberstrikeItemClass.WeaponMachinegun:
                AmmoDepot._startAmmo[AmmoType.Machinegun] = startAmmoCount;
                break;

            case UberstrikeItemClass.WeaponShotgun:
                AmmoDepot._startAmmo[AmmoType.Shotgun] = startAmmoCount;
                break;

            case UberstrikeItemClass.WeaponSniperRifle:
                AmmoDepot._startAmmo[AmmoType.Snipergun] = startAmmoCount;
                break;

            case UberstrikeItemClass.WeaponCannon:
                AmmoDepot._startAmmo[AmmoType.Cannon] = startAmmoCount;
                break;

            case UberstrikeItemClass.WeaponSplattergun:
                AmmoDepot._startAmmo[AmmoType.Splattergun] = startAmmoCount;
                break;

            case UberstrikeItemClass.WeaponLauncher:
                AmmoDepot._startAmmo[AmmoType.Launcher] = startAmmoCount;
                break;
            }
        }
    }
Ejemplo n.º 7
0
    // Token: 0x06001542 RID: 5442 RVA: 0x00077EF0 File Offset: 0x000760F0
    public Texture2D GetDefaultIcon(UberstrikeItemClass itemClass)
    {
        switch (itemClass)
        {
        case UberstrikeItemClass.WeaponMelee:
            return(this.DefaultWeaponIcons.Find((Texture2D icon) => icon.name.Contains("Melee")));

        case UberstrikeItemClass.WeaponMachinegun:
            return(this.DefaultWeaponIcons.Find((Texture2D icon) => icon.name.Contains("Machine")));

        case UberstrikeItemClass.WeaponShotgun:
            return(this.DefaultWeaponIcons.Find((Texture2D icon) => icon.name.Contains("Shot")));

        case UberstrikeItemClass.WeaponSniperRifle:
            return(this.DefaultWeaponIcons.Find((Texture2D icon) => icon.name.Contains("Sniper")));

        case UberstrikeItemClass.WeaponCannon:
            return(this.DefaultWeaponIcons.Find((Texture2D icon) => icon.name.Contains("Cannon")));

        case UberstrikeItemClass.WeaponSplattergun:
            return(this.DefaultWeaponIcons.Find((Texture2D icon) => icon.name.Contains("Splatter")));

        case UberstrikeItemClass.WeaponLauncher:
            return(this.DefaultWeaponIcons.Find((Texture2D icon) => icon.name.Contains("Launcher")));
        }
        return(null);
    }
Ejemplo n.º 8
0
 // Token: 0x06001629 RID: 5673 RVA: 0x0007BB30 File Offset: 0x00079D30
 private void LoadWeapon(UberstrikeItemClass weaponClass, GameObject slot)
 {
     if (this.weapons.ContainsKey(weaponClass))
     {
         this.weapons[weaponClass].transform.parent        = slot.transform;
         this.weapons[weaponClass].transform.localPosition = Vector3.zero;
     }
 }
    // Token: 0x060016B1 RID: 5809 RVA: 0x0007DE30 File Offset: 0x0007C030
    private void OnPlayerKilled(GameActorInfo shooter, GameActorInfo target, UberstrikeItemClass weapon, BodyPart bodyPart)
    {
        if (target == null)
        {
            return;
        }
        if (shooter != null && shooter.Cmid == PlayerDataManager.Cmid && target.Cmid != PlayerDataManager.Cmid)
        {
            bool flag = Time.time < this.lastKillTime + 10f;
            this.killCounter  = ((!flag) ? 1 : (this.killCounter + 1));
            this.lastKillTime = Time.time;
            if (weapon == UberstrikeItemClass.WeaponMelee)
            {
                AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.Smackdown, 0UL, 1f, 1f);
            }
            else if (bodyPart == BodyPart.Head)
            {
                AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.HeadShot, 0UL, 1f, 1f);
            }
            else if (bodyPart == BodyPart.Nuts)
            {
                AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.GotNutshotKill, 0UL, 1f, 1f);

                AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.NutShot, 0UL, 1f, 1f);
            }
            string textBig = string.Empty;
            if (this.killCounter == 2)
            {
                textBig = "DOUBLE KILL";
                AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.DoubleKill, 1000UL, 1f, 1f);
            }
            else if (this.killCounter == 3)
            {
                textBig = "TRIPLE KILL";
                AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.TripleKill, 1000UL, 1f, 1f);
            }
            else if (this.killCounter == 4)
            {
                textBig = "QUAD KILL";
                AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.QuadKill, 1000UL, 1f, 1f);
            }
            else if (this.killCounter == 5)
            {
                textBig = "MEGA KILL";
                AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.MegaKill, 1000UL, 1f, 1f);
            }
            else if (this.killCounter > 5)
            {
                textBig = "UBER KILL";
                if (this.killCounter == 6)
                {
                    AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.UberKill, 1000UL, 1f, 1f);
                }
            }
            this.Show(textBig, "You killed " + target.PlayerName, 1f);
        }
    }
Ejemplo n.º 10
0
    // Token: 0x06001E09 RID: 7689 RVA: 0x000943EC File Offset: 0x000925EC
    public static void RemoveExtraAmmoOfType(UberstrikeItemClass t)
    {
        AmmoType key;

        if (AmmoDepot.TryGetAmmoType(t, out key) && AmmoDepot._currentAmmo[key] > AmmoDepot._maxAmmo[key])
        {
            AmmoDepot._currentAmmo[key] = AmmoDepot._maxAmmo[key];
        }
    }
Ejemplo n.º 11
0
    // Token: 0x06001DFA RID: 7674 RVA: 0x000940CC File Offset: 0x000922CC
    public static void AddAmmoOfClass(UberstrikeItemClass c)
    {
        AmmoType t;

        if (AmmoDepot.TryGetAmmoType(c, out t))
        {
            AmmoDepot.AddDefaultAmmoOfType(t);
        }
    }
Ejemplo n.º 12
0
    // Token: 0x06001E02 RID: 7682 RVA: 0x0009424C File Offset: 0x0009244C
    public static int AmmoOfClass(UberstrikeItemClass t)
    {
        AmmoType t2;

        if (AmmoDepot.TryGetAmmoType(t, out t2))
        {
            return(AmmoDepot.AmmoOfType(t2));
        }
        return(0);
    }
Ejemplo n.º 13
0
    // Token: 0x06001E03 RID: 7683 RVA: 0x00094270 File Offset: 0x00092470
    public static int MaxAmmoOfClass(UberstrikeItemClass t)
    {
        AmmoType key;

        if (AmmoDepot.TryGetAmmoType(t, out key))
        {
            return(AmmoDepot._maxAmmo[key]);
        }
        return(0);
    }
Ejemplo n.º 14
0
 // Token: 0x06001885 RID: 6277 RVA: 0x00083994 File Offset: 0x00081B94
 public global::LoadoutSlotType GetItemClassSlotType(UberstrikeItemClass itemClass)
 {
     foreach (KeyValuePair <global::LoadoutSlotType, IUnityItem> keyValuePair in this._items)
     {
         if (keyValuePair.Value.View.ItemClass == itemClass)
         {
             return(keyValuePair.Key);
         }
     }
     return(global::LoadoutSlotType.None);
 }
Ejemplo n.º 15
0
    // Token: 0x06001404 RID: 5124 RVA: 0x00073C80 File Offset: 0x00071E80
    public bool TryGetDefaultItem(UberstrikeItemClass itemClass, out IUnityItem item)
    {
        string prefabName;

        if (this._defaultGearPrefabNames.TryGetValue(itemClass, out prefabName) || this._defaultWeaponPrefabNames.TryGetValue(itemClass, out prefabName))
        {
            item = this._shopItemsById.Values.FirstOrDefault((IUnityItem i) => i.View.PrefabName == prefabName);
            return(item != null);
        }
        item = null;
        return(false);
    }
Ejemplo n.º 16
0
 // Token: 0x06001F81 RID: 8065 RVA: 0x00097344 File Offset: 0x00095544
 public bool HasWeaponOfClass(UberstrikeItemClass itemClass)
 {
     for (int i = 0; i < 4; i++)
     {
         WeaponSlot weaponSlot = this._weapons[i];
         if (weaponSlot != null && weaponSlot.HasWeapon && weaponSlot.View.ItemClass == itemClass)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 17
0
 // Token: 0x0600153E RID: 5438 RVA: 0x00077DBC File Offset: 0x00075FBC
 public GameObject GetDefaultItem(UberstrikeItemClass itemClass)
 {
     if (this.UnityItemsDefaultGears.Exists((GearItem i) => i.TestItemClass == itemClass))
     {
         return(this.UnityItemsDefaultGears.Find((GearItem i) => i.TestItemClass == itemClass).gameObject);
     }
     if (this.UnityItemsDefaultWeapons.Exists((WeaponItem i) => i.TestItemClass == itemClass))
     {
         return(this.UnityItemsDefaultWeapons.Find((WeaponItem i) => i.TestItemClass == itemClass).gameObject);
     }
     Debug.LogError("Couldn't find default item with class: " + itemClass);
     return(null);
 }
Ejemplo n.º 18
0
    // Token: 0x060013EE RID: 5102 RVA: 0x00073498 File Offset: 0x00071698
    public int GetGearItem(int itemID, UberstrikeItemClass itemClass)
    {
        InventoryItem inventoryItem;

        if (this._inventoryItems.TryGetValue(itemID, out inventoryItem) && inventoryItem != null && inventoryItem.Item.View.ItemType == UberstrikeItemType.Gear)
        {
            return(inventoryItem.Item.View.ID);
        }
        IUnityItem unityItem;

        if (Singleton <ItemManager> .Instance.TryGetDefaultItem(itemClass, out unityItem))
        {
            return(unityItem.View.ID);
        }
        return(0);
    }
Ejemplo n.º 19
0
    // Token: 0x06001A8E RID: 6798 RVA: 0x0008A94C File Offset: 0x00088B4C
    public void PlayerKilled(int shooter, int target, UberstrikeItemClass weaponClass, BodyPart bodyPart, Vector3 direction)
    {
        CharacterConfig characterConfig;

        if (this.Avatars.TryGetValue(target, out characterConfig) && !characterConfig.IsDead)
        {
            this.Avatars[target].SetDead(direction, BodyPart.Body, target, weaponClass);
            GameActorInfo valueOrDefault  = this.Players.GetValueOrDefault(shooter, null);
            GameActorInfo valueOrDefault2 = this.Players.GetValueOrDefault(target, null);
            if (valueOrDefault2 == null)
            {
                Debug.LogError("Kill target is null " + target);
            }
            GameData.Instance.OnPlayerKilled.Fire(valueOrDefault, valueOrDefault2, weaponClass, bodyPart);
            if (target == PlayerDataManager.Cmid)
            {
                global::EventHandler.Global.Fire(new GameEvents.PlayerDied());
            }
        }
    }
Ejemplo n.º 20
0
    // Token: 0x060013E5 RID: 5093 RVA: 0x00072DF8 File Offset: 0x00070FF8
    public static global::LoadoutSlotType FindBestSlotToEquipWeapon(IUnityItem weapon)
    {
        UberstrikeItemClass itemClass = weapon.View.ItemClass;

        if (itemClass == UberstrikeItemClass.WeaponMelee)
        {
            return(global::LoadoutSlotType.WeaponMelee);
        }
        global::LoadoutSlotType itemClassSlotType = Singleton <LoadoutManager> .Instance.Loadout.GetItemClassSlotType(itemClass);

        if (itemClassSlotType != global::LoadoutSlotType.None)
        {
            return(itemClassSlotType);
        }
        global::LoadoutSlotType firstEmptyWeaponSlot = Singleton <LoadoutManager> .Instance.Loadout.GetFirstEmptyWeaponSlot();

        if (firstEmptyWeaponSlot != global::LoadoutSlotType.None)
        {
            return(firstEmptyWeaponSlot);
        }
        return(global::LoadoutSlotType.WeaponPrimary);
    }
Ejemplo n.º 21
0
    // Token: 0x06001407 RID: 5127 RVA: 0x00073DC8 File Offset: 0x00071FC8
    public GameObject GetDefaultWeaponItem(UberstrikeItemClass itemClass)
    {
        string defaultWeaponPrefabName = string.Empty;

        switch (itemClass)
        {
        case UberstrikeItemClass.WeaponMelee:
            defaultWeaponPrefabName = "TheSplatbat";
            break;

        case UberstrikeItemClass.WeaponMachinegun:
            defaultWeaponPrefabName = "MachineGun";
            break;

        case UberstrikeItemClass.WeaponShotgun:
            defaultWeaponPrefabName = "ShotGun";
            break;

        case UberstrikeItemClass.WeaponSniperRifle:
            defaultWeaponPrefabName = "SniperRifle";
            break;

        case UberstrikeItemClass.WeaponCannon:
            defaultWeaponPrefabName = "Cannon";
            break;

        case UberstrikeItemClass.WeaponSplattergun:
            defaultWeaponPrefabName = "SplatterGun";
            break;

        case UberstrikeItemClass.WeaponLauncher:
            defaultWeaponPrefabName = "Launcher";
            break;
        }
        WeaponItem weaponItem = UnityItemConfiguration.Instance.UnityItemsDefaultWeapons.Find((WeaponItem item) => item.name.Equals(defaultWeaponPrefabName));

        return((!(weaponItem != null)) ? null : weaponItem.gameObject);
    }
    // Token: 0x060012F4 RID: 4852 RVA: 0x0006F8DC File Offset: 0x0006DADC
    public static void ConfigureDefaultGearAndWeapons()
    {
        Singleton <ItemManager> .Instance.AddDefaultItem(new UberStrikeItemGearView
        {
            ID         = 1084,
            PrefabName = "LutzDefaultGearHead"
        });

        Singleton <ItemManager> .Instance.AddDefaultItem(new UberStrikeItemGearView
        {
            ID         = 1086,
            PrefabName = "LutzDefaultGearGloves"
        });

        Singleton <ItemManager> .Instance.AddDefaultItem(new UberStrikeItemGearView
        {
            ID         = 1087,
            PrefabName = "LutzDefaultGearUpperBody"
        });

        Singleton <ItemManager> .Instance.AddDefaultItem(new UberStrikeItemGearView
        {
            ID         = 1088,
            PrefabName = "LutzDefaultGearLowerBody"
        });

        Singleton <ItemManager> .Instance.AddDefaultItem(new UberStrikeItemGearView
        {
            ID         = 1089,
            PrefabName = "LutzDefaultGearBoots"
        });

        for (UberstrikeItemClass uberstrikeItemClass = UberstrikeItemClass.WeaponMelee; uberstrikeItemClass <= UberstrikeItemClass.WeaponLauncher; uberstrikeItemClass++)
        {
            Singleton <ItemManager> .Instance.AddDefaultItem(DefaultItemUtil.GetDefaultWeaponView(uberstrikeItemClass));
        }
    }
Ejemplo n.º 23
0
    // Token: 0x060010C2 RID: 4290 RVA: 0x00067124 File Offset: 0x00065324
    public static UberstrikeItemClass ItemClassFromSlot(global::LoadoutSlotType slot)
    {
        UberstrikeItemClass result = (UberstrikeItemClass)0;

        switch (slot)
        {
        case global::LoadoutSlotType.GearHead:
            result = UberstrikeItemClass.GearHead;
            break;

        case global::LoadoutSlotType.GearFace:
            result = UberstrikeItemClass.GearFace;
            break;

        case global::LoadoutSlotType.GearGloves:
            result = UberstrikeItemClass.GearGloves;
            break;

        case global::LoadoutSlotType.GearUpperBody:
            result = UberstrikeItemClass.GearUpperBody;
            break;

        case global::LoadoutSlotType.GearLowerBody:
            result = UberstrikeItemClass.GearLowerBody;
            break;

        case global::LoadoutSlotType.GearBoots:
            result = UberstrikeItemClass.GearBoots;
            break;

        case global::LoadoutSlotType.GearHolo:
            result = UberstrikeItemClass.GearHolo;
            break;
        }
        return(result);
    }
Ejemplo n.º 24
0
    // Token: 0x060010C3 RID: 4291 RVA: 0x00067198 File Offset: 0x00065398
    public static global::LoadoutSlotType SlotFromItemClass(UberstrikeItemClass itemClass)
    {
        global::LoadoutSlotType result = global::LoadoutSlotType.None;

        switch (itemClass)
        {
        case UberstrikeItemClass.GearBoots:
            result = global::LoadoutSlotType.GearBoots;
            break;

        case UberstrikeItemClass.GearHead:
            result = global::LoadoutSlotType.GearHead;
            break;

        case UberstrikeItemClass.GearFace:
            result = global::LoadoutSlotType.GearFace;
            break;

        case UberstrikeItemClass.GearUpperBody:
            result = global::LoadoutSlotType.GearUpperBody;
            break;

        case UberstrikeItemClass.GearLowerBody:
            result = global::LoadoutSlotType.GearLowerBody;
            break;

        case UberstrikeItemClass.GearGloves:
            result = global::LoadoutSlotType.GearGloves;
            break;

        case UberstrikeItemClass.GearHolo:
            result = global::LoadoutSlotType.GearHolo;
            break;
        }
        return(result);
    }
Ejemplo n.º 25
0
 // Token: 0x06000867 RID: 2151 RVA: 0x000073A0 File Offset: 0x000055A0
 public RefreshCurrentItemList(UberstrikeItemClass itemClass, UberstrikeItemType itemType)
 {
     this.UseCurrentSelection = false;
     this.ItemClass           = itemClass;
     this.ItemType            = itemType;
 }
Ejemplo n.º 26
0
    // Token: 0x0600186A RID: 6250 RVA: 0x000831A8 File Offset: 0x000813A8
    internal void SetDead(Vector3 direction, BodyPart bodyPart = BodyPart.Body, int target = 0, UberstrikeItemClass itemClass = UberstrikeItemClass.WeaponMachinegun)
    {
        this.IsDead = true;
        if (this._transform)
        {
            this._transform.position = this.State.Position;
        }
        Singleton <QuickItemSfxController> .Instance.DestroytSfxFromPlayer(this.State.Player.PlayerId);

        if (this.Avatar.Decorator)
        {
            this.Avatar.Decorator.HudInformation.Hide();
            this.Avatar.Decorator.PlayDieSound();
        }
        if (!this._isLocalPlayer)
        {
            this.Avatar.HideWeapons();
        }
        DamageInfo damageInfo = new DamageInfo(direction, bodyPart);

        damageInfo.WeaponClass = itemClass;
        if (PlayerDataManager.Cmid == target && (itemClass == UberstrikeItemClass.WeaponCannon || itemClass == UberstrikeItemClass.WeaponLauncher))
        {
            damageInfo.Force  = direction.normalized;
            damageInfo.Damage = ((this._lastShotInfo == null) ? Convert.ToInt16(100) : this._lastShotInfo.Damage);
        }
        this.Avatar.SpawnRagdoll(damageInfo);
    }
Ejemplo n.º 27
0
    // Token: 0x06001E07 RID: 7687 RVA: 0x000943A8 File Offset: 0x000925A8
    public static bool UseAmmoOfClass(UberstrikeItemClass t, int count = 1)
    {
        AmmoType t2;

        return(AmmoDepot.TryGetAmmoType(t, out t2) && AmmoDepot.UseAmmoOfType(t2, count));
    }
Ejemplo n.º 28
0
    // Token: 0x06000926 RID: 2342 RVA: 0x0003A3CC File Offset: 0x000385CC
    public static Texture2D GetIconForItemClass(UberstrikeItemClass itemClass)
    {
        switch (itemClass)
        {
        case UberstrikeItemClass.WeaponMelee:
            return(ShopIcons.StatsMostWeaponSplatsMelee);

        case UberstrikeItemClass.WeaponMachinegun:
            return(ShopIcons.StatsMostWeaponSplatsMachinegun);

        case UberstrikeItemClass.WeaponShotgun:
            return(ShopIcons.StatsMostWeaponSplatsShotgun);

        case UberstrikeItemClass.WeaponSniperRifle:
            return(ShopIcons.StatsMostWeaponSplatsSniperRifle);

        case UberstrikeItemClass.WeaponCannon:
            return(ShopIcons.StatsMostWeaponSplatsCannon);

        case UberstrikeItemClass.WeaponSplattergun:
            return(ShopIcons.StatsMostWeaponSplatsSplattergun);

        case UberstrikeItemClass.WeaponLauncher:
            return(ShopIcons.StatsMostWeaponSplatsLauncher);

        case UberstrikeItemClass.GearBoots:
            return(ShopIcons.Boots);

        case UberstrikeItemClass.GearHead:
            return(ShopIcons.Head);

        case UberstrikeItemClass.GearFace:
            return(ShopIcons.Face);

        case UberstrikeItemClass.GearUpperBody:
            return(ShopIcons.Upperbody);

        case UberstrikeItemClass.GearLowerBody:
            return(ShopIcons.Lowerbody);

        case UberstrikeItemClass.GearGloves:
            return(ShopIcons.Gloves);

        case UberstrikeItemClass.QuickUseGeneral:
            return(ShopIcons.QuickItems);

        case UberstrikeItemClass.QuickUseGrenade:
            return(ShopIcons.QuickItems);

        case UberstrikeItemClass.QuickUseMine:
            return(ShopIcons.QuickItems);

        case UberstrikeItemClass.FunctionalGeneral:
            return(ShopIcons.FunctionalItems);

        case UberstrikeItemClass.SpecialGeneral:
            return(ShopIcons.FunctionalItems);

        case UberstrikeItemClass.GearHolo:
            return(ShopIcons.Holos);
        }
        return(null);
    }
 // Token: 0x06000E29 RID: 3625 RVA: 0x0000A53B File Offset: 0x0000873B
 public ItemByClassFilter(UberstrikeItemType itemType, UberstrikeItemClass itemClass)
 {
     this._itemType  = itemType;
     this._itemClass = itemClass;
 }
Ejemplo n.º 30
0
    // Token: 0x06001E00 RID: 7680 RVA: 0x0009421C File Offset: 0x0009241C
    public static bool HasAmmoOfClass(UberstrikeItemClass t)
    {
        AmmoType t2;

        return(t == UberstrikeItemClass.WeaponMelee || (AmmoDepot.TryGetAmmoType(t, out t2) && AmmoDepot.HasAmmoOfType(t2)));
    }