[Tiny Release] Keep Unique Selected.

01/25/2023 12:10 painmaker_#1
Hello Dead community, this option just took me about 15 seconds to fully implement it. use any form OnUpdate Function.

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()
                        }
                    }
                }
            }
        }
    }
01/25/2023 14:43 790312795#2
nice work
01/25/2023 16:07 Mc-Diesel#3
useful if u use it in marco Smth like bots
01/25/2023 16:52 painmaker_#4
Quote:
Originally Posted by Mc-Diesel View Post
useful if u use it in marco Smth like bots
my pleasure ya3m el dezel :D

Quote:
Originally Posted by 790312795 View Post
nice work
theres a button for it
01/25/2023 21:15 NagySandor96#5
this "this option just took me about 15 seconds" overshadows your performance so badly. dont need to say that bro, even if its true. gj
01/25/2023 21:48 painmaker_#6
Quote:
Originally Posted by NagySandor96 View Post
this "this option just took me about 15 seconds" overshadows your performance so badly. dont need to say that bro, even if its true. gj
i Understand, but in the end. who cares? 15 seconds or 15 days. Nobody.
10/03/2024 01:07 abomalek2612#7
ty ya bro 3la el 4o8l el 3aly da bs dy 3mlha add fen momkn t3rfny