diff options
author | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-08 21:39:57 +0000 |
---|---|---|
committer | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-08 21:39:57 +0000 |
commit | eeea994eea737a7715cd321024430800c4186c84 (patch) | |
tree | c457048bbf927b7ee0c887cde7da4a0913d63bd4 /src/map/clif.c | |
parent | 975e208be2fc880de327d36607a6cc92a5d58c6a (diff) | |
download | hercules-eeea994eea737a7715cd321024430800c4186c84.tar.gz hercules-eeea994eea737a7715cd321024430800c4186c84.tar.bz2 hercules-eeea994eea737a7715cd321024430800c4186c84.tar.xz hercules-eeea994eea737a7715cd321024430800c4186c84.zip |
* Delayed the check for required items when a skill is cast to when they are consumed. Now skills only fail due to lack of items after being cast.
- Please make a bug report if you know of any skill that doesn't work like this in official.
* Fixed hp of other party members not being sent when you join a party.
* Removed unused global array names_id and renamed some structures that are used with variables of the same name.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11384 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 78917e5c1..3e7919159 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -99,7 +99,6 @@ static int max_account_id = DEFAULT_MAX_ACCOUNT_ID; static int max_char_id = DEFAULT_MAX_CHAR_ID; int clif_parse (int fd); -static void clif_hpmeter_single(int fd, struct map_session_data *sd); /*========================================== * mapŽI‚ÌipÝ’è @@ -3632,7 +3631,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds if((sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting. (battle_config.disp_hpmeter && (len = pc_isGM(sd)) >= battle_config.disp_hpmeter && len >= pc_isGM(dstsd)) ) - clif_hpmeter_single(sd->fd, dstsd); + clif_hpmeter_single(sd->fd, dstsd->bl.id, dstsd->battle_status.hp, dstsd->battle_status.max_hp); if(dstsd->status.manner < 0) clif_changestatus(&dstsd->bl,SP_MANNER,dstsd->status.manner); @@ -4277,8 +4276,8 @@ int clif_skillcastcancel(struct block_list* bl) /// type==4 "there is a delay after using a skill" MsgStringTable[219] /// type==5 "insufficient zeny" MsgStringTable[233] /// type==6 "wrong weapon" MsgStringTable[239] -/// type==7 "red jemstone needed" MsgStringTable[246] -/// type==8 "blue jemstone needed" MsgStringTable[247] +/// type==7 "red gemstone needed" MsgStringTable[246] +/// type==8 "blue gemstone needed" MsgStringTable[247] /// type==9 "overweight" MsgStringTable[580] /// type==10 "skill failed" MsgStringTable[285] /// type>=11 ignored @@ -5766,19 +5765,20 @@ int clif_party_hp(struct map_session_data *sd) /*========================================== * Sends HP bar to a single fd. [Skotlex] *------------------------------------------*/ -static void clif_hpmeter_single(int fd, struct map_session_data *sd) +void clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp) { WFIFOHEAD(fd,packet_len(0x106)); WFIFOW(fd,0) = 0x106; - WFIFOL(fd,2) = sd->status.account_id; - if (sd->battle_status.max_hp > SHRT_MAX) { //To correctly display the %hp bar. [Skotlex] - WFIFOW(fd,6) = sd->battle_status.hp/(sd->battle_status.max_hp/100); + WFIFOL(fd,2) = id; + if( maxhp > SHRT_MAX ) + {// To correctly display the %hp bar. [Skotlex] + WFIFOW(fd,6) = hp/(maxhp/100); WFIFOW(fd,8) = 100; } else { - WFIFOW(fd,6) = sd->battle_status.hp; - WFIFOW(fd,8) = sd->battle_status.max_hp; + WFIFOW(fd,6) = hp; + WFIFOW(fd,8) = maxhp; } - WFIFOSET (fd, packet_len(0x106)); + WFIFOSET(fd, packet_len(0x106)); } /*========================================== |