Merge pull request #496 from EmosewaMC/fix-skill-proxies

Addressed proxy items removing skills
This commit is contained in:
David Markowitz 2022-04-09 00:37:40 -07:00 committed by GitHub
commit f17e6d6a4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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));