1 mesaj
Membru Ucenic Membru Ucenic
  • Mesaje: 15
  • Reacții: 63
  • Mesaje utile: 0
  • Status: Post 🥜 clarity
  • Server: BlackGames2
  • Regat: Shinsoo
  • [ID Discord]
  • Contact:

    Medalii

    *Descriere: Vom adauga un grad nou, Smecher care va fi peste cavaler si Fraier care va fi sub Crud

    Sa incepe, Client:

    InstanceBase.h :
    // cauta
    Code:
    TITLE_NUM = 9,
    TITLE_NONE = 4,
    // modificam:
    Code:
    TITLE_NUM = 11, //+2 grade 
    TITLE_NONE = 5,// +1 grad pentru ca reprezinta neutru si daca pui grad sub el atunci neutru creste cu 1
    
    InstanceBase.cpp :

    cauta & modifica functia
    Code:
    UINT CInstanceBase::GetAlignmentGrade()
    {
    if (m_sAlignment >= 16000)return 0; // noul grad pozitiv
    if (m_sAlignment >= 12000)return 1; // a fost 0
    if (m_sAlignment >= 8000) return 2; // a fost 1
    if (m_sAlignment >= 4000) return 3; // a fost 2
    if (m_sAlignment >= 1000) return 4; // a fost 3
    if (m_sAlignment >= 0)return 5; // a fost 4
    if (m_sAlignment > -4000) return 6; // a fost 5
    if (m_sAlignment > -8000) return 7; // a fost 6
    if (m_sAlignment > -12000)return 8; // a fost 7
    if (m_sAlignment > -16000)return 9; // a fost 8
    return 10;// noul grad negativ
    }
    tot in InstanceBase.cpp :
    Code:
    int CInstanceBase::GetAlignmentType()
    {
        switch (GetAlignmentGrade())
        {
            case 0:// noul grad pozitiv
            case 1: case 2: case 3: case 4:// mutate pozitive
            return ALIGNMENT_TYPE_WHITE;
            case 6: case 7: case 8: case 9:// mutate negative
            case 10: //  noul grad negativ
            return ALIGNMENT_TYPE_DARK;
            default: // case 5 = TITLE_NONE
            return ALIGNMENT_TYPE_NORMAL;
        }
    }
    InstanceBaseEffect.cpp :

    aici ai culorile
    Code:
    D3DXCOLOR CInstanceBase::ms_kD3DXClrTitle[CInstanceBase::TITLE_MAX_NUM] =
    {
    D3DXCOLOR(...),// nu avem la fel degeaba pun cod, cauta si adapteaza
    apoi

    locale_game.txt pui cum se numesc
    Code:
    PVP_LEVEL_SMECHER Smecher
    PVP_LEVEL_FRAIER Fraier
    in localeinfo.py :

    cautam:
    Code:
    TITLE_NAME_LIST = ( PVP_LEVEL0, PVP_LEVEL1, PVP_LEVEL2, PVP_LEVEL3, PVP_LEVEL4, PVP_LEVEL5, PVP_LEVEL6, PVP_LEVEL7, PVP_LEVEL8, )
    
    modificam:
    Code:
    TITLE_NAME_LIST = ( PVP_LEVEL_SMECHER, PVP_LEVEL0, PVP_LEVEL1, PVP_LEVEL2, PVP_LEVEL3, PVP_LEVEL4, PVP_LEVEL5, PVP_LEVEL6, PVP_LEVEL7, PVP_LEVEL8, PVP_LEVEL_FRAIER, )
    
    in introloading.py :

    # cauta
    Code:
    if alignment >= 12000:
    return TITLE_NAME_LIST[0]
    elif alignment >= 8000:
    return TITLE_NAME_LIST[1]
    ...
    return TITLE_NAME_LIST[8]
    # modifica
    Code:
    if alignment >= 16000:
    return TITLE_NAME_LIST[0]# Smecher
    elif alignment >= 12000: #elif daca ai dat copy paste ca boul
    return TITLE_NAME_LIST[1]
    elif alignment >= 8000:
    return TITLE_NAME_LIST[2]
    ...
    elif alignment > -16000:
    return TITLE_NAME_LIST[9]
    return TITLE_NAME_LIST[10] # Fraier

    Acum Serverside:

    In server/src/game/src/char_battle.cpp :


    // cauti:
    Code:
    TItemDropPenalty aItemDropPenalty_kor[9] =
    {
    
    // modifica drop penalty dupa cum ai tu, exmplu pune +2 grade si adauga numerele lipsa de la noile grade, exemplu:
    Code:
    TItemDropPenalty aItemDropPenalty_kor[11] =
    {
    { 0, 0, 0, 0 },// tier 0: smecher fara drop
    dupa ce termini de facut dropul negativ/pozitiv dupa grad

    // cauta
    Code:
    if (GetRealAlignment() >= 120000)iAlignIndex = 0;
    else if (GetRealAlignment() >= 80000) iAlignIndex = 1;
    else if (GetRealAlignment() >= 40000) iAlignIndex = 2;
    else if (GetRealAlignment() >= 10000) iAlignIndex = 3;
    else if (GetRealAlignment() >= 0) iAlignIndex = 4;
    else if (GetRealAlignment() > -40000) iAlignIndex = 5;
    else if (GetRealAlignment() > -80000) iAlignIndex = 6;
    else if (GetRealAlignment() > -120000)iAlignIndex = 7;
    elseiAlignIndex = 8;
    // modifica
    Code:
    if (GetRealAlignment() >= 160000) iAlignIndex = 0;// noul grad pozitiv
    else if (GetRealAlignment() >= 120000)iAlignIndex = 1;
    else if (GetRealAlignment() >= 80000) iAlignIndex = 2;
    else if (GetRealAlignment() >= 40000) iAlignIndex = 3;
    else if (GetRealAlignment() >= 10000) iAlignIndex = 4;
    else if (GetRealAlignment() >= 0) iAlignIndex = 5;// netru a fost 4
    else if (GetRealAlignment() > -40000) iAlignIndex = 6;
    else if (GetRealAlignment() > -80000) iAlignIndex = 7;
    else if (GetRealAlignment() > -120000)iAlignIndex = 8;
    else if (GetRealAlignment() > -160000)iAlignIndex = 9;
    elseiAlignIndex = 10; // noul grad negativ

    Nou Cum descarc de pe TeraBox?

    Afișează detalii Ascunde detalii
    • Este asemănător cu Mega.nz
    • Instalați-vă clientul lor de Download de aici
    • Faceți-vă un cont (vă puteți loga cu Facebook / Google / etc)
    • Nou Dacă nu vreți să descărcați clientul de Download, folosiți acest site
    • Gata! Acum puteți descărca resursele rapid & simplu.

    De ce folosim TeraBox?

    • Este gratuit
    • Primești 1TB de spațiu gratuit la orice cont creat!
    • Este ușor de folosit și varianta premium este foarte ieftină
    • Fișierele nu sunt șterse niciodată
    TeraBox logo

    Înapoi la “Tutoriale”

    Informații

    Utilizatori ce navighează pe acest forum: br34k3r, Majestic-12 [Bot], marius_69140, RaKu, Succhiamelo și 2 vizitatori

    Discord ID copiat: