Jump to content

Denizeri24

Member
  • Posts

    188
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Denizeri24

  1. 5jgDc9M.jpg

     

    		if (Windowed)
    		{
    			m_isWindowed = true;
    
    			RECT workArea;
    			SystemParametersInfo(SPI_GETWORKAREA, 0, &workArea, 0);
    
    			const UINT workAreaWidth = (workArea.right - workArea.left);
    			const UINT workAreaHeight = (workArea.bottom - workArea.top);
    
    			const UINT windowWidth = m_pySystem.GetWidth() + GetSystemMetrics(SM_CXBORDER) * 2 + GetSystemMetrics(SM_CXDLGFRAME) * 2 + GetSystemMetrics(SM_CXFRAME) * 2;
    			const UINT windowHeight = m_pySystem.GetHeight() + GetSystemMetrics(SM_CYBORDER) * 2 + GetSystemMetrics(SM_CYDLGFRAME) * 2 + GetSystemMetrics(SM_CYFRAME) * 2 + GetSystemMetrics(SM_CYCAPTION);
    
    			const UINT x = workAreaWidth / 2 - windowWidth / 2;
    			const UINT y = workAreaHeight / 2 - windowHeight / 2;
    
    			SetPosition(x, y);
    		}
    		else
    		{
    			m_isWindowed = false;
    			SetPosition(0, 0);
    		}
    • Scream 1
    • Good 3
  2. 1 hour ago, Karbust said:

    That's the complete opposite of the previous instruction... Obviously it will crash on the else when it tries to access anything inside and find nothing...

    you said;

    c = new CItemCache; //crashes here...

     

    and your core said "c" variable is fucking NULL (0x0) ;

    BvtY24D.png

     

    you cant create new pointer. check your fucking system libraries(freebsd and compiler(gcc or clang)) and optimization flags.

  3. 12 minutes ago, Karbust said:

    What?

    My extern folder only has cryptopp self-compiled, nothing else, all other libraries are through installed packages...

    nevermind...

     

    just try this;

     

    find;

     

    	if (!c)
    	{
    		if (g_log)
    			sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner);
    
    		c = new CItemCache; //crashes here...
    		m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c));
    	}

     

     

    and change;

     

    	if (!c && c != NULL)
    	{
    		if (g_log)
    			sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner);
    
    		c = new CItemCache; //crashes here...
    		m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c));
    	}

     

     

    this is will fix the crash but you probably take new problems.

    • Lmao 4
  4. 13 minutes ago, Suzar said:

    EDIT: I noticed that this event only appears when I run any AS ADMINISTRATOR application. Whether it's metin or not, if I enable anything as administrator, my Client metin2 closes. Additionally, while debugging the Client according to the Martysama tutorial, I registered these "bugs". (Before I did not know that it is possible to debug the release or distribution version in live visual studio at all, in the post above there was no Martysama tutorial, only "Attach to Process".) I compared all lines with sources that do not have this problem and of course everything is 1: 1 ...

    SeJjByv.png

    delete d3d8.dll in game binary folder. windows already support old directx versions(system32/d3d8thk.dll)

  5. 1 hour ago, I3ooI3oo said:

    What do you mean? I can't understand what you mean with that message. That dynamic imports are from Overfall2. (It's not hard to remove them, pretty easy.)

    Helping with leaked server files is against metin2.dev rules.

    A pro boha, nepoužívej ten nechutnej translate.

     

     

    SOCIAL JUSTICE WARRIOR

    spacer.png

    • Not Good 1
    • Love 1
  6. 1 hour ago, Suzar said:

    No, I didn't add this system.

    PS: I have this error from the beginning (it was also on the clean source), but only now I figured out how to trigger it.

    Edit: As for the Debug bin this problem does not occur, in Visual Studio I chose "Attach in Process" for the first Client and when trying to start the next Client, the former crashed, and Visual Studio showed just the following about d3d8. Does anyone know what this might be? I compared the Extern directory with other sources and everything is 1: 1 ...

    l47oSLw.png

     

    just debug, we dont need pdb for d3d8 library. we only need to find the broken code..

  7. bHPPercent = MINMAX(0, reinterpret_cast<uint64_t>((static_cast<int64_t>(TargetPacket.icurHP * static_cast<int64_t>(100)) / static_cast<int64_t>(TargetPacket.iMaxHP)), 100));

    edit :

    uint64_t limit = 18,446,744,073,709,551,615

     

    ALSO BIG NOTE;

     

    int MINMAX(int  min, int value, int max)
    {
        int tv;

        tv = (min > value ? min : value);
        return (max < tv) ? max : tv;
    }

    • Love 1
  8. 3 hours ago, TMP4 said:

    I think he "thought in reverse" thinking you forbid the chars at the switch while you actually allows them there. Char ';' is because it seperates sql commands to try sql injection that's why he wanted to block it while it's blocked by default.

    dsmGaKWMeHXe9QuJtq_ys30PNfTGnMsRuHuo_MUz

    • Lmao 1
  9. i make a gm command;

    ACMD(do_sqltestlog)
    {
    	char	arg1[256];
    	uint64_t count = 0;
    	one_argument(argument, arg1, sizeof(arg1));
    
    	if (*arg1)
    	{
    		str_to_number(count, arg1);
    	}
    	else
    	{
    		count = 1;
    	}
    
    	count = MIN(100000000, count);
    
    	for (uint64_t i = 0; i < count; ++i)
    	{
    		DBManager::instance().Query("INSERT INTO log.log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), '%u', '%u', '%u', '%u', '%s', '%s', '%s', '%u')", 1, 555, 666, 10000000, "GM", "FORSQLTEST", "192.168.1.1", 00);
    	}
    
    	ch->ChatPacket(CHAT_TYPE_INFO, "%u adet sorgu gonderimi tamamlandi", count);
    }

     

    i did 10 million row insert in log.log and its take 660 second.  i give my local server 12 cpu cores ( i7 8700k ) and 6 gb ram. i using mariadb;

     

    spacer.png

     

    I can insert log table ~11.500 row per second but i have question, this performance is good or bad?

  10. 21 minutes ago, LordZiege said:

    Chest item type needs to be ITEM_TREASURE_BOX (for sql 20)

    Key item type needs to be ITEM_TREASURE_KEY (for sql 21)

    actually, he have a another problem;

    he can't open gold chest with gold key xd

     

    try debug your codes with gdb;

     

    char_item.cpp;

     

    case ITEM_TREASURE_KEY  --> if (item->GetValue(0) == item2->GetValue(0))

×
×
  • 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.