From e95d748f00473652a66e3a7d3a5aaa8e2cb9255f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=98=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD?= Date: Thu, 8 Aug 2024 21:12:57 +0200 Subject: [PATCH] fix: temporary disable abmormal effects --- .../Interlude/Factories/AbnormalEffectFactory.h | 10 +++------- L2BotDll/Versions/VersionAbstractFactory.h | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/L2BotDll/Versions/Interlude/Factories/AbnormalEffectFactory.h b/L2BotDll/Versions/Interlude/Factories/AbnormalEffectFactory.h index 81a2c0b..d864de0 100644 --- a/L2BotDll/Versions/Interlude/Factories/AbnormalEffectFactory.h +++ b/L2BotDll/Versions/Interlude/Factories/AbnormalEffectFactory.h @@ -29,17 +29,13 @@ namespace Interlude { const auto data = m_L2GameData.GetMSData(skillId, level); - if (!data) { - throw RuntimeException(std::format(L"cannot load MSData for abnormal effect {}", skillId)); - } - - const auto iconEntry = m_FName.GetEntry(data->iconNameIndex); + const auto iconEntry = data ? m_FName.GetEntry(data->iconNameIndex) : nullptr; return std::make_shared( skillId, static_cast(level), - data->name ? std::wstring(data->name) : L"", - data->description ? std::wstring(data->description) : L"", + data && data->name ? std::wstring(data->name) : L"", + data && data->description ? std::wstring(data->description) : L"", iconEntry ? std::wstring(iconEntry->value) : L"" ); } diff --git a/L2BotDll/Versions/VersionAbstractFactory.h b/L2BotDll/Versions/VersionAbstractFactory.h index 3ebd79f..9ad4b68 100644 --- a/L2BotDll/Versions/VersionAbstractFactory.h +++ b/L2BotDll/Versions/VersionAbstractFactory.h @@ -42,7 +42,7 @@ public: {L"player", GetPlayerRepository()}, {L"skill", GetSkillRepository()}, {L"item", GetItemRepository()}, - {L"abnormalEffect", GetAbnormalEffectRepository()}, + //{L"abnormalEffect", GetAbnormalEffectRepository()}, {L"chat", GetChatMessageRepository()} }; }