summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2015-12-27 15:01:36 +0530
committerDastgir <dastgirpojee@rocketmail.com>2016-01-16 20:39:26 +0530
commita7d49b6031898895bbd300eb625fd620f7b6daee (patch)
treeb949a50a2390d953ddd5385afe85bd809c7e3c62 /src/map/pc.c
parent9e48e2aebd5777179bd2fc2f45a58f8ad17b1373 (diff)
downloadhercules-a7d49b6031898895bbd300eb625fd620f7b6daee.tar.gz
hercules-a7d49b6031898895bbd300eb625fd620f7b6daee.tar.bz2
hercules-a7d49b6031898895bbd300eb625fd620f7b6daee.tar.xz
hercules-a7d49b6031898895bbd300eb625fd620f7b6daee.zip
Added OneClickIdentify packet
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 2dfd9519b..491584385 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -11479,6 +11479,20 @@ bool pc_db_checkid(unsigned int class_)
|| (class_ >= JOB_REBELLION && class_ < JOB_MAX );
}
+/**
+ * checks if player have any kind of magnifier in inventory
+ * @param sd map_session_data of Player
+ * @return index of magnifer, INDEX_NOT_FOUND if it is not found
+ */
+int pc_have_magnifier(struct map_session_data *sd)
+{
+ int n;
+ n = pc->search_inventory(sd, ITEMID_MAGNIFIER);
+ if (n == INDEX_NOT_FOUND)
+ n = pc->search_inventory(sd, ITEMID_NOVICE_MAGNIFIER);
+ return n;
+}
+
void do_final_pc(void) {
db_destroy(pc->itemcd_db);
pc->at_db->destroy(pc->at_db,pc->autotrade_final);
@@ -11846,4 +11860,6 @@ void pc_defaults(void) {
pc->check_job_name = pc_check_job_name;
pc->update_idle_time = pc_update_idle_time;
+
+ pc->have_magnifier = pc_have_magnifier;
}