[C++ Feed] fix give WP issue, for player loading map while war end

Results 1 to 1 of 1
  1. #1
    Member vinleprince is offline
    MemberRank
    Feb 2015 Join Date
    77Posts

    [C++ Feed] fix give WP issue, for player loading map while war end

    Description
    this is rework Give wp function, it will give WarPoint to every player that in SP Area even player still loading map


    How to use
    on server side find AddWarPointInMap then try disable old function, and use new one


    Paremeter
    AddWarPointInMapWarEx
    - MapIndex
    - Winner War Point
    - Loser War Point
    - Bonus War Point
    - Winner Nation
    - Give Type


    PHP Code:
    void CFieldIOCPSocket::AddWarPointInMapWarEx(MapIndex_t nMapIndexINT i_nWinnerWarPointINT i_nLoserWarPointBOOL i_bEventBonusBYTE i_bInfWinnerMaskBYTE i_byWPUpdateTy/*=WPUT_GENERAL*/)
    {
     
                    const 
    MAP_INFOpMapInfo CAtumSJ::GetMapInfo(nMapIndex);
                    if (
    pMapInfo == NULL || nMapIndex == || i_bInfWinnerMask == 0)
                                    return;
     
                    
    MapIndex_t nMapIndexBefore pMapInfo->BeforeMapIndex == pMapInfo->MapIndex pMapInfo->BeforeMapIndex// Clear Den Map
                    
    BYTE nInfLoserMask i_bInfWinnerMask == INFLUENCE_TYPE_ANI INFLUENCE_TYPE_VCN INFLUENCE_TYPE_ANI;
     
                    for (
    int i = (CLIENT_INDEX_START_NUM); ms_pFieldIOCP->m_dwArrayClientSizei++)
                    {
                                    
    CFieldIOCPSocketpSock = (CFieldIOCPSocket*)ms_pFieldIOCP->GetIOCPSocket(i);
                                    if (
    NULL == pSock || FALSE == pSock->IsValidCharacter(FALSE))
                                                    continue;
     
                                    if(
    pSock->m_character.MapChannelIndex.ChannelIndex != || 
    pSock->m_character.MapChannelIndex.MapIndex == )
                                                    continue;
     
     
                                    if (
    nMapIndex == pSock->m_character.MapChannelIndex.MapIndex || 
    nMapIndexBefore == pSock->m_character.MapChannelIndex.MapIndex || 
    pMapInfo->BeforeMapIndex2 == pSock->m_character.MapChannelIndex.MapIndex)
                                    {
                                                    
    int nWarPoint 0;
     
                                                    if (
    COMPARE_INFLUENCE(pSock->m_character.InfluenceTypei_bInfWinnerMask)) {
                                                                    
    nWarPoint i_nWinnerWarPoint;
                                                    }
                                                    else if (
    COMPARE_INFLUENCE(pSock->m_character.InfluenceTypenInfLoserMask)) {
                                                                    
    nWarPoint i_nLoserWarPoint;
                                                    }
     
                                                    if (
    nWarPoint == 0)
                                                                    continue;
     
                                                    
    pSock->WPAddWarPoint(nWarPointi_bEventBonusi_byWPUpdateTy);
     
     
                                    }
                    }

    Last edited by vinleprince; 13-09-21 at 05:42 AM. Reason: * add pSock-> to empty prefix m_character




Advertisement