Added a config for triggering OnPCLogout events on autotrade (#5159)

This commit is contained in:
Daegaladh 2020-07-01 13:59:39 +02:00 committed by GitHub
parent 2e04ca98b0
commit a3125e6e95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 0 deletions

View File

@ -114,6 +114,9 @@ at_timeout: 0
// Makes player cannot be attacked when autotrade? (turns player's state.monster_ignore) (Note 1)
at_monsterignore: no
// Should autotrade trigger OnPCLogout script events? (Note 1)
at_logout_event: yes
// Auction system, fee per hour. Default is 12000
auction_feeperhour: 12000

View File

@ -6100,6 +6100,9 @@ ACMD_FUNC(autotrade) {
status_change_start(NULL,&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, SCSTART_NONE);
}
if (battle_config.at_logout_event)
npc_script_event(sd, NPCE_LOGOUT); //Logout Event
channel_pcquit(sd,0xF); //leave all chan
clif_authfail_fd(sd->fd, 15);

View File

@ -8996,6 +8996,7 @@ static const struct _battle_data {
{ "show_skill_scale", &battle_config.show_skill_scale, 1, 0, 1, },
{ "achievement_mob_share", &battle_config.achievement_mob_share, 0, 0, 1, },
{ "slave_stick_with_master", &battle_config.slave_stick_with_master, 0, 0, 1, },
{ "at_logout_event", &battle_config.at_logout_event, 1, 0, 1, },
#include "../custom/battle_config_init.inc"
};

View File

@ -684,6 +684,7 @@ struct Battle_Config
int show_skill_scale;
int achievement_mob_share;
int slave_stick_with_master;
int at_logout_event;
#include "../custom/battle_config_struct.inc"
};