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);
}
Exemple #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);
}
uint32 Transmogrification::GetFakeEntry(Item* item)
{
    transmogData::iterator itr = dataMap.find(item->GetGUIDLow());
    if (itr == dataMap.end()) return 0;
    transmogMap::iterator itr2 = entryMap.find(itr->second);
    if (itr2 == entryMap.end()) return 0;
    transmogData::iterator itr3 = itr2->second.find(item->GetGUIDLow());
    if (itr3 == itr2->second.end()) return 0;
    return itr3->second;
}
Exemple #4
0
uint32 TransmogDisplayVendorMgr::GetFakeEntry(uint32 itemGUID)
{
    transmogData::iterator itr = dataMap.find(itemGUID);
    if (itr == dataMap.end()) return 0;
    transmogMap::iterator itr2 = entryMap.find(itr->second);
    if (itr2 == entryMap.end()) return 0;
    transmogData::iterator itr3 = itr2->second.find(itemGUID);
    if (itr3 == itr2->second.end()) return 0;
    return itr3->second;
}
 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);
 }