summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-25 20:36:26 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-25 20:36:26 +0000
commitd8d64f4cc916a6574a4e05f4b188bdcb110e03b3 (patch)
tree693602bbcbea2c4572053e3f4d8105365f76a186 /src/map
parentbd61d3ee7ccb281b034805f6c3cc5af4d1e5c49b (diff)
downloadhercules-d8d64f4cc916a6574a4e05f4b188bdcb110e03b3.tar.gz
hercules-d8d64f4cc916a6574a4e05f4b188bdcb110e03b3.tar.bz2
hercules-d8d64f4cc916a6574a4e05f4b188bdcb110e03b3.tar.xz
hercules-d8d64f4cc916a6574a4e05f4b188bdcb110e03b3.zip
- Moved the mapflag skill restrictions from skill_checkcondition to skillnotok, this makes auto-spells not work in maps where they aren't allowed.
- Added TK_HIGHJUMP to skillnotok, the skill is blocked in noteleport maps (with the exception of gvg ones) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6281 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c65
1 files changed, 32 insertions, 33 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 38f244a4e..678aaac42 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -835,7 +835,33 @@ int skillnotok(int skillid, struct map_session_data *sd)
switch (skillid) {
case AL_WARP:
+ if(map[sd->bl.m].flag.nowarp) {
+ clif_skill_teleportmessage(sd,0);
+ return 1;
+ }
+ return 0;
+ break;
case AL_TELEPORT:
+ if(map[sd->bl.m].flag.noteleport) {
+ clif_skill_teleportmessage(sd,0);
+ return 1;
+ }
+ return 0;
+ case TK_HIGHJUMP:
+ if(map[sd->bl.m].flag.noteleport && !map_flag_gvg(sd->bl.m))
+ { //Can't be used on noteleport maps, except for gvg maps [Skotlex]
+ clif_skill_fail(sd,skillid,0,0);
+ return 1;
+ }
+ break;
+ case WE_CALLPARTNER:
+ case WE_CALLPARENT:
+ case WE_CALLBABY:
+ if (map[sd->bl.m].flag.nomemo) {
+ clif_skill_teleportmessage(sd,1);
+ return 1;
+ }
+ break;
case MC_VENDING:
case MC_IDENTIFY:
return 0; // always allowed
@@ -845,9 +871,8 @@ int skillnotok(int skillid, struct map_session_data *sd)
clif_skill_fail(sd,skillid,0,0);
return 1;
}
- default:
- return (map[sd->bl.m].flag.noskill);
}
+ return (map[sd->bl.m].flag.noskill);
}
/* ƒXƒLƒ‹ƒ†ƒjƒbƒg‚Ì”z’u?î•ñ‚ð•Ô‚· */
@@ -6462,32 +6487,16 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
count=1; // Leave this at 1 [Valaris]
break;
case WE_CALLPARTNER:
- if (!sd)
- return NULL;
- if (map[src->m].flag.nomemo) {
- clif_skill_teleportmessage(sd,1);
- return NULL;
- }
- val1 = sd->status.partner_id;
+ if (sd ) val1 = sd->status.partner_id;
break;
case WE_CALLPARENT:
- if (!sd)
- return NULL;
- if (map[src->m].flag.nomemo) {
- clif_skill_teleportmessage(sd,1);
- return NULL;
+ if (sd) {
+ val1 = sd->status.father;
+ val2 = sd->status.mother;
}
- val1 = sd->status.father;
- val2 = sd->status.mother;
break;
case WE_CALLBABY:
- if (!sd)
- return NULL;
- if (map[src->m].flag.nomemo) {
- clif_skill_teleportmessage(sd,1);
- return NULL;
- }
- val1 = sd->status.child;
+ if (sd) val1 = sd->status.child;
break;
}
@@ -7717,21 +7726,11 @@ int skill_check_condition(struct map_session_data *sd,int skill, int lv, int typ
case AL_WARP:
if(!(type&2)) //Delete the item when the portal has been selected (type&2). [Skotlex]
delitem_flag = 0;
- if(map[sd->bl.m].flag.nowarp) {
- clif_skill_teleportmessage(sd,0);
- return 0;
- }
if(!battle_config.duel_allow_teleport && sd->duel_group) { // duel restriction [LuzZza]
clif_displaymessage(sd->fd, "Duel: Can't use warp in duel.");
return 0;
}
break;
- case AL_TELEPORT:
- if(map[sd->bl.m].flag.noteleport) {
- clif_skill_teleportmessage(sd,0);
- return 0;
- }
- break;
case MO_CALLSPIRITS: /* ?Œ÷ */
if(sd->spiritball >= lv) {
clif_skill_fail(sd,skill,0,0);