summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/map.c2
-rw-r--r--src/map/pc.c13
-rw-r--r--src/map/trade.c6
3 files changed, 15 insertions, 6 deletions
diff --git a/src/map/map.c b/src/map/map.c
index b4cb0cb..31f269d 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1704,7 +1704,7 @@ map_set_logfile(char *filename)
map_start_logfile(tv.tv_sec);
atexit(map_close_logfile);
- MAP_LOG("log-start");
+ MAP_LOG("log-start v2");
}
diff --git a/src/map/pc.c b/src/map/pc.c
index b934e13..acec322 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5013,11 +5013,14 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
skill_gangsterparadise(sd,0);
}
- if (src->type == BL_PC) {
- MAP_LOG_PC(sd, "INJURED-BY PC%d FOR %d", ((struct map_session_data *)src)->status.char_id, damage);
- } else {
- MAP_LOG_PC(sd, "INJURED-BY MOB%d FOR %d", src->id, damage);
- }
+ if (src) {
+ if (src->type == BL_PC) {
+ MAP_LOG_PC(sd, "INJURED-BY PC%d FOR %d", ((struct map_session_data *)src)->status.char_id, damage);
+ } else {
+ MAP_LOG_PC(sd, "INJURED-BY MOB%d FOR %d", src->id, damage);
+ }
+ } else
+ MAP_LOG_PC(sd, "INJURED-BY null FOR %d", damage);
// �� ���Ă����瑫���~�߂�
if(sd->sc_data[SC_ENDURE].timer == -1 && !sd->special_state.infinite_endure)
diff --git a/src/map/trade.c b/src/map/trade.c
index 67ac257..31f29ce 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -244,6 +244,8 @@ void trade_tradecancel(struct map_session_data *sd)
}
}
+#define MAP_LOG_PC(sd, fmt, args...) MAP_LOG("PC%d %d:%d,%d " fmt, sd->status.char_id, sd->bl.m, sd->bl.x, sd->bl.y, ## args)
+
/*==========================================
* Žæˆø‹–‘ø(trade‰Ÿ‚µ)
*------------------------------------------
@@ -256,17 +258,20 @@ void trade_tradecommit(struct map_session_data *sd)
nullpo_retv(sd);
if((target_sd = map_id2sd(sd->trade_partner)) != NULL){
+ MAP_LOG_PC(sd, " TRADECOMMIT WITH %d GIVE %d GET %d", target_sd->status.char_id, sd->deal_zeny, target_sd->deal_zeny);
if( (sd->deal_locked >=1) && (target_sd->deal_locked >=1) ){ // both have pressed 'ok'
if(sd->deal_locked < 2) {sd->deal_locked=2;} // set locked to 2
if(target_sd->deal_locked==2) { // the other one pressed 'trade' too
if(sd->deal_zeny > sd->status.zeny) {
sd->deal_zeny = 0;
trade_tradecancel(sd);
+ MAP_LOG_PC(sd, " TRADECANCEL");
return;
}
if(target_sd->deal_zeny > target_sd->status.zeny) {
target_sd->deal_zeny = 0;
trade_tradecancel(sd);
+ MAP_LOG_PC(sd, " TRADECANCEL");
return;
}
for(trade_i=0; trade_i<10;trade_i++) {
@@ -315,6 +320,7 @@ void trade_tradecommit(struct map_session_data *sd)
target_sd->trade_partner=0;
clif_tradecompleted(sd,0);
clif_tradecompleted(target_sd,0);
+ MAP_LOG_PC(sd, " TRADEOK");
}
}
}