Jump to content

Recommended Posts

  • Premium

Hello, let's start! 

 

1- char_item.cpp

Find for double  ";;"

It's ok the same for some compiler.

 

 

2- On bool CHARACTER::EquipItem(LPITEM item, int iCandidateCell)  
   Find:

        if (iWearCell < 0)
        return false;

   Add below:

        //FIX BLOCK MARRIAGE ITEMS WHILE RIDING
        if (iWearCell == WEAR_BODY && IsRiding() && (item->GetVnum() >= 11901 && item->GetVnum() <= 11914)) //Marriage Armors
        {
            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("?????????????????????????????"));
            return false;
        }

        if (iWearCell == WEAR_WEAPON && IsRiding() && (item->GetVnum() == 50201)) //Marriage Weapon
        {
            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("?????????????????????????????"));
            return false;
        }


3- SMALL PREVENTS ON questlua_global.cpp

    int _clear_server_timer(lua_State* L)
    {
        CQuestManager & q = CQuestManager::instance();
        const char * name = lua_tostring(L, 1);
        DWORD arg = (DWORD) lua_tonumber(L, 2);

        if (name && arg)
            q.ClearServerTimer(name, arg);
        else
            sys_err("LUA PREVENT: Wrong argument on ClearServerTimer!");

        return 0;
    }

    int _char_log(lua_State * L)
    {
        CQuestManager& q = CQuestManager::instance();
        LPCHARACTER ch = q.GetCurrentCharacterPtr();

        DWORD what = 0;
        const char* how = "";
        const char* hint = "";

        if (lua_isnumber(L, 1)) what = (DWORD)lua_tonumber(L, 1);
        if (lua_isstring(L, 2)) how = lua_tostring(L, 2);
        if (lua_tostring(L, 3)) hint = lua_tostring(L, 3);

        if (ch)
            LogManager::instance().CharLog(ch, what, how, hint);
        else
            sys_err("LUA PREVENT: !ch on _char_log!");

        return 0;
    }

 


4- FIX ISSUE ON WAR:

battle.cpp

 Find: battle_is_attackable

 Must be like this:

    if (victim->IsDead() || victim->IsObserverMode())
        return false;


    if (ch->IsStun() || ch->IsDead() || ch->IsObserverMode())
        return false;
Edited by WeedHex
  • Sad 1
  • Confused 1
  • Love 22
Link to comment
https://metin2.dev/topic/18887-fix-korean-errors-part2/
Share on other sites

As I see there are much ;; in the source, for ex

TPacketLoginOnSetup * pck = (TPacketLoginOnSetup *) c_pData;;

 Btw we still don't get any error or warning while compiling. But why? If it's a mistake the compiler why not show or get error? Or if its not a mistake why we should fix this?

Link to comment
https://metin2.dev/topic/18887-fix-korean-errors-part2/#findComment-102923
Share on other sites

  • Bot

Commands in C++ are terminated by using semicolon. If you add any other semicolon after that it won't have any other effect.
So in this case TPacketLoginOnSetup * pck = (TPacketLoginOnSetup *) c_pData; is equal to TPacketLoginOnSetup * pck = (TPacketLoginOnSetup *) c_pData;;;;;;;;;;;;;;;;;;;.

  • Love 1

english_banner.gif

Link to comment
https://metin2.dev/topic/18887-fix-korean-errors-part2/#findComment-102952
Share on other sites

  • 5 years later...

To be correct you need to prevent the usage of all the "weapons", there's two Flower Bouquet items on the item_proto, so it should look like this (I also corrected your "?????????????????????????????" error message to "¸»Ŕ» Ĺş »óĹÂżˇĽ­ żąşąŔ» ŔÔŔ» Ľö ľř˝Ŕ´Ď´Ů.":

	if (iWearCell == WEAR_WEAPON && IsRiding() && (item->GetVnum() >= 50201 && item->GetVnum() <= 50202)) //Marriage Weapon
	{
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("말을 탄 상태에서 예복을 입을 수 없습니다."));
		return false;
	}

If your locale_string.txt dont have "¸»Ŕ» Ĺş »óĹÂżˇĽ­ żąşąŔ» ŔÔŔ» Ľö ľř˝Ŕ´Ď´Ů." error message please add this:
 

"¸»Ŕ» Ĺş »óĹÂżˇĽ­ żąşąŔ» ŔÔŔ» Ľö ľř˝Ŕ´Ď´Ů.";
"You cannot use this, while you riding a horse.";

Your Wedding dress checking part in my case there's no need to add because my char_item.cpp already had these lines (at your code the id range was unnecessary big range, there is no item with 11914 ID! 11904 max value is enough.):

	// 무언가를 탄 상태에서 턱시도 입기 금지
	if (iWearCell == WEAR_BODY && IsRiding() && (item->GetVnum() >= 11901 && item->GetVnum() <= 11904))
	{
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("말을 탄 상태에서 예복을 입을 수 없습니다."));
		return false;
	}

The locale_string is similar in the armor case, no need to add new lines to locale string this time.
So your code now is prevent the player to change their armor/weapon to marriage items while they already riding their horse, but you don't solve that case when a women holding a flower already when she mounting a horse (flower can be used like daggers from horse which level is higher than 11 and they do damage also).
You need to add in the char_horse.cpp under the:
LPITEM armor = GetWear(WEAR_BODY);

    if (armor && (armor->GetVnum() >= 11901 && armor->GetVnum() <= 11904))
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("żąşąŔ» ŔÔŔş »óĹÂżˇĽ­ ¸»Ŕ» Ĺ» Ľö ľř˝Ŕ´Ď´Ů."));
        return false;
    }
This new case:
 

	LPITEM weapon = GetWear(WEAR_WEAPON);

	if (weapon && (weapon->GetVnum() >= 50201 && weapon->GetVnum() <= 50202))
	{
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("꽃다발을 손에 들고 말을 탈 수는 없습니다."));
		return false;
	}

The locale_string.txt part will be:
 

"˛É´ŮąßŔ» ĽŐżˇ µé°í ¸»Ŕ» Ĺ» Ľö´Â ľř˝Ŕ´Ď´Ů.";
"You cannot ride your while Flower Bouquet is equipped.";

Sorry for my english mistakes if there was any, i'm from Hungary.

Edited by Werwolf94
Link to comment
https://metin2.dev/topic/18887-fix-korean-errors-part2/#findComment-165835
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.