66 Commits

Author SHA1 Message Date
Aleos
6bea2da34d
Corrected Card/Enchant Combos (#3856)
* Fixes #3644.
* Corrected the loop that counts card/enchant combos at login being limited to the number of slots on the main item instead of MAX_SLOTS.
Thanks to @Badarosk0!
2019-01-13 19:29:18 -05:00
Aleos
5959365263
Corrected item bonus FixedCastRate (#3808)
* Fixes #3804.
* Corrected FixedCastRate attempting to save into VariableCastRate bonus array.
Thanks to @laziem!
2019-01-10 16:40:43 -05:00
Lemongrass3110
818ff109f3
Initial Release of Equipment Switch (#3548)
Thanks to everyone who contributed to this release in any way, be it donations, information or testing.

Merry Christmas :-)
2018-12-24 14:10:29 +01:00
Lemongrass3110
01f61cfa4f
Added support for 64bit ticks (#3768)
Fixes #3017

Thanks to Hercules for the idea and their implementation of it.

This deprecates Windows XP support. If you want to use it to run your server on it, you have to forcefully enable it now.
Since 64bit ticks do not exist on XP, you might encounter some issues that are already fixed on other OS.
2018-12-21 00:02:19 +01:00
Aleos
0d816975f7
Corrected some statuses and Mado Gear interaction (#3775)
* Fixes #3774.
* Resolved a few statuses getting removed when using Mado Gear that should be enabled.
* Added the ability to remove these statuses if the skills are disabled.
Thanks to @laziem and @Lemongrass3110!
2018-12-20 16:18:59 -05:00
Lemongrass3110
fb81e2d7ad
Fixed autobonus removal (#3767)
Fixes #3739

Thanks to @whupdo for finding the broken removal.

Fixes #3766

Since vector elements will be pushed around in the container when an element is removed,
the original pointer might be invalid at the time the end of the timer has been reached.

A big thank you to @teededung for being persistent and helping me to reproduce the issue.
2018-12-20 08:23:10 +01:00
Aleos
75aef6a544
Corrected AutospellOnSkill (#3770)
* Fixes #3769.
* Added a missing reference call.
* Defaulted item bonus entries to 0/nullptr.
Thanks to @laziem!
2018-12-19 18:09:24 -05:00
Lemongrass3110
016d15b79a
Unified infinite tick usage (#3755)
Introducing a new constant INFINITE_TICK
Changed current usages in items, npcs and source to use the new and correct constant.
Replaced some invalid usages of INVALID_TIMER and replaced them with the new constant.
2018-12-18 17:46:56 +01:00
Aleos
32c68c73bf
Renewal bBaseAtk readparam returning wrong value (#3731)
* Corrects readparam returning the wrong value for bBaseAtk.
2018-12-07 10:23:46 -05:00
Aleos
6a49dc2b90
Corrected possible item loss during char login (#3714)
* Resolved a rare case if a player logs in and the server hasn't fully initialized all of the player's items that the auto-save timer fires off and saves the player with no items.
Thanks to @Tokeiburu!
2018-11-30 09:33:44 -05:00
Aleos
c71ef92fb0
Refactored item bonuses to utilize C++ features (#3235)
* Fixes #996 and fixes #3152.
* Refactored MAX_PC_BONUS item bonuses from static arrays to vectors.
* Increased MAX_PC_BONUS to 50.
* Frees up memory from players that may not ever utilize all their static MAX_PC_BONUS item bonuses.
* Expanded bonus ResEff to not be restricted to SC_COMMON* statuses.
* Removed old ERS usages.
* Removed code redundancy and general cleanups.
Thanks to @Angelic234, @Atemo, @Lemongrass3110, and @Everade!
2018-11-28 21:50:43 -05:00
Aleos
505a0cd888
Fixed a potential crash on change map events (#3699)
* Fixes #3687.
* When changing to an unknown map (or one on another map-server) the instance checks attempted to check null data.
Thanks to @lelouch22!
2018-11-27 09:46:20 -05:00
Aleos
e8c116246e
Implemented official buy/sell amount restrictions (#3673)
* Fixes #3666.
* When purchasing items from a NPC shop, the minimum purchase price is always 1 Zeny.
* When selling items to a NPC shop, the minimum sell price is always 0 Zeny.
Thanks to @Balferian and @dastgirp!
2018-11-08 16:44:46 -05:00
Aleos
fc07588d60
Corrected Instance timers when entering a map (#3594)
* Fixes #3585.
* Resolves an issue when players change maps to instances (aside from script command instance_enter) and the active/idle timers are not adjusted.
* Cleaned up the entering and leaving checks for instances.
Thanks to @Atemo and @Lemongrass3110!
2018-11-01 20:10:29 -04:00
Aleos
ca1bd50465
Corrected renewal Steal formula (#3523)
* Fixes #3473.
* The steal bonus no longer modifies the item's drop rate but has it's own success chance into stealing an item.
Thanks to @mrjnumber1!
2018-11-01 19:40:24 -04:00
Lemongrass3110
a47e6cb427
Added multi level up level caps (#3646) 2018-11-01 23:47:45 +01:00
Aleos
a7d8fbae14
Corrected atcommand reloadscript and NPC dialogs (#3643)
* Corrected atcommand reloadscript and NPC dialogs
* Fixes #3637.
* Force atcommand reloadscript to send a close button if a NPC dialog is active to any attached players.
* Fixed cutin removal as well.
Thanks to @kukuasir1 and @Lemongrass3110!
2018-11-01 16:08:53 -04:00
Lemongrass3110
c0793a8072
Adding LGTM to CI tools (#3636)
Thanks to @aleos89 for his help.
2018-10-29 21:25:36 +01:00
Atemo
7d8530e3b1
Fix for issue #3540 "IM_NONE idle timer" (#3550)
* Fix for issue #3540 "IM_NONE idle timer"

* Cleaned redundant map_getmapdata

Thanks to @aleos89 !
2018-10-09 22:58:41 +02:00
Cydh Ramdh
3e1105b0cf
Updates Item Sell checks (#3491)
* Added config values for `allow_bound_sell`
  * 0x4 allows bound item to be sold at NPC Shops
  * 0x8 restrict only guild leader who can sell guild bound item at NPC Shops or Itemshops
* Added config to allow rental items can be sold at NPC `rental_transaction` (planned for more config values based on #3490). Default to `yes` allowed to be sold, still can be restricted by item_trade, item id based.
* Fixed itemshop which ignores another item stack in inventory even for same item currency
* Fixed exploit potential by using Itemshop & Pointshop
* Now equipped item cannot be sold at NPC
* Typo and grammar fixes. Thanks to @aleos89 and @secretdataz
2018-09-27 13:54:28 +07:00
Atemo
a12f1ce02f
EDP renewal change (#3485)
This setting only affects renewal mode:
- Switch to a different weapon or unequip a weapon now cancel EDP
- EDP can't be used with fist (right hand check only)

Thanks to @aleos89 and @cydh !
2018-09-19 00:33:45 +02:00
Aleos
0d77398385
Cleaned up Banding behavior (#3486)
* Fixes #3478.
* Adjusted Banding to use proper party counting functions.
* Corrected the DEF and HP Regen bonus for Banding.
* Banding Defense will no longer stack on itself.
Thanks to @admkakaroto and @exneval!
2018-09-18 11:05:27 -04:00
Aleos
d17ddf41fe
Corrected some weapon bonuses (#3466)
* Fixes #3465.
* Item bonuses AddEle, AddRace, AddClass, and AddSize now work with shields.
Thanks to @laziem!
2018-09-05 13:46:20 -04:00
Aleos
d3d8f3c5a7
Implemented official ammo equip behavior (#3438)
* Fixes #1155.
* Added specific checks for weapons when equipping ammo.
* Ammo is removed if the required weapon is removed.
* Added battle configs to disable behavior.
Thanks to @Atemo, @exneval, and @benching!
2018-09-05 10:44:34 -04:00
Atemo
fd4f7ccd5c Suggestion: identifyall script command (#3419)
* Implemented script command identifyall.
Thanks to @secretdataz for suggestions!
2018-08-30 10:03:03 -04: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
Atemo
c856b07c45
Suggestion of 'killedgid', variable set when a monster is killed containing the monster game ID (#3418) 2018-08-23 15:49:32 +02:00
Aleos
4befcf747f
Corrected SECURE_NPCTIMEOUT behavior (#3394)
* Fixes #3381 and fixes #3391.
* Properly end NPC sessions when a player times out.
Thanks to @mazvi, @anacondaqq, and @gustavobrigo!
2018-08-11 16:13:24 -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
584fcac43a Cleaned up map data storage (#3347)
Follow up to a942853.
Fixes #3336.
Moved map_data storage to std::map container.
Created map_getmapdata to obtain pointer to map_data.
Got rid of MAX_MAP_PER_SERVER define.
Resolved deletion of instances causing other instances to lose their intended map ID.
Refactored warp suggestions

Thanks to @teededung, @anacondaqq, @cydh and @Lemongrass3110!
2018-07-26 01:06:59 +02:00
Lemongrass3110
6b3f0717c7
Hotfix for issue 3277 (#3279)
Fixes #3277 

Thanks to @cydh and @aleos89
2018-07-24 22:55:17 +02:00
Lemongrass3110
95c3aed810 Fixing party death icon in newer clients
Fixes #2356

Thanks to @admkakaroto and @4144
2018-07-23 23:05:18 +02: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
Aleos
b409936f8d
Updated max recovery weight to 70% for renewal (#3309)
* Fixes #2622.
* Added a new battle config for renewal.
* Adjusted the battle config to support dropping the recovery weight to 0.
* Added the new weight limit packet.
Thanks to @functor-x and @Lemongrass3110!
2018-07-17 16:18:39 -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
Lemongrass3110
c4d7dc76d3
Hid timer function parameters in a macro (#3311) 2018-07-15 23:17:15 +02:00
Lemongrass3110
b2c026d4b0
Cleaned up Summer 2 code (#3294)
Fixes #3293

Thanks to @Everade for reporting.
2018-07-08 11:58:50 +02:00
Aleos
d612788ed7
Updated Shield Spell behavior (#3290)
* Fixes #3236.
* Shield Spell is now canceled when the user switches shields.
Thanks to @EthernalFriend and @MrLekkz!
2018-07-06 13:30:38 -04: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
Cydh Ramdh
ce9cbd2e65
Fixed logging of #CASHPOINTS and #KAFRAPOINTS (#3252)
* Fixes #2169
* #CASHPOINTS and #KAFRAPOINTS now will be logged correctly when used by scripting
* Fixed a bug where points removed cash as well
* Small cleanup for pc_paycash and pc_getcash
* Thanks to @Lemongrass3110, @ecdarreola
2018-07-02 13:21:41 +07:00
Cydh Ramdh
e7fd6aa5bd
Enable autobonus to be reactivated (#3199)
* Fixes #3039, #3158
* Thanks to @Raf4h @laziem
2018-06-28 20:56:39 +07: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
Aleos
dc413a3c57
Updated Mado Gear effects (#2103)
* Fixes #2099.
* Added Emergency Magic Gear.
-- Mounts the user to a Madogear.
-- Only usable by Mechanic class.
-- Has a reuse delay of 3 minutes.
* Increased maximum weight limit by 1500.
* HP naturally recovers similar to Swordman Moving HP-Recovery.
* Updated Emergency Cool's interaction with Overheat calculation.
* Added new Emergency Cool cooling devices.
* The three cooling devices now lower Overheat by 45, 75, and 105 respectively.
* Overheat now only increases on every attack by 1 or by 3 with Fire element.
* The Overheat limit is increased to 150, 200, 280, 360, and 450 respective to skill level.
* Updated the check for Acceleration, Self Destruction, Shape Shift, Emergency Cool, Magnetic Field, Neutral Barrier, and Stealth Field to also check inventory for required equipment.
* Updated Magic Gear Master NPC.
-- Added Emergency Magic Gear purchase option.
-- Added High Quality Cooler and Special Cooler upgrade options.
Thanks to @Felleonel, @Rytech2, @exneval and @mrjnumber1!
2018-06-14 17:28:16 -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
fc951469e7
Initial support for Star Emperor and Soul Reaper (#3184)
Merges 3CeAM/3CeAM@7df0f57 and 3CeAM/3CeAM@028d2e8
Credits to @Rytech2
2018-06-14 08:16:10 +02:00
Aleos
87e7e8891b
Added missing Imperial Set Combos (#3151)
* Fixes #3031.
* Added missing Royal Guard Necklace and Imperial Glove.
* Added bSkillDelay bonus which increases delay of skill sk by t milliseconds.
Thanks to @iubantot and @Secret!
2018-05-26 12:50:39 -04:00
Lemongrass3110
55bf142ab8 Follow up to d13d6a6
Thanks to @RadianFord
2018-04-20 22:53:09 +02:00
Lemongrass3110
d13d6a6e19
Changed SI_ enum to the official EFST_ enum (#2995) 2018-04-20 18:24:20 +02:00
flamefury
7f2c6cf2f5 Apply MHP limit based on bLv (#3003)
* Fixes #814.
* Applies the official maximum HP limit on players.
* Official notice: http://ro.gnjoy.com/news/notice/View.asp?BBSMode=10001&seq=6322
* Levels caps are as follows: Lv 99 = 330k; Lv 150 = 660k; Lv 175 = 1.1m
Thanks to @flamefury!
2018-04-06 12:29:54 -04:00