Fixed skills proxies

This commit is contained in:
EmosewaMC 2022-04-08 20:19:27 -07:00
parent 39089284ff
commit 96f1c0a709

View File

@ -1229,19 +1229,19 @@ void InventoryComponent::AddItemSkills(const LOT lot)
const auto index = m_Skills.find(slot);
if (index != m_Skills.end())
{
const auto old = index->second;
GameMessages::SendRemoveSkill(m_Parent, old);
}
const auto skill = FindSkill(lot);
if (skill == 0)
{
return;
}
if (index != m_Skills.end())
{
const auto old = index->second;
GameMessages::SendRemoveSkill(m_Parent, old);
}
GameMessages::SendAddSkill(m_Parent, skill, static_cast<int>(slot));