mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
[Tasks] Support Raw NPC Names in Task Goal List (#2333)
This commit is contained in:
parent
2ccf692167
commit
6e2d11a283
@ -2457,7 +2457,7 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
|||||||
give_exp_client->GetCleanName(),
|
give_exp_client->GetCleanName(),
|
||||||
GetNPCTypeID()
|
GetNPCTypeID()
|
||||||
);
|
);
|
||||||
task_manager->HandleUpdateTasksOnKill(give_exp_client, GetNPCTypeID(), GetCleanName());
|
task_manager->HandleUpdateTasksOnKill(give_exp_client, GetNPCTypeID(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kr) {
|
if (kr) {
|
||||||
|
|||||||
@ -1831,7 +1831,7 @@ void TaskManager::SyncClientSharedTaskStateToLocal(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskManager::HandleUpdateTasksOnKill(Client *client, uint32 npc_type_id, std::string npc_name)
|
void TaskManager::HandleUpdateTasksOnKill(Client *client, uint32 npc_type_id, NPC* npc)
|
||||||
{
|
{
|
||||||
for (auto &c: client->GetPartyMembers()) {
|
for (auto &c: client->GetPartyMembers()) {
|
||||||
if (!c->ClientDataLoaded() || !c->HasTaskState()) {
|
if (!c->ClientDataLoaded() || !c->HasTaskState()) {
|
||||||
@ -1897,7 +1897,10 @@ void TaskManager::HandleUpdateTasksOnKill(Client *client, uint32 npc_type_id, st
|
|||||||
std::to_string(npc_type_id)
|
std::to_string(npc_type_id)
|
||||||
) && !TaskGoalListManager::IsInMatchListPartial(
|
) && !TaskGoalListManager::IsInMatchListPartial(
|
||||||
activity_info->goal_match_list,
|
activity_info->goal_match_list,
|
||||||
npc_name
|
npc->GetCleanName()
|
||||||
|
) && !TaskGoalListManager::IsInMatchListPartial(
|
||||||
|
activity_info->goal_match_list,
|
||||||
|
npc->GetName()
|
||||||
)) {
|
)) {
|
||||||
LogTasksDetail("[HandleUpdateTasksOnKill] Matched list goal");
|
LogTasksDetail("[HandleUpdateTasksOnKill] Matched list goal");
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@ -73,7 +73,7 @@ public:
|
|||||||
// shared tasks
|
// shared tasks
|
||||||
void SyncClientSharedTaskState(Client *c, ClientTaskState *cts);
|
void SyncClientSharedTaskState(Client *c, ClientTaskState *cts);
|
||||||
|
|
||||||
void HandleUpdateTasksOnKill(Client *client, uint32 npc_type_id, std::string npc_name);
|
void HandleUpdateTasksOnKill(Client *client, uint32 npc_type_id, NPC* npc);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TaskGoalListManager m_goal_list_manager;
|
TaskGoalListManager m_goal_list_manager;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user