Jump to content

kafra storage bug cannot view some items.

closed

reigneil
2013-06-15 22:46:52
you cannot view some of the items you stored in kafra. can anyone confirm this? i used 20130320 client and it seems to be random disapperance? i also try 20130605 client.,

kyeme
2013-06-15 23:19:11
What your revision?
Fixed already http://rathena.org/board/tracker/issue-7697-kafra-storage-bug-cant-view-stored-weapon-and-equipment/?view=findpost&p=20205&hl=storage&fromsearch=1
Guildstorage: http://rathena.org/board/tracker/issue-7712-2013-clients-guild-sotrage-bug-17350/

reigneil
2013-06-16 01:01:35
i'm aware of that fix. i used rev. 17367 and seems to be another bug. later i will test it again using 2012 client

Napster
2013-06-16 01:10:08
Confirm still problem for 2013 client

some type item cannot view

reigneil
2013-06-17 11:30:28
i tested it on 2012-04-10aRagexeRE to be exact and it works well., i think this is related to packet handling for 2013 client. i hope that this will soon to fix. thanks!

Lighta
2013-06-17 14:56:50
Wich item cannot be viewed currently ?
(be more specific please so I can reproduce and try to fix it)

Napster
2013-06-17 18:58:38
@Lighta

type useable can't view when open storage again

reigneil
2013-06-18 00:58:05
i think this was solved by not changing mmo.h define packetver 20120410 even if you used 2013 client. but still under observation i hope that this could be it...

Napster
2013-06-18 01:09:16
i check again for guild storage & kafra storage

found problem item useable

ex.

put item to storage (1. red potion 1 ea) can't see red potion
but
put item to storage (1. [color=#ff0000]red potion[/color] 1 ea & 2. [color=#ff8c00]orange potion[/color] 1 ea) see orange potion only

maybe problem with [color=#0000ff]items_length[/color] count

reigneil
2013-06-18 04:25:02
just that i expected there is consequence not editing mmo.h cashshop problem arise. XD

what i notice is it only takes 2 item to be invisible and then stop from doing it again. it happen in all item you stored but once per category. item cash weapon etc.

to test this bug.
1) make sure you clear all items stored. @clearstorage or delete mysql db storage manually.
2) make an apple and main gauche as test subject.
3) store this and reopen your storage again.

mrlongshen
2013-07-27 18:18:26
[quote name="Napster" post="20500" timestamp="1371517756"]
i check again for guild storage & kafra storagefound problem item useableex.put item to storage (1. red potion 1 ea) can't see red potionbutput item to storage (1. [color=#ff0000]red potion[/color] 1 ea & 2. [color=#ff8c00]orange potion[/color] 1 ea) see orange potion onlymaybe problem with [color=#0000ff]items_length[/color] count[/quote]

same here. got problem. now. latest svn ...

x13th
2013-07-29 03:59:55
Confirm using 2013-06-05 client

megabox
2013-07-31 16:10:11
i can confirm this... it happens to me using every 2013 client and also using whatever item ex: usables, weapons, cards, etc..

x13th
2013-08-01 13:49:28
bump?

Talaysen
2013-08-03 21:38:41
I can also confirm this is happening with the 2013-07-17 client.
Items placed into storage disappear after the storage is closed.
It seems to (so far as I can tell) only affect the first item placed into the storage (in my case, this is an 'Apple'), where other items will remain visible.

It will still show 1/600, indicating that the item exists within the storage, it just isn't visible in the storage tab, for whatever reason?

Edit:

Actually, it seems like all items being placed into the 'Items' tab disappear for me.
Three cards placed into the 'Cards' tab are still visible, and I didn't seem to lose any armor or weapons.

(Using SVN Revision 17440)

