mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 07:21:48 +00:00
[Bug Fix] Fix an issue where EVENT_TIMER timers would not be cleaned up after zone (#3018)
* [Bug Fix] Dangling client timers fixed. * Remove all timers from mob in destructor instead of in QuestMgr::Process
This commit is contained in:
parent
a97a9a0d1c
commit
748602b04e
@ -519,6 +519,8 @@ Mob::Mob(
|
|||||||
|
|
||||||
Mob::~Mob()
|
Mob::~Mob()
|
||||||
{
|
{
|
||||||
|
quest_manager.stopalltimers(this);
|
||||||
|
|
||||||
mMovementManager->RemoveMob(this);
|
mMovementManager->RemoveMob(this);
|
||||||
|
|
||||||
AI_Stop();
|
AI_Stop();
|
||||||
|
|||||||
@ -88,7 +88,7 @@ void QuestManager::Process() {
|
|||||||
end = QTimerList.end();
|
end = QTimerList.end();
|
||||||
while (cur != end) {
|
while (cur != end) {
|
||||||
if (cur->Timer_.Enabled() && cur->Timer_.Check()) {
|
if (cur->Timer_.Enabled() && cur->Timer_.Check()) {
|
||||||
if (cur->mob && entity_list.IsMobInZone(cur->mob)) {
|
if (cur->mob) {
|
||||||
if (cur->mob->IsNPC()) {
|
if (cur->mob->IsNPC()) {
|
||||||
if (parse->HasQuestSub(cur->mob->GetNPCTypeID(), EVENT_TIMER)) {
|
if (parse->HasQuestSub(cur->mob->GetNPCTypeID(), EVENT_TIMER)) {
|
||||||
parse->EventNPC(EVENT_TIMER, cur->mob->CastToNPC(), nullptr, cur->name, 0);
|
parse->EventNPC(EVENT_TIMER, cur->mob->CastToNPC(), nullptr, cur->name, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user