Jump to content

new cashshop & nonstackable cash item

closed

Napster
2013-04-22 23:26:25
i Have test new cash shop
0,2201,2 1,2202,3



and buy item !nonstackable (quantity > 1) show error message
ShowWarning( "Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable cash item %d!
", sd->status.name, sd->status.account_id, sd->status.char_id, quantity, nameid );




please fix this thank you

Meister
2013-04-23 02:13:52
confirming. After buying 2 item non-stackable cash item for example 2357.. bought 2 pcs.. it spits out..



[Warning]: Player Athena (20000000:150000) sent a hexed packet trying to buy 2 o f nonstackable cash item 2357!
[Warning]: Player Athena (20000000:150000) sent a hexed packet trying to buy 2 o f nonstackable cash item 2357!



also attached the screenshot after buying 2 non-stackable item..[attachment=6783:screenrAthena000.jpg]

Update:

If you buy a non-stackable item. For example 2357, you bought 2 pcs. It will deduct cash points as if you bought 2 items but.. you can only receive 1. Though it shows in the screenshot that you have obtained 2 valkyrie armor but the problem is after reconnecting the other one is gone. one remain..

exneval
2013-04-23 05:02:05
Confirmed....
it says 2 valk armor, but only one armor with 2 number
and if you wear the fake armor, the warning shows up

Meister
2013-04-23 05:18:17
[quote name="exneval" post="19496" timestamp="1366693325"]
Confirmed....it says 2 valk armor, but only one armor with 2 numberand if you wear the fake armor, the warning shows up[/quote]
Yeah. This is what I forgot. It should be that the armor will show in the inventory twice. Not stack hehe.

Napster
2013-04-26 04:38:40
bump!!

exneval
2013-04-30 18:17:09
Bumping,
any one figure out this issue?

Mpsmith
2013-06-02 19:43:07
Confirm This Anyone Can Fix ?

OceanBlue
2013-06-07 05:22:14
i thought this is related to client

but u can fix, for source calculate to force any non stackable to 1
map/cashshop.c

@@ -226,11 +234,12 @@
 		if( j == cash_shop_items[tab].count || !itemdb_exists( nameid ) ){
 			clif_cashshop_result( sd, nameid, CASHSHOP_RESULT_ERROR_UNKNOWN );
 			return;
-		}else if( !itemdb_isstackable( nameid ) && quantity > 1 ){
-			uint32* quantity_ptr = (uint32*)item_list + i * 5 + 2;
-			ShowWarning( "Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable cash item %d!
", sd->status.name, sd->status.account_id, sd->status.char_id, quantity, nameid );
-			*quantity_ptr = 1;
 		}
+		if( !itemdb_isstackable( nameid ) && quantity > 1 ){
+			
+			//ShowWarning( "Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable cash item %d!
", sd->status.name, sd->status.account_id, sd->status.char_id, quantity, nameid );
+			quantity = 1;
+		}
 
 		switch( pc_checkadditem( sd, nameid, quantity ) ){
 			case CHKADDITEM_EXIST:

=================

-----map/pc.c


@@ -3701,7 +3719,7 @@
 
 	if( points > price )
 	{
-		ShowWarning("pc_paycash: More kafra points provided than needed (price=%d, points=%d, account_id=%d, char_id=%d).
", price, points, sd->status.account_id, sd->status.char_id);
+		//ShowWarning("pc_paycash: More kafra points provided than needed (price=%d, points=%d, account_id=%d, char_id=%d).
", price, points, sd->status.account_id, sd->status.char_id);
 		points = price;
 	}
 
@@ -3919,7 +3937,25 @@


RyotoRyo
2013-06-07 14:09:17
Hi,
Please refer to below two files.

1. http://tinyurl.com/kfa9vml
2. http://tinyurl.com/ml9m4xz

1. is a simple patch solution for "if you buy two nonstackable items but you will only receive one in true, it will force you only get one nonstackable item.

2. well... this is a temp patch solution for if you buy two or more nonstackable items, you will get two or more nonstaclable items.

I compile on VS2010 with r17348. It shall be work. :)

Mpsmith
2013-06-07 19:22:09
@RyotoRyo

I'm Use a cashshop_p2.patch This 's My Problem

http://www.screenr.com/A4BH

RyotoRyo
2013-06-07 19:58:01
@Mpsmith

wow, sorry for my mistake, I correct this error, please get from below website.
http://tinyurl.com/mb86xf2

/no1

Mpsmith
2013-06-07 20:23:42
@RyotoRyo

Result of P3

http://www.screenr.com/qlBH

RyotoRyo
2013-06-07 20:32:01
@Mpsmith

mmm... But I already comment the warning message, it should not pop up in map server.
Could you attach your code function "cashshop_buylist" in cashshop.c?

Napster
2013-06-07 20:45:11
@RryotoRyo

patch v3 you forgot add stackflag[n] = 2; on header

Mpsmith
2013-06-07 20:49:08
Ok This 's My Cashshop.c

RyotoRyo
2013-06-07 21:01:25
@Mpsmith

It seems not reasonable to show the warning message "[color=rgb(0,130,0)] Player sent a hexed packet trying to buy [/color] ..." in your video, sicne I already comment this message...
Could you recompile your code and test for more once? Thanks. /thx

@Napster

I think [color=rgb(40,40,40)] stackflag[n]=2; is not a necessary code, so I delete it. :) [/color][color=rgb(40,40,40)] [/color]

Mpsmith
2013-06-07 21:12:24
@RryotoRyo Yes That Clip I've Recomiled & Test In Video

RyotoRyo
2013-06-08 07:59:24
@Mpsmith
I tested cashshop_p3.patch on my server, it can work successfully, could you check your map_server.exe is correctly?
Thanks. /ok

AngelRO
2013-07-21 05:10:12
When we put the item on the storage, it comes back normal.

reigneil
2013-08-05 10:48:56
bump! i hope this fix release on rathena by default as well.

shatowolf
2013-09-06 16:40:20
any fix on this?

reigneil
2014-01-03 19:28:31
furthermore if you buy 2 pet eggs you only get 1 and your cash point deducted by 2.

Aleos
2014-06-24 18:14:28
Fixed in fff4877.
×
×
  • Create New...