Jump to content
×
×
  • Create New...
  • 0

About adding 4rd. Socket to Items. [ITEM_METIN]


-TÜRK-

Question

  • Answers 14
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

14 answers to this question

Recommended Posts

  • 0
 
+1 have to do part of the socket in the Database

 

"Some come to see you fall, others come pick you up
Some come make you smile, others will make you cry
Some lie by lie, lie to deceive others "

 

Link to comment
Share on other sites

  • 0
you need to change some thing more 
as here
 

db/Cache.cpp

		{
			iLen += snprintf(szColumns + iLen, sizeof(szColumns) - iLen, ", socket0, socket1, socket2");
			iValueLen += snprintf(szValues + iValueLen, sizeof(szValues) - iValueLen,
					", %lu, %lu, %lu", p->alSockets[0], p->alSockets[1], p->alSockets[2]);
			iUpdateLen += snprintf(szUpdate + iUpdateLen, sizeof(szUpdate) - iUpdateLen,
					", socket0=%lu, socket1=%lu, socket2=%lu", p->alSockets[0], p->alSockets[1], p->alSockets[2]);
		}

in

		{
			iLen += snprintf(szColumns + iLen, sizeof(szColumns) - iLen, ", socket0, socket1, socket2, socket3");
			iValueLen += snprintf(szValues + iValueLen, sizeof(szValues) - iValueLen,
					", %lu, %lu, %lu, %lu", p->alSockets[0], p->alSockets[1], p->alSockets[2],p->alSockets[3]);
			iUpdateLen += snprintf(szUpdate + iUpdateLen, sizeof(szUpdate) - iUpdateLen,
					", socket0=%lu, socket1=%lu, socket2=%lu, socket3=%lu", p->alSockets[0], p->alSockets[1], p->alSockets[2], p->alSockets[3]);
		}

is also in the sql table add a new column socket3

Link to comment
Share on other sites

  • 0

game/item.cpp

                if ((dwVnum = GetSocket(i)) <= 2)

>>>

                if ((dwVnum = GetSocket(i)) <= 3)
int CItem::GetAccessorySocketGrade()
{
       return MINMAX(0, GetSocket(0), GetAccessorySocketMaxGrade());
}

int CItem::GetAccessorySocketMaxGrade()
{
       return MINMAX(0, GetSocket(1), ITEM_ACCESSORY_SOCKET_MAX_NUM);
}

int CItem::GetAccessorySocketDownGradeTime()
{
    return MINMAX(0, GetSocket(2), aiAccessorySocketDegradeTime[GetAccessorySocketGrade()]);
}

>>>>

int CItem::GetAccessorySocketGrade()
{
       return MINMAX(0, GetSocket(0), GetAccessorySocketMaxGrade());
}

int CItem::GetAccessorySocketMaxGrade()
{
       return MINMAX(0, GetSocket(1), ITEM_ACCESSORY_SOCKET_MAX_NUM);
}

int CItem::GetAccessorySocketDownGradeTime()
{
    return MINMAX(0, GetSocket(2), ITEM_ACCESSORY_SOCKET_MAX_NUM);
}

int CItem::GetAccessorySocketDownGradeTime()
{
    return MINMAX(0, GetSocket(3), aiAccessorySocketDegradeTime[GetAccessorySocketGrade()]);
}

item_manager.cpp

if (socket > 2 && socket != ITEM_BROKEN_METIN_VNUM)

>>

if (socket > 3 && socket != ITEM_BROKEN_METIN_VNUM)

not tested.

"Some come to see you fall, others come pick you up
Some come make you smile, others will make you cry
Some lie by lie, lie to deceive others "

 

Link to comment
Share on other sites

  • 0

Guys, my db & game crash error has been "solved". But there is still I can't see 4rd. socket?

 

What I made?

 

DB & Game has been edited. + Client (socket0,socket1,socket2 has been extended to -> socket0,socket1,socket2,socket3)

 

In item_proto structure (client side) I changed socket count, 3 to 4.

I edited item_proto structure to make compatible with 4rd. socket.

Because when you will edit client side, client side gives you error about Item table size error & I fixed by this way.

 

If I edit 4rd socket (socket3) manually in item table still I can't see effects of metin stones.

 

Any ideas guys?

Link to comment
Share on other sites

  • 0

-TÜRK- changed what I quoted too?

 

I think, nothing to do with what you say. Because you are looking wrong place. They are just for accessories, then you wrote new function we don't need to write new function, we just need to extend existing functions :)

Link to comment
Share on other sites

  • 0

So it's more like want to make a new socket without doing all the functions that you need to function? how do you think it will work if you do not declare all the functions necessary for the operation? more good luck.

"Some come to see you fall, others come pick you up
Some come make you smile, others will make you cry
Some lie by lie, lie to deceive others "

 

Link to comment
Share on other sites

  • 0

 

-TÜRK- changed what I quoted too?

 

I think, nothing to do with what you say. Because you are looking wrong place. They are just for accessories, then you wrote new function we don't need to write new function, we just need to extend existing functions :)

 

 

So, you're saying that by changing the variable which contains the socket count is enough? By that logic, for example, increasing the number of inventory pages would be just change it's variable. But it's not.

 

I'd anyway try to do that. If the result is the same than without that piece of code, then remove it.

when you return 0 and server doesn't boot:

unknown.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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.