summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-15 18:35:18 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-15 18:35:18 +0000
commitfcc3b82cb7a3676ba7bb9c7901012b7c06e5f7b3 (patch)
tree318c6c8626375d793cb395cd3dd4d09ce70c4344
parent07171348bda5027a11a13e1d946fffc48a0ead09 (diff)
downloadhercules-fcc3b82cb7a3676ba7bb9c7901012b7c06e5f7b3.tar.gz
hercules-fcc3b82cb7a3676ba7bb9c7901012b7c06e5f7b3.tar.bz2
hercules-fcc3b82cb7a3676ba7bb9c7901012b7c06e5f7b3.tar.xz
hercules-fcc3b82cb7a3676ba7bb9c7901012b7c06e5f7b3.zip
- Fixed the nocast flag 2 (not usable in pvp) returning true in pk-mode servers.
- When removing a castle's owning guild, the char servers will erase the guardian data now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6602 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--src/char/int_guild.c4
-rw-r--r--src/char_sql/int_guild.c4
-rw-r--r--src/map/skill.c10
4 files changed, 18 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index f14b92177..af36de724 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/15
+ * Fixed the nocast flag 2 (not usable in pvp) returning true in pk-mode
+ servers. [Skotlex]
+ * When removing a castle's owning guild, the char servers will erase the
+ guardian data now. [Skotlex]
* Changed the behaviour of immobile mobs when they can't chase their
target. Rather than using a longrange skill and then unlocking, they will
use an attack/angry state skill and then unlock. [Skotlex]
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index a1f4d418e..6747e43e6 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -1417,6 +1417,10 @@ int mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value)
(g) ? g->name : "??", gid, (value) ? "occupy" : "abandon", castle_id);
}
gc->guild_id = value;
+ if(gc->guild_id == 0) {
+ //Delete guardians.
+ memset(&gc->guardian, 0, sizeof(gc->guardian));
+ }
break;
case 2: gc->economy = value; break;
case 3: gc->defense = value; break;
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index b3da7ea91..ed30c7031 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -1752,6 +1752,10 @@ int mapif_parse_GuildCastleDataSave(int fd,int castle_id,int index,int value)
(g)?g->name:"??" ,gid, (value)?"occupy":"abandon", castle_id);
}
gc.guild_id = value;
+ if(gc.guild_id == 0) {
+ //Delete guardians.
+ memset(&gc.guardian, 0, sizeof(gc.guardian));
+ }
break;
case 2: gc.economy = value; break;
case 3: gc.defense = value; break;
diff --git a/src/map/skill.c b/src/map/skill.c
index 878436381..1437b2a13 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -821,13 +821,15 @@ int skillnotok(int skillid, struct map_session_data *sd)
// Check skill restrictions [Celest]
if(!map_flag_vs(sd->bl.m) && skill_get_nocast (skillid) & 1)
return 1;
- if(map[sd->bl.m].flag.pvp && skill_get_nocast (skillid) & 2)
+ if(map[sd->bl.m].flag.pvp) {
+ if(!battle_config.pk_mode && skill_get_nocast (skillid) & 2)
+ return 1;
+ if(battle_config.pk_mode && skill_get_nocast (skillid) & 16)
return 1;
+ }
if(map_flag_gvg(sd->bl.m) && skill_get_nocast (skillid) & 4)
return 1;
- if (agit_flag && skill_get_nocast (skillid) & 8)
- return 1;
- if (battle_config.pk_mode && map[sd->bl.m].flag.pvp && skill_get_nocast (skillid) & 16)
+ if(agit_flag && skill_get_nocast (skillid) & 8)
return 1;
if(map[sd->bl.m].flag.restricted && map[sd->bl.m].zone && skill_get_nocast (skillid) & (8*map[sd->bl.m].zone))
return 1;