diff options
-rw-r--r-- | Changelog-Trunk.txt | 4 | ||||
-rw-r--r-- | src/char/int_guild.c | 4 | ||||
-rw-r--r-- | src/char_sql/int_guild.c | 4 | ||||
-rw-r--r-- | src/map/skill.c | 10 |
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;
|