Jump to content

Problem - 6/7 Bonus


Recommended Posts

  • Premium

Hi guys, i have little problem with 6/7 bonus, in source i change -> in char_item.cpp:

Code:
if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam())
	return false;

but i cannot still give attribute to subject

Here is the item_proto: https://metin2.download/picture/114A0r8CHbsU7VvHMM6x5tQyhmm6mXTc/.png 

Nad how it looks in game: https://metin2.download/picture/4r7nX1AqYfibS3ddTq23fvuOOs6Ptd4a/.png

char_item.cpp:

case 71051 :
	{
		// if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam())
		//     return false;
									
		LPITEM item2;

		if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
			return false;

		if (item2->IsExchanging() == true)
			return false;

		if (item2->GetAttributeSetIndex() == -1)
		{
	    	ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ĽÓĽşŔ» şŻ°ćÇŇ Ľö ľř´Â ľĆŔĚĹŰŔÔ´Ď´Ů."));
		    return false;
		}

		if (item2->AddRareAttribute() == true)
		{
			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Ľş°řŔűŔ¸·Î ĽÓĽşŔĚ Ăß°ˇ µÇľú˝Ŕ´Ď´Ů"));

			int iAddedIdx = item2->GetRareAttrCount() + 4;
			char buf[21];
			snprintf(buf, sizeof(buf), "%u", item2->GetID());

			LogManager::instance().ItemLog(
				GetPlayerID(),
				item2->GetAttributeType(iAddedIdx),
				item2->GetAttributeValue(iAddedIdx),
				item->GetID(),
				"ADD_RARE_ATTR",
				buf,
				GetDesc()->GetHostName(),
				item->GetOriginalVnum());

			item->SetCount(item->GetCount() - 1);
		}
		else
		{
			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´ő ŔĚ»ó ŔĚ ľĆŔĚĹŰŔ¸·Î ĽÓĽşŔ» Ăß°ˇÇŇ Ľö ľř˝Ŕ´Ď´Ů"));
		}
	}
break;

case 71052 :
{
	// if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam())
	//     return false;
									
	LPITEM item2;

	if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
		return false;

	if (item2->IsExchanging() == true)
		return false;

	if (item2->GetAttributeSetIndex() == -1)
	{
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ĽÓĽşŔ» şŻ°ćÇŇ Ľö ľř´Â ľĆŔĚĹŰŔÔ´Ď´Ů."));
		return false;
	}

	if (item2->ChangeRareAttribute() == true)
	{
		char buf[21];
		snprintf(buf, sizeof(buf), "%u", item2->GetID());
		LogManager::instance().ItemLog(this, item, "CHANGE_RARE_ATTR", buf);

		item->SetCount(item->GetCount() - 1);
	}
	else
	{
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("şŻ°ć ˝ĂĹł ĽÓĽşŔĚ ľř˝Ŕ´Ď´Ů"));
	}
}
break;

Thanks for help.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 7 years later...

i have the same problem i did not fix it yet aswell maby for you its gonna work if u just put this code in 

Quote

                            case 71051 : // 진재가
                                {
                                    // 유럽, 싱가폴, 베트남 진재가 사용금지
                                    // if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam())
                                        // return false;

                                    LPITEM item2;

                                    if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
                                        return false;

                                    if (item2->IsExchanging() == true)
                                        return false;

                                    if (item2->GetAttributeSetIndex() == -1)
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("속성을 변경할 수 없는 아이템입니다."));
                                        return false;
                                    }

                                    if (item2->AddRareAttribute() == true)
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("성공적으로 속성이 추가 되었습니다"));

                                        int iAddedIdx = item2->GetRareAttrCount() + 4;
                                        char buf[21];
                                        snprintf(buf, sizeof(buf), "%u", item2->GetID());

                                        LogManager::instance().ItemLog(
                                                GetPlayerID(),
                                                item2->GetAttributeType(iAddedIdx),
                                                item2->GetAttributeValue(iAddedIdx),
                                                item->GetID(),
                                                "ADD_RARE_ATTR",
                                                buf,
                                                GetDesc()->GetHostName(),
                                                item->GetOriginalVnum());

                                        item->SetCount(item->GetCount() - 1);
                                    }
                                    else
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("더 이상 이 아이템으로 속성을 추가할 수 없습니다"));
                                    }
                                }
                                break;

                            case 71052 : // 진재경
                                {
                                    // 유럽, 싱가폴, 베트남 진재가 사용금지
                                    // if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam())
                                        // return false;

                                    LPITEM item2;

                                    if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                                        return false;

                                    if (item2->IsExchanging() == true)
                                        return false;

                                    if (item2->GetAttributeSetIndex() == -1)
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("속성을 변경할 수 없는 아이템입니다."));
                                        return false;
                                    }

                                    if (item2->ChangeRareAttribute() == true)
                                    {
                                        char buf[21];
                                        snprintf(buf, sizeof(buf), "%u", item2->GetID());
                                        LogManager::instance().ItemLog(this, item, "CHANGE_RARE_ATTR", buf);

                                        item->SetCount(item->GetCount() - 1);
                                    }
                                    else
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("변경 시킬 속성이 없습니다"));
                                    }
                                }
                                break;

 

Edited by ilgryu
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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