From bb541eeb60a65f1af919f6b1093d9655f0b06dab Mon Sep 17 00:00:00 2001 From: Trevius Date: Tue, 1 Apr 2014 23:00:15 -0500 Subject: [PATCH] Fixed potential endless quest loop with EVENT_COMBAT and WipeHateList(). --- changelog.txt | 1 + zone/mob.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 4afe9c941..6931fac1d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ demonstar55: Implemented ability for a merchant to open and close shop. Lua quest functions: e.self:MerchantOpenShop() and e.self:MerchantCloseShop() GM Commands: #merchant_open_shop (short: #open_shop) and #merchant_close_shop (short: #close_shop) default to status 100, just in case you need to force the merchants status +Trevius: Fixed potential endless quest loop with EVENT_COMBAT and WipeHateList(). == 03/31/2014 == Uleat: Fix for unconscious skillups. diff --git a/zone/mob.cpp b/zone/mob.cpp index 3c1500d19..6267f5bcc 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -2450,13 +2450,18 @@ bool Mob::RemoveFromHateList(Mob* mob) return bFound; } + void Mob::WipeHateList() { if(IsEngaged()) { + hate_list.Wipe(); AI_Event_NoLongerEngaged(); } - hate_list.Wipe(); + else + { + hate_list.Wipe(); + } } uint32 Mob::RandomTimer(int min,int max) {