Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[C++ | Python] Minimap BOSS más színnel
#1
Thumbs Up 
[Image: nd7caab.jpg]

Indító forrás

InstanceBase.h

Rákeresel erre:
Code:
NAMECOLOR_WAYPOINT,

Ezt írod alá:
Code:
NAMECOLOR_BOSS,

Rákeresel erre:
Code:
        BOOL                    IsEnemy();
Írd alá ezt:
Code:
        ///boss
        BOOL                    IsBoss();



InstanceBase.cpp

Keresd ezt:
Code:
BOOL CInstanceBase::IsFlag()
A tömb alá másold ezt:
Code:
///boss
BOOL CInstanceBase::IsBoss()
{
    if (GetRace() == 691)
        return TRUE;
    if (GetRace() == 692)
        return TRUE;
    if (GetRace() == 693)
        return TRUE;
    if (GetRace() == 791)
        return TRUE;
    if (GetRace() == 991)
        return TRUE;
    if (GetRace() == 992)
        return TRUE;
    if (GetRace() == 993)
        return TRUE;
    if (GetRace() == 1091)
        return TRUE;
    if (GetRace() == 1092)
        return TRUE;
    if (GetRace() == 1093)
        return TRUE;
    if (GetRace() == 1094)
        return TRUE;
    if (GetRace() == 1095)
        return TRUE;
    if (GetRace() == 2191)
        return TRUE;
    if (GetRace() == 1191)
        return TRUE;
    if (GetRace() == 1192)
        return TRUE;
    if (GetRace() == 1304)
        return TRUE;
    if (GetRace() == 1306)
        return TRUE;
    if (GetRace() == 1307)
        return TRUE;
    if (GetRace() == 1901)
        return TRUE;
    if (GetRace() == 1902)
        return TRUE;
    if (GetRace() == 1903)
        return TRUE;
    if (GetRace() == 2206)
        return TRUE;
    if (GetRace() == 2207)
        return TRUE;
    if (GetRace() == 2291)
        return TRUE;
    if (GetRace() == 2306)
        return TRUE;
    if (GetRace() == 2307)
        return TRUE;
    if (GetRace() == 2492)
        return TRUE;
    if (GetRace() == 2493)
        return TRUE;
    if (GetRace() == 2494)
        return TRUE;
    if (GetRace() == 2598)
        return TRUE;
    if (GetRace() == 3090)
        return TRUE;
    if (GetRace() == 3091)
        return TRUE;
    if (GetRace() == 3190)
        return TRUE;
    if (GetRace() == 3191)
        return TRUE;
    if (GetRace() == 3290)
        return TRUE;
    if (GetRace() == 3291)
        return TRUE;
    if (GetRace() == 3390)
        return TRUE;
    if (GetRace() == 3391)
        return TRUE;
    if (GetRace() == 3490)
        return TRUE;
    if (GetRace() == 3491)
        return TRUE;
    if (GetRace() == 3590)
        return TRUE;
    if (GetRace() == 3591)
        return TRUE;
    if (GetRace() == 3690)
        return TRUE;
    if (GetRace() == 3691)
        return TRUE;
    if (GetRace() == 3790)
        return TRUE;
    if (GetRace() == 3791)
        return TRUE;
    if (GetRace() == 3890)
        return TRUE;
    if (GetRace() == 3891)
        return TRUE;
    if (GetRace() == 5001)
        return TRUE;
    if (GetRace() == 5004)
        return TRUE;
    if (GetRace() == 5002)
        return TRUE;
    if (GetRace() == 5161)
        return TRUE;
    if (GetRace() == 5162)
        return TRUE;
    if (GetRace() == 5163)
        return TRUE;
    if (GetRace() == 6091)
        return TRUE;
    if (GetRace() == 6191)
        return TRUE;

    return FALSE;
}
///////////////
///////////////


InstanceBaseEffect.cpp

Rákeresel erre:
Code:
    else if (IsEnemy())
    {
        return NAMECOLOR_MOB;
    }
