summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-30 23:08:08 -0300
committershennetsind <ind@henn.et>2013-03-30 23:08:08 -0300
commit7ec1e8fdff6adad1979d750774f9003f223bf3ef (patch)
tree65553e83135c5f5f983c106914d0a35ea2f62588 /src/map/battle.c
parent87373047cd4aaf8b0c2425133b9b907e3ea4d122 (diff)
downloadhercules-7ec1e8fdff6adad1979d750774f9003f223bf3ef.tar.gz
hercules-7ec1e8fdff6adad1979d750774f9003f223bf3ef.tar.bz2
hercules-7ec1e8fdff6adad1979d750774f9003f223bf3ef.tar.xz
hercules-7ec1e8fdff6adad1979d750774f9003f223bf3ef.zip
Hercules Renewal: clif.c complete
Added the last missing functions into the interface, all functions in clif.c are now wired to the interface. http://hercules.ws/board/topic/237-hercules-renewal/ Also shortened clif->displaymessage to clif->message, removed the old clif->message and merged its functionality with clif->disp_overhead (both use the same packet and do the same thing :P) - and a gazillion other stuff: http://hercules.ws/board/topic/316-introducing-hercules-channel-system/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 8f97ca58d..692750bdb 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1324,7 +1324,7 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama
}
}
if(src->type != BL_MOB) {
- struct guild *g = guild_search(status_get_guild_id(src));
+ struct guild *g = src->type == BL_PC ? ((TBL_PC *)src)->guild : guild_search(status_get_guild_id(src));
if (class_ == MOBID_EMPERIUM && (!g || guild_checkskill(g,GD_APPROVAL) <= 0 ))
return 0;
@@ -1335,32 +1335,32 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama
}
switch (skill_id) {
- //Skills with no damage reduction.
- case PA_PRESSURE:
- case HW_GRAVITATION:
- case NJ_ZENYNAGE:
- case KO_MUCHANAGE:
- break;
- default:
- /* Uncomment if you want god-mode Emperiums at 100 defense. [Kisuka]
- if (md && md->guardian_data) {
- damage -= damage * (md->guardian_data->castle->defense/100) * battle_config.castle_defense_rate/100;
- }
- */
- if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex]
- if (flag&BF_WEAPON)
- damage = damage * battle_config.gvg_weapon_damage_rate / 100;
- if (flag&BF_MAGIC)
- damage = damage * battle_config.gvg_magic_damage_rate / 100;
- if (flag&BF_MISC)
- damage = damage * battle_config.gvg_misc_damage_rate / 100;
- } else { //Normal attacks get reductions based on range.
- if (flag & BF_SHORT)
- damage = damage * battle_config.gvg_short_damage_rate / 100;
- if (flag & BF_LONG)
- damage = damage * battle_config.gvg_long_damage_rate / 100;
- }
- if(!damage) damage = 1;
+ //Skills with no damage reduction.
+ case PA_PRESSURE:
+ case HW_GRAVITATION:
+ case NJ_ZENYNAGE:
+ case KO_MUCHANAGE:
+ break;
+ default:
+ /* Uncomment if you want god-mode Emperiums at 100 defense. [Kisuka]
+ if (md && md->guardian_data) {
+ damage -= damage * (md->guardian_data->castle->defense/100) * battle_config.castle_defense_rate/100;
+ }
+ */
+ if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex]
+ if (flag&BF_WEAPON)
+ damage = damage * battle_config.gvg_weapon_damage_rate / 100;
+ if (flag&BF_MAGIC)
+ damage = damage * battle_config.gvg_magic_damage_rate / 100;
+ if (flag&BF_MISC)
+ damage = damage * battle_config.gvg_misc_damage_rate / 100;
+ } else { //Normal attacks get reductions based on range.
+ if (flag & BF_SHORT)
+ damage = damage * battle_config.gvg_short_damage_rate / 100;
+ if (flag & BF_LONG)
+ damage = damage * battle_config.gvg_long_damage_rate / 100;
+ }
+ if(!damage) damage = 1;
}
return damage;
}