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.
This commit is contained in:
Lemongrass3110
2020-01-13 14:44:48 +01:00
committed by GitHub
parent 3142863a13
commit e72c7360cf
41 changed files with 948 additions and 683 deletions

View File

@@ -80,7 +80,7 @@ std::unordered_map<uint16, std::string> aegis_itemnames;
std::unordered_map<uint16, uint16> aegis_itemviewid;
std::unordered_map<uint16, std::string> aegis_mobnames;
std::unordered_map<uint16, std::string> aegis_skillnames;
std::unordered_map<const char*, int32> constants;
std::unordered_map<const char*, int64> constants;
// Forward declaration of constant loading functions
static bool parse_item_constants( const char* path );
@@ -93,7 +93,7 @@ bool askConfirmation( const char* fmt, ... );
YAML::Emitter body;
// Implement the function instead of including the original version by linking
void script_set_constant_( const char* name, int value, const char* constant_name, bool isparameter, bool deprecated ){
void script_set_constant_( const char* name, int64 value, const char* constant_name, bool isparameter, bool deprecated ){
constants[name] = value;
}