mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-22 21:43:35 +00:00
Fix Trigger Missions (#1010)
This commit is contained in:
parent
3e482602d4
commit
a0c0a87956
@ -163,19 +163,14 @@ void TriggerComponent::HandleSetPhysicsVolume(Entity* targetEntity, std::vector<
|
||||
void TriggerComponent::HandleUpdateMission(Entity* targetEntity, std::vector<std::string> argArray) {
|
||||
CDMissionTasksTable* missionTasksTable = CDClientManager::Instance()->GetTable<CDMissionTasksTable>("MissionTasks");
|
||||
std::vector<CDMissionTasks> missionTasks = missionTasksTable->Query([=](CDMissionTasks entry) {
|
||||
std::string lowerTargetGroup;
|
||||
for (char character : entry.targetGroup) {
|
||||
lowerTargetGroup.push_back(std::tolower(character)); // make lowercase to ensure it works
|
||||
}
|
||||
|
||||
return (lowerTargetGroup == argArray[4]);
|
||||
return (entry.targetGroup == argArray.at(4));
|
||||
});
|
||||
|
||||
for (const CDMissionTasks& task : missionTasks) {
|
||||
MissionComponent* missionComponent = targetEntity->GetComponent<MissionComponent>();
|
||||
if (!missionComponent) continue;
|
||||
|
||||
missionComponent->ForceProgress(task.id, task.uid, std::stoi(argArray[2]));
|
||||
missionComponent->ForceProgress(task.id, task.uid, std::stoi(argArray.at(2)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user