Implemented config setting 'vending_over_max', to let people configure the behavior of vending items over the MAX_ZENY limit.
Default/official setting is 'yes', which makes players lose zeny that they cannot hold. Adjust as needed. This re-adds the behavior from before r11344 (see topic:180568). git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12614 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
45f1ef5202
commit
b7b80e5c97
@ -3,6 +3,9 @@ Date Added
|
||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||
|
||||
2008/04/18
|
||||
* Implemented config setting 'vending_over_max', to let people configure
|
||||
the behavior of vending items over the MAX_ZENY limit [ultramage]
|
||||
2008/04/15
|
||||
* Use the same code for script commands getitem & getitem2 as @item to avoid
|
||||
bug in bugreport:1324 (non-stackable items are stacked) [Toms]
|
||||
|
@ -1,5 +1,7 @@
|
||||
Date Added
|
||||
|
||||
2008/04/18
|
||||
* Implemented config setting 'vending_over_max' [ultramage]
|
||||
2008/04/02
|
||||
* Rev. 12462 Uncommented restricted map entryies for WoESE maps. [L0ne_W0lf]
|
||||
2008/03/07
|
||||
|
@ -24,6 +24,10 @@
|
||||
// The highest value at which an item can be sold via the merchant vend skill. (in zeny)
|
||||
vending_max_value: 1000000000
|
||||
|
||||
// Whether to allow buying from vending chars that are at their max. zeny limit.
|
||||
// If set to yes, the rest of the zeny above the char's capacity will disappear.
|
||||
vending_over_max: yes
|
||||
|
||||
// Tax to apply to all vending transactions (eg: 10000 = 100%, 50 = 0.50%)
|
||||
// When a tax is applied, the item's full price is charged to the buyer, but
|
||||
// the vender will not get the whole price paid (they get 100% - this tax).
|
||||
|
@ -3503,6 +3503,7 @@ static const struct _battle_data {
|
||||
{ "mob_warp", &battle_config.mob_warp, 0, 0, 1|2|4, },
|
||||
{ "dead_branch_active", &battle_config.dead_branch_active, 1, 0, 1, },
|
||||
{ "vending_max_value", &battle_config.vending_max_value, 10000000, 1, MAX_ZENY, },
|
||||
{ "vending_over_max", &battle_config.vending_over_max, 1, 0, 1, },
|
||||
{ "show_steal_in_same_party", &battle_config.show_steal_in_same_party, 0, 0, 1, },
|
||||
{ "party_hp_mode", &battle_config.party_hp_mode, 0, 0, 1, },
|
||||
{ "show_party_share_picker", &battle_config.party_show_share_picker, 0, 0, 1, },
|
||||
|
@ -268,6 +268,7 @@ extern struct Battle_Config
|
||||
int mob_warp;
|
||||
int dead_branch_active;
|
||||
int vending_max_value;
|
||||
int vending_over_max;
|
||||
int vending_tax;
|
||||
int show_steal_in_same_party;
|
||||
int party_share_type;
|
||||
|
@ -105,6 +105,12 @@ void vending_purchasereq(struct map_session_data* sd, int id, const uint8* data,
|
||||
clif_buyvending(sd, idx, amount, 1); // you don't have enough zeny
|
||||
return;
|
||||
}
|
||||
if( z + (double)vsd->status.zeny > (double)MAX_ZENY && !battle_config.vending_over_max )
|
||||
{
|
||||
clif_buyvending(sd, idx, vsd->vending[j].amount, 4); // too much zeny = overflow
|
||||
return;
|
||||
|
||||
}
|
||||
w += itemdb_weight(vsd->status.cart[idx].nameid) * amount;
|
||||
if( w + sd->weight > sd->max_weight )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user