From 051e92e4246634d256651903c8c097a89857fba8 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Wed, 26 Jun 2013 15:29:15 -0700 Subject: Hopefully don't crash --- src/map/atcommand.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/map/atcommand.cpp') diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp index 5bb4d5f..1926f83 100644 --- a/src/map/atcommand.cpp +++ b/src/map/atcommand.cpp @@ -666,7 +666,7 @@ int atcommand_charwarp(const int fd, dumb_ptr sd, "You are not authorised to warp someone to this map."); return -1; } - if (pl_sd->bl_m != nullptr && pl_sd->bl_m->flag.nowarp + if (pl_sd->bl_m && pl_sd->bl_m->flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, @@ -741,7 +741,7 @@ int atcommand_warp(const int fd, dumb_ptr sd, "You are not authorised to warp you to this map."); return -1; } - if (sd->bl_m != nullptr && sd->bl_m->flag.nowarp + if (sd->bl_m && sd->bl_m->flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, @@ -816,14 +816,14 @@ int atcommand_goto(const int fd, dumb_ptr sd, if ((pl_sd = map_nick2sd(character)) != NULL) { - if (pl_sd->bl_m != nullptr && pl_sd->bl_m->flag.nowarpto + if (pl_sd->bl_m && pl_sd->bl_m->flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, "You are not authorised to warp you to the map of this player."); return -1; } - if (sd->bl_m != nullptr && sd->bl_m->flag.nowarp + if (sd->bl_m && sd->bl_m->flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, @@ -859,14 +859,14 @@ int atcommand_jump(const int fd, dumb_ptr sd, y = random_::in(1, 399); if (x > 0 && x < 800 && y > 0 && y < 800) { - if (sd->bl_m != nullptr && sd->bl_m->flag.nowarpto + if (sd->bl_m && sd->bl_m->flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, "You are not authorised to warp you to your actual map."); return -1; } - if (sd->bl_m != nullptr && sd->bl_m->flag.nowarp + if (sd->bl_m && sd->bl_m->flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, @@ -1274,7 +1274,7 @@ int atcommand_load(const int fd, dumb_ptr sd, "You are not authorised to warp you to your save map."); return -1; } - if (sd->bl_m != nullptr && sd->bl_m->flag.nowarp + if (sd->bl_m && sd->bl_m->flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, @@ -2517,14 +2517,14 @@ int atcommand_recall(const int fd, dumb_ptr sd, { if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can recall only lower or same level - if (sd->bl_m != nullptr && sd->bl_m->flag.nowarpto + if (sd->bl_m && sd->bl_m->flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, "You are not authorised to warp somenone to your actual map."); return -1; } - if (pl_sd->bl_m != nullptr && pl_sd->bl_m->flag.nowarp + if (pl_sd->bl_m && pl_sd->bl_m->flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, @@ -4156,7 +4156,7 @@ int atcommand_recallall(const int fd, dumb_ptr sd, { int count; - if (sd->bl_m != nullptr && sd->bl_m->flag.nowarpto + if (sd->bl_m && sd->bl_m->flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, @@ -4176,7 +4176,7 @@ int atcommand_recallall(const int fd, dumb_ptr sd, && pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can recall only lower or same level - if (pl_sd->bl_m != nullptr && pl_sd->bl_m->flag.nowarp + if (pl_sd->bl_m && pl_sd->bl_m->flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) count++; else @@ -4214,7 +4214,7 @@ int atcommand_partyrecall(const int fd, dumb_ptr sd, return -1; } - if (sd->bl_m != nullptr && sd->bl_m->flag.nowarpto + if (sd->bl_m && sd->bl_m->flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, @@ -4235,7 +4235,7 @@ int atcommand_partyrecall(const int fd, dumb_ptr sd, && sd->status.account_id != pl_sd->status.account_id && pl_sd->status.party_id == p->party_id) { - if (pl_sd->bl_m != nullptr && pl_sd->bl_m->flag.nowarp + if (pl_sd->bl_m && pl_sd->bl_m->flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) count++; else @@ -5931,14 +5931,14 @@ int atcommand_jump_iterate(const int fd, dumb_ptr sd, pl_sd = get_start(); } - if (pl_sd->bl_m != nullptr && pl_sd->bl_m->flag.nowarpto + if (pl_sd->bl_m && pl_sd->bl_m->flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, "You are not authorised to warp you to the map of this player."); return -1; } - if (sd->bl_m != nullptr && sd->bl_m->flag.nowarp + if (sd->bl_m && sd->bl_m->flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd)) { clif_displaymessage(fd, -- cgit v1.2.3-70-g09d2