Módosítod erre:
Code:
    else if (IsEnemy())
    {
        if (IsBoss())
            return NAMECOLOR_BOSS;
        
        return NAMECOLOR_MOB;
    }


PythonCharacterManagerModule.cpp

Keresd meg ezt a sort:
Code:
PyModule_AddIntConstant(poModule, "NAMECOLOR_WAYPOINT", CInstanceBase::NAMECOLOR_WAYPOINT);
Alá másolod ezt:
Code:
PyModule_AddIntConstant(poModule, "NAMECOLOR_BOSS", CInstanceBase::NAMECOLOR_BOSS);

PythonMinimap.h

Rákeresel erre:
Code:
        TInstanceMarkPositionVector        m_NPCPositionVector;
Alá írod ezt:
Code:
        TInstanceMarkPositionVector        m_BossPositionVector;

PythonMinimap.cpp

Rákeresel erre:
Code:
m_NPCPositionVector.clear();
Írd alá ezt:

Code:
m_BossPositionVector.clear();



Keresd ezt a tömböt:
Code:
    // NPC
    STATEMANAGER.SetRenderState(D3DRS_TEXTUREFACTOR, CInstanceBase::GetIndexedNameColor(CInstanceBase::NAMECOLOR_NPC));
    aIterator = m_NPCPositionVector.begin();
    while (aIterator != m_NPCPositionVector.end())
    {
        TMarkPosition & rPosition = *aIterator;
        m_WhiteMark.SetPosition(rPosition.m_fX, rPosition.m_fY);
        m_WhiteMark.Render();
        ++aIterator;
    }
Másold alá ezt:
Code:
   // Boss
   STATEMANAGER.SetRenderState(D3DRS_TEXTUREFACTOR, CInstanceBase::GetIndexedNameColor(CInstanceBase::NAMECOLOR_BOSS));
   aIterator = m_BossPositionVector.begin();
   while (aIterator != m_BossPositionVector.end())
   {
       TMarkPosition & rPosition = *aIterator;
       m_WhiteMark.SetPosition(rPosition.m_fX, rPosition.m_fY);
       m_WhiteMark.Render();
       ++aIterator;
   }

Rákeresel erre a tömbre is:
Code:
        else if (pkInstEach->IsEnemy())
        {
            aMarkPosition.m_fX = ( m_fWidth - (float)m_WhiteMark.GetWidth() ) / 2.0f + fDistanceFromCenterX + m_fScreenX;
            aMarkPosition.m_fY = ( m_fHeight - (float)m_WhiteMark.GetHeight() ) / 2.0f + fDistanceFromCenterY + m_fScreenY;

            m_MonsterPositionVector.push_back(aMarkPosition);
        }
Fölé írod ezt:
Code:
       else if (pkInstEach->IsBoss())
       {
           aMarkPosition.m_fX = ( m_fWidth - (float)m_WhiteMark.GetWidth() ) / 2.0f + fDistanceFromCenterX + m_fScreenX;
           aMarkPosition.m_fY = ( m_fHeight - (float)m_WhiteMark.GetHeight() ) / 2.0f + fDistanceFromCenterY + m_fScreenY;

           m_BossPositionVector.push_back(aMarkPosition);
       }


Python

colorInfo.py-ba

Code:
CHR_NAME_RGB_BOSS = (9, 22, 255)
Itt tudod módosítani a színét a BOSS-oknak.



introloading.py

Keresd meg ezt a sort:
Code:
chrmgr.NAMECOLOR_WAYPOINT : colorInfo.CHR_NAME_RGB_WAYPOINT,
Írd alá ezt a sort:
Code:
chrmgr.NAMECOLOR_BOSS : colorInfo.CHR_NAME_RGB_BOSS,


Üdv, Pisti95
[Image: 1453876818-b8928becdb9a3058b7c9ff22ccc5caf6.jpeg]
Reply
#2
Pisti ez jóféle Smile
"Egyetlen ismeretlen van, a többi csak toldás: Alattad a föld, fölötted az ég, benned a létra!"
-Weöres Sándor-  Angel
Reply
#3
(04-03-2018, 12:06 AM)Neon Wrote: You are not allowed to view links. Register or Login to view.Pisti ez jóféle Smile

