8752 Commits

Author SHA1 Message Date
Aleos
cdbb14b90d
Resolved a compile warning on pre-renewal (#2625)
* Fixes #2624.
* Resolves a switch statement warning with only a default case for pre-renewal builds.
Thanks to @Daegaladh!
2017-11-21 17:35:32 -05:00
aleos89
3ce3bc3fed Added a new Vending Tax config
* Follow up to 8e002bc.
* Added vending_tax_min which allows for defining a custom minimum value to apply taxes to.
Thanks to @cydh's suggestion!
2017-11-21 10:27:18 -05:00
aleos89
6fdb605932 Corrected Hell Inferno Dark damage behavior
* Follow up to dc2c51c.
* Fixes #2623.
* Resolved the Dark damage not being flagged properly.
Thanks to @Sweet520 and @hartonox!
2017-11-21 09:36:52 -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
Aleos
8e002bc993
Adjusting Vending tax to match official (#2620)
* Adjusting Vending tax to match official
* Fixes #2528.
* There are no taxes on items being sold for less than 100 million. Anything above incurs a 5% tax.
* Refactored the tax code to use a single function.
Thanks to @mazvi, @Jeybla, and @lighta!
2017-11-20 22:07:55 -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
60b5491766 Fixed compilation for the Windows XP API (#2611)
* Fixed compilation for the Windows XP API

Fixes #2137

Thanks to @zackdreaver

* Fixed Windows version initialization

Respecting the SDK's Windows version and only use our own defines if they are not set by the SDK, which should not happen.

Thanks to @lighta.

* Moved Windows Vista declaration up

This way all defines that should actually come from sdkddkver.h will be checked right behind it and defined if they were not.

* Reverted line deletion
2017-11-20 00:30:31 -05:00
Lemongrass3110
a2e8d02752 Respect the default platform toolset (#2609)
With this you will not have to upgrade your solution everytime you clone a fresh copy of rAthena and the problem with having to stash between branch switches should also be gone.
If you want to compile it for another toolset you simply have to set the target toolset by yourself.
2017-11-19 12:19:36 -05:00
Lemongrass3110
a49a1a52a3 Fixed a compiler warning due to a wrong include
Follow up to c4a364b
2017-11-19 04:11:53 +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
9766ec9489 Corrected Free Cast and Exceed Break walk speed
* Fixes #2599.
* Follow up to 1f7a314.
Thanks to @mazvi and @uddevil!
2017-11-14 20:08:49 -05:00
Lemongrass3110
c20d1cc3e9 Follow up to 243f4ca 2017-11-13 21:04:23 +01:00
Lemongrass3110
243f4ca3be Support for 2017-10-25 and 2017-11-01
Merges HerculesWS/Hercules@3e03556

Thanks to @4144
2017-11-13 20:51:58 +01:00
Aleos
805a6fb69a
Updated Heal formulas to match kRO (#2585)
* Fixes #2575 and fixes #2574.
* Adjusted the formula to properly account for bonuses which are additive of one another, not multiplicative.
* Added the global multiplier which is added on after MATK.
* Updated Highness Heal, Fresh Shrimp, and Bunch of Shrimp heal formulas.
Thanks to @Tokeiburu for his extensive research and code!
2017-11-13 13:02:39 -05:00
Aleos
da0883572d
Small cleanup of Rune Knight Runes (#2596)
* Small cleanup of Rune Knight Runes
* Stone Hard Skin weapon break chance only applies to physical melee attacks.
* Giant Growth's physical bonus damage only applies to Rune Knights.
* Corrected weapon break chance to only happen when damage is increased for Giant Growth.
Thanks to @Rytech2 and @Jeybla!
2017-11-13 09:59:24 -05:00
Atemo
ea88ea5054
Emoticons constant name (#2527)
This PR change the emoticons constant name to match emoticonlist from client side.
Note: the previous emoticons names are now deprecated.

Additionnally emotion and unitemote scripts commands are being merged together to the new format
-> emotion <emotion number>{,<target>};
Where target use the target Game ID (GID) of the unit (npc, pet, character etc..).

* unitemote is now deprecated.
* Additionnally fixed incorrect variable in quests_brasilis.txt

Thanks to @aleos89 and @Lemongrass3110 !
2017-11-10 18:35:21 +01:00
Roman Kalashnikov
1f7a314c78 Fixed twice assigned values (#2560)
* Resolves the skill timer getting assigned twice.
Thanks to @lunixoid!
2017-11-09 14:50:11 -05: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
86241b0eb8
Adjusted item drop minimum value limit (#2561)
* Fixes #2551.
* Lowered the item drop minimum value limits to be able to be set to 0.
Thanks to @mazvi!
2017-11-08 18:44:32 -05:00
aleos89
c13f271a94 Resolved some compile warnings
* Fixes #2588.
* Clean up from 24b3509.
Thanks to @darhlism!
2017-11-08 13:36:01 -05:00
lighta
a587b913fa Initial work for login server to C++ (#2583)
* Initial progression of moving the map-server to C++ format.
* Converted all core files to .cpp and header files to .hpp.
Thanks to @lighta!
2017-11-08 12:56:41 -05:00
aleos89
728a29d435 Harmonized include guards
* Follow up to 24b3509 and c4a364b.
* Harmonized the include guards for char-server and map-server header files.
2017-11-07 10:22:03 -05:00
lighta
24b3509e53
Initial work for char server to C++ (#2567)
* Initial work for char server to C++

* Changes suggested from @Lemongrass3110

* Removes unwanted beginning white spaces.
2017-11-06 22:40:35 -04:00
aleos
6decf6c6d0 Resolved skill NK checks
* Fixes #2577.
* Adjusted the battle checks to properly return the NK value rather than bool.
Thanks to @darhylism!
2017-11-06 17:16:45 -05:00
lighta
673315994b Temporary adjustment for strict aliasing (#2582)
* Fixes #2572.
* Added a custom rule to avoid optimization causing monsters to not attack. (From tests this appears to be npc.cpp on Centos 7 and mob.cpp on Windows vc141)
* Added -fno-strict-alising to CMake when building with GCC. (Clang and VS have it by default)
* Fixed cmake output path.
Thanks to @lighta!
2017-11-06 16:59:59 -05:00
lighta
e7e9cf6d73 Cleanup and harmonize cmake. 2017-11-03 03:42:29 -04: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
Lemongrass3110
af358809b9 New npc and mob IDs
The old range has been fully used up now.
2017-11-01 16:40:22 +01:00
lighta
611dee0753 Fix cmake (#2554)
* Fix cmake
Thanks to @secretdataz for help. (cherry-picked from refactor)
2017-10-30 13:19:27 -04:00
Roman Kalashnikov
9772639ae7 Fixed duplicated condition (#2553)
The condition `if(node->prev)` was checked in the previous:
`if( node->prev && n > 5 ) {`
2017-10-29 11:00:59 +01:00
Aleos
2c1df58ba4
Corrected Dark Claw behavior (#2548)
* Fixes #2537.
* The wound effect should be applied even if Dark Claw misses.
Thanks to @esu1214!
2017-10-27 14:25:03 -04:00
Lemongrass3110
18e0f0ab48 Fixed searchstore for vendings with item id > 32k 2017-10-27 00:57:32 +02:00
Aleos
5208d16995 Item Shop Trade Restriction adjustment (#2517)
* Item Shop Trade Restriction adjustment
* Fixes #2503.
* Added a config to allow usage of sell-restricted items as currency in Item Shops.
Thanks to @Mickosis!

* Cleaned up some final things
* Fixed some typos in the configuration file.
* Resolved the shop ID not being stored at the time of checking the currency.
* Optimized the inventory check.
2017-10-25 13:49:39 -04:00
Lemongrass3110
93ad3a1378 2 new NPC constants 2017-10-24 23:19:57 +02:00
Lemongrass3110
3b219565d3 Enabled import for translations by default (#2535)
Added possibility to override MAP_MAX_MSG with defines_pre.h
Added possibility to override LANG_ENABLE with defines_pre.h

Thanks to @Daegaladh for the idea with LANG_ENABLE.
2017-10-24 22:36:59 +02:00
Lemongrass3110
cb760a0a42 Adjusted atcommand go for new novi grounds
Follow up to c7d5b61
2017-10-22 17:18:54 +02:00
Lemongrass3110
828f7d6ec2 Fixed a typo with SC_CHEERUP
Follow up to c73e10c
Fixes #2532

Thanks to @mazvi
2017-10-20 09:57:50 +02:00
Lemongrass3110
caf31521d0 Fixed an import issue in mapindex (#2512)
* Fixes #2511.
Thanks to @Daegaladh for his input!
2017-10-19 14:11:56 -04:00
Aleos
c73e10cb30 Added new 2016 Wedding skills (#2479)
* Added new 2016 Wedding skills
* Adds Call All Family, One Forever, and Cheer Up skills to the renewal databases.
* Removed Enlarge Weight Limit R skill from a few job skill trees as it's not needed to be defined there.
Thanks to @Rytech2, @Jeybla, and @Lemongrass3110!
2017-10-19 13:22:55 -04:00
Aleos
ea0b54e03f Corrected Endure hit count behavior (#2525)
* Fixes #2508.
* Endure should have 7 hits (instead of 8) in PvM.
Thanks to @kaninhot004!
2017-10-19 10:14:57 -04:00
Lemongrass3110
7dc6f7577c Support for october clients
Thanks to @4144
2017-10-19 01:15:46 +02:00
Jittapan Pluemsumran
2830183eaa Implemented round,floor,ceil script commands. (#2524) 2017-10-18 03:10:10 -07:00
Aleos
b4106eb988 Adjusted script command bindatcmd (#2518)
* Fixes #2513.
* Defaulted the char-command level to 100.
Thanks to @mazvi and @Lemongrass3110!
2017-10-16 14:49:39 -04:00
Jey
48fcc92a9c Follow up to 828f78322b12b42a11bb7974777010076e5b8753
* Only checks item names of items with new ids.
* Fixes warnings on import itemdb overwrites.
* Note: The duplicate name check should be refactored after the Cpp
  migration. It'd be much faster with a C++ map with the
  name string as the key.
* Thanks to @Daegaladh!
2017-10-15 13:38:15 +02:00
Aleos
db37fc7ddd Fixes required equipment check for skills (#2374)
* Fixes required equipment check for skills
* Fixes #2372.
* Required equipment check was allowing the skill to cast without the proper equipment.
* Adjusted the skill fail messages to their appropriate responses.
Thanks to @M4karov, @exneval, @Jeybla, and @Lemongrass3110!
2017-10-14 22:37:55 -04:00
Lemongrass3110
8c2f727f64 Added support for 3 new hat effects 2017-10-15 02:29:38 +02:00
Aleos
2606cf977f Migrated skill.c to C++ (#2500)
* Migrated skill.c to C++
* Needed in preparation for future projects.
2017-10-14 13:03:27 -04:00
Lemongrass3110
f42c2ff211 Moved some remaining constants into src (#2501)
* Moved all npc view constants into src

Source side the constants will use Gravity's naming standard(JT_*)
NPC side still supports the old names without JT_

* Moved all effect constants into src

Added check for effect validation to atcommand effect and all script commands using them
Removed the unused and broken function unit_changeviewsize from unit.c
Replaced a lot of hardcoded effect ids with their respective constants
Cleaned up the effect documentations

* Moved all hat effect constants into src

Added check for effect validation to script command hateffect
2017-10-14 18:13:51 +02:00