mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-05-09 08:01:12 +00:00
fix: add null check and character version update (#1793)
* fix: add null check * Add version update as well
This commit is contained in:
parent
522299c9ec
commit
b6f7b4c092
@ -1104,12 +1104,13 @@ void HandlePacket(Packet* packet) {
|
||||
bool complete = true;
|
||||
for (auto missionID : missions) {
|
||||
auto* mission = missionComponent->GetMission(missionID);
|
||||
if (!mission->IsComplete()) {
|
||||
if (!mission || !mission->IsComplete()) {
|
||||
complete = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (complete) missionComponent->CompleteMission(937 /* Nexus Force explorer */);
|
||||
levelComponent->SetCharacterVersion(eCharacterVersion::UP_TO_DATE);
|
||||
[[fallthrough]];
|
||||
}
|
||||
case eCharacterVersion::UP_TO_DATE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user