summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt7
-rw-r--r--src/map/script.c4
-rw-r--r--src/map/skill.c17
-rw-r--r--src/map/status.c7
4 files changed, 27 insertions, 8 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 50badae50..20f763fa6 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,13 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/03/01
+ * Silence will only block skills when they have begun casting, not when the
+ cast bar is done. This also means that auto-spells will likely come-out
+ even when silenced. [Skotlex]
+ * opt1 status will block skills when they are done casting only if the
+ sc_castcancel option is set. [Skotlex]
+ * strcharinfo now returns blank instead of crashing the map server when
+ there's no player attached. [Skotlex]
* Added a missing mysql_init call to the mapreg sql handle. [Skotlex]
* Checked and fixed the script engine barking when you try to have a label
with the same name as a const.txt defined parameter. [Skotlex]
diff --git a/src/map/script.c b/src/map/script.c
index b37542fb3..46586c434 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -4293,6 +4293,10 @@ int buildin_strcharinfo(struct script_state *st)
sd=script_rid2sd(st);
num=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ if (!sd) { //Avoid crashing....
+ push_str(st->stack,C_CONSTSTR,(unsigned char *) "");
+ return 0;
+ }
if(num==0){
char *buf;
buf=(char *)aCallocA(NAME_LENGTH,sizeof(char));
diff --git a/src/map/skill.c b/src/map/skill.c
index 07e6ea73b..6207a639a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6780,11 +6780,18 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign
tsc = status_get_sc(bl);
type = SkillStatusChangeTable[sg->skill_id];
- if (sg->interval == -1 && (sg->unit_id == UNT_ANKLESNARE || sg->unit_id == UNT_SPIDERWEB || sg->unit_id == UNT_FIREPILLAR_ACTIVE))
- //Ok, this case only happens with Ankle Snare/Spider Web (only skills that sets its interval to -1),
- //and only happens when more than one target is stepping on the trap at the moment it was triggered
- //(yet only the first mob standing on the trap will be captured) [Skotlex]
- return 0;
+ if (sg->interval == -1) {
+ switch (sg->unit_id) {
+ case UNT_ANKLESNARE: //These happen when a trap is splash-triggered by multiple targets on the same cell.
+ case UNT_SPIDERWEB:
+ case UNT_FIREPILLAR_ACTIVE:
+ return 0;
+ default:
+ if (battle_config.error_log)
+ ShowError("skill_unit_onplace_timer: interval error (unit id %x)\n", sg->unit_id);
+ return 0;
+ }
+ }
if ((ts = skill_unitgrouptickset_search(bl,sg,tick)))
{ //Not all have it, eg: Traps don't have it even though they can be hit by Heaven's Drive [Skotlex]
diff --git a/src/map/status.c b/src/map/status.c
index a39adbc62..a5595d953 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -376,7 +376,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
if (src) sc = status_get_sc(src);
- if(sc && sc->opt1 >0)
+ if(sc && sc->opt1 >0 && (!flag || battle_config.sc_castcancel))
return 0;
if(sc && sc->count)
@@ -407,7 +407,8 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
(sc->data[SC_MARIONETTE].timer != -1 && skill_num != CG_MARIONETTE) ||
(sc->data[SC_MARIONETTE2].timer != -1 && skill_num == CG_MARIONETTE) ||
(sc->data[SC_HERMODE].timer != -1 && skill_get_inf(skill_num) & INF_SUPPORT_SKILL) ||
- sc->data[SC_SILENCE].timer != -1 || sc->data[SC_STEELBODY].timer != -1 ||
+ (sc->data[SC_SILENCE].timer != -1 && !flag) || //Silence only blocks initial casting of skills.
+ sc->data[SC_STEELBODY].timer != -1 ||
sc->data[SC_BERSERK].timer != -1 || sc->data[SC_SKA].timer != -1 ||
sc->data[SC_NOCHAT].timer != -1
)
@@ -4188,7 +4189,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_COMA: //Coma. Sends a char to 1HP
battle_damage(NULL, bl, status_get_hp(bl)-1, 0);
- return 0;
+ return 1;
case SC_CARTBOOST: /* カ?トブ?スト */
if(sc->data[SC_DECREASEAGI].timer!=-1 )