diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-21 17:11:50 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-21 17:11:50 +0000 |
commit | b81bf258fc28b910d1b5cdf5feefeffc3e12a5c4 (patch) | |
tree | 55eca28b50df71603ff219b8d31937e6ae753c82 /src | |
parent | 5baa9babc11f9c0e7f126d171c484266984e3e78 (diff) | |
download | hercules-b81bf258fc28b910d1b5cdf5feefeffc3e12a5c4.tar.gz hercules-b81bf258fc28b910d1b5cdf5feefeffc3e12a5c4.tar.bz2 hercules-b81bf258fc28b910d1b5cdf5feefeffc3e12a5c4.tar.xz hercules-b81bf258fc28b910d1b5cdf5feefeffc3e12a5c4.zip |
- Now when the char-txt server does not finds a requested party, it will clear out said party id of all characters (will help prevent massive spamming/overhead when for some reason the party file needs to be deleted).
- Combo skills (inf = self, inf2 = no target self) no longer check range if you use them while your attack-timer is still active.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7806 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/char/char.c | 14 | ||||
-rw-r--r-- | src/char/char.h | 1 | ||||
-rw-r--r-- | src/char/int_party.c | 4 | ||||
-rw-r--r-- | src/map/unit.c | 4 |
4 files changed, 21 insertions, 2 deletions
diff --git a/src/char/char.c b/src/char/char.c index 2c9f5e321..a062f761f 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -1749,6 +1749,20 @@ int char_family(int cid1, int cid2, int cid3) { return 1; //cid2/cid3 parents. cid1 child.
return 0;
}
+
+//Clears the given party id from all characters.
+//Since sometimes the party format changes and parties must be wiped, this
+//method is required to prevent stress during the "party not found!" stages.
+void char_clearparty(int party_id)
+{
+ int i;
+ for(i = 0; i < char_num; i++)
+ {
+ if (char_dat[i].status.party_id == party_id)
+ char_dat[i].status.party_id = 0;
+ }
+}
+
//------------------------------------------------------------
// E-mail check: return 0 (not correct) or 1 (valid). by [Yor]
//------------------------------------------------------------
diff --git a/src/char/char.h b/src/char/char.h index 780e8ba6e..feb5c1243 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -34,6 +34,7 @@ int mapif_send(int fd,unsigned char *buf, unsigned int len); int char_married(int pl1,int pl2);
int char_child(int parent_id, int child_id);
int char_family(int cid1, int cid2, int cid3);
+void char_clearparty(int party_id);
int char_log(char *fmt, ...);
diff --git a/src/char/int_party.c b/src/char/int_party.c index e7d2044a5..e26e659f6 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -529,8 +529,10 @@ int mapif_parse_PartyInfo(int fd, int party_id) { p = idb_get(party_db, party_id);
if (p != NULL)
mapif_party_info(fd, &p->party);
- else
+ else {
mapif_party_noinfo(fd, party_id);
+ char_clearparty(party_id);
+ }
return 0;
}
diff --git a/src/map/unit.c b/src/map/unit.c index e14f3d388..511ec86ce 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -846,7 +846,9 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int } } - if(src->id != target_id && + //Check range when not using skill on yourself or is a combo-skill during attack + //(these are supposed to always have the same range as your attack) + if(src->id != target_id && (!temp || ud->attacktimer == -1) && !battle_check_range(src,target,skill_get_range2(src, skill_num,skill_lv) +(skill_num==RG_CLOSECONFINE?0:1))) //Close confine is exploitable thanks to this extra range "feature" of the client. [Skotlex] return 0; |