Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[SHARE][SPLIT SOURCE][GS]Buff removed upon moving to another map

Joined
Aug 15, 2010
Messages
39
Reaction score
21
Hi! Here, this released split source is for GS only. Always back up your source code before modifying it! Also, like the post if this helped you. :msmile:

Let's start!

find case EMFACTEFFECTPROCESSING_MOVEMAP: at GLCharacterEx.cpp
C++:
    case EMFACTEFFECTPROCESSING_MOVEMAP:
        {
            FACTEFF::DeleteAllEffect ( STARGETID(GetCrow(), GetGaeaID(), GetPosition()), GetSkinChar(), m_sSKILLFACT, SKILLFACT_SIZE, m_sSTATEBLOWS );


            for ( int i=0; i<EMBLOW_MULTI;   ++i )
                m_sSTATEBLOWS[i].emBLOW = EMBLOW_NONE;


            for ( int i=0; i<SKILLFACT_SIZE; ++i )
                m_sSKILLFACT [i].RESET();


            m_pGaeaClient->PartyMemberRemoveAllBuff( m_dwGaeaID );
        }
        break;
Change to:
C++:
    case EMFACTEFFECTPROCESSING_MOVEMAP:
        {
           //Blazer Reset buffs
            RESET_SKILL_DATA();
            NSEffectPlay::DeleteALL();
            FACTEFF::DeleteEffect ( STARGETID(GetCrow(), GetGaeaID(), GetPosition()), GetSkinChar(), m_sSKILLFACT, SKILLFACT_SIZE_NORMAL, m_sSTATEBLOWS );

            for (size_t i=SKILLFACT_INDEX_NORMAL_START; i<SKILLFACT_INDEX_NORMAL_END; ++i)
                RESETSKEFF(i);

            for (size_t i=SKILLFACT_INDEX_SYSTEM_START; i<SKILLFACT_INDEX_SYSTEM_END; ++i)
                SetSkillFact(i, TRUE);

            for (size_t i=SKILLFACT_INDEX_LUNCHBOX_START; i<SKILLFACT_INDEX_EXP_LUNCHBOX_END; ++i)
                SetSkillFact(i, TRUE);
        }
        break;
find case EMFACTEFFECTPROCESSING_MOVEMAP: at GLCharClient.cpp
C++:
case EMFACTEFFECTPROCESSING_MOVEMAP:
        {
            FACTEFF::DeleteAllEffect ( STARGETID(GetCrow(), GetGaeaID(), GetPosition()), GetSkinChar(), m_sSKILLFACT, SKILLFACT_SIZE, m_sSTATEBLOWS );


            for ( int i=0; i<EMBLOW_MULTI;   ++i )
                m_sSTATEBLOWS[i].emBLOW = EMBLOW_NONE;


            for ( int i=0; i<SKILLFACT_SIZE; ++i )
                m_sSKILLFACT [i].RESET();


            m_pGaeaClient->PartyMemberRemoveAllBuff( m_dwGaeaID );
        }
        break;
Change to:
C++:
case EMFACTEFFECTPROCESSING_MOVEMAP:
        {
           //Blazer Reset buffs
           RESET_SKILL_DATA();

            FACTEFF::DeleteEffect ( STARGETID(GetCrow(), GetGaeaID(), GetPosition()), GetSkinChar(), m_sSKILLFACT, SKILLFACT_SIZE, m_sSTATEBLOWS );

            for ( int i=0; i<EMBLOW_MULTI; ++i )                                                
                m_sSTATEBLOWS[i].emBLOW = EMBLOW_NONE;

            for( int i=SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                m_sSKILLFACT [i].RESET();

            for ( int i=SKILLFACT_INDEX_LUNCHBOX_START; i<SKILLFACT_INDEX_EXP_LUNCHBOX_END; ++i )    m_sSKILLFACT [i].bEnable = FALSE;
            for ( int i=SKILLFACT_INDEX_SYSTEM_START;   i<SKILLFACT_INDEX_SYSTEM_END;   ++i )     m_sSKILLFACT [i].bEnable = FALSE;

            m_pGaeaClient->PartyMemberRemoveAllBuff( m_dwGaeaID );
        }
        break;
Next go to MoveManagerField.cpp
First:

C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;


                    SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                        SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }
Change to:
C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;
                      //Blazer Reset buffs
                    //SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    //if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                        //SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }
Second:
C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;


                    SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                        SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }
Change to:
C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;
                      //Blazer Reset buffs
                   // SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    //if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                      //  SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }
Third:
C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;


                    SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                        SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }
Change to:

C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;
                      //Blazer Reset buffs
                    //SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    //if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                       // SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }


Happy coding!
 
Last edited:
Junior Spellweaver
Joined
Apr 2, 2019
Messages
142
Reaction score
27
Hi! Here, this released split source is for GS only. Always back up your source code before modifying it! Also, like the post if this helped you. :msmile:

Let's start!

