Jump to content

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


Recommended Posts

  • Replies 14
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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

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

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

  • Developer

 

-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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 0

      Quest 6/7 Problem

    2. 5

      Effect weapons

    3. 3

      Crystal Metinstone

    4. 3

      Feeding game source to LLM

    5. 113

      Ulthar SF V2 (TMP4 Base)

    6. 3

      Feeding game source to LLM

    7. 0

      Target Information System

    8. 3

      Feeding game source to LLM

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.