summaryrefslogtreecommitdiff
path: root/src/map/pc.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-25Merge pull request #1009 from Jedzkie/ItemDB_UpdatesDastgir1-12/+27
ItemDB Updates
2015-12-25Implemented NoViewIDDastgir1-12/+14
(http://herc.ws/board/topic/10020-official-mapflag-to-disable-viewid/) Closes #926 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-24Item Update:Jedzkie1-6/+20
- Fix items that uses SPVanishRate bonus are not working properly. - Fix Velum Katzbalger item effect. - Added HPVanishRate bonus.
2015-12-23Update:Jedzkie1-6/+7
- Rename BLUE_CRYST and PINK_CRYST to BLUE_CRYSTAL and PINK_CRYSTAL - Rename FOOD_STOR to FOOD_STORAGE - Rename TREAS01, TREAS40, TREAS41, TREAS49 to TREASURE_01, TREASURE_40, TREASURE_41, TREASURE_49
2015-12-20Costume and Shadow items are not equip-able anymore on older clients that ↵hemagx1-0/+5
doesn't support it. Fixes #947 Closes #954 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-17Change all chat mute checks to use pc->can_talk instead of direct check.hemagx1-2/+2
Put new macro pc_ismuted and change all other kind of mutes to use it Closes #937 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-17Add bAddMaxWeight bonus for increasing player's max weightAnnieRuru1-0/+4
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-14follow up f975f0a55ca930fd0f95a6209bea479ac9bc3a5dhemagx1-1/+1
2015-12-14Players now will auto warped to random spot in the map upon login in-case ↵hemagx1-0/+3
they're stuck in dead cell. Closes #802
2015-12-13ItemDB Updates:Jedzkie1-0/+2
- Added 'Malang Cat Can' item. - Added 'Ru Blue Spear' item. - Change the item id of 'RWC Silver Brooch' from 2998 to 2999. - Follow up https://github.com/HerculesWS/Hercules/commit/e511dcf5940cee7a6e43744543a5ca96bc23cf84, thanks to zackdreaver. - item_db.conf renewal minor clean-up xD
2015-12-13Fixed an issue in the bonus2 bAddMonsterDropChainItem implementationHaru1-3/+3
- The item_chain and race arguments were swapped. - Thanks to pengc2010 for pointing it out Signed-off-by: Haru <haru@dotalux.com>
2015-12-13Corrected an error in bonus3 bAddMonsterDropItemHaru1-1/+1
- Follow-up to 9fef13d4d2e0eab3376ea95b3cb8783d48d19dda - Thanks to pengc2010 for pointing it out Signed-off-by: Haru <haru@dotalux.com>
2015-12-10Rename 'ITEMIDBATTLE_MANUAL100' to 'ITEMID_BATTLE_MANUAL100'.Jedzkie1-1/+1
2015-12-06Fixed issues with compound races in bonuses where they're handled as arraysHaru1-323/+203
- Corrected handling of RC_ALL in: * bAddRace * bSubRace * bMagicAddRace * bWeaponComaRace * bCriticalAddRace * bExpAddRace * bSPGainRace * bHPDrainValueRace * bSPDrainValueRace * bSPGainRaceAttack * bHPGainRaceAttack * bRaceTolerance * bHPDrainRateRace * bSPDrainRateRace * bSetDefRace * bSetMDefRace - Corrected out of bound array accesses (memory corruption) in: * bIgnoreMdefRate * bIgnoreDefRate Signed-off-by: Haru <haru@dotalux.com>
2015-12-06Replaced RC_BOSS/RC_NONBOSS bitmask combinations with RC_ALL bitmasksHaru1-25/+32
- Sources only Signed-off-by: Haru <haru@dotalux.com>
2015-12-06Refactored/fixed race handling for bonuses that store it as a bitmaskHaru1-63/+44
- The following bonuses now work correctly with RC_DemiPlayer, RC_NonDemiPlayer, RC_NonDemiHuman, RC_Nonplayer: * bIgnoreDefRace * bIgnoreMdefRace * bDefRatioAtkRace * bAddMonsterDropChainItem (bonus3) * bAddMonsterDropItem (bonus3) - A new function (map->race_id2mask) is provided, to easily and efficiently generate a bitmask from a race ID. - The RC_ALL race ID is mapped to RC_BOSS and RC_NONBOSS, for backwards compatibility. Signed-off-by: Haru <haru@dotalux.com>
2015-12-04Merge pull request #910 from dastgir/idleAndrei Karas1-0/+8
Added a function to update idle time
2015-12-04Added a function to update idle timeDastgir1-0/+8
2015-11-14Changed struct map_session_data::queues into a VECTOR and renamed to ↵Haru1-6/+5
::script_queues Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Standardized script-queue related commandsHaru1-1/+1
- The commands queueadd, queueremove, queueopt, queuedel and qiclear now all return true (success) or false (failure). - Taken/extended from AnnieRuru's PR #847. - The constants HQO_OnDeath, HQO_OnLogOut, HQO_OnMapChange were renamed to QUEUEOPT_DEATH, QUEUEOPT_LOGOUT, QUEUEOPT_MAPCHANGE respectively. - The name of the variable @QMapChangeTo$ used during the QUEUEOPT_MAPCHANGE event has been renamed to @Queue_Destination_Map$. Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Fix @QMapChangeTo$ not usable when HQO_OnMapChange triggeredAnnieRuru1-1/+1
- also add documentation for it
2015-11-14Renamed hQueue/hQueueIterator/hQueueOpt to latest standardsHaru1-6/+6
Signed-off-by: Haru <haru@dotalux.com>
2015-11-08Fixes missing new RC_ constants in some bonuses. Fixes #815Dastgir1-25/+102
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-10-13Return actual result from pc_insert_card.Andrei Karas1-1/+5
2015-10-11Fixed another compiler warning (follow-up to 5c22b63)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-10-11Fixed various compiler warnings (follow-up to 5c22b63)Haru1-17/+17
Signed-off-by: Haru <haru@dotalux.com>
2015-10-11Cleanup of the HPluginData implementation (second part)Haru1-4/+2
- Changed the hplugin_data_store's array into a VECTOR. Signed-off-by: Haru <haru@dotalux.com>
2015-10-11Cleanup of the HPluginData implementation (First part)Haru1-18/+4
- Several explicit casts are removed, to have a slightly better type-checking at compile time. - A destructor function is provided, to remove code duplication. Signed-off-by: Haru <haru@dotalux.com>
2015-09-25More aggressive whitespace cleanup. Follow up to 51329e6Haru1-228/+202
Signed-off-by: Haru <haru@dotalux.com>
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>