Jump to content

Deliris

Developer
  • Posts

    162
  • Joined

  • Last visited

  • Days Won

    5
  • Feedback

    0%

Posts posted by Deliris

  1. 43 minutes ago, DrTurk said:
    
    struct SendDisconnectFunc
    {
    	void operator()(LPDESC d)
    	{
    		if(d->GetCharacter())
    		{
    			d->GetCharacter()->SaveReal();
    			DWORD pid = d->GetCharacter()->GetPlayerID();
    			db_clientdesc->DBPacketHeader(HEADER_GD_FLUSH_CACHE, 0, sizeof(DWORD));
    			db_clientdesc->Packet(&pid, sizeof(DWORD));
    
    			if(d->GetCharacter()->GetGMLevel() == GM_PLAYER)
    			{
    				d->GetCharacter()->ChatPacket(CHAT_TYPE_COMMAND, "quit Shutdown(SendDisconnectFunc)");
    			}
    		}
    	}
    };
    

     

    I see what you did there, but this doesn't help at all, what if the player disconnected before the shutdown ?
    As we said before, best way is to shutdown in-game, wait a few minutes and then just gracefully kill the cores.

  2. Those updates shouldn't cause this error;

    I've had this problem too a while ago, but in my case it was because I didn't send the correct size of the dynamic packet(there should be a 'short' variable in the packet's struct if it's Dynamic), maybe it helps.

    You could also can try starting the client in Debug mode and check what data you receive from the server;

    Hope it helps!

  3. 15 minutes ago, Bizzy said:
    
    struct FCFight
    {
    	LPCHARACTER pkLeaver;
    	DWORD stateType;
    	FCombatFight(LPCHARACTER ch, DWORD state) : pkLeaver(ch), stateType(state) {}
    
    	void operator() (LPENTITY ent)
    	{
    		if (ent->IsType(ENTITY_CHARACTER))
    		{
    			LPCHARACTER ch = static_cast<LPCHARACTER>(ent);
    			if (ch && ch->IsPC())
    			{
    				switch (stateType)
    				{
    					case C_FIGHT_ADD:
    					{
    						TargetInfo * pInfo = CTargetManager::instance().GetTargetInfo(ch->GetPlayerID(), COMBAT_FIGHT_INDEX, pkLeaver->GetVID());
    						if (!pInfo)
    							CTargetManager::Instance().CreateTarget(ch->GetPlayerID(), C_ZONE_INDEX_TARGET, pkLeaver->GetName(), C_FIGHT_INDEX,pkLeaver->GetVID(), NULL, ch->GetMapIndex(), "1");
    					}
    					break;
    
    					case C_FIGHT_REMOVE:
    						CTargetManager::instance().DeleteTarget(ch->GetPlayerID(), C_FIGHT_INDEX, pkLeaver->GetName());
    						break;
    				}
    			}
    		}
    	}
    };

     

    When he told you to show us the function...he meant the function that generates the error.......

    The fix that @WeedHexprovided should work, If I remember correctly there are multiple occurrences in char_item.cpp

    • Love 1
  4. 1 minute ago, Lead0b110010100 said:

    He needs to do that, but he needs to recompile / use the 64 bit equvivalent of the libs too.

    And he needs to recompile metin2's libs like libthecore etc etc.

     

    It's not as easy as it sounds if you ask me. Changing dependencies is always a shit ton of work / trial & error.

    Indeed, you're right, but from what he said I assumed that he already updated & compiled the libs.

    • Good 1
    • Love 1
  5. You can make use of the 'FindAffect' function which returns 'nullptr' (if the player doesn't have the affect) or a pointer to the affect.

     

    CAffect* FindAffect(DWORD dwType, BYTE bApply = APPLY_NONE) const;
    
    if (ch->FindAffect(AFFECT_COLLECT)) { // Checks if the player has the affect AFFECT_COLLECT.
      // code if the player has the AFFECT_COLLECT.
    } else {
     // code if the player doesn't have the affect. 
    }
    
    
    
    You can also use it like this:
    if (ch->FindAffect(AFFECT_COLLECT, POINT_HT)) // Checks for AFFECT_COLLECT that gives POINT_HT(Vitality).

     

    P.S: I used 'AFFECT_COLLECT' as an example, you can get a list of the affects from affects.h

    • Lmao 1
  6. On 2/22/2021 at 9:41 AM, ⚡FlasH⚡ said:
    • Do you think the forum lacks something?

    - i'm not sure

    • Do you want to see new things?

    -Yes

    Make a Trade request features how M2D have, if they want to buy, buy through forum and if the seller will try to scam, he will be banned.

    - What i'm meaning through forum?

    After the payment was made the seller will accept his Trade request and give him the files link (https://file.io/) which after download is removed.

    Or to be safe the buyer have 24h time to download the content ,after 24h the link will be removed even wasn't downloaded. But for that features u have to use their API (https://file.io/#api)

    In case of chargeback idk...how many trade request u have that's mean u are a Trusted seller / buyer.

    • What do you want to see on Metin2 Dev?

    Let ppl selling metin2 stuffs. many of them are interested in the sell/buy systems , and bcoz of new "rules" many of them leave the community.

    And unbanned unfair ban..
     

     

    This is exactly what I wanted to propose, it's a very good idea; it would help both the sellers & customers.

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