diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-16 19:30:28 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-16 19:30:28 +0000 |
commit | 6196f0e6d34dba214a1598d7df7ab2f07b860a07 (patch) | |
tree | db3fff0e89fab29becb961f39b968751a78cd6a2 /src/map/clif.c | |
parent | 8d048f50359a01b56e1224ff8664f0a22ee8821d (diff) | |
download | hercules-6196f0e6d34dba214a1598d7df7ab2f07b860a07.tar.gz hercules-6196f0e6d34dba214a1598d7df7ab2f07b860a07.tar.bz2 hercules-6196f0e6d34dba214a1598d7df7ab2f07b860a07.tar.xz hercules-6196f0e6d34dba214a1598d7df7ab2f07b860a07.zip |
- Modified the "guardian" spawn script command, it no longer receives a "amount" argument (since that only leads to trouble), if the class is negative, it'll pick a random class the same way the monster spawn script command does, and if you pass a spawn position with coordinates equal or less to 0, a random spot in the map will be taken. However you can't use "this" as a map name anymore since these script commands do not need an attached player.
- Guardian spawning will now fail if you attempt to spawn a guardian that already exists on the same position.
- Collapsed clif_party_main_info and clif_party_join_info into a single function: clif_party_member_info
- Collapsed config settings "sg_miracle_skill_min_duration" and "sg_miracle_skill_max_duration" into "sg_miracle_skill_duration", which defaults to an hour.
- Miracle of the Sun, Moon and Stars can now retrigger to lenghten it's effect, and it is cancelled on warp/map-change.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9871 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 49 |
1 files changed, 10 insertions, 39 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 9a7d941f2..a10a27501 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5681,56 +5681,27 @@ int clif_party_created(struct map_session_data *sd,int flag) return 0; } -int clif_party_main_info(struct party_data *p, int fd) +int clif_party_member_info(struct party_data *p, struct map_session_data *sd) { - struct map_session_data *sd; - int i; unsigned char buf[96]; - - for (i=0; i<MAX_PARTY && !p->party.member[i].leader; i++); - if (i >= MAX_PARTY) return 0; //Should never happen... - sd = p->data[i].sd; - WBUFW(buf,0)=0x1e9; - WBUFL(buf,2)= p->party.member[i].account_id; - WBUFL(buf,6)= 0; //We don't know yet what this long is about. - WBUFW(buf,10)=sd?sd->bl.x:0; - WBUFW(buf,12)=sd?sd->bl.y:0; - WBUFB(buf,14)=(p->party.member[i].online)?0:1; //This byte is also unconfirmed... - memcpy(WBUFP(buf,15), p->party.name, NAME_LENGTH); - memcpy(WBUFP(buf,39), p->party.member[i].name, NAME_LENGTH); - memcpy(WBUFP(buf,63), mapindex_id2name(p->party.member[i].map), MAP_NAME_LENGTH); - WBUFB(buf,79) = (p->party.item&1)?1:0; - WBUFB(buf,80) = (p->party.item&2)?1:0; - if(fd>=0){ - WFIFOHEAD(fd,packet_len(0x1e9)); - memcpy(WFIFOP(fd,0),buf,packet_len(0x1e9)); - WFIFOSET(fd,packet_len(0x1e9)); - return 1; - } - if (!sd) { - for (i=0; i<MAX_PARTY && !p->data[i].sd; i++) + if (!sd) { //Pick any party member (this call is used when changing item share rules) + int i; + for (i=0; i<MAX_PARTY && !p->data[i].sd; i++); if (i >= MAX_PARTY) return 0; //Should never happen... - sd=p->data[i].sd; + sd = p->data[i].sd; } - clif_send(buf,packet_len(0x1e9),&sd->bl,PARTY); - return 1; -} - -int clif_party_join_info(struct party *p, struct map_session_data *sd) -{ - unsigned char buf[96]; WBUFW(buf,0)=0x1e9; WBUFL(buf,2)= sd->status.account_id; WBUFL(buf,6)= 0; //Apparently setting this to 1 makes you adoptable. WBUFW(buf,10)=sd->bl.x; WBUFW(buf,12)=sd->bl.y; - WBUFB(buf,14)=0; //Unconfirmed byte. - memcpy(WBUFP(buf,15), p->name, NAME_LENGTH); + WBUFB(buf,14)=0; //Unconfirmed byte, could be online/offline. + memcpy(WBUFP(buf,15), p->party.name, NAME_LENGTH); memcpy(WBUFP(buf,39), sd->status.name, NAME_LENGTH); memcpy(WBUFP(buf,63), mapindex_id2name(sd->mapindex), MAP_NAME_LENGTH); - WBUFB(buf,79) = (p->item&1)?1:0; - WBUFB(buf,80) = (p->item&2)?1:0; - clif_send(buf,packet_len(0x1e9),&sd->bl,PARTY_WOS); + WBUFB(buf,79) = (p->party.item&1)?1:0; + WBUFB(buf,80) = (p->party.item&2)?1:0; + clif_send(buf,packet_len(0x1e9),&sd->bl,PARTY); return 1; } |