Jump to content

How To Fix Korean Errors #PART4


Recommended Posts

  • Premium

-1: Very serious common mistake, let's check.

Run this query

SELECT * FROM `item_proto` WHERE `size` <= '0'

If you find something, fix all 'size' or you'll get serious problems with these items.

 

 

-2: Fix rare crash core with cube (happened and fixxed like this)

Go in cube.cpp and find for this log

		LogManager::instance().CubeLog(ch->GetPlayerID(), ch->GetX(), ch->GetY(),
				reward_value->vnum, new_item->GetID(), reward_value->count, 1);

Replace the log with

        if (new_item)
            LogManager::instance().CubeLog(ch->GetPlayerID(), ch->GetX(), ch->GetY(),reward_value->vnum, new_item->GetID(), reward_value->count, 1);
        else
            sys_err("Cannot find new_item on CUBE_MAKE!");

 

 

-3: config.cpp

g_iFullUserCount
g_iBusyUserCount

These two const will set the STATE_DICT in your serverinfo.py. Edit them as you prefer.

BUSY = Warning many users are connected in that channel.

FULL = Stop login due to many users in the channel.

 

 

-4: cmd_gm.cpp

Find for:

for (int i = 0; i < MAX_PRIV_NUM; ++i)

Add the missing braces

 

 

 

That's all for now, I'll update this thread if I remember any other useful change.

 

Old threads

 

Edited by WeedHex
  • Metin2 Dev 1
  • Love 13
Link to comment
Share on other sites

  • Honorable Member
On 4/7/2020 at 10:46 PM, Sherer said:

You can just wrap size into std::min(1, size) during protos reading process.

std::min<int>(1,0) results in 0. You should use std::max, or, at worst, MINMAX(1, size, 3). I like this way better than filtering them via query.

 

In here a quick&dirty patch:

Spoiler
diff --git a/s3ll_server/Srcs/Server/db/src/ClientManagerBoot.cpp b/s3ll_server/Srcs/Server/db/src/ClientManagerBoot.cpp
index 559e5926..2cf778d 100644
--- a/s3ll_server/Srcs/Server/db/src/ClientManagerBoot.cpp
+++ b/s3ll_server/Srcs/Server/db/src/ClientManagerBoot.cpp
@@ -1483,6 +1483,7 @@ bool CClientManager::InitializeItemTableFromDB()
        VERIFY_IFIELD(IProto::subtype,          item_table->bSubType);
        VERIFY_IFIELD(IProto::weight,           item_table->bWeight);
        VERIFY_IFIELD(IProto::size,             item_table->bSize);
+       item_table->bSize = MINMAX(1, item_table->bSize, 3);
        VERIFY_IFIELD(IProto::antiflag,         item_table->dwAntiFlags);
        VERIFY_IFIELD(IProto::flag,             item_table->dwFlags);
        VERIFY_IFIELD(IProto::wearflag,         item_table->dwWearFlags);
diff --git a/s3ll_server/Srcs/Server/db/src/ProtoReader.cpp b/s3ll_server/Srcs/Server/db/src/ProtoReader.cpp
index 1a76b401..c831994e 100644
--- a/s3ll_server/Srcs/Server/db/src/ProtoReader.cpp
+++ b/s3ll_server/Srcs/Server/db/src/ProtoReader.cpp
@@ -794,7 +794,7 @@ bool Set_Proto_Item_Table(TItemTable *itemTable, cCsvTable &csvTable,std::map<in
    }
    itemTable->bType = dataArray[2];
    itemTable->bSubType = dataArray[3];
-   itemTable->bSize = dataArray[4];
+   itemTable->bSize = MINMAX(1, dataArray[4], 3);
    itemTable->dwAntiFlags = dataArray[5];
    itemTable->dwFlags = dataArray[6];
    itemTable->dwWearFlags = dataArray[7];

 

Edited by martysama0134
added patch
  • Love 9
Link to comment
Share on other sites

  • 9 months later...
  • 11 months later...
  • Honorable Member

I only checked mainline.

Server Source:

Spoiler

APPLY_PC_BANG_EXP_BONUS: 75

APPLY_PC_BANG_DROP_BONUS: 76

APPLY_EXTRACT_HP_PCT: 77

Client Source:

Spoiler

APPLY_EXTRACT_HP_PCT: 75

APPLY_PC_BANG_EXP_BONUS: 76

APPLY_PC_BANG_DROP_BONUS: 77

Which one is true?

I checked official binary builtins, here is answer: 

Spoiler

131147att.PNG

Game source is wrong.

-------------------------------------------------------

In common/length.h, move APPLY_EXTRACT_HP_PCT up two lines like this:

Spoiler

1314211.PNG

in game/constants.cpp, same thing:

Spoiler

 

//Find
	// PC_BANG_ITEM_ADD
	{ POINT_PC_BANG_EXP_BONUS	},		// 75
	{ POINT_PC_BANG_DROP_BONUS	},		// 76
	// END_PC_BANG_ITEM_ADD

	{ POINT_NONE,		},				// 77 사용시 HP 소모 APPLY_EXTRACT_HP_PCT

///Change
	{ POINT_NONE,		},				// 75 사용시 HP 소모 APPLY_EXTRACT_HP_PCT
	
	// PC_BANG_ITEM_ADD
	{ POINT_PC_BANG_EXP_BONUS	},		// 76
	{ POINT_PC_BANG_DROP_BONUS	},		// 77
	// END_PC_BANG_ITEM_ADD

-------------------------------------------------------

Are these bonuses in use?:

- I don't know, I'm just correcting the mistake.

Edited by Mali
  • Metin2 Dev 1
  • Love 1
  • Love 2

 

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...
  • Honorable Member
On 11/29/2023 at 10:29 AM, Mind Rapist said:

Does anyone have a fix for this?

spacer.png

I've been looking everywhere even a clue for where to look could be helpful

The reason behind this bug is, there are some models especially the newer ones that they have/had different bone names of the hand/fingers of the character.
I've resolved this thing with a small extension that I gave more boneNames into the skill's script (example below)

 

Spoiler
ScriptType               MotionData

MotionFileName           "D:\Ymir Work\pc\sura\skill\muyeong.GR2"
MotionDuration           2.000000
Accumulation           0.00	-219.45	0.00

Group MotionEventData
{
    MotionEventDataCount     1
    Group Event00
    {
        MotionEventType      1
        StartingTime         0.358974
        
        IndependentFlag      0
        AttachingEnable      1
        FollowingEnable      1
        AttachingBoneName    "Bip01 L Finger1Nub"
        AttachingBoneName1   "Bip01 L Finger12"
        EffectFileName       "d:/ymir work/pc/sura/effect/muyeong_4_making.mse"
        EffectPosition       0.000000 0.000000 0.000000
    }
}

As you can see the logic is simple there.

        AttachingBoneName    "Bip01 L Finger1Nub"
        AttachingBoneName1   "Bip01 L Finger12"

Changing the SMotionEventDataEffect::strAttachingBoneName variable from std::string to std::vector<std::string> and make the changes for the function of load, save and handling.

 

  • Metin2 Dev 1
  • Love 4
Link to comment
Share on other sites

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.