diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-14 08:05:57 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-14 08:05:57 +0000 |
commit | 46e3a8ecf6c3582876e195a62add9a5ccf3dd62c (patch) | |
tree | ef326fa4e4ca883f56e52902989324e67f91446c /src/map/pc.c | |
parent | 941f5e48a3847e968e57f1f3b0a56cd2ed097682 (diff) | |
download | hercules-46e3a8ecf6c3582876e195a62add9a5ccf3dd62c.tar.gz hercules-46e3a8ecf6c3582876e195a62add9a5ccf3dd62c.tar.bz2 hercules-46e3a8ecf6c3582876e195a62add9a5ccf3dd62c.tar.xz hercules-46e3a8ecf6c3582876e195a62add9a5ccf3dd62c.zip |
Added equipment max-level support as per manager Kenpachi request (required for upcoming renewal items).
- in renewal mode item_db's elv field now supports a optional elvmax separated by a colon, example:
- 65:70 in the elv field means the item can only be worn by characters whose level is within 65~70 base level range.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16632 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 7683166b6..d1b4e752f 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -849,6 +849,10 @@ int pc_isequip(struct map_session_data *sd,int n) return 0; if(item->elv && sd->status.base_level < (unsigned int)item->elv) return 0; +#ifdef RENEWAL + if(item->elvmax && sd->status.base_level > (unsigned int)item->elvmax) + return 0; +#endif if(item->sex != 2 && sd->status.sex != item->sex) return 0; if(!map_flag_vs(sd->bl.m) && ((item->flag.no_equip&1) || !pc_isAllowedCardOn(sd,item->slot,n,1))) @@ -4067,6 +4071,11 @@ int pc_isUseitem(struct map_session_data *sd,int n) //Required level check if(item->elv && sd->status.base_level < (unsigned int)item->elv) return 0; + +#ifdef RENEWAL + if(item->elvmax && sd->status.base_level > (unsigned int)item->elvmax) + return 0; +#endif //Not equipable by class. [Skotlex] if (!( |