Örülök ha tetszik! Unaloműzés forever Big Grin
[Image: 1453876818-b8928becdb9a3058b7c9ff22ccc5caf6.jpeg]
Reply
#4
Úgy érzem hogy megfogom szerintem csinálni Big Grin
Reply
#5
Code:
///boss
BOOL CInstanceBase::IsBoss()
{
    if (GetRace() == 691)
        return TRUE;
    if (GetRace() == 692)
        return TRUE;
    if (GetRace() == 693)
        return TRUE;
    if (GetRace() == 791)
        return TRUE;
    if (GetRace() == 991)
        return TRUE;
    if (GetRace() == 992)
        return TRUE;
    if (GetRace() == 993)
        return TRUE;
    if (GetRace() == 1091)
        return TRUE;
    if (GetRace() == 1092)
        return TRUE;
    if (GetRace() == 1093)
        return TRUE;
    if (GetRace() == 1094)
        return TRUE;
    if (GetRace() == 1095)
        return TRUE;
    if (GetRace() == 2191)
        return TRUE;
    if (GetRace() == 1191)
        return TRUE;
    if (GetRace() == 1192)
        return TRUE;
    if (GetRace() == 1304)
        return TRUE;
    if (GetRace() == 1306)
        return TRUE;
    if (GetRace() == 1307)
        return TRUE;
    if (GetRace() == 1901)
        return TRUE;
    if (GetRace() == 1902)
        return TRUE;
    if (GetRace() == 1903)
        return TRUE;
    if (GetRace() == 2206)
        return TRUE;
    if (GetRace() == 2207)
        return TRUE;
    if (GetRace() == 2291)
        return TRUE;
    if (GetRace() == 2306)
        return TRUE;
    if (GetRace() == 2307)
        return TRUE;
    if (GetRace() == 2492)
        return TRUE;
    if (GetRace() == 2493)
        return TRUE;
    if (GetRace() == 2494)
        return TRUE;
    if (GetRace() == 2598)
        return TRUE;
    if (GetRace() == 3090)
        return TRUE;
    if (GetRace() == 3091)
        return TRUE;
    if (GetRace() == 3190)
        return TRUE;
    if (GetRace() == 3191)
        return TRUE;
    if (GetRace() == 3290)
        return TRUE;
    if (GetRace() == 3291)
        return TRUE;
    if (GetRace() == 3390)
        return TRUE;
    if (GetRace() == 3391)
        return TRUE;
    if (GetRace() == 3490)
        return TRUE;
    if (GetRace() == 3491)
        return TRUE;
    if (GetRace() == 3590)
        return TRUE;
    if (GetRace() == 3591)
        return TRUE;
    if (GetRace() == 3690)
        return TRUE;
    if (GetRace() == 3691)
        return TRUE;
    if (GetRace() == 3790)
        return TRUE;
    if (GetRace() == 3791)
        return TRUE;
    if (GetRace() == 3890)
        return TRUE;
    if (GetRace() == 3891)
        return TRUE;
    if (GetRace() == 5001)
        return TRUE;
    if (GetRace() == 5004)
        return TRUE;
    if (GetRace() == 5002)
        return TRUE;
    if (GetRace() == 5161)
        return TRUE;
    if (GetRace() == 5162)
        return TRUE;
    if (GetRace() == 5163)
        return TRUE;
    if (GetRace() == 6091)
        return TRUE;
    if (GetRace() == 6191)
        return TRUE;

    return FALSE;
}
///////////////
///////////////

Amúgy ez eléggé csúnya megoldás.
Én ezt megoldotta néhány sorból.

De jóvan' ez tanyára Big Grin
"Egyetlen ismeretlen van, a többi csak toldás: Alattad a föld, fölötted az ég, benned a létra!"
-Weöres Sándor-  Angel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)