void Transmogrification::DeleteFakeFromDB(uint32 itemGUID)
{
    if (dataMap.find(itemGUID) != dataMap.end())
    {
        entryMap.erase(dataMap[itemGUID]);
        dataMap.erase(itemGUID);
    }
    CharacterDatabase.PExecute("DELETE FROM custom_transmogrification WHERE GUID = %u", itemGUID);
}
Example #2
0
void TransmogDisplayVendorMgr::DeleteFakeFromDB(uint32 itemGUID)
{
    if (dataMap.find(itemGUID) != dataMap.end())
    {
        if (entryMap.find(dataMap[itemGUID]) != entryMap.end())
            entryMap[dataMap[itemGUID]].erase(itemGUID);
        dataMap.erase(itemGUID);
    }
    CharacterDatabase.PExecute("DELETE FROM custom_transmogrifications WHERE GUID = %u", itemGUID);
}
 void OnLogout(Player* player)
 {
     uint32 pGUID = player->GetGUIDLow();
     if(entryMap.find(pGUID) == entryMap.end())
         return;
     for(transmogData::iterator it = entryMap[pGUID].begin(); it != entryMap[pGUID].end(); ++it)
     {
         dataMap.erase(it->first);
     }
     entryMap.erase(pGUID);
 }