From 0b0ee921a53b7bf72bc558d5663661b138d1ad53 Mon Sep 17 00:00:00 2001 From: JJ Date: Thu, 14 Mar 2013 20:42:02 -0400 Subject: [PATCH] Fix for hatelist random missing last member on hatelist. --- changelog.txt | 3 +++ zone/hate_list.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 16a414cdb..7d5d30c96 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 03/14/2013 == +JJ: (NatedogEZ) Fix for hate list random never selecting last member of hate list. + == 03/09/2013 == Zaela_S: Stop mobs aggroing on dead players when using RespawnFromHover. Derision: Removed _log message from zone/CatchSignal on Linux as it can deadlock on shutdown if another signal is received while the _log call is being processed. diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index 6ea0e4ae5..28ac0bccb 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -439,7 +439,7 @@ Mob *HateList::GetRandom() int random = MakeRandomInt(0, count-1); iterator.Reset(); - for (int i = 0; i < random-1; i++) + for (int i = 0; i < random; i++) iterator.Advance(); return iterator.GetData()->ent; }