Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //empty list for adding items we want to loot
- List<Loot> _toLootList = new List<Loot>();
- //open the corpse and sleep for half a second
- Corpse.Use();
- Thread.Sleep(500);
- //start the stopwatch for searching
- Stopwatch _lootingWatch = new Stopwatch();
- _lootingWatch.Start();
- //searching for weapons, armor and jewery
- var _weaponList = Item.Find(typeof(BaseWeapon), Corpse.Serial.Value, false);
- var _armorList = Item.Find(typeof(BaseArmor), Corpse.Serial.Value, false);
- var _jewelryList = Item.Find(typeof(BaseJewel), Corpse.Serial.Value, false);
- ConsoleMessage("Searching took: " + _lootingWatch.Elapsed.ToString());
- //restart the stopwatch for filtering
- _lootingWatch.Restart();
- foreach (BaseWeapon _weapon in _weaponList)
- {
- if (_weapon.WeaponAttributes.SplinteringWeapon >= 20)
- _toLootList.Add(new Loot(_weapon.Serial, "Splintering weapon"));
- }
- ConsoleMessage("Filtering took: " + _lootingWatch.Elapsed.ToString());
- if (_toLootList.Count() > 0)
- LootItems(_toLootList);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement