[Cleanup] Move Client::Undye() to client.cpp from #path Command. (#2188)

- Client::Undye() was inside the #path command file.
This commit is contained in:
Kinglykrab
2022-05-21 10:26:45 -04:00
committed by GitHub
parent f3e5423677
commit 089246db53
2 changed files with 18 additions and 18 deletions
+18
View File
@@ -11730,3 +11730,21 @@ std::map<std::string,std::string> Client::GetMerchantDataBuckets()
return merchant_data_buckets;
}
void Client::Undye()
{
for (uint8 slot = EQ::textures::textureBegin; slot <= EQ::textures::LastTexture; slot++) {
auto inventory_slot = SlotConvert(slot);
auto inst = m_inv.GetItem(inventory_slot);
if (inst) {
inst->SetColor(inst->GetItem()->Color);
database.SaveInventory(CharacterID(), inst, inventory_slot);
}
m_pp.item_tint.Slot[slot].Color = 0;
SendWearChange(slot);
}
database.DeleteCharacterDye(CharacterID());
}