summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-16 19:30:28 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-16 19:30:28 +0000
commit6196f0e6d34dba214a1598d7df7ab2f07b860a07 (patch)
treedb3fff0e89fab29becb961f39b968751a78cd6a2 /src/map/unit.c
parent8d048f50359a01b56e1224ff8664f0a22ee8821d (diff)
downloadhercules-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/unit.c')
-rw-r--r--src/map/unit.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 7383aed1c..80e0137cf 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -183,15 +183,10 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
}
if (
(sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR &&
- sd->sc.data[SC_MIRACLE].timer==-1 &&
!(ud->walk_count%WALK_SKILL_INTERVAL) &&
rand()%10000 < battle_config.sg_miracle_skill_ratio
- ) { //SG_MIRACLE [Komurka]
- clif_displaymessage(sd->fd,"[Miracle of the Sun, Moon and Stars]");
- sc_start(&sd->bl,SC_MIRACLE,100,1,
- battle_config.sg_miracle_skill_duration_min+
- rand()%battle_config.sg_miracle_skill_duration_max);
- }
+ ) //SG_MIRACLE [Komurka]
+ sc_start(&sd->bl,SC_MIRACLE,100,1,battle_config.sg_miracle_skill_duration);
} else if (md) {
if(battle_config.mob_warp&1 && map_getcell(bl->m,x,y,CELL_CHKNPC) &&
npc_touch_areanpc2(bl)) // Enable mobs to step on warps. [Skotlex]
@@ -1656,6 +1651,8 @@ int unit_remove_map(struct block_list *bl, int clrtype) {
status_change_end(bl, SC_GOSPEL, -1);
if (sc->data[SC_CHANGE].timer!=-1)
status_change_end(bl, SC_CHANGE, -1);
+ if (sc->data[SC_MIRACLE].timer!=-1)
+ status_change_end(bl, SC_MIRACLE, -1);
}
if (bl->type&BL_CHAR) {