Fix for hatelist random missing last member on hatelist.

This commit is contained in:
JJ 2013-03-14 20:42:02 -04:00
parent 9fdb6862f8
commit 0b0ee921a5
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50) 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 == == 03/09/2013 ==
Zaela_S: Stop mobs aggroing on dead players when using RespawnFromHover. 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. 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.

View File

@ -439,7 +439,7 @@ Mob *HateList::GetRandom()
int random = MakeRandomInt(0, count-1); int random = MakeRandomInt(0, count-1);
iterator.Reset(); iterator.Reset();
for (int i = 0; i < random-1; i++) for (int i = 0; i < random; i++)
iterator.Advance(); iterator.Advance();
return iterator.GetData()->ent; return iterator.GetData()->ent;
} }