From f0a87e4f7f5377498960429e96be5dff183c8326 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Wed, 9 Jan 2013 00:18:53 -0800 Subject: Make incoming packets read-only --- src/map/pc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/pc.cpp') diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 2c8a4e7..68dc50b 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -217,7 +217,7 @@ void pc_invincible_timer(timer_id tid, tick_t, custom_id_t id, custom_data_t) { struct map_session_data *sd; - if ((sd = (struct map_session_data *) map_id2sd(id)) == NULL + if ((sd = map_id2sd(id)) == NULL || sd->bl.type != BL_PC) return; @@ -259,7 +259,7 @@ void pc_spiritball_timer(timer_id tid, tick_t, custom_id_t id, custom_data_t) struct map_session_data *sd; int i; - if ((sd = (struct map_session_data *) map_id2sd(id)) == NULL + if ((sd = map_id2sd(id)) == NULL || sd->bl.type != BL_PC) return; @@ -781,7 +781,7 @@ int pc_breakarmor(struct map_session_data *sd) *------------------------------------------ */ int pc_authok(int id, int login_id2, time_t connect_until_time, - short tmw_version, struct mmo_charstatus *st) + short tmw_version, const struct mmo_charstatus *st) { struct map_session_data *sd = NULL; @@ -6883,7 +6883,7 @@ int pc_equipitem(struct map_session_data *sd, int n, EPOS) return 0; } - if (bool(pos == (EPOS::MISC2 | EPOS::CAPE))) + if (pos == (EPOS::MISC2 | EPOS::CAPE)) { // アクセサリ用例外処理 EPOS epor = EPOS::ZERO; -- cgit v1.2.3-60-g2f50