fix: remove exception throwing from game threads
This commit is contained in:
@@ -121,7 +121,7 @@ namespace Interlude
|
||||
|
||||
if (m_Items.find(data.objectId) == m_Items.end())
|
||||
{
|
||||
auto item = m_Factory.Create(data);
|
||||
const auto item = m_Factory.Create(data);
|
||||
if (item) {
|
||||
m_Items[data.objectId] = item;
|
||||
}
|
||||
@@ -197,6 +197,7 @@ namespace Interlude
|
||||
Services::ServiceLocator::GetInstance().GetEventDispatcher()->Subscribe(Events::OnEndItemListEvent::name, [this](const Events::Event& evt) {
|
||||
OnEndItemList(evt);
|
||||
});
|
||||
m_NetworkHandler.RequestItemList();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -120,11 +120,14 @@ namespace Interlude
|
||||
|
||||
if (m_Skills.find(skillId) == m_Skills.end())
|
||||
{
|
||||
m_Skills[skillId] = m_Factory.Create(
|
||||
const auto newSkill = m_Factory.Create(
|
||||
skillInfo[2],
|
||||
skillInfo[1],
|
||||
skillInfo[0]
|
||||
);
|
||||
if (newSkill) {
|
||||
m_Skills[skillId] = newSkill;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user