18 Commits

Author SHA1 Message Date
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
Aleos
783009d642
Updated Achievement EXP to official values (#4326)
* Added the official values for the AG_GOAL_ACHIEVE.
* Refactored the leveling logic for Achievements to account for the new values.
* Moved achievement EXP to a database file.
* Added AchievementLevel player variable to allow for easy tracking in the achievement condition checks.
* Cleaned up player GUI EXP progression.
* Added a check to not save achievements that made no changes.
* Added first login achievement.
Thanks to @Lemongrass3110!
2019-10-11 09:42:01 -04:00
Atemo
b412c4fcab
questinfo requirement update (#4168)
* The <quest ID> is now removed, all the conditions are handled by a <condition> argument. The <condition> is using the achievement_check_condition (like in achievement_db.yml) so any condition (in theory) can be used to display the icon.
* A new script command has been added to refresh the bubble for the given player anytime.

Thanks to @aleos89 and @secretdataz for the review!
2019-10-06 17:15:46 +02:00
Lemongrass3110
0e793e0c12
Fixed memory management for achievements (#4381)
Fixes #4380
2019-10-02 09:17:53 +02:00
Aleos
bbca9efd57
Added new achievements (#4368)
* Added new achievements
* Reordered some older achievements by ID.
* Fixed memory management on duplicate achievements.
Thanks to @Lemongrass3110!
2019-09-30 11:27:49 -04:00
Aleos
ac46920e73
Fixed Achievement Level progression (#4156)
* Fixes #4131.
* Changed the behavior of achievement experience to roll over remaining experience rather than check from the total amount.
* Cleaned up achievement level logic.
Thanks to @daisyanne1380 and @SeravySensei!
2019-07-19 10:25:28 -04:00
Lemongrass3110
8bb6b119b4
Fixed invalid item errors in achievements (#4240)
Fixes #4236

Thanks to @RadianFord
2019-07-08 08:35:29 +02:00
Aleos
8df036c428
Fixed AG_BATTLE and AG_TAMING achievements (#4065)
* Fixes #4015.
* Fixes a potential crash from AG_BATTLE and AG_TAMING achievements.
* General cleanups.
Thanks to @Atemo!
2019-04-17 12:23:43 -04:00
Aleos
54ac2ae132
Fixed an issue with AG_BATTLE and AG_TAMING (#4006)
* Added a missing assignment for achievement monster targets.
Thanks to @teededung and @Lemongrass3110!
2019-03-09 14:17:11 -05: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
Lemongrass3110
4706115d5b
Refactored achievement conditions (#3831)
They now use the normal script engine and not a duplicated portion of code of it.
This is required for another pending update.

This also fixes atcommands not triggering status achievements.

Thanks to @aleos89 and @RadianFord
2019-01-13 17:26:25 +01: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
801d3ed942
Moved common, config and mapcache to C++ (#3200)
Dropped BETA_THREAD_TEST and everything around it
Dropped mt19937
Replaced msinttypes with cinttypes
Removed IRC link and updated README name
2018-06-14 21:51:58 +02:00
Lemongrass3110
a7df035854
Fixed titles only being added on relog (#2945)
Fixes #2944

Thanks to @admkakaroto
2018-03-07 18:57:00 +01:00
aleos
114bebac68 Corrected a potential map crash with achievements
* Follow up to 1c66035.
* Reverted a lambda function which was causing a mismatch between achievement vectors and player achievements.
Thanks to @reymarbc and @cydh!
2017-11-23 16:40:06 -05:00
Aleos
1c66035761
Refactored achievements to utilize C++ features (#2607)
* Refactored achievements to utilize C++ features
* Cleaned up the YAML parser.
* Moved achievements from DBMap to an unordered_map.
* Moved achievement targets from DBMap to a vector.
* Changed all struct arrays into vectors.
* Changed all char arrays to strings.
* Changed all int arrays to std::arrays.
* Removed achievement_dummy as it's no longer needed.
* Achievements now use smart pointer to ensure proper construction and deconstruction of objects.
Thanks to @lighta!
2017-11-20 21:34:16 -05:00
Lemongrass3110
b2ab9724fe
Implemented new monster range (#2604)
With this the internal static array was changed to a std::map which manages it's memory dynamically when needed.

Dropped mob_dummy since it was useless to have it in the first place.

Replaced a lot of direct accesses to the mob db by the "get" function.

With this you can now use 20021-31998 for monsters and also 4000-20020 will be used for player clones whenever needed.

Dropped mobdb_exists
Replaced almost all references to MAX_MOB_DB

Moved MAX_MOB_DB from the header directly into the source file to make it only visible to the .cpp file itself and not to any other.

Moved the mob drop calculation function from itemdb.cpp into mob.cpp, because it needs to iterate over the whole mob db.

Added a few missing clone checks.

Thanks to @lighta, @Jeybla and @aleos89.
2017-11-19 01:22:29 +01:00
Aleos
c4a364be2c
Initial work for map server to C++ (#2565)
* Initial progression of moving the map-server to C++ format.
* Converted all core files to .cpp and header files to .hpp.
* Refactored the refine database parser to utilize native YAML C++.
Thanks to @Jeybla and @lighta for their help!
2017-11-02 17:39:03 -04:00