Item Mix code that generate item.

Results 1 to 5 of 5
  1. #1
    Enthusiast otep is offline
    MemberRank
    Jan 2020 Join Date
    42Posts

    Item Mix code that generate item.

    Hello devs,May i ask if where i can find the code that generate the item after the player press the button "Generate" in the source code.? because i need to modify the code so that players can craft upgraded weapon and upgrade will not vanish instead it will move into new crafted item. i scan some code and i found this ItemMixWindow.cpp but i don't think so this is the right code.


    ItemMixWindow.cpp

    Code:
    VOID CItemMixWindow::TranslateUIMessage(UIGUID ControlID, DWORD dwMsg) {
        switch (ControlID) {
            case ITEM_COMPOUND_GENERATE_BUTTON:
                if (CHECK_KEYFOCUSED(dwMsg) || CHECK_MOUSEIN_LBUPLIKE(dwMsg)) {
                    if (!m_bOK) {
                        DoItemMix();
                    }
                    SetMessageEx(dwMsg &= ~UIMSG_KEY_FOCUSED);
                }
                break;
        }
        CUIWindowEx::TranslateUIMessage(ControlID, dwMsg);
    }
    VOID CItemMixWindow::DoItemMix() {
        GLCHARLOGIC & ref_CharData = GLGaeaClient::GetInstance().GetCharacterLogic();
        LONGLONG lnGold = ref_CharData.m_lnMoney;
        DWORD dwPrice = GLGaeaClient::GetInstance().GetCharacter() - > GetItemMixMoney();
        if (lnGold >= (LONGLONG) dwPrice) m_bIsOK = true;
        if (dwPrice == UINT_MAX) {
            CInnerInterface::GetInstance().PrintMsgText(NS_UITEXTCOLOR::DISABLE, ID2GAMEINTEXT("EMITEM_MIX_FB_NOMIX"));
            SetItemMixResult(ID2GAMEINTEXT("EMITEM_MIX_FB_NOMIX"));
            return;
        }
        if (dwPrice > 0) {
            CString strTemp;
            strTemp.Format(ID2GAMEINTEXT("ITEM_MIX_MONEY_OKQUESTION"), dwPrice);
            DoModal(strTemp, MODAL_QUESTION, YESNO, MODAL_ITEMMIX_OKQUESTION);
        } else {
            DoModal(ID2GAMEINTEXT("ITEM_MIX_OKQUESTION"), MODAL_QUESTION, YESNO, MODAL_ITEMMIX_OKQUESTION);
        }
    }
    Last edited by otep; 28-01-20 at 01:08 PM.


  2. #2
    Valued Member a4t333ch is offline
    MemberRank
    Jul 2019 Join Date
    129Posts

    Re: Item Mix code that generate item.

    Quote Originally Posted by otep View Post
    Hello devs,May i ask if where i can find the code that generate the item after the player press the button "Generate" in the source code. because i need to modify the code so that players can craft upgraded weapon and upgrade will not vanish instead it will move into new crafted item. i scan some code and i found this ItemMixWindow.cpp but i don't think so this is the right code.

    ItemMixWindow.cpp
    PHP Code:
    VOID CItemMixWindow::TranslateUIMessageUIGUID ControlIDDWORD dwMsg ){    switch( ControlID )    {        case ITEM_COMPOUND_GENERATE_BUTTON:            if( CHECK_KEYFOCUSEDdwMsg ) || CHECK_MOUSEIN_LBUPLIKEdwMsg ) )                {            if ( !m_bOK )                        {                            DoItemMix();                            }                        SetMessageExdwMsg &= ~UIMSG_KEY_FOCUSED );                     }                break;            }    CUIWindowEx::TranslateUIMessageControlIDdwMsg );    }...............Seems this is not the right function . I thinks this is only a message before the item is generated.VOID CItemMixWindow::DoItemMix(){    GLCHARLOGICref_CharData GLGaeaClient::GetInstance().GetCharacterLogic ();        LONGLONG lnGold ref_CharData.m_lnMoney;        DWORD dwPrice GLGaeaClient::GetInstance().GetCharacter()->GetItemMixMoney();        if ( lnGold >= (LONGLONG)dwPrice m_bIsOK true;    if ( dwPrice == UINT_MAX )     {            CInnerInterface::GetInstance().PrintMsgText NS_UITEXTCOLOR::DISABLEID2GAMEINTEXT("EMITEM_MIX_FB_NOMIX") );                SetItemMixResultID2GAMEINTEXT("EMITEM_MIX_FB_NOMIX") );                return;    }    if ( dwPrice )    {        CString strTemp;                strTemp.FormatID2GAMEINTEXT("ITEM_MIX_MONEY_OKQUESTION"), dwPrice );                DoModalstrTempMODAL_QUESTIONYESNOMODAL_ITEMMIX_OKQUESTION );            }    else    {        DoModalID2GAMEINTEXT("ITEM_MIX_OKQUESTION"), MODAL_QUESTIONYESNOMODAL_ITEMMIX_OKQUESTION );            }} 
    it's hard to see the code, use the quote one not the php

  3. #3
    Enthusiast otep is offline
    MemberRank
    Jan 2020 Join Date
    42Posts

    Re: Item Mix code that generate item.

    Quote Originally Posted by a4t333ch View Post
    it's hard to see the code, use the quote one not the php
    Hi a4t333ch kindly please check again my post i reedit it. thanks

  4. #4
    Enthusiast aninostephen is offline
    MemberRank
    Jul 2019 Join Date
    26Posts

    Re: Item Mix code that generate item.

    Seems that no one can help me in this problem so
    I got an idea, i develop this through website and it's working perfectly HAHAHA.
    But it's better that this functionality is in in-game. still i cannot understand the structure of source code
    maybe i need more time to understand it. Good luck to me.

  5. #5
    Proficient Member Cabalife is offline
    MemberRank
    Apr 2017 Join Date
    179Posts

    Re: Item Mix code that generate item.

    Quote Originally Posted by aninostephen View Post
    Seems that no one can help me in this problem so
    I got an idea, i develop this through website and it's working perfectly HAHAHA.
    But it's better that this functionality is in in-game. still i cannot understand the structure of source code
    maybe i need more time to understand it. Good luck to me.
    You should check the keyword generate success rate

    我從使用 Tapatalk 的 vivo 1725 發送



Advertisement