Jump to content

spectrum

Member
  • Posts

    46
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by spectrum

  1. 7 minutes ago, Nebi said:

    Full function code:

    bool CArenaMap::AddArena(DWORD mapIdx, WORD startA_X, WORD startA_Y, WORD startB_X, WORD startB_Y)
    {
    	itertype(m_listArena) iter = m_listArena.begin();
    
    	for (; iter != m_listArena.end(); iter++)
    	{
    		if ((CArena*)(*iter)->CheckArea(startA_X, startA_Y, startB_X, startB_Y) == false)
    		{
    			sys_log(0, "CArenaMap::AddArena - Same Start Position set. stA(%d, %d) stB(%d, %d)", startA_X, startA_Y, startB_X, startB_Y);
    			return false;
    		}
    	}
    
    	m_dwMapIndex = mapIdx;
    
    	CArena *pArena = M2_NEW CArena(startA_X, startA_Y, startB_X, startB_Y);
    	m_listArena.push_back(pArena);
    
    	return true;
    }

    is there anything missing here?

    i think you need auto for itertype 

    I have c ++ 17 and it didn't cause this problem

    bool CArenaMap::AddArena (DWORD mapIdx, WORD startA_X, WORD startA_Y, WORD startB_X, WORD startB_Y)
    {
    	auto iter = m_listArena.begin();
    
    	for (; iter != m_listArena.end(); iter++)
    	{
    		if ((CArena*) (*iter)->CheckArea (startA_X, startA_Y, startB_X, startB_Y) == false)
    		{
    			sys_log (0, "CArenaMap::AddArena - Same Start Position set. stA(%d, %d) stB(%d, %d)", startA_X, startA_Y, startB_X, startB_Y);
    			return false;
    		}
    	}
    
    	m_dwMapIndex = mapIdx;
    
    	CArena* pArena = M2_NEW CArena (startA_X, startA_Y, startB_X, startB_Y);
    	m_listArena.push_back (pArena);
    
    	return true;
    }

     

  2. 20 minutes ago, Nebi said:

    I'm getting an error when compiling Metin2 gcc11 c++20. Can you help me?

     

    game/src/arena.cpp

    ERROR:

    arena.cpp: In member function 'bool CArenaMap::AddArena(DWORD, WORD, WORD, WORD, WORD)': arena.cpp:83:89: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 83 | if ((CArena*)(*iter)->CheckArea(startA_X, startA_Y, startB_X, startB_Y) == false) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
    
    bool CArenaMap::AddArena(DWORD mapIdx, WORD startA_X, WORD startA_Y, WORD startB_X, WORD startB_Y) { itertype(m_listArena) iter = m_listArena.begin();

     

    for (; iter != m_listArena.end(); iter++)
    {
        if ((CArena*)(*iter)->CheckArea(startA_X, startA_Y, startB_X, startB_Y) == false)
        {
            sys_log(0, "CArenaMap::AddArena - Same Start Position set. stA(%d, %d) stB(%d, %d)", startA_X, startA_Y, startB_X, startB_Y);
            return false;
        }
    }

     

    bool CArenaMap::AddArena(DWORD mapIdx, WORD startA_X, WORD startA_Y, WORD startB_X, WORD startB_Y)
    {
    	itertype(m_listArena) iter = m_listArena.begin();
    
    	for (; iter != m_listArena.end(); iter++)
    	{
    		if ((CArena*)(*iter)->CheckArea(startA_X, startA_Y, startB_X, startB_Y) == false)
    		{
    			sys_log(0, "CArenaMap::AddArena - Same Start Position set. stA(%d, %d) stB(%d, %d)", startA_X, startA_Y, startB_X, startB_Y);
    			return false;
    		}
    	}

     

  3. On 10/2/2021 at 5:45 PM, Draveniou1 said:

    This is the hidden content, please

    Metin2 Download

     

    I do this topic for those who have a problem with Unknown Header operating server in France with 800-1k player online and it has been working for 5 days without problems and without kick

    This is the hidden content, please

     

    If you have provlem :

    Open in game.py

    search and remove:

            if constInfo.SEQUENCE_PACKET_ENABLE:
                net.SetPacketSequenceMode()

     

    Now open constinfo.py and search and remove

    SEQUENCE_PACKET_ENABLE = 1

    ----------------------------------------------------------------------------------------------

     

    Source Client:

    Search 

    return SendSequence();

    change with

    // return disable;

     

    it is in intrologin.py no game.py , try to use lentile 

    def Connect(self, id, pwd):

            if constInfo.SEQUENCE_PACKET_ENABLE:
                net.SetPacketSequenceMode()

    https://metin2.download/picture/55cAxCRatHc8SUXkEpIcR0RJh9AD5S1z/.png

    and more the first remove this bullshit it is IraWork 

    • Metin2 Dev 2
    • Not Good 1
    • Good 1
    • Love 1
  4. the problem that many do not check if you have an item on position 1 (example 19 level 1 sword) level 1 sword occupies position 1 and 6 in the safebox - deposit adding another weapon on slot 6 overlap

     

    normal : https://metin2.download/picture/pJ3tIASQ2GtRwJaBTCgY1hTO2GGYBIAO/.png

     

    bug : https://metin2.download/picture/qmx54CuTyVR22HnlsiuHc8QrpwpF1TsL/.png

  5. for all guys don't understend . take the good cod

    if (pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) && number(0, 4) > 0) // 80% E¢ç¡¤u
                {
                    int i = ((iCurHP>=0)?MIN(dam, iCurHP):dam) * pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) / 100; //@fixme107
    
                    if (i)
                    {
                        CreateFly(FLY_HP_SMALL, pAttacker);
                        pAttacker->PointChange(POINT_HP, i);
                    }
                }
                if (pAttacker->GetPoint(POINT_HIT_SP_RECOVERY) && number(0, 4) > 0) // 80% E¢ç¡¤u
                {
                    int i = ((iCurHP>=0)?MIN(dam, iCurHP):dam) * pAttacker->GetPoint(POINT_HIT_SP_RECOVERY) / 100; //@fixme107
    
                    if (i)
                    {
                        CreateFly(FLY_SP_SMALL, pAttacker);
                        pAttacker->PointChange(POINT_SP, i);
                    }
                }

     

    • Love 1
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.