mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
Merge pull request #496 from EmosewaMC/fix-skill-proxies
Addressed proxy items removing skills
This commit is contained in:
commit
f17e6d6a4a
@ -1229,19 +1229,19 @@ void InventoryComponent::AddItemSkills(const LOT lot)
|
|||||||
|
|
||||||
const auto index = m_Skills.find(slot);
|
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);
|
const auto skill = FindSkill(lot);
|
||||||
|
|
||||||
if (skill == 0)
|
if (skill == 0)
|
||||||
{
|
{
|
||||||
return;
|
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));
|
GameMessages::SendAddSkill(m_Parent, skill, static_cast<int>(slot));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user