Exemple #1
0
        private static void LoadArmorInfo()
        {
            foreach (var item in armorSheet)
            {
                if (item._code == null)
                {
                    continue;
                }

                item.code           = item._code;
                item.cost           = item._cost;
                item.gambleCost     = item._gambleCost;
                item.flippyFile     = item._flippyFile;
                item.invFile        = item._invFile;
                item.invWidth       = item._invWidth;
                item.invHeight      = item._invHeight;
                item.level          = item._level;
                item.levelReq       = item._levelReq;
                item.armor          = item;
                item.name           = Translation.Find(item.nameStr);
                item.type1Code      = item._type1;
                item.type2Code      = item._type2;
                item.component      = item._component;
                item.alternateGfx   = item._alternateGfx;
                item.dropSound      = SoundInfo.Find(item._dropSound);
                item.dropSoundFrame = item._dropSoundFrame;
                item.useSound       = SoundInfo.Find(item._useSound);
                item.alwaysUnique   = item._alwaysUnique;
                item.normCode       = item._normCode;
                item.uberCode       = item._uberCode;
                item.ultraCode      = item._ultraCode;

                if (!byCode.ContainsKey(item.code))
                {
                    byCode.Add(item.code, item);
                }
            }
        }
Exemple #2
0
        public static void Load()
        {
            sheet = Datasheet.Load <SoundInfo>();
            for (int i = 0; i < sheet.Count; ++i)
            {
                var sound = sheet[i];
                if (sound.sound == null)
                {
                    continue;
                }

                GatherVariations(sound, i);
                sound.volume           = sound._volume / 255f;
                sound.fadeInDuration   = sound._fadeIn / 25f;
                sound.fadeOutDuration  = sound._fadeOut / 25f;
                sound.compoundDuration = sound.compound / 25f;
                map.Add(sound.sound, sound);
            }

            itemPickup        = Find("item_pickup");
            itemFlippy        = Find("item_flippy");
            cursorButtonClick = Find("cursor_button_click");
        }
Exemple #3
0
 public static SoundInfo GetHitSound(int hitClass, Character hitCharacter)
 {
     if (hitClass == 10 && hitCharacter != null)
     {
         return(SoundInfo.Find("impact_arrow_1"));
     }
     if (hitClass == 32)
     {
         return(SoundInfo.Find("impact_fire_1"));
     }
     if (hitClass == 48)
     {
         return(SoundInfo.Find("impact_cold_1"));
     }
     if (hitClass == 64)
     {
         return(SoundInfo.Find("impact_lightning_1"));
     }
     if (hitClass == 80)
     {
         return(SoundInfo.Find("impact_poison_1"));
     }
     if (hitClass == 96)
     {
         return(SoundInfo.Find("impact_stun_1"));
     }
     if (hitClass == 112)
     {
         return(SoundInfo.Find("impact_bash"));
     }
     if (hitClass == 176)
     {
         return(SoundInfo.Find("impact_goo_1"));
     }
     return(null);
 }
Exemple #4
0
        static WeaponHitClass()
        {
            map.Add("hth", new WeaponHitClass()
            {
                sound    = SoundInfo.Find("weapon_punch_1"),
                hitSound = SoundInfo.Find("impact_punch_1")
            });
            map.Add("1hss", new WeaponHitClass()
            {
                sound    = SoundInfo.Find("weapon_1hs_small_1"),
                hitSound = SoundInfo.Find("impact_blade_swing_1")
            });
            map.Add("1hsl", new WeaponHitClass()
            {
                sound    = SoundInfo.Find("weapon_1hs_large_1"),
                hitSound = SoundInfo.Find("impact_blade_swing_1")
            });
            map.Add("2hss", new WeaponHitClass()
            {
                sound    = SoundInfo.Find("weapon_2hs_small_1"),
                hitSound = SoundInfo.Find("impact_blade_swing_1")
            });
            map.Add("2hsl", new WeaponHitClass()
            {
                sound    = SoundInfo.Find("weapon_2hs_large_1"),
                hitSound = SoundInfo.Find("impact_blade_swing_1")
            });
            map.Add("1ht", new WeaponHitClass()
            {
                sound    = SoundInfo.Find("weapon_1ht_1"),
                hitSound = SoundInfo.Find("impact_blade_thrust_1")
            });
            map.Add("2ht", new WeaponHitClass()
            {
                sound    = SoundInfo.Find("weapon_2ht_1"),
                hitSound = SoundInfo.Find("impact_blade_thrust_1")
            });
            map.Add("club", new WeaponHitClass()
            {
                sound    = SoundInfo.Find("weapon_1ht_1"),
                hitSound = SoundInfo.Find("impact_blunt_1")
            });
            map.Add("staf", new WeaponHitClass()
            {
                sound    = SoundInfo.Find("weapon_staff_1"),
                hitSound = SoundInfo.Find("impact_blunt_1")
            });
            map.Add("bow", new WeaponHitClass()
            {
                sound    = null,
                hitSound = null
            });
            map.Add("xbow", new WeaponHitClass()
            {
                sound    = null,
                hitSound = null
            });
            map.Add("claw", new WeaponHitClass()
            {
                sound    = SoundInfo.Find("weapon_punch_1"),
                hitSound = SoundInfo.Find("impact_claw_1")
            });

            foreach (var kv in map)
            {
                kv.Value.code = kv.Key;
            }

            HandToHand = map["hth"];
        }