mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Cleanup] Move Client::Undye() to client.cpp from #path Command. (#2188)
- Client::Undye() was inside the #path command file.
This commit is contained in:
parent
f3e5423677
commit
089246db53
@ -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());
|
||||
}
|
||||
@ -7,21 +7,3 @@ void command_path(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
|
||||
void Client::Undye()
|
||||
{
|
||||
for (int cur_slot = EQ::textures::textureBegin; cur_slot <= EQ::textures::LastTexture; cur_slot++) {
|
||||
uint8 slot2 = SlotConvert(cur_slot);
|
||||
EQ::ItemInstance *inst = m_inv.GetItem(slot2);
|
||||
|
||||
if (inst != nullptr) {
|
||||
inst->SetColor(inst->GetItem()->Color);
|
||||
database.SaveInventory(CharacterID(), inst, slot2);
|
||||
}
|
||||
|
||||
m_pp.item_tint.Slot[cur_slot].Color = 0;
|
||||
SendWearChange(cur_slot);
|
||||
}
|
||||
|
||||
database.DeleteCharacterDye(CharacterID());
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user