summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/mmo.h14
-rw-r--r--src/map/battle.c2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 44069b85f..617a870e9 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -7,6 +7,20 @@
#include <time.h>
#include "utils.h" // _WIN32
+#if ! defined(Assert)
+#if defined(RELEASE)
+#define Assert(EX)
+#else
+// extern "C" {
+#include <assert.h>
+// }
+#if defined(_WIN32)
+#include <crtdbg.h>
+#endif
+#define Assert(EX) assert(EX)
+#endif
+#endif /* ! defined(Assert) */
+
#ifdef CYGWIN
// txtやlogなどの書き出すファイルの改行コード
#define RETCODE "\r\n" // (CR/LF:Windows系)
diff --git a/src/map/battle.c b/src/map/battle.c
index a5f33a655..92711bcd4 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3076,7 +3076,7 @@ static struct Damage battle_calc_pc_weapon_attack(
else
damage2 += atkmin_ ;
if(sd->atk_rate != 100 || sd->weapon_atk_rate != 0) {
- if (((struct map_session_data *)bl)->status.weapon < 16) {
+ if (sd->status.weapon < 16) {
damage = (damage * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
damage2 = (damage2 * (sd->atk_rate + sd->weapon_atk_rate[sd->status.weapon]))/100;
}