From c650888eebb2e184e7f29fcd9c27edda0b43cbd6 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 9 Mar 2018 23:30:55 -0500 Subject: [PATCH] Core/Loot: Fixed getting to much loot sometimes. --- Source/Framework/Util/RandomHelper.cs | 2 +- Source/Game/Loot/Loot.cs | 1 - Source/Game/Loot/LootManager.cs | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/Framework/Util/RandomHelper.cs b/Source/Framework/Util/RandomHelper.cs index 6eb911c1b..2bf074a94 100644 --- a/Source/Framework/Util/RandomHelper.cs +++ b/Source/Framework/Util/RandomHelper.cs @@ -81,7 +81,7 @@ public class RandomHelper /// public static bool randChance(float i) { - return i > rand.Next(0, 100); + return i > randChance(); } public static double randChance() diff --git a/Source/Game/Loot/Loot.cs b/Source/Game/Loot/Loot.cs index 3e5af2736..eb2237e0f 100644 --- a/Source/Game/Loot/Loot.cs +++ b/Source/Game/Loot/Loot.cs @@ -213,7 +213,6 @@ namespace Game.Loots return false; LootTemplate tab = store.GetLootFor(lootId); - if (tab == null) { if (!noEmptyError) diff --git a/Source/Game/Loot/LootManager.cs b/Source/Game/Loot/LootManager.cs index fc8d22b17..d147c1903 100644 --- a/Source/Game/Loot/LootManager.cs +++ b/Source/Game/Loot/LootManager.cs @@ -764,7 +764,6 @@ namespace Game.Loots } } - public bool HasQuestDrop(LootTemplateMap store, byte groupId = 0) { if (groupId != 0) // Group reference @@ -836,7 +835,6 @@ namespace Game.Loots return false; } - public void Verify(LootStore lootstore, uint id) { // Checking group chances @@ -926,7 +924,6 @@ namespace Game.Loots return false;//not found or not reference } - LootStoreItemList Entries = new LootStoreItemList(); // not grouped only Dictionary Groups = new Dictionary(); // groups have own (optimised) processing, grouped entries go there