mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-10 06:02:25 +00:00
Prevented an endless loop crash related to EVENT_TASK_STAGE_COMPLETE.
This commit is contained in:
parent
955f164efb
commit
174cb1876a
@ -5,8 +5,8 @@ Uleat: Fix for unconscious skillups.
|
|||||||
Uleat: Fix for crash issue with nullptr reference in recent Client::SummonItem() work.
|
Uleat: Fix for crash issue with nullptr reference in recent Client::SummonItem() work.
|
||||||
Uleat: Added rule for GM Status check code in Client::SummonItem().
|
Uleat: Added rule for GM Status check code in Client::SummonItem().
|
||||||
Note: Rule default is set to 250..but, implementation is on hold until load item code handles the database 'minstatus' field.
|
Note: Rule default is set to 250..but, implementation is on hold until load item code handles the database 'minstatus' field.
|
||||||
|
|
||||||
Uleat: Added RuleB(Bots, BotLevelsWithOwner). Bots will auto-update as their owner levels/de-levels. Appearance packets are sent to show the 'leveling effect' as well as updating client entities.
|
Uleat: Added RuleB(Bots, BotLevelsWithOwner). Bots will auto-update as their owner levels/de-levels. Appearance packets are sent to show the 'leveling effect' as well as updating client entities.
|
||||||
|
Trevius: Prevented an endless loop crash related to EVENT_TASK_STAGE_COMPLETE.
|
||||||
|
|
||||||
Optional Bot SQL: utils/sql/git/bot/optional/2014_03_31_BotLevelsWithOwnerRule.sql
|
Optional Bot SQL: utils/sql/git/bot/optional/2014_03_31_BotLevelsWithOwnerRule.sql
|
||||||
Note: This sql is required to activate the optional behavior.
|
Note: This sql is required to activate the optional behavior.
|
||||||
|
|||||||
@ -1972,14 +1972,6 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T
|
|||||||
Task->Activity[ActivityID].GoalCount,
|
Task->Activity[ActivityID].GoalCount,
|
||||||
ActivityID);
|
ActivityID);
|
||||||
|
|
||||||
if(Task->Activity[ActivityID].GoalMethod != METHODQUEST)
|
|
||||||
{
|
|
||||||
char buf[24];
|
|
||||||
snprintf(buf, 23, "%d %d", ActiveTasks[TaskIndex].TaskID, ActiveTasks[TaskIndex].Activity[ActivityID].ActivityID);
|
|
||||||
buf[23] = '\0';
|
|
||||||
parse->EventPlayer(EVENT_TASK_STAGE_COMPLETE, c, buf, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Flag the activity as complete
|
// Flag the activity as complete
|
||||||
ActiveTasks[TaskIndex].Activity[ActivityID].State = ActivityCompleted;
|
ActiveTasks[TaskIndex].Activity[ActivityID].State = ActivityCompleted;
|
||||||
// Unlock subsequent activities for this task
|
// Unlock subsequent activities for this task
|
||||||
@ -1991,6 +1983,15 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation* Task, int T
|
|||||||
taskmanager->SendSingleActiveTaskToClient(c, TaskIndex, TaskComplete, false);
|
taskmanager->SendSingleActiveTaskToClient(c, TaskIndex, TaskComplete, false);
|
||||||
// Inform the client the task has been updated, both by a chat message
|
// Inform the client the task has been updated, both by a chat message
|
||||||
c->Message(0, "Your task '%s' has been updated.", Task->Title);
|
c->Message(0, "Your task '%s' has been updated.", Task->Title);
|
||||||
|
|
||||||
|
if(Task->Activity[ActivityID].GoalMethod != METHODQUEST)
|
||||||
|
{
|
||||||
|
char buf[24];
|
||||||
|
snprintf(buf, 23, "%d %d", ActiveTasks[TaskIndex].TaskID, ActiveTasks[TaskIndex].Activity[ActivityID].ActivityID);
|
||||||
|
buf[23] = '\0';
|
||||||
|
parse->EventPlayer(EVENT_TASK_STAGE_COMPLETE, c, buf, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// If this task is now complete, the Completed tasks will have been
|
// If this task is now complete, the Completed tasks will have been
|
||||||
// updated in UnlockActivities. Send the completed task list to the
|
// updated in UnlockActivities. Send the completed task list to the
|
||||||
// client. This is the same sequence the packets are sent on live.
|
// client. This is the same sequence the packets are sent on live.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user