diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-30 16:41:54 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-30 16:41:54 +0000 |
commit | d8514a81bbd118303e62e109ca56950b50fa82f3 (patch) | |
tree | 326195de0fe591b629dbc71174641ef231673faf /src/map/pc.h | |
parent | de3e9a7aea38e374a91d9f036da043f14e58b9f3 (diff) | |
download | hercules-d8514a81bbd118303e62e109ca56950b50fa82f3.tar.gz hercules-d8514a81bbd118303e62e109ca56950b50fa82f3.tar.bz2 hercules-d8514a81bbd118303e62e109ca56950b50fa82f3.tar.xz hercules-d8514a81bbd118303e62e109ca56950b50fa82f3.zip |
Follow up r16981:
- Where it causes nullpo_info warnings or even map crash(bugreport:6954)
- Fixed wrong display of info using HW_MAGICPOWER in pre-re/skill_cast_db.txt(bugreport:5663)
Synced 'skill_cast_db.txt'(new skills only) of RE with PRE RE
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16988 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.h')
-rw-r--r-- | src/map/pc.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/map/pc.h b/src/map/pc.h index 8d74b8953..971fce1d2 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -654,8 +654,18 @@ enum equip_index { #define pc_rightside_def(sd) ((sd)->battle_status.def2) #define pc_leftside_mdef(sd) ((sd)->battle_status.mdef) #define pc_rightside_mdef(sd) ( (sd)->battle_status.mdef2 - ((sd)->battle_status.vit>>1) ) -#define pc_leftside_matk(sd) ((sd)->battle_status.matk_min) -#define pc_rightside_matk(sd) ((sd)->battle_status.matk_max) +#define pc_leftside_matk(sd) \ + (\ + ((sd)->sc.data[SC_MAGICPOWER] && (sd)->sc.data[SC_MAGICPOWER]->val4) \ + ?((sd)->battle_status.matk_min * 100 + 50) / ((sd)->sc.data[SC_MAGICPOWER]->val3+100) \ + :(sd)->battle_status.matk_min \ + ) +#define pc_rightside_matk(sd) \ + (\ + ((sd)->sc.data[SC_MAGICPOWER] && (sd)->sc.data[SC_MAGICPOWER]->val4) \ + ?((sd)->battle_status.matk_max * 100 + 50) / ((sd)->sc.data[SC_MAGICPOWER]->val3+100) \ + :(sd)->battle_status.matk_max \ + ) #endif int pc_class2idx(int class_); |