summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--src/map/skill.c65
2 files changed, 37 insertions, 33 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index faad3492a..669edc764 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,11 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/04/25
+ * Moved the mapflag skill restrictions from skill_checkcondition to
+ skillnotok, this makes auto-spells not work in maps where they aren't
+ allowed. [Skotlex]
+ * Added TK_HIGHJUMP to skillnotok, the skill is blocked in noteleport maps
+ (with the exception of gvg ones) [Skotlex]
* Modified and simplified the random item group format. It now is
<GroupID>,<ItemID>,<Rate>, where Rate normally is 1, greater numbers is the
equivalent of adding the line multiple times. Also has support for import
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);