Add deleteinven slash command

This commit is contained in:
EmosewaMC
2022-12-02 06:03:47 -08:00
parent a0310f6ffd
commit cf44028665
26 changed files with 129 additions and 33 deletions

View File

@@ -16,6 +16,7 @@
#include "dLogger.h"
#include "dServer.h"
#include "dZoneManager.h"
#include "InventoryComponent.h"
#include "Database.h"
Mission::Mission(MissionComponent* missionComponent, const uint32_t missionId) {
@@ -424,7 +425,7 @@ void Mission::YieldRewards() {
for (const auto target : task->GetAllTargets()) {
// This is how live did it. ONLY remove item collection items from the items and hidden inventories and none of the others.
inventoryComponent->RemoveItem(target, task->GetClientInfo().targetValue, eInventoryType::ITEMS);
inventoryComponent->RemoveItem(target, task->GetClientInfo().targetValue, eInventoryType::HIDDEN);
inventoryComponent->RemoveItem(target, task->GetClientInfo().targetValue, eInventoryType::QUEST);
missionComponent->Progress(MissionTaskType::MISSION_TASK_TYPE_ITEM_COLLECTION, target, LWOOBJID_EMPTY, "", -task->GetClientInfo().targetValue);
}

View File

@@ -11,9 +11,9 @@
#include "ScriptedActivityComponent.h"
#include "GameMessages.h"
#include "dZoneManager.h"
#include "InventoryComponent.h"
#include "MissionComponent.h"
MissionTask::MissionTask(Mission* mission, CDMissionTasks* info, uint32_t mask) {
this->info = info;
this->mission = mission;