summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/map.c3
-rw-r--r--src/map/trade.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c
index d02c6da55..37a6f1d91 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3154,7 +3154,8 @@ void do_abort(void) {
//Save all characters and then flush the inter-connection.
if (!chrif_isconnect())
{
- ShowFatalError("Server has crashed without a connection to the char-server, character data can't be saved!\n");
+ if (pc_db->size(pc_db))
+ ShowFatalError("Server has crashed without a connection to the char-server, character data can't be saved!\n");
return;
}
ShowError("Server received crash signal! Attempting to save all online characters!\n");
diff --git a/src/map/trade.c b/src/map/trade.c
index 77bc80bdf..40f63e888 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -39,7 +39,13 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta
clif_tradestart(sd, 1); // character does not exist
return;
}
-
+
+ if (target_sd->npc_id)
+ { //Trade fails if you are using an NPC.
+ clif_tradestart(sd, 2);
+ return;
+ }
+
if (!battle_config.invite_request_check) {
if (target_sd->guild_invite > 0 || target_sd->party_invite > 0) {
clif_tradestart(sd, 2);