Skip to content
Snippets Groups Projects

Added tool tip to chest display items. Also cleaned up code and fixed bug

Merged Alexander Gatland requested to merge alexg into main
3 files
+ 44
73
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -38,13 +38,12 @@ namespace BigSock.Service {
}
public List<IItem> Get3Random() {
List<IItem> tempItemList = _itemList;
List<IItem> returnList = new List<IItem>();
var num = 0;
for(int i = 0; i < 3; i++) {
num = _rnd.Next(tempItemList.Count);
returnList.Add(tempItemList[num]);
tempItemList.Remove(tempItemList[num]);
while (returnList.Count < 3) {
IItem random = _itemList[_rnd.Next(_itemList.Count)];
if(!returnList.Contains(random)) {
returnList.Add(random);
}
}
return returnList;
}
Loading