1 mesaj
Administrator Administrator
  • Mesaje: 3714
  • Reacții: 64703
  • Mesaje utile: 38
  • Status: Pe aici.. 🤠
  • Server: Saga2 - Soon
  • Regat: Jinno
  • [ID Discord]
  • Contact:
    *Descriere:

    Acesta este o rezolvare pentru un core doner rar.

    Este un fix facut de @Gurgarath
    While trying things on my server, I stumbled accross a weird core-downer. It is really simple but I say "weird" because in litteraly 10 years it has never happened to me nor anyone I know. It probably gets triggered by a malfunctioning quest I had taken from 2012 and forgot to remove (quests were not my concern at the time). I didn't want to only remove the quest but instead I decided to fix the coredowner.



    It happens because the game is not expected to trigger the function get_leader_vid() without a party. However, there is no check at all if it somehow did and on my server it randomly got triggered without a party and the core simply crashed. So instead of digging further, I thus added a check to avoid the core to crash. Please note that my sources were vanilla at that time.
    *Poze / Video:

    *Link download / Code:

    Cum rezolvam?

    Deschidem questlua_npc.cpp si cautam functia:
    Code:
    	//Function "npc_get_leader_vid"
    	{
    		CQuestManager& q = CQuestManager::instance();
    		LPCHARACTER npc = q.GetCurrentNPCCharacterPtr();
    
    		LPPARTY party = npc->GetParty();
    		LPCHARACTER leader = party->GetLeader();
    
    		if (leader)
    			lua_pushnumber(L, leader->GetVID());
    		else
    			lua_pushnumber(L, 0);
    
    
    		return 1;
    	}
    Adaugam un check de if "party":
    Conținut: Ascuns
    Reacționează ❤️ la acest mesaj și conținutul se va afișa automat.

    Nou Cum descarc de pe TeraBox?

    Afișează detalii Ascunde detalii
    • Este asemănător cu Mega.nz
    • Instalați-vă clientul lor de Download de aici
    • Faceți-vă un cont (vă puteți loga cu Facebook / Google / etc)
    • Nou Dacă nu vreți să descărcați clientul de Download, folosiți acest site
    • Gata! Acum puteți descărca resursele rapid & simplu.

    De ce folosim TeraBox?

    • Este gratuit
    • Primești 1TB de spațiu gratuit la orice cont creat!
    • Este ușor de folosit și varianta premium este foarte ieftină
    • Fișierele nu sunt șterse niciodată
    TeraBox logo
    Te asteptam si pe serverul de Discord :p - aici ne-am strans toata comunitatea de Metin2 din Romania.
    Link: https://discord.gg/jWxeDSf7HP

    Suntem aproape 2000 membri! - Avem chat activ zilnic, support, cereri, resurse. :D :ymcowboy:




    See full signature

    🔥 Hai pe Discord! - Chat activ și support direct

    Te așteptăm și pe serverul de Discord - aici ne-am strâns toată comunitatea de Metin2 din România.

    Alătură-te acum!
    Suntem aproape: 
    Robot Discord
    Roboțelu'
    Anunț

    Creează-ți un cont sau autentifică-te pentru a participa la discuție

    Trebuie să fii membru pentru a răspunde

    Creează-ți un cont

    Membrii pot crea subiecte noi și pot descărca resurse Metin2 Gratuit!


    Te poți înregistra sau conecta rapid utilizând contul tău de Discord, Github sau Google.

    Înregistrare

    Autentifică-te

    Înapoi la “FIX-uri”

    Informații

    Utilizatori ce navighează pe acest forum: bip4me, drogul85, Manfred, Turn0n și 4 vizitatori

    Discord ID copiat: