summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-27 13:31:29 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-27 13:31:29 +0000
commit78d5126daf93ed401807f79c3f7fab27a06b0e3e (patch)
tree94b182962748e6ed20ea710e99eb5b2cb0382ca0 /src
parent63b4658868a7fec265ab1c46d86fe72bfa2a3549 (diff)
downloadhercules-78d5126daf93ed401807f79c3f7fab27a06b0e3e.tar.gz
hercules-78d5126daf93ed401807f79c3f7fab27a06b0e3e.tar.bz2
hercules-78d5126daf93ed401807f79c3f7fab27a06b0e3e.tar.xz
hercules-78d5126daf93ed401807f79c3f7fab27a06b0e3e.zip
- Corrected the hit value of the TK kicks (from single hit "6" to multi-hit "8")
- All kicks do 3 hits now. - Added battle config hide_woe_damage which hides damage on woe maps packet-wise. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6311 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/clif.c27
3 files changed, 25 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index d33f31a2b..8168ec153 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3835,6 +3835,7 @@ static const struct battle_data_short {
{ "idle_no_share", &battle_config.idle_no_share}, // [celest], for a feature by [MouseJstr]
{ "party_even_share_bonus", &battle_config.party_even_share_bonus},
{ "delay_battle_damage", &battle_config.delay_battle_damage}, // [celest]
+ { "hide_woe_damage", &battle_config.hide_woe_damage}, // [Skotlex]
{ "display_version", &battle_config.display_version}, // [Ancyker], for a feature by...?
{ "who_display_aid", &battle_config.who_display_aid}, // [Ancyker], for a feature by...?
{ "display_hallucination", &battle_config.display_hallucination}, // [Skotlex]
@@ -4234,6 +4235,7 @@ void battle_set_defaults() {
battle_config.idle_no_share = 0;
battle_config.party_even_share_bonus = 0;
battle_config.delay_battle_damage = 1;
+ battle_config.hide_woe_damage = 0;
battle_config.display_version = 1;
battle_config.who_display_aid = 0;
battle_config.display_hallucination = 1;
diff --git a/src/map/battle.h b/src/map/battle.h
index aab83d460..0d78cc460 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -363,6 +363,7 @@ extern struct Battle_Config {
unsigned short idle_no_share;
unsigned short party_even_share_bonus;
unsigned short delay_battle_damage;
+ unsigned short hide_woe_damage;
unsigned short display_version;
unsigned short who_display_aid;
diff --git a/src/map/clif.c b/src/map/clif.c
index e83fc9ba9..d9360c3b5 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3795,10 +3795,15 @@ int clif_damage(struct block_list *src,struct block_list *dst,unsigned int tick,
WBUFL(buf,10)=tick;
WBUFL(buf,14)=sdelay;
WBUFL(buf,18)=ddelay;
- WBUFW(buf,22)=(damage > SHRT_MAX)?SHRT_MAX:damage;
+ if (battle_config.hide_woe_damage && map_flag_gvg(src->m)) {
+ WBUFW(buf,22)=-1;
+ WBUFW(buf,27)=-1;
+ } else {
+ WBUFW(buf,22)=(damage > SHRT_MAX)?SHRT_MAX:damage;
+ WBUFW(buf,27)=damage2;
+ }
WBUFW(buf,24)=div;
WBUFB(buf,26)=type;
- WBUFW(buf,27)=damage2;
clif_send(buf,packet_len_table[0x8a],src,AREA);
if(disguised(src)) {
@@ -4307,7 +4312,11 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,
WBUFL(buf,12)=tick;
WBUFL(buf,16)=sdelay;
WBUFL(buf,20)=ddelay;
- WBUFW(buf,24)=damage;
+ if (battle_config.hide_woe_damage && map_flag_gvg(src->m)) {
+ WBUFW(buf,24)=-1;
+ } else {
+ WBUFW(buf,24)=damage;
+ }
WBUFW(buf,26)=skill_lv;
WBUFW(buf,28)=div;
WBUFB(buf,30)=type;
@@ -4334,7 +4343,11 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,
WBUFL(buf,12)=tick;
WBUFL(buf,16)=sdelay;
WBUFL(buf,20)=ddelay;
- WBUFL(buf,24)=damage;
+ if (battle_config.hide_woe_damage && map_flag_gvg(src->m)) {
+ WBUFL(buf,24)=-1;
+ } else {
+ WBUFL(buf,24)=damage;
+ }
WBUFW(buf,28)=skill_lv;
WBUFW(buf,30)=div;
WBUFB(buf,32)=type;
@@ -4390,7 +4403,11 @@ int clif_skill_damage2(struct block_list *src,struct block_list *dst,
WBUFL(buf,20)=ddelay;
WBUFW(buf,24)=dst->x;
WBUFW(buf,26)=dst->y;
- WBUFW(buf,28)=damage;
+ if (battle_config.hide_woe_damage && map_flag_gvg(src->m)) {
+ WBUFW(buf,28)=-1
+ } else {
+ WBUFW(buf,28)=damage;
+ }
WBUFW(buf,30)=skill_lv;
WBUFW(buf,32)=div;
WBUFB(buf,34)=type;