summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-26 16:10:53 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-26 16:10:53 +0000
commita10f6d9308baa615d2f5da46be8779a93c580834 (patch)
tree086da5eb98f53bfb4247542a2a34ec4b17134465 /src
parent5abd5bd1f8f53b73560cecd4496bfd4bc2acc226 (diff)
downloadhercules-a10f6d9308baa615d2f5da46be8779a93c580834.tar.gz
hercules-a10f6d9308baa615d2f5da46be8779a93c580834.tar.bz2
hercules-a10f6d9308baa615d2f5da46be8779a93c580834.tar.xz
hercules-a10f6d9308baa615d2f5da46be8779a93c580834.zip
- Fixed some warnings
- Corrected the comment for the global functions file. - Updated Charge Attack's damage equation as per the only source I've seen of it so far. - Now Guardians/Emperium can't hit /be hit if their current map isn't a gvg_castle or woe is off. This enables "localized" WoE by removing/setting the mapflag gvg_castle on the castles where you want WoE to take effect (note that even though normal players can't be hit on non gvg_castle maps, normal mobs can still be killed in such maps, you'd still need to modify the WoE scripts to use this kind of feature) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9575 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/battle.c10
2 files changed, 3 insertions, 9 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index cd4ed4dbd..83e816cc1 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3031,8 +3031,6 @@ int atcommand_pvpoff(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- struct map_session_data *pl_sd, **pl_allsd;
- int i, users;
nullpo_retr(-1, sd);
if (battle_config.pk_mode) { //disable command if server is in PK mode [Valaris]
diff --git a/src/map/battle.c b/src/map/battle.c
index 7ff6299e6..beca8752d 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1587,7 +1587,7 @@ static struct Damage battle_calc_weapon_attack(
skillratio += 100*(skill_lv-1);
break;
case KN_CHARGEATK:
- skillratio += wflag*15; //FIXME: How much is the actual bonus? [Skotlex]
+ skillratio += 100*((wflag-1)/3); //+100% every 3 cells.of distance
break;
case HT_PHANTASMIC:
skillratio += 50;
@@ -3259,7 +3259,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
{
TBL_MOB *md = (TBL_MOB*)t_bl;
- if (!agit_flag && md->guardian_data && md->guardian_data->guild_id)
+ if (!(agit_flag && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id)
return 0; //Disable guardians/emperiums owned by Guilds on non-woe times.
break;
}
@@ -3267,10 +3267,6 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
switch(src->type)
{ //Checks on actual src type
- case BL_MOB:
- if (!agit_flag && ((TBL_MOB*)src)->guardian_data && ((TBL_MOB*)src)->guardian_data->guild_id)
- return 0; //Disable guardians/emperium owned by Guilds on non-woe times.
- break;
case BL_PET:
if (t_bl->type != BL_MOB && flag&BCT_ENEMY)
return 0; //Pet may not attack non-mobs.
@@ -3333,7 +3329,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
case BL_MOB:
{
TBL_MOB*md = (TBL_MOB*)s_bl;
- if (!agit_flag && md->guardian_data && md->guardian_data->guild_id)
+ if (!(agit_flag && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id)
return 0; //Disable guardians/emperium owned by Guilds on non-woe times.
if(md->state.killer/* || !(battle_config.mob_ai&0x400)*/)
state |= BCT_ENEMY; //By default everyone hates mobs.