diff options
author | Haru <haru@dotalux.com> | 2016-01-16 20:28:02 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-01-16 20:28:02 +0100 |
commit | 3b1f9881edf52d725f768dbf2c0ef0c03ac60190 (patch) | |
tree | 4feaf21981ba31a0ce68abd22829773bc25acae9 /src/map/pc.c | |
parent | 76103463b0eba50c72aae6b3cf4db58871c84ee5 (diff) | |
parent | a7d49b6031898895bbd300eb625fd620f7b6daee (diff) | |
download | hercules-3b1f9881edf52d725f768dbf2c0ef0c03ac60190.tar.gz hercules-3b1f9881edf52d725f768dbf2c0ef0c03ac60190.tar.bz2 hercules-3b1f9881edf52d725f768dbf2c0ef0c03ac60190.tar.xz hercules-3b1f9881edf52d725f768dbf2c0ef0c03ac60190.zip |
Merge pull request #1031 from dastgir/12-OneClickIdentify
Added OneClickIdentify packet
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 16 |
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; } |