summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-24 14:33:31 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-24 14:33:31 +0000
commit4f8feb79e16e222a71d4fb3b057688ca8285d002 (patch)
tree84aa2668805b63a55589aa19d64b0fc34fa67ab6 /src/map/pc.c
parentd257a8eea5c92370e8d0e3e2912ac3073015020a (diff)
downloadhercules-4f8feb79e16e222a71d4fb3b057688ca8285d002.tar.gz
hercules-4f8feb79e16e222a71d4fb3b057688ca8285d002.tar.bz2
hercules-4f8feb79e16e222a71d4fb3b057688ca8285d002.tar.xz
hercules-4f8feb79e16e222a71d4fb3b057688ca8285d002.zip
* Some rewrites on Basilica
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1172 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 3110726d2..b7b80b525 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2894,10 +2894,14 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
if(sd->sc_data[SC_DANCING].timer!=-1) // clear dance effect when warping [Valaris]
skill_stop_dancing(&sd->bl,0);
if (sd->sc_data[SC_BASILICA].timer!=-1) {
- int i;
+ /*int i;
for (i=0;i<MAX_SKILLUNITGROUP;i++)
if (sd->skillunit[i].skill_id==HP_BASILICA)
- skill_delunitgroup(&sd->skillunit[i]);
+ skill_delunitgroup(&sd->skillunit[i]);*/
+
+ struct skill_unit_group *sg = (struct skill_unit_group *)sd->sc_data[SC_BASILICA].val4;
+ if (sg && sg->src_id == sd->bl.id)
+ skill_delunitgroup (sg);
status_change_end(&sd->bl,SC_BASILICA,-1);
}
}
@@ -3276,10 +3280,12 @@ static int pc_walk(int tid,unsigned int tick,int id,int data)
skill_devotion2(&sd->bl,sd->sc_data[SC_DEVOTION].val1);
if (sd->sc_data[SC_BASILICA].timer!=-1) { // Basilica cancels if caster moves [celest]
- int i;
+ /*int i;
for (i=0;i<MAX_SKILLUNITGROUP;i++)
- if (sd->skillunit[i].skill_id==HP_BASILICA)
- skill_delunitgroup(&sd->skillunit[i]);
+ if (sd->skillunit[i].skill_id==HP_BASILICA*/
+ struct skill_unit_group *sg = (struct skill_unit_group *)sd->sc_data[SC_BASILICA].val4;
+ if (sg && sg->src_id == sd->bl.id)
+ skill_delunitgroup (sg);
status_change_end(&sd->bl,SC_BASILICA,-1);
}
}
@@ -3710,9 +3716,11 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data)
//if((opt = status_get_option(bl)) != NULL && *opt&0x46)
if((opt = status_get_option(bl)) != NULL && *opt&0x42)
return 0;
- if(((sc_data = status_get_sc_data(bl)) != NULL && sc_data[SC_TRICKDEAD].timer != -1) ||
- ((sc_data = status_get_sc_data(bl)) != NULL && sc_data[SC_BASILICA].timer != -1 ))
+ if((sc_data = status_get_sc_data(bl)) != NULL) {
+ if (sc_data[SC_TRICKDEAD].timer != -1 ||
+ sc_data[SC_BASILICA].timer != -1)
return 0;
+ }
if(sd->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST) <= 0)
return 0;