summaryrefslogtreecommitdiff
path: root/src/map/pc.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-18Socket interfacedshennetsind1-1/+1
We designed this one with having as little changes required elsewhere in mind, thus the way most socket-related things are called has not changed. Plugins may now take a greater advantage of the socket features. Signed-off-by: shennetsind <ind@henn.et>
2014-01-18Libconfig Interfacedshennetsind1-14/+14
Ready for plugin use. Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2014-01-15Fixed autotrading persistency problem with multiple non-stackable itemsshennetsind1-2/+11
Thanks to Mhalicot! Signed-off-by: shennetsind <ind@henn.et>
2014-01-12Fixed Bug 7967shennetsind1-0/+1
temporary pc regs (@) were being misflagged. http://hercules.ws/board/tracker/issue-7967-scriptc-leaks/ Signed-off-by: shennetsind <ind@henn.et>
2014-01-12Two Adjustmentsshennetsind1-4/+4
From some notes I took while working on the megapatch: - Dropped unused char_dat variable in chrif's auth_node - Fixed DB/BB/PB Logging, which could create false logs due to where it was placed. Signed-off-by: shennetsind <ind@henn.et>
2014-01-12Fixed ERS Cache sharingshennetsind1-3/+3
Enforcing cache to match the option condition in order for it to be shared. Special Thanks to Haruna! Signed-off-by: shennetsind <ind@henn.et>
2014-01-11Hercules 1st 2014 MegaPatchshennetsind1-332/+257
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/ Signed-off-by: shennetsind <ind@henn.et>
2014-01-08Introducing Hercules Autotrade Persistencyshennetsind1-15/+228
Aka autotrading merchants survive server restarts. Originally sekai's (aka me). Special Thanks to Haruna, Michieru. Signed-off-by: shennetsind <ind@henn.et>
2013-12-18Merge pull request #236 from missxantara/mastershennetsind1-0/+5
Item database bug fixes.
2013-12-15Replaced pc->pc_has_permission/can_give_items/can_give_bound_items with ↵shennetsind1-36/+9
equivalent macros Because 2/3 jumps to perform such a operation is just awful Signed-off-by: shennetsind <ind@henn.et>
2013-12-14Replaced pc->get_group_level with a macro (pc_get_group_level)shennetsind1-13/+3
Because 2 jumps to get a single value is just awful. Signed-off-by: shennetsind <ind@henn.et>
2013-12-12Fix core bug issue 7435: When the Storage is openXantara1-0/+5
2013-12-17Fixed several compiler warningsHaru1-10/+9
- Warnings detected thanks to Xcode's compiler settings (more strict by default) and clang, warnings mostly but not only related to data sizes on 64 bit systems, that were silenced until now by very lax compiler settings. - This also decreases by a great deal the amount of warnings produced by MSVC in x64 mode (for the adventurous ones who tried that) - Also fixed (or silenced in case of false positives) the potential issues pointed out by the (awesome) clang static analyzer. - Patch co-produced with Ind, I'm merging and committing in his place! Signed-off-by: Haru <haru@dotalux.com>
2013-12-11Corrected some local 'mapindex' variables shadowing the global oneHaru1-3/+2
Signed-off-by: Haru <haru@dotalux.com>
2013-12-09Fixed some logic errorsshennetsind1-3/+2
Special Thanks to Haru Signed-off-by: shennetsind <ind@henn.et>
2013-12-06HPM: mapindex interfaceshennetsind1-13/+13
Signed-off-by: shennetsind <ind@henn.et>
2013-12-04Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-14/+20
2013-12-03Questlog fixesHaru1-1/+6
- Improved memory usage of the quest log system. (saves up to 75kB per online character). Fixes issue #133. - Fixed various issues with quest entries disappearing from characters without an apparent reason, or monster kill counters getting stuck - the issues were caused by a de-synchronization between the two parallel questlog arrays in map_session_data. - Added some code documentation. - Thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-12-03Corrected Steal Coin formulas and battle log messageHaru1-13/+14
- Updated to use official formulas from Aegis (for both success chance and stolen zeny amount.) - It now shows the correct stolen zeny amount in the battle log, rather than showing the skill level. - Made possible thanks to Yommy and Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-12-03Fixed Bug 7542shennetsind1-4/+9
replaced pc_isuseitem 90overweight error message by its official version, added invent-full check for when trying to open packages/boxes, and modified mail getAttachment to fail when over 90% weight. Special Thanks to kyeme. http://hercules.ws/board/tracker/issue-7542-bug-when-weight-90/ Signed-off-by: shennetsind <ind@henn.et>
2013-12-01Fixed Bug 7866shennetsind1-4/+4
Fixed EQI_SHADOW_ACC_L ability to produce bonuses, Special Thanks to rosfus, Angelmelody. http://hercules.ws/board/tracker/issue-7866-eqi-shadow-acc-l-missing-effect/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-30Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-3/+6
2013-11-29Minor improvementshennetsind1-2/+6
pc_checkitem is now triggered by @reloaditemdb to ensure modified conditions are respected, also a performance boost that causes the itemlist/cartlist/storagelist/gstoragelist lookups to only be triggered on demand instead of on every teleport. Closes #219 Fixed ancient monster ai bug that caused mobs to consider themselves elegible targets, which would waste status_check_skilluse and battle_check_target calls. Signed-off-by: shennetsind <ind@henn.et>
2013-11-29Update JOB_REBELLION 'job_db1.txt' to its official values and some mini ↵malufett1-2/+3
adjustment. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-11-29Corrected an uninitialized variable when adding an itemHaru1-1/+3
- The .favorite field of newly added inventory items wasn't correctly initialized to zero, potentially causing data loss (fixes bugreport:7854, thanks to Vincent, GrumpyPanda). Signed-off-by: Haru <haru@dotalux.com>
2013-11-27Fixed Bug 7495shennetsind1-0/+4
warping (e.g. @recall) of autotrade characters no longer leaves them in memory limbo, the trigger that'd be expected from the client is now called for autotrade units so that they complete the warp procedure in full, vendings are loaded properly as well. http://hercules.ws/board/tracker/issue-7495-autotrade/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-19Added support for Max EquipLv in Pre-RenewalHaru1-7/+1
- Follow-up to ed72a947a6c97804c1eef5b80bfa49d99f7d7586 - Max EquipLv is now observed, rather than ignored, in pre-renewal mode. Signed-off-by: Haru <haru@dotalux.com>
2013-11-19Replaced hardcoded Item IDs with constantsHaru1-42/+39
- This makes it harder to get the item IDs wrong in the code. - Fixes item 'Slot_Coupon' being incorrectly considered a Spell Book due to an oversight (wrong item nameid) when the check was introduced. Signed-off-by: Haru <haru@dotalux.com>
2013-11-16Renewal elemental attr fixshennetsind1-0/+2
I'm committing on malufett's behalf. Signed-off-by: shennetsind <ind@henn.et>
2013-11-15Official expiration timer supportshennetsind1-5/+70
As brought up in http://hercules.ws/board/topic/2225-paid-server/ Special Thanks to Haruna for all the help! Thanks to Beret, Ai4rei for information Signed-off-by: shennetsind <ind@henn.et>
2013-11-15Official Item BindOnEquip Supportshennetsind1-0/+6
Implements the 'BindOnEquip' item db field which determines whether the piece of equipment should bind to the character upon being equipped. When a character tries to equip such a item for the first time a dialog shows up asking the character to confirm whether to equip the item or not, and notifying the character that by equipping the item it will become bound to the character, and therefore unable to be used by another character. Special Thanks to Beret for all the information, Haruna for testing. Signed-off-by: shennetsind <ind@henn.et>
2013-11-14Item DB overhaulHaru1-11/+11
http://hercules.ws/board/topic/2954-item-db-file-structure-overhaul - Item db was changed to libconfig format. - This new format is larger than the original format, but it's less subject to conflicts when some items are edited and the file gets updated. - It is no longer necessary to specify fields with no value, and only the actually used fields are specified. - Items scripts (especially the long ones) are made more readable by splitting them into multiple lines, with proper indentation. - A converter perl script is provided in the tools directory (and a link to the web-based version of the same script canbe found in the above forum topic) - All of this was made possible thanks to Ind, Yommy. Signed-off-by: Haru <haru@dotalux.com>
2013-11-09Follow up 7803b4e0d437681aa09113b5240363d03d85a1b8shennetsind1-2/+2
The commit said "4. pc_jobchange now correctly vaporizes the homun. " while it actually fixed it on skillreset, this commit fixes it on pc_jobchange and on pc_dead. Special Thanks to kyeme! Signed-off-by: shennetsind <ind@henn.et>
2013-11-08Fixed 5 Homun Bugsshennetsind1-1/+1
1. Homun cooldowns are no longer reset upon being vaporized. 2. Call Homun now displays the skill title above the char upon success. 3. Homuns that have been out of owners sight for over 3 seconds will now be teleport back to master. 4. pc_jobchange now correctly vaporizes the homun. 5. New homunculus now spawn with full health. Special Thanks to kyeme/Beret for all the information and official server testing. Signed-off-by: shennetsind <ind@henn.et>
2013-11-07Further item bind adjustmentsshennetsind1-4/+4
Thanks to Haruna! Signed-off-by: shennetsind <ind@henn.et>
2013-11-07Item Bound Fixes/Adjustments/Improvementsshennetsind1-31/+61
Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-11-06Merge remote-tracking branch 'origin/master'shennetsind1-10/+50
Signed-off-by: shennetsind <ind@henn.et> Conflicts: conf/messages.conf src/common/mmo.h src/map/pc_groups.c src/map/pc_groups.h
2013-11-06Updated to latest Herculesshennetsind1-13/+40
Signed-off-by: shennetsind <ind@henn.et>
2013-11-06Merge pull request #217 from HerculesWS/script-checkershennetsind1-1/+3
Introducing the Hercules Standalone Script Syntax Checker
2013-11-06Modified status_calc_shennetsind1-32/+32
Replaces the previous 'first' flag with a multi-option flag capable of selectively determining calls where the recalculation must not be hold by delayed damage, and therefore must take place immediately. This fixes issues caused by actions that require immediate recalculation e.g. on-level-up max_hp update, also modified @baselevel where status_calc was being called after the heal and not before, causing it not to be fully healed. Special Thanks to Haruna! <3 Signed-off-by: shennetsind <ind@henn.et>
2013-11-05Introducing the Hercules Standalone Script Syntax CheckerHaru1-1/+3
- Added a command line argument '--script-check' to check a script's syntax without running the server (and without requiring a SQL connection). Usage: ./map-server --script-check /path/to/the/script.txt - For convenience, a script-checker bash script is provided, to set the path correctly when called from a different directory. Usage: /path/to/Hercules/script-checker /path/to/the/script/to/check.txt - While the script checker will supposedly work under windows as well, no convenience scripts are currently provided for platforms other than UNIX (feel free to open a pull request with a .bat launcher or whatever you like) - Integration with IDEs or text editors is possible. In fact, I already have a fully functional plugin for vim (through vim-syntastic), and if there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD - If you want an online checker, http://haru.ws/scriptchecker/ is running this code, without modifications and will be kept up to date (without any warranty though.) - Special thanks to Ind, Yommy, Streusel, who helped making this possible, in a way or another.
2013-11-04Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-2/+8
2013-11-04pc_groups interfacedshennetsind1-8/+8
The last file without a interface is now no more (date.h doesn't count :P). Modified the way permissions are stored in order to enable plugins to be able to create permissions ( pcg->add_permission("name") [returns permission key] ). Special Thanks to Haruna! Closes #121 Signed-off-by: shennetsind <ind@henn.et>
2013-11-03Merged Pull Request #195 (@autoloottype)Haru1-2/+8
- Small tweaks to the command, fixed merge conflicts Signed-off-by: Haru <haru@dotalux.com>
2013-11-02Fixed Shadow System Bonusesshennetsind1-1/+1
Item in shadow slots are now able to give bonuses properly, thanks to rosfus for pointing it out! Also added the missing constants for script handling. Signed-off-by: shennetsind <ind@henn.et>
2013-11-01Removed type_id and some unused variables from @autoloottypeDastgir Pojee1-1/+0
2013-11-01Item Binding System Final.sevenzz231-0/+1
Fixed, some issue thanks to Master Ind ;) Signed-off-by: sevenzz23 <sevenzz23@yahoo.com>
2013-10-31No error after compilation, but when logging in at map server it will crash.sevenzz231-10/+49
Im pretty sure its on the clif.c Signed-off-by: sevenzz23 <sevenzz23@yahoo.com>
2013-10-30Official Font Supportshennetsind1-1/+55
Fonts are now relog-persistent. Font items are now toggle-on/off, they no longer go away on use, they go away when their rental duration is over (and the font effect goes back to original). Special Thanks to Yommy for all the data! Signed-off-by: shennetsind <ind@henn.et>
2013-10-31Several Changes to autoloottype command.Dastgir Pojee1-7/+7