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); }
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; }
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; }