yuhsing

Untitled

Apr 10th, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. Index: conf/battle/misc.conf
  2. ===================================================================
  3. --- conf/battle/misc.conf (revision 15238)
  4. +++ conf/battle/misc.conf (working copy)
  5. @@ -139,3 +139,6 @@
  6. // 1 = Yes
  7. // 2 = Yes, when there are unread mails
  8. mail_show_status: 0
  9. +
  10. +// Delay for @warp when received damages. ( in second )
  11. +warp_attack_delay: 5
  12. \ No newline at end of file
  13. Index: src/map/atcommand.c
  14. ===================================================================
  15. --- src/map/atcommand.c (revision 15238)
  16. +++ src/map/atcommand.c (working copy)
  17. @@ -423,7 +423,13 @@
  18. nullpo_retr(-1, sd);
  19.  
  20. memset(map_name, '\0', sizeof(map_name));
  21. -
  22. +
  23. + // @warp delay on hit.
  24. + if( DIFF_TICK( sd->disable_warp_tick,gettick() ) > 0 ){
  25. + clif_displaymessage( fd, "Command Failed. Delaying upon hitted." );
  26. + return -1;
  27. + }
  28. +
  29. if (!message || !*message ||
  30. (sscanf(message, "%15s %hd %hd", map_name, &x, &y) < 3 &&
  31. sscanf(message, "%15[^,],%hd,%hd", map_name, &x, &y) < 1)) {
  32. Index: src/map/battle.c
  33. ===================================================================
  34. --- src/map/battle.c (revision 15238)
  35. +++ src/map/battle.c (working copy)
  36. @@ -4024,6 +4024,7 @@
  37. { "bg_magic_attack_damage_rate", &battle_config.bg_magic_damage_rate, 60, 0, INT_MAX, },
  38. { "bg_misc_attack_damage_rate", &battle_config.bg_misc_damage_rate, 60, 0, INT_MAX, },
  39. { "bg_flee_penalty", &battle_config.bg_flee_penalty, 20, 0, INT_MAX, },
  40. + { "warp_attack_delay", &battle_config.warp_attack_delay, 0, 0, INT_MAX, },
  41. };
  42.  
  43.  
  44. Index: src/map/battle.h
  45. ===================================================================
  46. --- src/map/battle.h (revision 15238)
  47. +++ src/map/battle.h (working copy)
  48. @@ -488,6 +488,7 @@
  49. int cashshop_show_points;
  50. int mail_show_status;
  51. int client_limit_unit_lv;
  52. + int warp_attack_delay; // Emistry @warp delay upon damage
  53.  
  54. // [BattleGround Settings]
  55. int bg_update_interval;
  56. @@ -497,6 +498,7 @@
  57. int bg_magic_damage_rate;
  58. int bg_misc_damage_rate;
  59. int bg_flee_penalty;
  60. +
  61. } battle_config;
  62.  
  63. void do_init_battle(void);
  64. Index: src/map/pc.c
  65. ===================================================================
  66. --- src/map/pc.c (revision 15238)
  67. +++ src/map/pc.c (working copy)
  68. @@ -959,6 +959,8 @@
  69. sd->canequip_tick = tick;
  70. sd->cantalk_tick = tick;
  71. sd->cansendmail_tick = tick;
  72. +
  73. + sd->disable_warp_tick = tick;
  74.  
  75. for(i = 0; i < MAX_SKILL_LEVEL; i++)
  76. sd->spirit_timer[i] = INVALID_TIMER;
  77. @@ -5809,6 +5811,9 @@
  78. pet_target_check(sd,src,1);
  79.  
  80. sd->canlog_tick = gettick();
  81. +
  82. + // @Warp delay on hit
  83. + sd->disable_warp_tick = ( gettick() + ( battle_config.warp_attack_delay * 1000 ) );
  84. }
  85.  
  86. int pc_dead(struct map_session_data *sd,struct block_list *src)
  87. Index: src/map/pc.h
  88. ===================================================================
  89. --- src/map/pc.h (revision 15238)
  90. +++ src/map/pc.h (working copy)
  91. @@ -209,6 +209,8 @@
  92. unsigned int cansendmail_tick; // [Mail System Flood Protection]
  93. unsigned int ks_floodprotect_tick; // [Kill Steal Protection]
  94.  
  95. + unsigned int disable_warp_tick; // [Emistry]
  96. +
  97. struct {
  98. int nameid;
  99. unsigned int tick;
Advertisement
Add Comment
Please, Sign In to add comment