mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
Fix Some missions not progressing if they are the last item in the inventory (#899)
This commit is contained in:
parent
84c5d74450
commit
f311685dda
@ -5736,16 +5736,16 @@ void GameMessages::HandleClientItemConsumed(RakNet::BitStream* inStream, Entity*
|
||||
}
|
||||
|
||||
auto* item = inventory->FindItemById(itemConsumed);
|
||||
|
||||
if (item == nullptr) {
|
||||
return;
|
||||
}
|
||||
LOT itemLot = item->GetLot();
|
||||
|
||||
item->Consume();
|
||||
|
||||
auto* missions = static_cast<MissionComponent*>(entity->GetComponent(COMPONENT_TYPE_MISSION));
|
||||
if (missions != nullptr) {
|
||||
missions->Progress(MissionTaskType::MISSION_TASK_TYPE_FOOD, item->GetLot());
|
||||
missions->Progress(MissionTaskType::MISSION_TASK_TYPE_FOOD, itemLot);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user