Code:
Code:
if (CIFMainMenu::UFOptions->m_keepunqSelect->GetCheckedState_MAYBE())
{
std::map<int, CIObject*> entities = g_pGfxEttManager->entities;
for (std::map<int, CIObject*>::iterator it = entities.begin();
it != entities.end(); ++it) {
if (!strcmp(it->second->GetRuntimeClass()->m_lpszClassName, "CICMonster")) {
int mobID = *(int*)((int)(it->second) + 0x21C);
if (CGlobalDataManager* g_datamanager = CGlobalDataManager::Get())
{
if (CharData* uqdata = g_datamanager->GetCharData(mobID))
{
if (uqdata->Rarity == 3 || uqdata->Rarity == 8)
{
if (g_pCGInterface->Get_SelectedObjectId() != 0)
{
CICharactor* SelectdObject = GetCharacterObjectByID_MAYBE(g_pCGInterface->Get_SelectedObjectId());
ObjectData* data = g_CGlobalDataManager->GetObjectData(SelectdObject->m_refObjID);
if (data != NULL && data->Rarity == 8 || data->Rarity == 3)//Yea if you have already selected a unique
{
return;//Then nothing to do, preventing from packet spamming.
}
}
NEWMSG(0x7045)
pReq << (UINT)((CICharactor*)it->second)->GetUniqueID();
SENDMSG()
}
}
}
}
}
}






