19 Commits

Author SHA1 Message Date
Aleos
8038e71322
Speed up item and mob information commands (#7084)
* Fixes #7081.
* Small refactor of the atcommands: iteminfo, mobinfo, whodrops, and idsearch.
* Item information gathering is now sped up.
* Refactored itemdb_searchname_array to store results in a std::map so that the data is sorted by ID automatically.
* Cleanups across the board to remove extra calls for itemdb_exists().
Thanks to @voyfmyuh, @CairoLee, and @Lemongrass3110!
2022-07-22 15:11:44 -04:00
Lemongrass3110
6b84115790
Speeded up item name lookup (#6161)
Partial takeover from #5997
Did some further cleanup and took it out of the pull request until secret has time to finish it.

All credits to @secretdataz

Co-authored-by: secretdataz <secretdataz@users.noreply.github.com>
2021-08-08 16:46:44 +02:00
Aleos
7992e0891b
Converts the mob database to YAML (#5435)
* Combines mob_race2 and mob_drop databases into one.
* General cleanups and optimizations.
* Includes CSV2YAML conversion tool.
Thanks to @vstumpf, @lukasrmattos, and @Lemongrass3110!
2021-02-16 17:09:06 -05:00
Aleos
be9babee32
Converts the random option databases to YAML (#5494)
* Fixes #3084.
* Creating random option groups now further reflects official behavior.
* Group bonuses can now be created without having to create multiple permutations of the same group.
* Specific slot options can now be defined which guarantee a bonus.
* Non-guaranteed options can now be defined along with a maximum amount.
* Random option value can now be defined as a range instead of a static value.
* Adds conversion of official random option groups.
* Includes CSV2YAML conversion tool.
Thanks to @Lemongrass3110!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2020-11-08 12:21:52 -05:00
Cydh Ramdh
1658f273de
Adjust EXP storage to uint64 (#4377)
* Updates EXP table to 200/70
* Always store exp as uint64 no matter the client date.
* Adjusts guild exp to uint64.
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2020-07-28 16:43:46 -04:00
Aleos
06c159c405
Refactored Instances to utilize C++ features (#3163)
* Fixes #3087 and fixes #3095.
* Converts database file to YAML.
* Converts static array to unordered_map which frees up pre-allocated memory that may never be fully used.
* Got rid of all DBMap/ERS features.
* Removes MAX_INSTANCE_DATA in favor of INT_MAX.
* Includes TXT converter.
Thanks to @Lemongrass3110, @secretdataz, @Atemo, @lighta, @InusualZ, @Angelic234, @Normynator, @cydh, and @ecdarreola!
2020-04-08 12:52:45 -04:00
Aleos
2931c00bd4
Implemented the Battleground Queue System (#3995)
* Fixes #1310.
* Added a battle config which allows toggling of the Battleground Queue client feature and also toggles between the modes of scripts.
* Added script commands bg_reserve, bg_unbook, and bg_desert.
* Removed old custom Battleground scripts.
Thanks to @Lemongrass3110, @Locien, @secretdataz, @InusualZ, @Normynator, @Atemo, @iubantot, @admkakaroto, and @noobzter003!
2020-02-12 08:26:59 -05:00
Aleos
dca3797d44
Converted the skill database to YAML (#4531)
* Combines skill_cast_db, skill_castnodex_db, skill_copyable_db, skill_nonearnpc_db, skill_require_db, and skill_unit_db into skill_db.
* Introduces a cached YAML class for quicker lookups.
* General cleanups and optimizations.
* Includes CSV2YAML conversion tool.
Thanks to @Lemongrass3110!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2020-01-31 14:14:08 -05:00
Lemongrass3110
e72c7360cf
Added int64 support to the script engine (#4522)
Added support for signed 64 bit integer value computation into the script engine.
This is required because newer official features require support for bigger numbers inside the scripts.

This also cleans up a lot of messy code and fixes a few issues like script stack corruptions.

Thanks to @aleos89 and everyone who supported me with this.
2020-01-13 14:44:48 +01:00
Lemongrass3110
deb0615639 Follow up to 2fc7472
Fixed an issue with random calculation on abra in some cases.
Moved some commonly used functions into util and yaml database for global usage.

Thanks to @Daegaladh and @aleos89
2019-12-19 22:12:55 +01:00
Aleos
78eed02273 Updated the YAML parsing method (#3694)
Synchronized the process of loading and parsing YAML databases.
Provides more robust parse warnings/errors.
Added Header checks to validate database versions.
Adjusted root keys to a standard name of Body.
Adjusted inter-server storages, achievements, and attendance to follow the new format.

Fixes #3483

Thanks to @Lemongrass3110!
2019-02-28 22:19:39 +01:00
Aleos
bde33e762c
Cleaned up map data checks (#3405)
* Fixes #3398 and fixes #3402.
* Sped up pc_isUseitem, pc_setpos, and pc_dead map data checks.
Thanks to @uddevil!
2018-08-27 18:03:38 -04:00
Aleos
2ab298076c
Cleaned up header guard names (#3395)
* Fixes #3385.
* Updated the header guard names to C++ standards.
Thanks to @elfring's suggestion!
2018-08-10 15:57:50 -04:00
Aleos
48ae1a1e05
Cleaned up map storage type (#3384)
* Fixes #3369, fixes #3370, and fixes #3382.
* Converted maps storage container back to static array.
* Converted mapflag storage containers to unordered_map.
* Removed a lot of redundancy and recursive lookups.
* Fixed a couple short-circuit checks to help with performance.
* Fixed multiple instance creation/destruction issues.
* Fixed PK Mode attempting to set PvP on flags that are already active.
* Getting MF_RESTRICTED will return the map's zone value instead of the state.
* Converted mapflag macros to inline functions.
Thanks to @teededung, @lelouch22, @mazvi, @Lemongrass3110, and @cydh!
2018-08-10 13:52:07 -04:00
Aleos
a942853d55
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!
2018-07-18 20:00:33 -04:00
Lemongrass3110
a5588dd9ab
Initial Release of Attendance Feature (#3297)
Thanks to @secretdataz and @aleos89 for their help.
Thanks to @Haikenz and @admkakaroto for testing.
Thanks to @Daegaladh for his ideas.
2018-07-16 21:39:42 +02:00
Aleos
11b42569fc
Synchronized source file headers (#3212)
* Alphabetically sorted includes.
* Updated copyright and license text to match across all files.
* Removed pragma once define in header files in lieu of ifdef guards.
2018-06-20 18:08:30 -04:00
Lemongrass3110
0a84542220
Added a template function for std::map search (#3107)
Thanks to @secretdataz for his help.
2018-05-16 08:26:48 +02:00
lighta
fd8e1fe2cd Introduced utilities to gradually replace utils. (#2651)
* Replace current levenshtein with much faster implementation.
* Remove usage of alias to simplify code for VS 2013.
2017-12-06 10:38:10 -05:00