97 Commits

Author SHA1 Message Date
Sader Fawall
3058d10a4e Fix several issues with pets (#4422)
* Fixes #4422.
* Resolves an issue hatching eggs when trading and eggs not being deleted after the pet is lost.
Thanks to @sader1992!
2019-12-06 21:56:34 +01:00
Cydh Ramdh
e6bf2d18f9
bonus bVariableCast and bonus2 bSkillVariableCast for Pre-renewal (#4268)
* `bonus bVariableCast,t;` now works in pre-renewal to increase casting time
* `bonus2 bSkillVariableCast,sk,t;` now works in pre-renewal to increase casting time by skill name
* Item bonus documentation update
2019-11-04 08:03:15 +07: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
df6385fd4a
Fixed reply for adding to equip switch (#4384)
Fixes #4031

Thanks to @sctnightcore
2019-10-02 11:26:14 +02:00
Cydh Ramdh
dda63f517c
Fixes #4311 (#4312)
* Added item with GUID flag as `CHKADDITEM_NEW` in pc_checkadditem
* Adjust inventory blank check for guid item to `+n`
* Moved slot check as item_data function
* Removed quantity force-set-to-1 check for buying equip from cashshop, it will gives the item to player just like item with GUID flag
2019-10-01 07:49:23 +07:00
Aleos
d476934c93
Corrected RENEWAL_ASPD macro processing (#4259)
* Resolves an issue with the RENEWAL_ASPD macro processing the wrong database as it would go off the current compiled mode.
Thanks to @rfperuch!
2019-07-25 08:06:40 -04:00
Cydh Ramdh
17f32a1756
Fixed CZ_STANDING_RESURRECTION check (#4242)
* Fixed CZ_STANDING_RESURRECTION check
* Player can force to resurrect as long as they have valid Token of Siegfried even in auto respawn maps
* Added command `@resurrect` to resurrect using first matched Token of Siegfried item in inventory clients that don't show Resurrect button
* Set `respawn_tid` to int
2019-07-22 22:27:35 +07:00
Sader Fawall
454163c48f prevent moving/dropping the pet egg if it's hatched (#4179)
Fixes #4178
2019-07-07 20:17:40 +02:00
Aleos
32525bad55
Corrected autospell stacking (#4227)
* Resolves an issue with autospell bonuses stacking too generously.
Thanks to @Playtester!
2019-07-03 10:15:26 -04:00
Joam
aae31a19a5 Update Itemdb (JRO item) (#4161)
* The items implementation is based on JRO description instead of IRO description
* Yinyang combo items will be implemented later when more infos will be available
2019-06-25 20:03:33 +02:00
Atemo
f8ea43ebc7
getmapflag MF_RESTRICTED (#4193)
* Corrected the value returned by getmapflag script command for MF_RESTRICTED
2019-06-03 20:45:19 +02:00
norm
8ed3d0583a Fixes problem with PR #4148. (#4176)
* Fixes the disappearing item mentioned in PR #4148.
* Should now mirror kRO behavior when cart is full.
Thanks to @Normynator!
2019-05-31 13:30:54 -04:00
Jittapan Pluemsumran
7ad1b32d7d Additional fixes for cart exploit (#4148)
* Fixes #4146.
* Reverted some of 7f772c3 as this falls into a larger refactor scope.
* Resolved an issue where items could not be picked up from the cart when the overweight message was sent to the player.
* Added missing e_additem_result constants.
Thanks to @secretdataz, @Normynator, and @cydh!
2019-05-14 14:19:26 -04:00
Aleos
69843289c9
Fixed some bonuses getting capped (#4137)
* Fixes #4135.
* Fixes several item bonuses getting their bonus capped when they shouldn't be.
Thanks to @Badaroks0!
2019-05-10 08:41:16 -04:00
Jittapan Pluemsumran
7f772c32d3
Fixed potential race-condition possibility in cart item transaction (#4139)
Co-authored-by: Cydh Ramdh <cydh@users.noreply.github.com>
Co-Authored-By: Aleos <aleos89@users.noreply.github.com>
2019-05-02 21:01:18 +07:00
Aleos
a0bcb92b8a
Added caps to item bonus rates (#4081)
* Fixes #4069.
* Added caps to item bonus rates so that they don't exceed the -10000~10000 range.
* Added warning messages when initial rate exceeds range.
* Added a missing vector size check for HP/SP Vanish bonus.
Thanks to @Litro and @Lemongrass3110!
2019-04-08 10:11:56 -04:00
Atemo
7dde174c83
setpcblock script command (#4052)
* Added setpcblock and getpcblock script commands.
'setpcblock' command prevents/allows the player from doing the given type of action.
'getpcblock' command return the bit-mask value of the currently enabled block flags.

The available type are:
	PCBLOCK_MOVE
	PCBLOCK_ATTACK
	PCBLOCK_SKILL
	PCBLOCK_USEITEM
	PCBLOCK_CHAT
	PCBLOCK_IMMUNE
	PCBLOCK_SITSTAND
	PCBLOCK_COMMANDS
	PCBLOCK_NPCCLICK
	PCBLOCK_EMOTION
	PCBLOCK_ALL

Thanks to @sigtus, @secretdataz, @Lemongrass3110 and @aleos89 for the help and reviews !
Credit to https://github.com/HerculesWS/Hercules/pull/842 for the idea.
2019-03-31 18:28:55 +02:00
Cydh Ramdh
eb88f0ce4f
Fixes #4034 (#4036)
* Move HP/SP Vanish bonuses to vector
* Corrected the BF flags usage
* Immaterial Swords, Mental Destroyer, and Dark Priest trigger SPVanish by any attack types

Co-Authored-By: cydh <cydh@users.noreply.github.com>
2019-03-31 16:19:57 +07:00
Jittapan Pluemsumran
ac558d7c1e
Initial implementation of pet evolution system + Pet DB conversion to YAML (#3544)
* Implemented official pet evolution system
* Added evolved pets to pet database
* Corrected various pet system mechanics
* Migrated pet database to YAML format and the converter from CSV format

Thanks to @Lemongrass3110 @aleos89 and @Atemo for their suggestions and additional fixes
2019-03-26 22:51:57 +07:00
Atemo
e4b41ef7e0
Revert "Added pcblock and checkpcblock script commands. (#3951)" (#4048)
This reverts commit 3e0d3d2fe6b244099d3987b7a21260d6b070512e.
2019-03-26 16:41:14 +01:00
Atemo
3e0d3d2fe6 Added pcblock and checkpcblock script commands. (#3951)
* Added getpcblock and setpcblock script commands.
* Added the docs
* Added the message 'This action is currently blocked.' when the player attempts to perform the following blocked actions
* PCBLOCK_USEITEM
* PCBLOCK_SITSTAND
* PCBLOCK_NPCCLICK
* The actions blocked are saved in state.block_action
* Click to the npc returns the WORK_IN_PROGRESS message when PCBLOCK_NPCCLICK is enabled
* Blocked action and reload script.
The player will return to his/her original state after reload script.

Thanks to @aleos89, @Lemongrass3110, @secretdataz
2019-03-26 22:18:59 +07:00
Aleos
ed83999de4
Corrected Vellum and Vanish item bonuses (#4030)
* Fixes #4016.
* Cleaned up the way Vellum damage and Vanish damage are calculated.
* Implemented bonus3 bSPVanishRate/bHPVanishRate.
* Updated Mental Destroyer item bonus.
* Cleaned up and added documentation.
Thanks to @Balferian!
2019-03-23 15:02:49 -04:00
Cydh Ramdh
bce4e0b660
Fixes #4026 (#4027)
* Fixed flag's overwritten for bonus3 bSubEle and bonus3 bAddEle
2019-03-22 07:09:14 +07: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
Mark Hester
a5c93b60a6 Definitions for DB Pathing (#3964)
* Added the use of DBPATH/DBIMPORT definition for guild EXP, job information, level penalties, and map cache to remove hardcoded values.
Thanks to @marky291!
2019-02-22 09:02:08 -05:00
Aleos
c5a5c54518
Converted remaining C comments (#3927)
* Converted remaining documentation that references .c or .h files.
2019-02-09 15:08:45 -05:00
Aleos
2ae2f25f4b
Fixed accessory equipping with cards (#3913)
* Fixes #3908.
* Accessories that have cards which require specific left/right locations must take priority.
* Sped up position checking.
Thanks to @Badarosk0 and @Lemongrass3110!
2019-02-05 19:08:04 -05:00
Aleos
1f97beae27
Cleaned up script command argument parsing (#3910)
* Cleaned up the way script commands parse arguments.
* script_isstring and script_isint will now properly check variable references.
* This allows script command arguments to contain variables without having to make source side adjustments.
* Reverted several script commands that reference the data directly.
Thanks to @Lemongrass3110!
2019-02-05 18:50:54 -05:00
Aleos
f235d89e76
Added item bonus bNoWalkDelay (#3906)
* Fixes #131 and fixes #2699.
* Added item bonus bNoWalkDelay to replace infinite SC_ENDURE bonus in items.
* Added a warning if INFINITE_TICK is detected in the item combo bonus.
* Included some minor cleanups and additions.
Thanks to @exneval, @c0nflicts, and @esu1214!
2019-02-05 12:23:36 -05:00
Daegaladh
6c1d1a84d2
Fixed points command using negative numbers (#3867) 2019-01-20 22:42:44 +01:00
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