Fix ArmorWearer setters

silly me
This commit is contained in:
Kae 2023-06-25 14:00:41 +10:00
parent 25b021c0cb
commit f7d5ff8deb
2 changed files with 9 additions and 9 deletions

View File

@ -168,56 +168,56 @@ List<PersistentStatusEffect> ArmorWearer::statusEffects() const {
}
void ArmorWearer::setHeadItem(HeadArmorPtr headItem) {
if (!Item::itemsEqual(m_headItem, headItem))
if (Item::itemsEqual(m_headItem, headItem))
return;
m_headItem = headItem;
m_needsHumanoidSync = true;
}
void ArmorWearer::setHeadCosmeticItem(HeadArmorPtr headCosmeticItem) {
if (!Item::itemsEqual(m_headCosmeticItem, headCosmeticItem))
if (Item::itemsEqual(m_headCosmeticItem, headCosmeticItem))
return;
m_headCosmeticItem = headCosmeticItem;
m_needsHumanoidSync = true;
}
void ArmorWearer::setChestCosmeticItem(ChestArmorPtr chestCosmeticItem) {
if (!Item::itemsEqual(m_chestCosmeticItem, chestCosmeticItem))
if (Item::itemsEqual(m_chestCosmeticItem, chestCosmeticItem))
return;
m_chestCosmeticItem = chestCosmeticItem;
m_needsHumanoidSync = true;
}
void ArmorWearer::setChestItem(ChestArmorPtr chestItem) {
if (!Item::itemsEqual(m_chestItem, chestItem))
if (Item::itemsEqual(m_chestItem, chestItem))
return;
m_chestItem = chestItem;
m_needsHumanoidSync = true;
}
void ArmorWearer::setLegsItem(LegsArmorPtr legsItem) {
if (!Item::itemsEqual(m_legsItem, legsItem))
if (Item::itemsEqual(m_legsItem, legsItem))
return;
m_legsItem = legsItem;
m_needsHumanoidSync = true;
}
void ArmorWearer::setLegsCosmeticItem(LegsArmorPtr legsCosmeticItem) {
if (!Item::itemsEqual(m_legsCosmeticItem, legsCosmeticItem))
if (Item::itemsEqual(m_legsCosmeticItem, legsCosmeticItem))
return;
m_legsCosmeticItem = legsCosmeticItem;
m_needsHumanoidSync = true;
}
void ArmorWearer::setBackItem(BackArmorPtr backItem) {
if (!Item::itemsEqual(m_backItem, backItem))
if (Item::itemsEqual(m_backItem, backItem))
return;
m_backItem = backItem;
m_needsHumanoidSync = true;
}
void ArmorWearer::setBackCosmeticItem(BackArmorPtr backCosmeticItem) {
if (!Item::itemsEqual(m_backCosmeticItem, backCosmeticItem))
if (Item::itemsEqual(m_backCosmeticItem, backCosmeticItem))
return;
m_backCosmeticItem = backCosmeticItem;
m_needsHumanoidSync = true;

View File

@ -291,7 +291,7 @@ bool Item::itemsEqual(ItemConstPtr const& a, ItemConstPtr const& b) {
if (a && b) // Both aren't null, compare
return a->stackableWith(b);
else // One is null, so not equal
return true;
return false;
}
}