diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-08-12 21:44:02 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-08-12 21:44:02 +0000 |
commit | 09e154b0687a2ba69d5ce6f2456c61db86bc4dec (patch) | |
tree | 6be18bd056964352e036afef8c36c860c0ff52af /src/map/party.c | |
parent | 653c88c4f1bf019f61132324fd7146ae2f858cec (diff) | |
download | hercules-09e154b0687a2ba69d5ce6f2456c61db86bc4dec.tar.gz hercules-09e154b0687a2ba69d5ce6f2456c61db86bc4dec.tar.bz2 hercules-09e154b0687a2ba69d5ce6f2456c61db86bc4dec.tar.xz hercules-09e154b0687a2ba69d5ce6f2456c61db86bc4dec.zip |
- Optimization to instance system.
* Removed the crc feature to generate instance npc names. The instance npc name will be "dup_" + instanceid + "_" + srcnpcid.
* Removed the big array under map structure and coded in a different way. It was only used to generate map names, but i just used the instance_id + "origin map name".
* Moved all instance features to separated files.
* Moved the npc duplication for instances into npc.c as Ultramage says (removed npcname_db from npc.h).
* Added recomendations for scripts commands by Saithis.
- Testing required, i will prepare Endless Tower script soon. I hope this do almost anything in bugreport 3276.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14003 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/party.c')
-rw-r--r-- | src/map/party.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/party.c b/src/map/party.c index a7e6758e4..4a10036d3 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -14,6 +14,7 @@ #include "atcommand.h" //msg_txt() #include "pc.h" #include "map.h" +#include "instance.h" #include "battle.h" #include "intif.h" #include "clif.h" @@ -540,7 +541,7 @@ int party_member_leaved(int party_id, int account_id, int char_id) clif_charnameupdate(sd); //Update name display [Skotlex] //TODO: hp bars should be cleared too if( p->instance_id ) - map_instance_check_kick(sd); + instance_check_kick(sd); } return 0; @@ -559,15 +560,18 @@ int party_broken(int party_id) if( p->instance_id ) { instance[p->instance_id].party_id = 0; - map_instance_destroy( p->instance_id ); + instance_destroy( p->instance_id ); } - for(i=0;i<MAX_PARTY;i++){ - if(p->data[i].sd!=NULL){ + for( i = 0; i < MAX_PARTY; i++ ) + { + if( p->data[i].sd!=NULL ) + { clif_party_leaved(p,p->data[i].sd,p->party.member[i].account_id,p->party.member[i].name,0x10); p->data[i].sd->status.party_id=0; } } + idb_remove(party_db,party_id); return 0; } |