Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: conf/battle/misc.conf
- ===================================================================
- --- conf/battle/misc.conf (revision 15238)
- +++ conf/battle/misc.conf (working copy)
- @@ -139,3 +139,6 @@
- // 1 = Yes
- // 2 = Yes, when there are unread mails
- mail_show_status: 0
- +
- +// Delay for @warp when received damages. ( in second )
- +warp_attack_delay: 5
- \ No newline at end of file
- Index: src/map/atcommand.c
- ===================================================================
- --- src/map/atcommand.c (revision 15238)
- +++ src/map/atcommand.c (working copy)
- @@ -423,7 +423,13 @@
- nullpo_retr(-1, sd);
- memset(map_name, '\0', sizeof(map_name));
- -
- +
- + // @warp delay on hit.
- + if( DIFF_TICK( sd->disable_warp_tick,gettick() ) > 0 ){
- + clif_displaymessage( fd, "Command Failed. Delaying upon hitted." );
- + return -1;
- + }
- +
- if (!message || !*message ||
- (sscanf(message, "%15s %hd %hd", map_name, &x, &y) < 3 &&
- sscanf(message, "%15[^,],%hd,%hd", map_name, &x, &y) < 1)) {
- Index: src/map/battle.c
- ===================================================================
- --- src/map/battle.c (revision 15238)
- +++ src/map/battle.c (working copy)
- @@ -4024,6 +4024,7 @@
- { "bg_magic_attack_damage_rate", &battle_config.bg_magic_damage_rate, 60, 0, INT_MAX, },
- { "bg_misc_attack_damage_rate", &battle_config.bg_misc_damage_rate, 60, 0, INT_MAX, },
- { "bg_flee_penalty", &battle_config.bg_flee_penalty, 20, 0, INT_MAX, },
- + { "warp_attack_delay", &battle_config.warp_attack_delay, 0, 0, INT_MAX, },
- };
- Index: src/map/battle.h
- ===================================================================
- --- src/map/battle.h (revision 15238)
- +++ src/map/battle.h (working copy)
- @@ -488,6 +488,7 @@
- int cashshop_show_points;
- int mail_show_status;
- int client_limit_unit_lv;
- + int warp_attack_delay; // Emistry @warp delay upon damage
- // [BattleGround Settings]
- int bg_update_interval;
- @@ -497,6 +498,7 @@
- int bg_magic_damage_rate;
- int bg_misc_damage_rate;
- int bg_flee_penalty;
- +
- } battle_config;
- void do_init_battle(void);
- Index: src/map/pc.c
- ===================================================================
- --- src/map/pc.c (revision 15238)
- +++ src/map/pc.c (working copy)
- @@ -959,6 +959,8 @@
- sd->canequip_tick = tick;
- sd->cantalk_tick = tick;
- sd->cansendmail_tick = tick;
- +
- + sd->disable_warp_tick = tick;
- for(i = 0; i < MAX_SKILL_LEVEL; i++)
- sd->spirit_timer[i] = INVALID_TIMER;
- @@ -5809,6 +5811,9 @@
- pet_target_check(sd,src,1);
- sd->canlog_tick = gettick();
- +
- + // @Warp delay on hit
- + sd->disable_warp_tick = ( gettick() + ( battle_config.warp_attack_delay * 1000 ) );
- }
- int pc_dead(struct map_session_data *sd,struct block_list *src)
- Index: src/map/pc.h
- ===================================================================
- --- src/map/pc.h (revision 15238)
- +++ src/map/pc.h (working copy)
- @@ -209,6 +209,8 @@
- unsigned int cansendmail_tick; // [Mail System Flood Protection]
- unsigned int ks_floodprotect_tick; // [Kill Steal Protection]
- + unsigned int disable_warp_tick; // [Emistry]
- +
- struct {
- int nameid;
- unsigned int tick;
Advertisement
Add Comment
Please, Sign In to add comment