Jump to content

6 Stone Add Items


Recommended Posts

CPythonItem::LoadItemTable: invalid item_proto[locale/en/item_proto] STRIDE[156] != sizeof(SItemTable)

Someone fix this?

FIX:

change only userinterface->gamelib not source/gamelib/itemdata.h

ITEM_SOCKET_SLOT_MAX_NUM

 

db/src/ClientManager open;

 

Code Search:
"SELECT id, window+0, pos, count, vnum, socket0, socket1, socket2 "


Code Replace:
"SELECT id, window+0, pos, count, vnum, socket0, socket1, socket2, socket3, socket4, socket5  "

this is not all, must change in this function:

void CClientManager::RESULT_SAFEBOX_LOAD(CPeer * pkPeer, SQLMsg * msg)

 

snprintf(szQuery, sizeof(szQuery), 
				"SELECT id, window+0, pos, count, vnum, socket0, socket1, socket2, socket3, "
				"attrtype0, attrvalue0, "
				"attrtype1, attrvalue1, "
				"attrtype2, attrvalue2, "
				"attrtype3, attrvalue3, "
				"attrtype4, attrvalue4, "
				"attrtype5, attrvalue5, "
				"attrtype6, attrvalue6, "
				"attrtype7, attrvalue7 "
				"FROM item%s WHERE owner_id=%d AND window='%s'",
				GetTablePostfix(), pi->account_id, pi->ip[0] == 0 ? "SAFEBOX" : "MALL");

attr7 is optional i show only where must change.

Add:

DWORD dwSocket3 = 0;

under this:

DWORD dwSocket2 = 0;

 

search and change this:

snprintf(szQuery, sizeof(szQuery), 
								"INSERT INTO item%s (id, owner_id, window, pos, vnum, count, socket0, socket1, socket2, socket3) "
								"VALUES(%u, %u, '%s', %d, %u, %u, %u, %u, %u, %u)",
								GetTablePostfix(),
								GainItemID(),
								pi->account_id,
								pi->ip[0] == 0 ? "SAFEBOX" : "MALL",
								iPos,
								pItemAward->dwVnum, pItemAward->dwCount, pItemAward->dwSocket0, pItemAward->dwSocket1, dwSocket2, dwSocket3);

and this:

item.id = pmsg->Get()->uiInsertID;
					item.window = pi->ip[0] == 0 ? SAFEBOX : MALL,
					item.pos = iPos;
					item.count = pItemAward->dwCount;
					item.vnum = pItemAward->dwVnum;
					item.alSockets[0] = pItemAward->dwSocket0;
					item.alSockets[1] = pItemAward->dwSocket1;
					item.alSockets[2] = dwSocket2;
					item.alSockets[3] = dwSocket3;

this:(attr7 optional)

snprintf(szQuery, sizeof(szQuery), 
			"REPLACE INTO item%s (id, owner_id, window, pos, count, vnum, socket0, socket1, socket2, socket3, "
			"attrtype0, attrvalue0, "
			"attrtype1, attrvalue1, "
			"attrtype2, attrvalue2, "
			"attrtype3, attrvalue3, "
			"attrtype4, attrvalue4, "
			"attrtype5, attrvalue5, "
			"attrtype6, attrvalue6, "
			"attrtype7, attrvalue7) "
			"VALUES(%u, %u, %d, %d, %u, %u, %ld, %ld, %ld, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)",
			GetTablePostfix(),
			p->id,
			p->owner,
			p->window,
			p->pos,
			p->count,
			p->vnum,
			p->alSockets[0],
			p->alSockets[1],
			p->alSockets[2],
			p->alSockets[3],
			p->aAttr[0].bType, p->aAttr[0].sValue,
			p->aAttr[1].bType, p->aAttr[1].sValue,
			p->aAttr[2].bType, p->aAttr[2].sValue,
			p->aAttr[3].bType, p->aAttr[3].sValue,
			p->aAttr[4].bType, p->aAttr[4].sValue,
			p->aAttr[5].bType, p->aAttr[5].sValue,
			p->aAttr[6].bType, p->aAttr[6].sValue,
			p->aAttr[7].bType, p->aAttr[7].sValue);

 

Edited by Traktorzysta
fix
Link to comment
Share on other sites

  • 5 months later...
  • 2 weeks later...
  • 2 years later...
  • Premium
3 hours ago, Kaba said:

toxic comment ahead:

Would it hurt anyone if a moderator had strenght to delete this $h!tsh0w?

or would it be offensive if someone just cut and post the right modifications into a simple thread? 

You can find it on another forum, in the rules it is "copy + paste" not allowed when its not your work.


 

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.