summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--conf/Changelog.txt2
-rw-r--r--conf/battle/client.conf3
-rw-r--r--db/Changelog.txt1
-rw-r--r--db/packet_db.txt11
-rw-r--r--src/map/atcommand.c11
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/clif.c24
-rw-r--r--src/map/clif.h2
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/status.c10
-rw-r--r--src/map/status.h1
-rw-r--r--src/map/unit.c14
14 files changed, 65 insertions, 20 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0e6544bab..c0d8e8866 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2009/03/23
+ * Added support for new status change packet, uses new setting display_status_timers in client.conf. [Sara]
2009/03/18
* Updated item_db.sql with the perl script [Playtester]
2009/03/08
diff --git a/conf/Changelog.txt b/conf/Changelog.txt
index 168a1ef9e..1e23b43b2 100644
--- a/conf/Changelog.txt
+++ b/conf/Changelog.txt
@@ -1,4 +1,6 @@
Date Added
+2009/3/23
+ * Added setting display_status_timers to client.conf for new status change packet. [Sara]
2009/1/26
* Rev. 13494 Changed guild_skill_relog_delay to yes. Relogging no longer resets delay on guild skills. [L0ne_W0lf]
2009/1/12
diff --git a/conf/battle/client.conf b/conf/battle/client.conf
index ce7141c16..09a6088c6 100644
--- a/conf/battle/client.conf
+++ b/conf/battle/client.conf
@@ -113,3 +113,6 @@ display_version: yes
// When affected with the "Hallucination" status effect, send the effect to client? (Note 1)
// Note: Set to 'no' if the client lags due to the "Wavy" screen effect.
display_hallucination: yes
+
+// Set this to 1 if your client is newer than 2009-01-14aSakexe and you want skill timers displayed
+display_status_timers: no
diff --git a/db/Changelog.txt b/db/Changelog.txt
index f07674116..5bfc6c651 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -45,6 +45,7 @@
- duration is a fixed 30s, except for stun 5s and bleeding 60s
- petrify/stone don't have a 5-second solidifying phase (instant stone)
- also lol @ DARKGRANDNESS
+ * Added new packets, included new status change packet. [Sara]
2009/03/22
* Hopefully fixed NPC_DEFENDER not working [Playtester]
(thanks to Brainstorm for the fix)
diff --git a/db/packet_db.txt b/db/packet_db.txt
index 6d116a200..acf1b6fa7 100644
--- a/db/packet_db.txt
+++ b/db/packet_db.txt
@@ -1208,6 +1208,17 @@ packet_ver: 23
0x0437,7,actionrequest,2:6
0x0438,10,useskilltoid,2:4:6
0x0439,8,useitem,2:4
+0x043d,8
+0x043e,-1
+0x043f,25
+0x0440,10
+0x0441,4
+0x0442,-1
+0x0443,8
+0x0444,-1
+0x0445,10
+0x0446,14
+0x0448,-1
//Add new packets here
//packet_ver: 24
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index f6928dcc0..1ed4f0701 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2816,16 +2816,17 @@ int atcommand_gat(const int fd, struct map_session_data* sd, const char* command
*------------------------------------------*/
int atcommand_displaystatus(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
- int i, type, flag;
+ int i, type, flag, tick;
nullpo_retr(-1, sd);
- if (!message || !*message || (i = sscanf(message, "%d %d", &type, &flag)) < 1) {
- clif_displaymessage(fd, "Please, enter a status type/flag (usage: @displaystatus <status type> <flag>).");
+ if (!message || !*message || (i = sscanf(message, "%d %d %d", &type, &flag, &tick)) < 1) {
+ clif_displaymessage(fd, "Please, enter a status type/flag (usage: @displaystatus <status type> <flag> <tick>).");
return -1;
}
- if (i == 1) flag = 1;
+ if (i < 2) flag = 1;
+ if (i < 3) tick = 0;
- clif_status_change(&sd->bl, type, flag);
+ clif_status_change(&sd->bl, type, flag, tick);
return 0;
}
diff --git a/src/map/battle.c b/src/map/battle.c
index 66a70e8a7..bd9e49f5a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3826,6 +3826,7 @@ static const struct _battle_data {
{ "auction_maximumprice", &battle_config.auction_maximumprice, 500000000, 0, MAX_ZENY, },
{ "gm_viewequip_min_lv", &battle_config.gm_viewequip_min_lv, 0, 0, 99, },
{ "homunculus_auto_vapor", &battle_config.homunculus_auto_vapor, 0, 0, 1, },
+ { "display_status_timers", &battle_config.display_status_timers, 1, 0, 1, },
// BattleGround Settings
{ "bg_update_interval", &battle_config.bg_update_interval, 1000, 100, INT_MAX, },
{ "bg_guild_id1", &battle_config.bg_guild_id1, 0, 0, INT_MAX, },
diff --git a/src/map/battle.h b/src/map/battle.h
index 13d17cbb4..21c68b50b 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -461,6 +461,7 @@ extern struct Battle_Config
int auction_maximumprice;
int gm_viewequip_min_lv;
int homunculus_auto_vapor; //Keep Homunculus from Vaporizing when master dies. [L0ne_W0lf]
+ int display_status_timers; //Show or hide skill buff/delay timers in recent clients [Sara]
// [BattleGround Settings]
int bg_update_interval;
int bg_guild_id1;
diff --git a/src/map/clif.c b/src/map/clif.c
index 063240899..c6fcb924b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4531,20 +4531,36 @@ int clif_status_load(struct block_list *bl,int type, int flag)
/*==========================================
* 状態異常アイコン/メッセージ表示
*------------------------------------------*/
-int clif_status_change(struct block_list *bl,int type,int flag)
+int clif_status_change(struct block_list *bl,int type,int flag,unsigned int tick)
{
unsigned char buf[16];
if (type == SI_BLANK) //It shows nothing on the client...
return 0;
-
+
nullpo_retr(0, bl);
- WBUFW(buf,0)=0x0196;
+ if (type == SI_BLANK || type == SI_MAXIMIZEPOWER || type == SI_RIDING ||
+ type == SI_FALCON || type == SI_TRICKDEAD || type == SI_BROKENARMOR ||
+ type == SI_BROKENWEAPON || type == SI_WEIGHT50 || type == SI_WEIGHT90 ||
+ type == SI_TENSIONRELAX || type == SI_LANDENDOW || type == SI_AUTOBERSERK ||
+ type == SI_BUMP || type == SI_READYSTORM || type == SI_READYDOWN ||
+ type == SI_READYTURN || type == SI_READYCOUNTER || type == SI_DODGE ||
+ type == SI_DEVIL || type == SI_NIGHT || type == SI_INTRAVISION)
+ tick=0;
+ if( battle_config.display_skill_timers && tick>0 )
+ WBUFW(buf,0)=0x043f;
+ else
+ WBUFW(buf,0)=0x0196;
WBUFW(buf,2)=type;
WBUFL(buf,4)=bl->id;
WBUFB(buf,8)=flag;
- clif_send(buf,packet_len(0x196),bl,AREA);
+ if( battle_config.display_skill_timers && tick>0 )
+ clif_send(buf,packet_len(0x196),bl,AREA);
+ else {
+ WBUFL(buf,9)=tick;
+ clif_send(buf,packet_len(0x43f),bl,AREA);
+ }
return 0;
}
diff --git a/src/map/clif.h b/src/map/clif.h
index 6356a0c89..7d866a801 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -248,7 +248,7 @@ void clif_bladestop(struct block_list* src, int dst_id, int active);
void clif_changemapcell(int fd, int m, int x, int y, int type, enum send_target target);
int clif_status_load(struct block_list *bl,int type, int flag);
-int clif_status_change(struct block_list *bl,int type,int flag);
+int clif_status_change(struct block_list *bl,int type,int flag,unsigned int tick);
int clif_wis_message(int fd, const char* nick, const char* mes, int mes_len);
int clif_wis_end(int fd,int flag);
diff --git a/src/map/pc.c b/src/map/pc.c
index 9e0157041..9ee886984 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4543,7 +4543,7 @@ int pc_checkjoblevelup(struct map_session_data *sd)
status_calc_pc(sd,0);
clif_misceffect(&sd->bl,1);
if (pc_checkskill(sd, SG_DEVIL) && !pc_nextjobexp(sd))
- clif_status_change(&sd->bl,SI_DEVIL, 1); //Permanent blind effect from SG_DEVIL.
+ clif_status_change(&sd->bl,SI_DEVIL, 1, 0); //Permanent blind effect from SG_DEVIL.
npc_script_event(sd, NPCE_JOBLVUP);
return 1;
diff --git a/src/map/status.c b/src/map/status.c
index ae0da921f..05061ec5a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5370,7 +5370,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
//val3 : Brings the skilllv (merged into val1 here)
//val4 : Partner
if (val1 == CG_MOONLIT)
- clif_status_change(bl,SI_MOONLIT,1);
+ clif_status_change(bl,SI_MOONLIT,1,tick);
val1|= (val3<<16);
val3 = tick/1000; //Tick duration
tick = 1000;
@@ -6226,9 +6226,9 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
}
if( vd && (pcdb_checkid(vd->class_) || bl->type == BL_MER ) ) //Only for players sprites, client crashes if they receive this for a mob o.O [Skotlex]
- clif_status_change(bl,StatusIconChangeTable[type],1);
+ clif_status_change(bl,StatusIconChangeTable[type],1,tick);
else if( sd ) //Send packet to self otherwise (disguised player?)
- clif_status_load(bl,StatusIconChangeTable[type],1);
+ clif_status_load(bl,StatusIconChangeTable[type],1,tick);
//Don't trust the previous sce assignment, in case the SC ended somewhere between there and here.
if((sce=sc->data[type]))
@@ -6538,7 +6538,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
}
}
if ((sce->val1&0xFFFF) == CG_MOONLIT)
- clif_status_change(bl,SI_MOONLIT,0);
+ clif_status_change(bl,SI_MOONLIT,0,0);
status_change_end(bl,SC_LONGING,-1);
break;
@@ -6815,7 +6815,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
//On Aegis, when turning off a status change, first goes the sc packet, then the option packet.
if( vd && (pcdb_checkid(vd->class_) || bl->type == BL_MER ) )
- clif_status_change(bl,StatusIconChangeTable[type],0);
+ clif_status_change(bl,StatusIconChangeTable[type],0,0);
else if (sd)
clif_status_load(bl,StatusIconChangeTable[type],0);
diff --git a/src/map/status.h b/src/map/status.h
index 0ac17016f..638783de1 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -360,6 +360,7 @@ enum si_type {
//40: Again Aspd Potion
SI_SPEEDPOTION1 = 41,
SI_SPEEDPOTION2 = 42,
+ SI_ACTIONDELAY = 46,
SI_STRIPWEAPON = 50,
SI_STRIPSHIELD = 51,
SI_STRIPARMOR = 52,
diff --git a/src/map/unit.c b/src/map/unit.c
index 194145e58..faf6ec3e3 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -435,7 +435,7 @@ int unit_run(struct block_list *bl)
if(to_x == bl->x && to_y == bl->y) {
//If you can't run forward, you must be next to a wall, so bounce back. [Skotlex]
- clif_status_change(bl, SI_BUMP, 1);
+ clif_status_change(bl, SI_BUMP, 1, 0);
//Set running to 0 beforehand so status_change_end knows not to enable spurt [Kevin]
unit_bl2ud(bl)->state.running = 0;
@@ -443,7 +443,7 @@ int unit_run(struct block_list *bl)
skill_blown(bl,bl,skill_get_blewcount(TK_RUN,lv),unit_getdir(bl),0);
clif_fixpos(bl); //Why is a clif_slide (skill_blown) AND a fixpos needed? Ask Aegis.
- clif_status_change(bl, SI_BUMP, 0);
+ clif_status_change(bl, SI_BUMP, 0, 0);
return 0;
}
if (unit_walktoxy(bl, to_x, to_y, 1))
@@ -455,7 +455,7 @@ int unit_run(struct block_list *bl)
} while (--i > 0 && !unit_walktoxy(bl, to_x, to_y, 1));
if (i==0) {
// copy-paste from above
- clif_status_change(bl, SI_BUMP, 1);
+ clif_status_change(bl, SI_BUMP, 1, 0);
//Set running to 0 beforehand so status_change_end knows not to enable spurt [Kevin]
unit_bl2ud(bl)->state.running = 0;
@@ -463,7 +463,7 @@ int unit_run(struct block_list *bl)
skill_blown(bl,bl,skill_get_blewcount(TK_RUN,lv),unit_getdir(bl),0);
clif_fixpos(bl);
- clif_status_change(bl, SI_BUMP, 0);
+ clif_status_change(bl, SI_BUMP, 0, 0);
return 0;
}
return 1;
@@ -1070,6 +1070,8 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
ud->state.skillcastcancel = 0;
ud->canact_tick = tick + casttime + 100;
+ if ( sd )
+ clif_status_change(bl, SI_ACTIONDELAY, 1, ud->canact_tick);
ud->skilltarget = target_id;
ud->skillx = 0;
ud->skilly = 0;
@@ -1175,6 +1177,8 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
ud->state.skillcastcancel=0;
ud->canact_tick = tick + casttime + 100;
+ if ( sd )
+ clif_status_change(bl, SI_ACTIONDELAY, 1, ud->canact_tick);
ud->skillid = skill_num;
ud->skilllv = skill_lv;
ud->skillx = skill_x;
@@ -1591,6 +1595,8 @@ int unit_skillcastcancel(struct block_list *bl,int type)
}
ud->canact_tick = tick;
+ if ( sd )
+ clif_status_change(bl, SI_ACTIONDELAY, 1, ud->canact_tick);
if(type&1 && sd)
skill = sd->skillid_old;