diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-10 03:58:15 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-10 03:58:15 +0000 |
commit | e2856893e1bdaba52c1ff3e0cbd7a4635e7af90b (patch) | |
tree | 2bb49221533209ffdbb7e9cecb107fc734d57872 /src/map/script.c | |
parent | 8542722b5f295eb8d282cc22f894ec49b5368f40 (diff) | |
download | hercules-e2856893e1bdaba52c1ff3e0cbd7a4635e7af90b.tar.gz hercules-e2856893e1bdaba52c1ff3e0cbd7a4635e7af90b.tar.bz2 hercules-e2856893e1bdaba52c1ff3e0cbd7a4635e7af90b.tar.xz hercules-e2856893e1bdaba52c1ff3e0cbd7a4635e7af90b.zip |
- Added structure party_data and party_member_data to the map server to hold party-specific required information about parties including Monk/TK/SG/SN states and party member count.
- party Hp updates are no longer done each time the Hp is modified, but together with the party xy timer.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7083 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/map/script.c b/src/map/script.c index 8c84e89de..4bb550a13 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3159,7 +3159,7 @@ int buildin_warpparty(struct script_state *st) int i; unsigned short mapindex; struct map_session_data *pl_sd; - struct party *p=NULL; + struct party_data *p=NULL; str=conv_str(st,& (st->stack->stack_data[st->start+2])); x=conv_num(st,& (st->stack->stack_data[st->start+3])); y=conv_num(st,& (st->stack->stack_data[st->start+4])); @@ -3173,7 +3173,7 @@ int buildin_warpparty(struct script_state *st) { for (i = 0; i < MAX_PARTY; i++) { - if ((pl_sd = p->member[i].sd)) + if ((pl_sd = p->data[i].sd)) { if(map[pl_sd->bl.m].flag.nowarp) continue; @@ -3185,7 +3185,7 @@ int buildin_warpparty(struct script_state *st) { for (i = 0; i < MAX_PARTY; i++) { - if ((pl_sd = p->member[i].sd)) + if ((pl_sd = p->data[i].sd)) { if(map[pl_sd->bl.m].flag.noreturn) continue; @@ -3204,7 +3204,7 @@ int buildin_warpparty(struct script_state *st) for (i = 0; i < MAX_PARTY; i++) { - if ((pl_sd = p->member[i].sd)) + if ((pl_sd = p->data[i].sd)) { if(map[pl_sd->bl.m].flag.noreturn) continue; @@ -3219,7 +3219,7 @@ int buildin_warpparty(struct script_state *st) return 1; for (i = 0; i < MAX_PARTY; i++) { - if ((pl_sd = p->member[i].sd)) + if ((pl_sd = p->data[i].sd)) { if(map[pl_sd->bl.m].flag.noreturn || map[pl_sd->bl.m].flag.nowarp) continue; @@ -4469,15 +4469,14 @@ int buildin_getcharid(struct script_state *st) */ char *buildin_getpartyname_sub(int party_id) { - struct party *p; + struct party_data *p; - p=NULL; p=party_search(party_id); if(p!=NULL){ char *buf; buf=(char *)aMallocA(NAME_LENGTH*sizeof(char)); - memcpy(buf, p->name, NAME_LENGTH-1); + memcpy(buf, p->party.name, NAME_LENGTH-1); buf[NAME_LENGTH-1] = '\0'; return buf; } @@ -4504,10 +4503,9 @@ int buildin_getpartyname(struct script_state *st) */ int buildin_getpartymember(struct script_state *st) { - struct party *p; + struct party_data *p; int i,j=0,type=0; - p=NULL; p=party_search(conv_num(st,& (st->stack->stack_data[st->start+2]))); if( st->end>st->start+3 ) @@ -4515,16 +4513,16 @@ int buildin_getpartymember(struct script_state *st) if(p!=NULL){ for(i=0;i<MAX_PARTY;i++){ - if(p->member[i].account_id){ + if(p->party.member[i].account_id){ switch (type) { case 2: - mapreg_setreg(add_str((unsigned char *) "$@partymemberaid")+(j<<24),p->member[i].account_id); + mapreg_setreg(add_str((unsigned char *) "$@partymemberaid")+(j<<24),p->party.member[i].account_id); break; case 1: - mapreg_setreg(add_str((unsigned char *) "$@partymembercid")+(j<<24),p->member[i].char_id); + mapreg_setreg(add_str((unsigned char *) "$@partymembercid")+(j<<24),p->party.member[i].char_id); break; default: - mapreg_setregstr(add_str((unsigned char *) "$@partymembername$")+(j<<24),p->member[i].name); + mapreg_setregstr(add_str((unsigned char *) "$@partymembername$")+(j<<24),p->party.member[i].name); } j++; } |