find case EMFACTEFFECTPROCESSING_MOVEMAP: at GLCharacterEx.cpp
C++:
    case EMFACTEFFECTPROCESSING_MOVEMAP:
        {
            FACTEFF::DeleteAllEffect ( STARGETID(GetCrow(), GetGaeaID(), GetPosition()), GetSkinChar(), m_sSKILLFACT, SKILLFACT_SIZE, m_sSTATEBLOWS );


            for ( int i=0; i<EMBLOW_MULTI;   ++i )
                m_sSTATEBLOWS[i].emBLOW = EMBLOW_NONE;


            for ( int i=0; i<SKILLFACT_SIZE; ++i )
                m_sSKILLFACT [i].RESET();


            m_pGaeaClient->PartyMemberRemoveAllBuff( m_dwGaeaID );
        }
        break;
Change to:
C++:
    case EMFACTEFFECTPROCESSING_MOVEMAP:
        {
           //Blazer Reset buffs
            RESET_SKILL_DATA();
            NSEffectPlay::DeleteALL();
            FACTEFF::DeleteEffect ( STARGETID(GetCrow(), GetGaeaID(), GetPosition()), GetSkinChar(), m_sSKILLFACT, SKILLFACT_SIZE_NORMAL, m_sSTATEBLOWS );

            for (size_t i=SKILLFACT_INDEX_NORMAL_START; i<SKILLFACT_INDEX_NORMAL_END; ++i)
                RESETSKEFF(i);

            for (size_t i=SKILLFACT_INDEX_SYSTEM_START; i<SKILLFACT_INDEX_SYSTEM_END; ++i)
                SetSkillFact(i, TRUE);

            for (size_t i=SKILLFACT_INDEX_LUNCHBOX_START; i<SKILLFACT_INDEX_EXP_LUNCHBOX_END; ++i)
                SetSkillFact(i, TRUE);
        }
        break;
find case EMFACTEFFECTPROCESSING_MOVEMAP: at GLCharClient.cpp
C++:
case EMFACTEFFECTPROCESSING_MOVEMAP:
        {
            FACTEFF::DeleteAllEffect ( STARGETID(GetCrow(), GetGaeaID(), GetPosition()), GetSkinChar(), m_sSKILLFACT, SKILLFACT_SIZE, m_sSTATEBLOWS );


            for ( int i=0; i<EMBLOW_MULTI;   ++i )
                m_sSTATEBLOWS[i].emBLOW = EMBLOW_NONE;


            for ( int i=0; i<SKILLFACT_SIZE; ++i )
                m_sSKILLFACT [i].RESET();


            m_pGaeaClient->PartyMemberRemoveAllBuff( m_dwGaeaID );
        }
        break;
Change to:
C++:
case EMFACTEFFECTPROCESSING_MOVEMAP:
        {
           //Blazer Reset buffs
           RESET_SKILL_DATA();

            FACTEFF::DeleteEffect ( STARGETID(GetCrow(), GetGaeaID(), GetPosition()), GetSkinChar(), m_sSKILLFACT, SKILLFACT_SIZE, m_sSTATEBLOWS );

            for ( int i=0; i<EMBLOW_MULTI; ++i )                                               
                m_sSTATEBLOWS[i].emBLOW = EMBLOW_NONE;

            for( int i=SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                m_sSKILLFACT [i].RESET();

            for ( int i=SKILLFACT_INDEX_LUNCHBOX_START; i<SKILLFACT_INDEX_EXP_LUNCHBOX_END; ++i )    m_sSKILLFACT [i].bEnable = FALSE;
            for ( int i=SKILLFACT_INDEX_SYSTEM_START;   i<SKILLFACT_INDEX_SYSTEM_END;   ++i )     m_sSKILLFACT [i].bEnable = FALSE;

            m_pGaeaClient->PartyMemberRemoveAllBuff( m_dwGaeaID );
        }
        break;
Next go to MoveManagerField.cpp
First:

C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;


                    SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                        SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }
Change to:
C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;
                      //Blazer Reset buffs
                    //SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    //if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                        //SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }
Second:
C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;


                    SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                        SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }
Change to:
C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;
                      //Blazer Reset buffs
                   // SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    //if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                      //  SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }
Third:
C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;


                    SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                        SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }
Change to:

C++:
if( sCurMapID != _sMoveInfo.sMapID )
            {
                for ( int i = 0; i < EMBLOW_MULTI; ++i )
                    pChar->DISABLEBLOW( i );
                for ( int i = SKILLFACT_INDEX_NORMAL_START; i < SKILLFACT_INDEX_NORMAL_END; ++i )
                {
                    PGLSKILL pSkill = GLSkillMan::GetInstance().GetData ( pChar->m_sSKILLFACT[i].sNATIVEID );
                    if ( NULL == pSkill )
                        continue;
                      //Blazer Reset buffs
                    //SKILL::EMACTION_TYPE emActionType = pSkill->m_sBASIC.emACTION_TYPE;
                    //if ( SKILL::EMACTION_TYPE_NORMAL != emActionType &&
                       // SKILL::EMACTION_TYPE_BUFF != emActionType )
                        pChar->RESETSKEFF( i );
                }


Happy coding!
Thank you
 
Back
Top