x13th
2013-08-04 04:20:12
Is there anyone can fix this? :(

Talaysen
2013-08-04 17:32:42
This is a pretty severe issue. Players missing important gear, unable to get items out of storage, scared to put items in storage, and weight limits is making it difficult for many people to play.
(If I could be any assistance at all in providing more information or anything of the such, let me know how I can help.)

reigneil
2013-08-05 08:07:10
heres a temporary remedy for 2013 client (tested on 20130320)
[color=rgb(0,100,0)]make backup incase there something happen.[/color]
just edit your clif.c
find clif_storagelist statement and replace it with this.

[color=#ff0000] V.2 [/color]
void clif_storagelist(struct map_session_data* sd, struct item* items, int items_length)
{
	struct item_data *id;
	int i,n,ne;
	unsigned char *buf;
	unsigned char *bufe;
#if PACKETVER < 5
	const int s = 10; //Entry size.normal item
	const int sidx=4; //start itemlist idx
#elif PACKETVER < 20080102
	const int s = 18;
	const int sidx=4;
#elif PACKETVER < 20120925
	const int s = 22;
	const int sidx=4;
#else
	const int s = 24;
	const int sidx = 24+4;
#endif
#if PACKETVER < 20071002
	const int se = 20; //entry size equip
	const int sidxe = 4; //start itemlist idx
#elif PACKETVER < 20100629
	const int se = 26;
	const int sidxe = 4;
#elif PACKETVER < 20120925
	const int se = 28;
	const int sidxe = 4;
#else
	const int se = 31;
	const int sidxe = 24+4;
#endif

	buf = (unsigned char*)aMalloc(items_length * s + sidx);
	bufe = (unsigned char*)aMalloc(items_length * se + sidxe);

	for( i = 0, n = 0, ne = 0; i < items_length; i++ )
	{
		if( items[i].nameid <= 0 )
			continue;
		id = itemdb_search(items[i].nameid);
		if( !itemdb_isstackable2(id) ) { //Equippable
			clif_item_sub(bufe, ne*se+sidxe,i+1, &items[i], id, id->equip);
			ne++;
		}
		else { //Stackable
			clif_item_sub(buf, n*s+sidx,i+1, &items[i], id,-1);
			n++;
		}
	}
	if( n )
	{
#if PACKETVER < 5
		WBUFW(buf,0)=0xa5;
#elif PACKETVER < 20080102
		WBUFW(buf,0)=0x1f0;
#elif PACKETVER < 20120925
		WBUFW(buf,0)=0x2ea;
#else
		WBUFW(buf,0)=0x995;
//		memset((char*)WBUFP(buf,6),0,24); //storename
#endif
		WBUFW(buf,2)=n*s+sidx;
		clif_send(buf, WBUFW(buf,2), &sd->bl, SELF);
	}
	if( ne )
	{
#if PACKETVER < 20071002
		WBUFW(bufe,0)=0xa6;
#elif PACKETVER < 20120925
		WBUFW(bufe,0)=0x2d1;
#else
		WBUFW(bufe,0)=0x996;
//		memset((char*)WBUFP(bufe,6),0,24); //storename
#endif
		WBUFW(bufe,2)=ne*se+sidxe;
		clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
	}

	if( buf ) aFree(buf);
	if( bufe ) aFree(bufe);
}





[s]what i do here is i replace all #elif for PACKETVER 20120925 with #else and remove the old #else statement.[/s] see what i comment in the code.
this thing is what i observe for client 20120410 and merge the idea with 20130320.

[color=#ff0000] dont forget to recompile .[/color]

[color=#000000]EDIT:[/color]
[color=#000000]sorry for everyone... i mess it up clip_item_sub. /sob[/color]
[color=#ff0000]v.2[/color] i only comment
[color=#008000]memset((char*)WBUFP(bufe,6),0,24); //storename[/color]
but storage name glitch.
still under observation... [color=#ff0000]use it at your own risk![/color]

Lighta
2013-08-06 02:56:11
reigneil if you want to use the old packet for this you'll need to change clif_item_sub, as it will still try to create the itemdata for the 2013 client. Comment it they way you did and you should be fine. (You'll use old packet but that should be fine)

anginafectoris
2013-08-06 04:52:09
@ reigneil im using client 20130713 svn 17442 and i confirm yes there was a bug in kafra storage. then i change my mmo.h to 20120410 after that i recompile it viola it was fix now. i will observe it for now.

Talaysen
2013-08-06 05:09:46
[quote name="reigneil" post="21639" timestamp="1375690030"]
heres a remedy for 2013 client (tested on 20130320) [color=#006400]make backup incase there something happen.[/color] just edit your clif.cfind clif_storagelist statement and replace it with this.
void clif_storagelist(struct map_session_data* sd, struct item* items, int items_length){	struct item_data *id;	int i,n,ne;	unsigned char *buf;	unsigned char *bufe;#if PACKETVER < 5	const int s = 10; //Entry size.normal item	const int sidx=4; //start itemlist idx#elif PACKETVER < 20080102	const int s = 18;	const int sidx=4;#else	const int s = 22;	const int sidx=4;//#elif PACKETVER < 20120925//	const int s = 22;//	const int sidx=4;//#else//	const int s = 24;//	const int sidx = 24+4;#endif#if PACKETVER < 20071002	const int se = 20; //entry size equip	const int sidxe = 4; //start itemlist idx#elif PACKETVER < 20100629	const int se = 26;	const int sidxe = 4;#else	const int se = 28;	const int sidxe = 4;//#elif PACKETVER < 20120925//	const int se = 28;//	const int sidxe = 4;//#else//	const int se = 31;//	const int sidxe = 24+4;#endif	buf = (unsigned char*)aMalloc(items_length * s + sidx);	bufe = (unsigned char*)aMalloc(items_length * se + sidxe);	for( i = 0, n = 0, ne = 0; i < items_length; i++ )	{		if( items[i].nameid <= 0 )			continue;		id = itemdb_search(items[i].nameid);		if( !itemdb_isstackable2(id) ) { //Equippable			clif_item_sub(bufe, ne*se+sidxe,i+1, &items[i], id, id->equip);			ne++;		}		else { //Stackable			clif_item_sub(buf, n*s+sidx,i+1, &items[i], id,-1);			n++;		}	}	if( n )	{#if PACKETVER < 5		WBUFW(buf,0)=0xa5;#elif PACKETVER < 20080102		WBUFW(buf,0)=0x1f0;#else		WBUFW(buf,0)=0x2ea;//#elif PACKETVER < 20120925//		WBUFW(buf,0)=0x2ea;//#else//		WBUFW(buf,0)=0x995;//		memset((char*)WBUFP(buf,6),0,24); //storename#endif		WBUFW(buf,2)=n*s+sidx;		clif_send(buf, WBUFW(buf,2), &sd->bl, SELF);	}	if( ne )	{#if PACKETVER < 20071002		WBUFW(bufe,0)=0xa6;#else		WBUFW(bufe,0)=0x2d1;//#elif PACKETVER < 20120925//		WBUFW(bufe,0)=0x2d1;//#else//		WBUFW(bufe,0)=0x996;//		memset((char*)WBUFP(bufe,6),0,24); //storename#endif		WBUFW(bufe,2)=ne*se+sidxe;		clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);	}	if( buf ) aFree(buf);	if( bufe ) aFree(bufe);}

what i do here is i replace all #elif for PACKETVER 20120925 with #else and remove the old #else statement. see what i comment in the code.this thing is what i observe for client 20120410 and merge the idea with 20130320.[color=#ff0000] dont forget to recompile .[/color][/quote]
Implemented this, using the 2013-07-17 client.
With this, I could see the items that were previously invisible, but it makes it to where I can't remove anything from storage that has a quantity, whether a quantity is present or not.

(IE: 1 apple or 100 apples, can't remove them)
I can remove weapons or armor, cannot remove cards, cannot remove potions, cannot remove Misc. items.

reigneil
2013-08-06 05:33:40
@Lighta
thanks for info. i knew there something i miss, sorry.
@anginafectoris
if i were you dont do that... just edit your clif.c only... i think.
@Talaysen
sorry my mistake.. just what Lighta said you have to edit clif_item_sub. /sob
can you try v.2 i just comment only 2 of this under clif_storagelist
memset((char*)WBUFP(buf,6),0,24); //storename


Lighta
2013-08-06 19:06:07
Ok confirmed thx to reigneil test case.
so the fix I propose is :
[diff]
-memset((char*)WBUFP(buf, 6), 0, 24); //Storename
+memset((char*)WBUFP(buf, 4), 0, 24); //Storename

-memset((char*)WBUFP(bufe, 6), 0, 24); //Storename
+memset((char*)WBUFP(bufe, 4), 0, 24); //Storename
[/diff]
cause it appear I did a little typo on index, with this little change everything seem ok but need confirmation.

reigneil
2013-08-07 01:23:07
@Lighta
wow it works no item invisible and storage name display correct name. /no1

2Wire
2013-08-07 04:09:28
@Lighta
Works perfectly! Thanks.
/ok

sanosan33
2013-08-07 15:02:57
So to resume what's code we have to add for storage working perfectly with client 2013 please ?

Talaysen
2013-08-08 01:43:11
Combined @Lighta's changes with reigneil's on the previous page, implemented it, storage working as intended.
Thanks, both of you.

Skymomo
2013-08-08 10:49:12
hi is this fix official or not?

Skymomo
2013-08-09 12:06:01
still no fix rev?

Lighta
2013-08-17 14:00:49
should be fixed in 342745d
×
×
  • Create New...