* Follow up 462b2be, wrong check for itemdb_isstackable(). Thank Napster
* Follow up 171e2f2, added battle config 'at_monsterignore' at conf/battle/misc.conf to makes autotrader cannot be attacked. Thank @Lemongrass3110 Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
This commit is contained in:
parent
171e2f2be9
commit
401a7161ce
@ -101,6 +101,9 @@ at_mapflag: no
|
||||
// Set this to the amount of minutes autotrade chars will be kicked from the server.
|
||||
at_timeout: 0
|
||||
|
||||
// Makes player cannot be attacked when autotrade? (turns player's state.monster_ignore) (Note 1)
|
||||
at_monsterignore: no
|
||||
|
||||
// Auction system, fee per hour. Default is 12000
|
||||
auction_feeperhour: 12000
|
||||
|
||||
|
@ -5752,7 +5752,8 @@ ACMD_FUNC(autotrade) {
|
||||
}
|
||||
|
||||
sd->state.autotrade = 1;
|
||||
sd->state.monster_ignore = 1;
|
||||
if (battle_config.autotrade_monsterignore)
|
||||
sd->state.monster_ignore = 1;
|
||||
|
||||
if( sd->state.vending ){
|
||||
if( Sql_Query( mmysql_handle, "UPDATE `%s` SET `autotrade` = 1 WHERE `id` = %d;", vendings_db, sd->vender_id ) != SQL_SUCCESS ){
|
||||
|
@ -7778,6 +7778,7 @@ static const struct _battle_data {
|
||||
{ "fame_pharmacy_7", &battle_config.fame_pharmacy_7, 10, 0, INT_MAX, },
|
||||
{ "fame_pharmacy_10", &battle_config.fame_pharmacy_10, 50, 0, INT_MAX, },
|
||||
{ "mail_delay", &battle_config.mail_delay, 1000, 1000, INT_MAX, },
|
||||
{ "at_monsterignore", &battle_config.autotrade_monsterignore, 0, 0, 1, },
|
||||
};
|
||||
#ifndef STATS_OPT_OUT
|
||||
/**
|
||||
|
@ -563,6 +563,7 @@ extern struct Battle_Config
|
||||
int taekwon_ranker_min_lv;
|
||||
int revive_onwarp;
|
||||
int mail_delay;
|
||||
int autotrade_monsterignore;
|
||||
} battle_config;
|
||||
|
||||
void do_init_battle(void);
|
||||
|
@ -692,6 +692,7 @@ void do_init_buyingstore_autotrade( void ) {
|
||||
pc_setnewpc(autotraders[i]->sd, autotraders[i]->account_id, autotraders[i]->char_id, 0, gettick(), autotraders[i]->sex, 0);
|
||||
|
||||
autotraders[i]->sd->state.autotrade = 1;
|
||||
autotraders[i]->sd->state.monster_ignore = (battle_config.autotrade_monsterignore);
|
||||
chrif_authreq(autotraders[i]->sd, true);
|
||||
i++;
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ void vending_reopen( struct map_session_data* sd ){
|
||||
}
|
||||
|
||||
*index = entry->index + 2;
|
||||
*amount = itemdb_isstackable(sd->status.cart[entry->index].id) ? entry->amount : 1;
|
||||
*amount = itemdb_isstackable(sd->status.cart[entry->index].nameid) ? entry->amount : 1;
|
||||
*value = entry->price;
|
||||
|
||||
p += 8;
|
||||
@ -609,7 +609,7 @@ void do_init_vending_autotrade( void ) {
|
||||
pc_setnewpc(autotraders[i]->sd, autotraders[i]->account_id, autotraders[i]->char_id, 0, gettick(), autotraders[i]->sex, 0);
|
||||
|
||||
autotraders[i]->sd->state.autotrade = 1;
|
||||
autotraders[i]->sd->state.monster_ignore = 1;
|
||||
autotraders[i]->sd->state.monster_ignore = (battle_config.autotrade_monsterignore);
|
||||
chrif_authreq(autotraders[i]->sd, true);
|
||||
i++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user