Cleaned up the mapflag system (#2943)
* Created setter and getter functions. * Adjusted all calls to use these functions. * Converted mapflags to C++ map container. * Converted drop_list to vector. * Converted skill_damage ERS into vector and increased limit from UINT8 to UINT16. * Cleaned up several functions to be more dynamic to reduce redundancy that was all over the place. * Renamed nosumstarmiracle to nosunmoonstarmiracle. * Adjusted skill_damage mapflag to use proper defined constants. * Refactored map index into a vector. Thanks to @Lemongrass3110 for a lot of help and @secretdataz!
This commit is contained in:
@@ -1582,11 +1582,11 @@ bool itemdb_isNoEquip(struct item_data *id, uint16 m) {
|
||||
if (!id->flag.no_equip)
|
||||
return false;
|
||||
if ((!map_flag_vs2(m) && id->flag.no_equip&1) || // Normal
|
||||
(map[m].flag.pvp && id->flag.no_equip&2) || // PVP
|
||||
(map_getmapflag(m, MF_PVP) && id->flag.no_equip&2) || // PVP
|
||||
(map_flag_gvg2_no_te(m) && id->flag.no_equip&4) || // GVG
|
||||
(map[m].flag.battleground && id->flag.no_equip&8) || // Battleground
|
||||
(map_getmapflag(m, MF_BATTLEGROUND) && id->flag.no_equip&8) || // Battleground
|
||||
(map_flag_gvg2_te(m) && id->flag.no_equip&16) || // WOE:TE
|
||||
(map[m].flag.restricted && id->flag.no_equip&(8*map[m].zone)) // Zone restriction
|
||||
(map_getmapflag(m, MF_RESTRICTED) && id->flag.no_equip&(8*map[m].zone)) // Zone restriction
|
||||
)
|
||||
return true;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user