summaryrefslogtreecommitdiff
path: root/src/map/pc.c
AgeCommit message (Collapse)AuthorFilesLines
2015-09-24Add bl parameter to map_searchrandfreecell and map_addflooritem.Andrei Karas1-2/+2
2015-09-24Add bl parameter to getcell functions.Andrei Karas1-3/+3
2015-09-18Clarified the intent of several assignments inside conditional expressionsHaru1-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2015-09-09Autotrade Struct to HPMdastgir1-1/+30
2015-08-15HPM compatibility improvementsHaru1-0/+1
Improved compatibility, portability and standards conformance. - Since it is not possible to portably and reliably re-use the core's symbols in plugins, symbols are no longer exported unless explicitly required, in the UNIX builds. This mimics the Windows behavior and adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas for making this possible. - For convenience, it is no longer necessary to call GET_SYMBOL, since the plugin will automatically import all the available symbols when it's loaded, depending on the included headers. - Plugins are now supposed to include the "common/hercules.h" header before including anything else. Incluing common/HPMi.h, common/cbasetypes.h or conf/core.h is no longer necessary, as those are guaranteed to be automatically included by hercules.h. - HPM API version bumped to 1.1. Signed-off-by: Haru <haru@dotalux.com>
2015-08-15Moved session array into the socket interfaceHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15Added showmsg HPM interfaceHaru1-10/+4
- The showmsg interface is automatically imported into plugins by the HPM (just like previously, the various Show* functions were). This change requires no actions from plugin developers. - stdout_with_ansisequence is now available through showmsg->stdout_with_ansisequence - msg_silent is now available through showmsg->silent - console_msg_log is now available through showmsg->console_log - timestamp_format is now available through showmsg->timestamp_format - Plugin-safe macros are provided, so that all Show* and Clear* calls will require no changes. - vShowMessage is provided through the public API, as va_list variant of ShowMessage. - vShowMessage_ is no longer part of the public API. If necessary, va_list variants of the other Show* functions will be added at a later time as follow-ups. Signed-off-by: Haru <haru@dotalux.com>
2015-08-15Cleaned up socket interfaceHaru1-2/+2
- Replaced some macro calls with the proper interface syntax - Removed useless macros and workarounds API changes summary: - WFIFOSET() can now be safely used both inside and outside socket.c - RFIFOSKIP() can now be safely used both inside and outside socket.c - do_close() is now sockt->close() - flush_fifo() is now sockt->flush() - flush_fifos() is now sockt->flush_fifos() - getips() is now sockt->getips() - host2ip() is now sockt->host2ip() - ip2str() is now sockt->ip2str() - ntows() is now sockt->ntows() - make_connection() is now sockt->make_connection() - make_listen_bind() is now sockt->make_listen_bind() - realloc_fifo() is now sockt->realloc_fifo() - realloc_writefifo() is now sockt->realloc_writefifo() - session_isActive() is now sockt->session_is_active() - session_isValid() is now sockt->session_is_valid() - set_defaultparse() is now sockt->set_defaultparse() - set_eof() is now sockt->eof() - set_noblocking() is now sockt->set_noblocking() - str2ip() is now sockt->str2ip() Signed-off-by: Haru <haru@dotalux.com>
2015-08-11Add n parameter to function pc_equipitem_pos.Andrei Karas1-2/+15
2015-08-11Fix issue #634. Delay actual item deletion after running item script.Andrei Karas1-2/+5
2015-08-10Move unequip item script function call into function ↵Andrei Karas1-4/+4
script_run_item_unequip_script.
2015-08-10Move equip item script function call into function script_run_item_equip_script.Andrei Karas1-3/+4
2015-08-10Move use item script function call into function script_run_use_script.Andrei Karas1-12/+7
2015-08-10Fixes #630, RC_NonBoss was including all races even if they weren't meant to be.Dastgir1-16/+16
2015-08-05Add optional parameter to warp script command for prevent stoping npc ↵Andrei Karas1-0/+1
scripts after warp.
2015-07-25Reduce memory usage in HPM in skill.cAndrei Karas1-26/+26
2015-07-18Move check cards related code into separate functions.Andrei Karas1-28/+70
This remove code duplicates and improve a bit code.
2015-07-08Update Unique ID system to match official now it cover all cash items ↵Ibrahim Hossam1-3/+4
include stackable ones. Implement ForceSerial option in Package Item Database to force serial for any item. Implement ForceSerial option in item database to force serial for any item. Implement Merge Client interface to merge stackable items with serial numbers ( check npc/other/item_merge.txt ).
2015-06-19Removed ".." from include directivesHaru1-45/+45
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-06-12RC_Player, RC_DemiPlayer, RC_NonPlayer, RC_NonDemiPlayer, RC_All and Ele_All ↵Dastgir1-82/+424
implemented (ref:Herc@9d1fe3cd3855bb973c55bdf98909c25bb80ee97a)
2015-06-02Merge remote-tracking branch 'upstream/pr/530' into herculesHaru1-1/+5
2015-06-02Re-implemented clif->colormes to accept arbitrary colorsHaru1-14/+12
- Due to the backward-incompatible change, clif->colormes was renamed to clif->messagecolor_self (for similarity with clif->messagecolor). The 'color' argument is now a 0xRRGGBB color rather than a color_table index. - enum clif_colors is no longer needed, but 0xRRGGBB-based constants are now provided to replace the old COLOR_* values. Signed-off-by: Haru <haru@dotalux.com>
2015-06-01Followup in malufett's commit a5a8605Lemongrass31101-1/+5
2015-06-01Replaced some of the hardcoded values with constants (map)Haru1-83/+77
- Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru <haru@dotalux.com>
2015-05-31Fixed Bug#8673malufett1-0/+19
-http://hercules.ws/board/tracker/issue-8673-gt-energy-gain/?gopid=25265#entry25265 -Fixed some skills related to spiritball, should now work like official. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2015-05-19Fixed some issues reported by coverity scan [3/3]Haru1-10/+4
- Automatically zeroed variables are now zeroed in the correct size, regardless of padding. - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2015-05-18Removed duplicates of clif->msgtableHaru1-19/+19
- Removed clif->msgtable, and renamed clif->msg to clif->msgtable. - Removed clif->msgtable_num, and renamed clif->msg_value to clif->msgtable_num - Renamed clif->msg_skill to clif->msgtable_skill - Removed clif_viewequip_fail - Replaced hardcoded message IDs with constants (see enum clif_messages) Signed-off-by: Haru <haru@dotalux.com>
2015-05-17Follow-up to 5be01dcHaru1-2/+2
Fixed a swapped-variable typo. Special thanks to Michieru Signed-off-by: Haru <haru@dotalux.com>
2015-05-17Added bonus4 variant of bAddEff to specify a durationHaru1-8/+41
- When a duration value is specified, the effect will have a fixed, non-reducible duration, as required by item scripts. - Special thanks to Michieru Signed-off-by: Haru <haru@dotalux.com>
2015-04-10Fixed Bug#8615malufett1-1/+1
-http://hercules.ws/board/tracker/issue-8615-warning-after-compiling/?gopid=24928#entry24928
2015-04-10Merge branch 'master' of https://github.com/HerculesWS/Hercules into ↵malufett1-8/+15
JobDBRedesign
2015-04-07Done show error message in client if was used item with flag KeepAfterUse.Andrei Karas1-6/+7
2015-04-07Return from pc_equipitem/pc_unequipitem 0 if cant equip item and 1 if item ↵Andrei Karas1-2/+8
equipped/unequipped
2015-03-27Hercules 'job_db1.txt' Redesignmalufett1-152/+158
-Initial and for review Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2015-03-11RENEWAL Updates:malufett1-0/+6
-Fixed card bonuses related to to ATK.(Added 'bRaceTolerance'). Thanks Michi for the support. -Fixed Renewal EDP. Special thanks to Awesome Yommy <3 -Enabled 'display_skill_fail' since '/skillfail' is already available in the client Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2015-02-23Hercules Ultimate Localization Designshennetsind1-15/+17
Servers can now run on any number of languages, without editing npc files. Designed by Haruna and Ind http://hercules.ws/board/topic/8687-hercules-ultimate-localization-design/ Signed-off-by: shennetsind <ind@henn.et>
2015-02-20Fixed Bug#8540malufett1-1/+2
-http://hercules.ws/board/tracker/issue-8540-genetic-ammo-issue/?gopid=24595#entry24595 Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2015-02-17Fixed Bug#7938malufett1-6/+21
-http://hercules.ws/board/tracker/issue-7938-frenzy/?gopid=21566#entry21566 Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2015-01-28Follow-up to e778f4f5f1b6a08adee5e7e908a44c38cd29bd12Haru1-0/+6
- Fixed some issues that prevented spirit charms from showing up - Special thanks to Michieru Signed-off-by: Haru <haru@dotalux.com>
2015-01-24Channels refactoring: quit, leave, deleteHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-01-24Moved the Hercules Channel System to its own file/interfaceHaru1-2/+3
Signed-off-by: Haru <haru@dotalux.com>
2015-01-23Cleaned up spirit charms implementation (optimized memory and CPU usage)Haru1-60/+81
Signed-off-by: Haru <haru@dotalux.com>
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru1-81/+81
- Variable scopes reduced - Parenthesized ambiguous expressions - Removed or added NULL checks where (un)necessary - Corrected format strings - Fixed typos potentially leading to bugs Signed-off-by: Haru <haru@dotalux.com>
2015-01-19Extract exp table validation into separate function.Andrei Karas1-10/+17
2015-01-18Fixing 38 issuesshennetsind1-17/+17
Addressing out of bounds read/write, pointless null checks on already deferenced variables, dead code. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-1727 Fixesshennetsind1-17/+16
Addressing out of bounds read/write, pointless null checks on already deferenced variables. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-17Another ~10 Fixesshennetsind1-25/+29
Addressing out of bounds read/write, resource leaks. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-1710 Distinct fixesshennetsind1-2/+2
Addressing out of bounds read-write. Special Thanks to 4144, Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-11Convert pcdb_checkid into function in pc interface.Andrei Karas1-6/+21
2014-12-31Remove useless checks.Andrei Karas1-2/+2