diff options
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r-- | src/map/script-fun.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index ce765a2..9014d2b 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -2295,7 +2295,7 @@ void builtin_pvpon(ScriptState *st) Session *s = get_session(i); if (!s) continue; - map_session_data *pl_sd = static_cast<map_session_data *>(s->session_data.get()); + dumb_ptr<map_session_data> pl_sd = dumb_ptr<map_session_data>(static_cast<map_session_data *>(s->session_data.get())); if (pl_sd && pl_sd->state.auth) { if (m == pl_sd->bl_m && !pl_sd->pvp_timer) @@ -2303,8 +2303,9 @@ void builtin_pvpon(ScriptState *st) pl_sd->pvp_timer = Timer(gettick() + 200_ms, std::bind(pc_calc_pvprank_timer, ph::_1, ph::_2, pl_sd->bl_id)); - pl_sd->pvp_rank = 0; - pl_sd->pvp_point = 5; + //pl_sd->pvp_rank = 0; + //pl_sd->pvp_point = 5; + clif_map_pvp(pl_sd); } } } @@ -2328,12 +2329,13 @@ void builtin_pvpoff(ScriptState *st) Session *s = get_session(i); if (!s) continue; - map_session_data *pl_sd = static_cast<map_session_data *>(s->session_data.get()); + dumb_ptr<map_session_data> pl_sd = dumb_ptr<map_session_data>(static_cast<map_session_data *>(s->session_data.get())); if (pl_sd && pl_sd->state.auth) { if (m == pl_sd->bl_m) { pl_sd->pvp_timer.cancel(); + clif_map_pvp(pl_sd); } } } |