summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/map.cpp2
-rw-r--r--src/map/mob.cpp3
-rw-r--r--src/map/party.cpp3
-rw-r--r--src/map/pc.cpp5
-rw-r--r--src/map/pc.t.hpp2
5 files changed, 11 insertions, 4 deletions
diff --git a/src/map/map.cpp b/src/map/map.cpp
index 152b3c8..a3f600a 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -1562,7 +1562,7 @@ void map_set_logfile(const char *filename)
map_start_logfile(tv.tv_sec);
- MAP_LOG("log-start v3");
+ MAP_LOG("log-start v4");
}
void map_log(const_string line)
diff --git a/src/map/mob.cpp b/src/map/mob.cpp
index a6070f0..be9e71d 100644
--- a/src/map/mob.cpp
+++ b/src/map/mob.cpp
@@ -2616,7 +2616,8 @@ int mob_damage(struct block_list *src, struct mob_data *md, int damage,
}
}
if (flag) // 各自所得
- pc_gainexp(tmpsd[i], base_exp, job_exp);
+ pc_gainexp_reason(tmpsd[i], base_exp, job_exp,
+ PC_GAINEXP_REASON::KILLING);
}
// 公平分配
for (int i = 0; i < pnum; i++)
diff --git a/src/map/party.cpp b/src/map/party.cpp
index 5f04b58..f737601 100644
--- a/src/map/party.cpp
+++ b/src/map/party.cpp
@@ -717,7 +717,8 @@ int party_exp_share(struct party *p, int mapid, int base_exp, int job_exp)
return 0;
for (i = 0; i < MAX_PARTY; i++)
if ((sd = p->member[i].sd) != NULL && sd->bl.m == mapid)
- pc_gainexp(sd, base_exp / c + 1, job_exp / c + 1);
+ pc_gainexp_reason(sd, base_exp / c + 1, job_exp / c + 1,
+ PC_GAINEXP_REASON::SHARING);
return 0;
}
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 255dc90..bcac46f 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -3114,7 +3114,7 @@ int pc_checkjoblevelup(struct map_session_data *sd)
int pc_gainexp(struct map_session_data *sd, int base_exp, int job_exp)
{
return pc_gainexp_reason(sd, base_exp, job_exp,
- PC_GAINEXP_REASON::KILLING);
+ PC_GAINEXP_REASON::UNKNOWN);
}
int pc_gainexp_reason(struct map_session_data *sd, int base_exp, int job_exp,
@@ -3133,6 +3133,9 @@ int pc_gainexp_reason(struct map_session_data *sd, int base_exp, int job_exp,
"KILLXP",
"HEALXP",
"SCRIPTXP",
+ "SHAREXP",
+ /* Insert new types here */
+ "UNKNOWNXP"
}};
MAP_LOG_PC(sd, "GAINXP %d %d %s", base_exp, job_exp, reasons[reason]);
diff --git a/src/map/pc.t.hpp b/src/map/pc.t.hpp
index 26e4d94..feffd89 100644
--- a/src/map/pc.t.hpp
+++ b/src/map/pc.t.hpp
@@ -8,7 +8,9 @@ enum class PC_GAINEXP_REASON
KILLING = 0,
HEALING = 1,
SCRIPT = 2,
+ SHARING = 3,
+ UNKNOWN,
COUNT,
};