fix: catch housing exceptions

This commit is contained in:
Anna 2024-02-17 22:24:40 -05:00
parent 0818c77a4e
commit e5585be0f4
Signed by: anna
GPG Key ID: D0943384CD9F87D1
1 changed files with 11 additions and 2 deletions

View File

@ -39,8 +39,17 @@ public class ScreenshotMetadata {
eorzea = new EorzeaTime((ulong) framework->ClientTime.EorzeaTime);
var housing = HousingManager.Instance();
ward = (uint) housing->GetCurrentWard();
plot = (uint) housing->GetCurrentPlot();
try {
ward = (uint) housing->GetCurrentWard();
} catch {
ward = 0;
}
try {
plot = (uint) housing->GetCurrentPlot();
} catch {
plot = 0;
}
var env = EnvManager.Instance();
var weatherId = env->ActiveWeather;