diff options
author | Komurka <Komurka@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-01-30 14:24:26 +0000 |
---|---|---|
committer | Komurka <Komurka@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-01-30 14:24:26 +0000 |
commit | f1375b9ae3116eb408a962d9b03a5f64df6747f3 (patch) | |
tree | 1d604d92fcd06a02203f313d7fed46eb3f2f4da4 /src/map/skill.c | |
parent | 66e4865ef4398014c67057e851456df1261c3c66 (diff) | |
download | hercules-f1375b9ae3116eb408a962d9b03a5f64df6747f3.tar.gz hercules-f1375b9ae3116eb408a962d9b03a5f64df6747f3.tar.bz2 hercules-f1375b9ae3116eb408a962d9b03a5f64df6747f3.tar.xz hercules-f1375b9ae3116eb408a962d9b03a5f64df6747f3.zip |
* Added 'restricted' mapflag, based on lordalfa patch
- you can set restriction zone on map (see mapflag/restricted.txt)
- you can turn off item usage on certain restricted map in item_noequip.txt
- you can turn off skill usage on certain restricted map in skill_nocast_db.txt
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5115 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 7c393fd40..b7426beff 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -716,7 +716,7 @@ int skillnotok(int skillid, struct map_session_data *sd) return 1;
}
- if (pc_isGM(sd) >= 20)
+ if (pc_isGM(sd) >= 20 && battle_config.gm_skilluncond)
return 0; // gm's can do anything damn thing they want
// Check skill restrictions [Celest]
@@ -730,6 +730,10 @@ int skillnotok(int skillid, struct map_session_data *sd) return 1;
if (battle_config.pk_mode && !map[sd->bl.m].flag.nopvp && skill_get_nocast (skillid) & 16)
return 1;
+//printf("skill %d, flag restricted=%d, zone=%d, zone*8=%d, skill_get_nocast (skillid)=%d, skill_get_nocast (skillid)&8*zone=%d\n",
+// skillid,map[sd->bl.m].flag.restricted,map[sd->bl.m].zone,map[sd->bl.m].zone*8, skill_get_nocast (skillid),skill_get_nocast (skillid) & (8*map[sd->bl.m].zone));
+ if(map[sd->bl.m].flag.restricted && map[sd->bl.m].zone && skill_get_nocast (skillid) & (8*map[sd->bl.m].zone))
+ return 1;
switch (skillid) {
case AL_WARP:
|