summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c4
-rw-r--r--src/map/skill.c23
-rw-r--r--src/map/status.c33
3 files changed, 32 insertions, 28 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index f39c63dc3..48157c3e2 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2387,7 +2387,7 @@ int atcommand_kami(
memset(atcmd_output, '\0', sizeof(atcmd_output));
- if(*(command + 5) != 'c') {
+ if(*(command + 5) != 'c' && *(command + 5) != 'C') {
if (!message || !*message) {
clif_displaymessage(fd, "Please, enter a message (usage: @kami <message>).");
@@ -2395,7 +2395,7 @@ int atcommand_kami(
}
sscanf(message, "%199[^\n]", atcmd_output);
- intif_GMmessage(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b') ? 0x10 : 0);
+ intif_GMmessage(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? 0x10 : 0);
} else {
diff --git a/src/map/skill.c b/src/map/skill.c
index 405e5a109..07ef6e066 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3424,14 +3424,15 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case SA_SEISMICWEAPON:
if (dstsd) {
if(dstsd->status.weapon == 0 ||
- (dstsd->sc.count && (
- dstsd->sc.data[SC_FIREWEAPON].timer != -1 ||
- dstsd->sc.data[SC_WATERWEAPON].timer != -1 ||
- dstsd->sc.data[SC_WINDWEAPON].timer != -1 ||
- dstsd->sc.data[SC_EARTHWEAPON].timer != -1 ||
- dstsd->sc.data[SC_SHADOWWEAPON].timer != -1 ||
- dstsd->sc.data[SC_GHOSTWEAPON].timer != -1 ||
- dstsd->sc.data[SC_ENCPOISON].timer != -1
+ (dstsd->sc.count && dstsd->sc.data[type].timer == -1 &&
+ ( //Allow re-enchanting to lenghten time. [Skotlex]
+ dstsd->sc.data[SC_FIREWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_WATERWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_WINDWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_EARTHWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_SHADOWWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_GHOSTWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_ENCPOISON].timer != -1
))
) {
if (sd) clif_skill_fail(sd,skillid,0,0);
@@ -3596,8 +3597,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
dstsd->sc.data[SC_WINDWEAPON].timer != -1 ||
dstsd->sc.data[SC_EARTHWEAPON].timer != -1 ||
dstsd->sc.data[SC_SHADOWWEAPON].timer != -1 ||
- dstsd->sc.data[SC_GHOSTWEAPON].timer != -1 ||
- dstsd->sc.data[SC_ENCPOISON].timer != -1) {
+ dstsd->sc.data[SC_GHOSTWEAPON].timer != -1
+ // dstsd->sc.data[SC_ENCPOISON].timer != -1 //People say you should be able to recast to lengthen the timer. [Skotlex]
+ ) {
clif_skill_nodamage(src,bl,skillid,skilllv,0);
clif_skill_fail(sd,skillid,0,0);
break;
@@ -7968,6 +7970,7 @@ int skill_check_condition(struct map_session_data *sd,int type)
clif_skill_fail(sd,skill,0,0);
return 0;
}
+ break;
//SHOULD BE OPTIMALIZED [Komurka]
case SG_SUN_WARM:
if ((sd->bl.m == sd->feel_map[0].m) || (sd->sc.data[SC_MIRACLE].timer!=-1))
diff --git a/src/map/status.c b/src/map/status.c
index d9f958f1e..8ceb69c06 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -343,9 +343,15 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
if (target && status_isdead(target) && skill_num != ALL_RESURRECTION && skill_num != PR_REDEMPTIO)
return 0;
- if (skill_num == PA_PRESSURE && flag)
- return 1; //Once Gloria Domini has been casted, there's nothing you can do to stop it. [Skotlex]
-
+ if (skill_num == PA_PRESSURE && flag) {
+ //Once Gloria Domini has been casted, there's nothing you can do to stop it. [Skotlex]
+ //- Except hiding from it.
+ tsc = target?status_get_sc(target):NULL;
+ if(tsc && tsc->option&OPTION_HIDE)
+ return 0;
+ return 1;
+ }
+
mode = src?status_get_mode(src):MD_CANATTACK;
if (!skill_num && !(mode&MD_CANATTACK))
@@ -3271,7 +3277,6 @@ int status_get_sc_def(struct block_list *bl, int type)
{
int sc_def;
struct status_change* sc;
- struct map_session_data *sd;
nullpo_retr(0, bl);
//Status that are blocked by Golden Thief Bug card or Wand of Hermod
@@ -3351,12 +3356,6 @@ int status_get_sc_def(struct block_list *bl, int type)
sc_def += 100*sc->data[SC_SIEGFRIED].val2; //Status resistance.
}
- sd = bl->type==BL_PC?(struct map_session_data*)bl:NULL;
-
- if(sd && SC_COMMON_MIN<=type && type<=SC_COMMON_MAX &&
- sd->reseff[type-SC_COMMON_MIN] > 0)
- sc_def += sd->reseff[type-SC_COMMON_MIN];
-
if(bl->type == BL_PC) {
if (sc_def > battle_config.pc_max_sc_def)
sc_def = battle_config.pc_max_sc_def;
@@ -3494,12 +3493,14 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
//Check rate
if (!(flag&(4|1))) {
rate*=100; //Pass to 10000 = 100%
- if (!(flag&8)) {
- race = status_get_sc_def(bl, type);
- if (race)
- rate -= rate*race/10000;
- }
-
+ race = flag&8?0:status_get_sc_def(bl, type); //recycling race to store the sc_def value.
+ //sd resistance applies even if the flag is &8
+ if(sd && SC_COMMON_MIN<=type && type<=SC_COMMON_MAX && sd->reseff[type-SC_COMMON_MIN] > 0)
+ race+= sd->reseff[type-SC_COMMON_MIN];
+
+ if (race)
+ rate -= rate*race/10000;
+
if (!(rand()%10000 < rate))
return 0;
}