19 Commits

Author SHA1 Message Date
Lemongrass3110
c4d7dc76d3
Hid timer function parameters in a macro (#3311) 2018-07-15 23:17:15 +02:00
Lemongrass3110
91169d7ebc
Fixed a few compiler warnings on clang (#3263)
Mostly pointer-bool-conversion and autological-pointer-compare
2018-07-05 22:53:20 +02:00
Lemongrass3110
880e227ea2
Cleaned up some hardcoded variables (#3237) 2018-06-24 22:16:28 +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
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
0a84542220
Added a template function for std::map search (#3107)
Thanks to @secretdataz for his help.
2018-05-16 08:26:48 +02:00
Lemongrass3110
a0a55dada1 Fixed unitwalkto calls in unit walk events (#2913)
* Fixes #2341.
* Fixed unitkill for mobs inside the walk event.
* Also fixed the state tracking of the walk event script.
Thanks to @Atemo!
2018-02-27 13:33:12 -05:00
Atemo
6e0187bc2b
* Initial release of dimensional travel quest (access to flame bassin) (#2775)
* * Initial release of dimensional travel quest (access to flame bassin)

* Include misc npcs related to ep14.3

* Implementation of NPC_DEATHSUMMON - summon monsters at the location of master grave.

Thanks @ecdarreola, @rye305 for testing
Thanks to https://www.divine-pride.net/ !
2018-02-20 23:11:56 +01:00
Lemongrass3110
65771a8ec1 Switched mob db searches to find (#2726)
* Switched mob db searches to find
* Replace NULL with nullptr

As suggested by @Jeybla
This way no (caught) exceptions will be reported in visual studio anymore
2017-12-22 07:43:44 -05:00
aleos
1645fc0cdb Corrected a ShowError output
* The new mob database range error message was missing the new ranges.
Thanks to @CairoLee!
2017-11-26 10:29:41 -05:00
Jey
b2d904b764 Follow up to ba9314cba590f831c88b7a6a69afb62f4d51fe59
* Fixes #2621
* Makes the getspawn functions independent of the mob_db struct.
  Removes the getMobID() function from the struct which caused the
  the issue.
* Thanks to @Lemongrass3110 and @uddevil!
2017-11-21 12:35:51 +01: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
Jey
e148bd3a63 Follow up to ba9314cba590f831c88b7a6a69afb62f4d51fe59
* Now mob_get_spawn does not add empty vectors to mob_spawn_data, when the
  mobid does not exist in mob_spawn_data
* Saves a bit more memory space
* Thanks to @Lemongrass3110 for the suggestion
2017-11-16 11:19:26 +01:00
Jeybla
ba9314cba5
Fixes spawn infos after mobdb reload. (#2469)
* Moves the monster spawn infos from the mob_db struct to an own
  data structure.
* Fixes whereis after mobdb reload. Fixes #2360
* Fixes Taekwon Mission after mobdb reload. Closes #2460
* Thanks to @uddevil, @mgksrt8, @lighta and @aleos89!
2017-11-16 02:02:37 +01:00
Aleos
63daab5860
Added battle config autoloot_adjust (#2562)
* Fixes #2540.
* Added battle config autoloot_adjust that allows autoloot to take player drop penalties and bonuses into account.
Thanks to @ecdarreola!
2017-11-08 18:55:20 -05: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
Jey
215aa158ed Follow up to aa6e8987db08ecd7dfb06ab55f4e44009e174175.
* Fixes compile warnings.
2017-10-02 22:16:12 +02:00
Jey
a5719e7228 Prefer static_casts instead of C casts. 2017-10-01 18:32:52 +02:00
Jey
593ac62757 Convert mob.c to mob.cpp. 2017-10-01 18:25:16 +02:00