summaryrefslogtreecommitdiff
path: root/src/map/pc.c
AgeCommit message (Collapse)AuthorFilesLines
2010-12-07Changed almost all instances of sprintf() to snprintf().Paradox924X1-20/+20
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-06Added support for bonus bAddItemHealRate, which works for all healing items ↵L0ne_W0lf1-0/+6
care of Epoque. Updated some items to use bonus bAddItemHealRate, and healpower2. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14559 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-03* Fixed soul linkers not receiving taekwon angel buffs upon level up ↵ai4rei1-1/+1
(bugreport:3585, since r3657 and r3660, related r6294). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14556 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-02* Various code tweaks and updates related to item types.ai4rei1-1/+1
- Replaced item type literals with their appropriate constants. - Added itemdb_typename to replace the ugly "BUG!" filled array in @iteminfo (since r1741, follow up to r14550). - Made the item database parser verify item type for validity. - Added item type constants to const.txt for use in scripts (getiteminfo). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14551 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-02* Added item type IT_CASH (item type 18) Requires user confirmation before ↵L0ne_W0lf1-1/+1
using/generating item(s). * Updated the item types for several of the cash item boxes to 18. * Fixed the Exorcism_Bible bonus, missing {}'s for who knows how long. (bugreport:4342) * Updated Brasilis monsters stats again, care of Playtester. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14549 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-30* Made skill_tree.txt reading use sv_readdb. [Ai4rei]ai4rei1-53/+52
- Added define for skill entry requirements. - Reports duplicate skills within same job class. - Updated comments for skill Berserk in skill_tree.txt, among others because they would cause errors the way they are read now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14524 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-30* Added a define for star gladiator feel/hate info array length (follow up ↵ai4rei1-3/+3
to r8721 and r11840). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14523 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-29* Resolved issues with item delay system.ai4rei1-18/+23
- Fixed random crashes caused by map_session_data corruption due to out-of-bounds access to item_delay array (bugreport:4568, since r14455). - Fixed item delay database not being compatible with @reloaditemdb. Item delays are now reset upon reloading, much like a restart would do (bugreport:4589). - Fixed trailing commented lines in db/item_delay.txt could cause 'too many entries' error to be displayed. - Fixed last entity of a cash food item not being recognized as cash food, thus not receiving use delay, due to access to deleted inventory slot (since r14426). - These changes also fix a warning regarding variable 'i' in pc_useitem being potentionally uninitialized (bugreport:4559). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14521 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-29* Insignificant code tweaks: removal of excess function declarations and ↵ai4rei1-2/+2
self assignments. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14520 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-28* Added clr_type enumeration for vanish effect constants.ai4rei1-8/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14517 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-26Reverted r14504, the old value is correct due to how the equation works.ultramage1-6/+4
Fixed an ancient off-by-one mistake in the statpoint calc equation, details are in bugreport:4575. This will affect players with levels above 99, now giving them one stat point a level later. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14508 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-26Changed 'killerrid' and 'killedrid' from player vars to player params ↵ultramage1-2/+10
(bugreport:3249). Now stored in player session data, so they don't get saved on logout anymore. Added sql upgrade script 'upgrade_svn14507.sql' to remove the now unused player variables. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14507 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-26* Fixed base and job exp not getting reset on (de)leveling through commands ↵ai4rei1-3/+13
(bugreport:85). - Fixed level up related functions not updating client-side exp information, causing the exp percent value display random values. - Fixed party system not getting notified of level-ups through parameter changes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14505 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-26* Fixed auto-generated statpoint table missing 3 status points (since r1107).ai4rei1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14504 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-22* Fixed Rogue skill Steal Coin working on boss monsters (bugreport:2442).ai4rei1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14489 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-21* Added enumeration RC2_* for mob data 'race2' (bugreport:4561).ai4rei1-2/+3
- Fixed race2-related bonus arrays using RC_MAX, rather than race2 maximum (since r6221, related r1277). - Fixed bSubRace2 lacking bounds check (since r1257). - Fixed bSubRace2 being documented as bSPSubRace2 (since r1257). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14480 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-20* Fixed pc_marriage not checking spouse character job for baby class.ai4rei1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-10Added an item_delay database usable for item-specific use delays.Paradox924X1-2/+21
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14455 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-07'Exp gained' packets are now sent regardless of @showexp. @showexp can be ↵Gepard1-7/+6
enabled regardless of PACKETVER. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14450 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-11Implemented official cash food behavior, including use delay, not being ↵Paradox924X1-2/+9
dispelled (including on death), distinct status effects and icons from the ordinary food types. Updated items accordingly. (bugreport:2560) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14426 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-09Replaced all nullpo_retr() calls which returned 0 with nullpo_ret() calls.Paradox924X1-77/+77
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14414 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-19- Implemented usage of packets 0x7fa and 0x7f7, 0x7f8, 0x7f9. These are used ↵Skotlex1-10/+10
for proper deletion of items as well as movement/spawn packets for Renewal clients. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14383 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-18* Added bonus3 bAdd/SubEle, which allows you to specify a battle flag as ↵L0ne_W0lf1-0/+83
well! Dun dun dun! - The bonuses are addititive to existing bAdd/SubEles, as that's how it appears to work. - Updated Asprika to use new bonus3 bSubEle. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14381 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-28* Follow up to r13895, added a battle.conf setting to control if ranges ↵L0ne_W0lf1-2/+2
should be checked with autocasts. 'autospell_check_range', by default is set to no, as this is official behavior. This does not affect autospellwhenhit. * Sonic Blow autocast now stops players attacking when it triggers. It's possible there is more depth to this on official servers, and should 'stop' attacking on regular casts as well. It appears so far that this is the only skill that behaves this way. * Modified the default value for homunculus_auto_vapor in source to 1. * pvp_points are no longer calculated in the gvg_dungeon flagged maps. * Corrected a view ID and an equip location in the item database. (bugreport:4330) * Corrected a typo in the DTS_Warper script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14356 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-04-01- Fixed 'OnPCLogoutEvent' being queued and never executed if brianluau1-0/+3
the player was already talking to an npc. (bugreport:1209) - Fixed 'OnPCLogoutEvent' not triggering when changing map-servers (pc_setpos). - Combined some isequipped() in item scripts. (bugreport:4158) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14278 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-062010/02/06Inkfish1-2/+9
* Added official packet to display received expirience. (info provided by papkil) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14240 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-01-24Prevented pc_skill with a value of 2 for 'flag' from granting a skill level ↵Paradox924X1-10/+14
that surpasses MAX_SKILL_LEVEL. (bugreport:4022) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14225 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-01-16Fixed items don't grant skill if you had this skill before and then changed ↵Inkfish1-2/+2
your job. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14219 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-01-15* Fixed change cart packet doesn't check for skill.Inkfish1-1/+5
* Added new packets for Plagiarism. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14218 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-12-02* Autobonus code cleanups.Inkfish1-35/+29
- removed the 'script_parsed' flag to fix the issues with combo items. - introduced a global cache for autobonus scripts so that we don't have to parse scripts everytime invoking status_calc_bl. - fixed such script commands as 'getrefine()' not working inside autobonus scripts. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14180 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-27Fixed warping in OnPCDieEvent revives people with 0 hp.Inkfish1-10/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14174 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-24* Fixed the logged damage from pets doesn't count when ↵Inkfish1-2/+2
'pet_attack_exp_to_master' is inactive. * Uncommented the codes that stop pc_bleeding when dead (shouldn't have been commented out.....) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14166 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-23* Fixed player keeps bleeding when dead.Inkfish1-0/+3
- if battle_config.invincible_nodamage is true, reflected damage to targets in invincible status is now 1. * Fixed a script typo i made when i was fixing a typo... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14164 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-13Resolved a client hang in the scenario where the client sent loadendack ↵ultramage1-1/+2
before the server finished loading all data (bugreport:3700). Improved the performance of pc_autosave() to stop scanning players after it has already found the player it wanted to save (bugreport:3717). The 'overweight' status changes (SC_WEIGHT50/SC_WEIGHT90) will now be cleared on logout, to avoid saving them into the database (they get derived from player weight during login anyway). Improved lock.c on windows to use C's access(0) function instead of doing fopen/fclose when testing for existence of files. Re-added the 'static' attribute to mapindex_getmapname_ext's buffer; returning the address of a non-static local variable is undefined behavior (see r13901). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14144 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-07Added a flag to indicate if the script of an autobonus was parsed for the ↵Inkfish1-3/+12
sake of resource saving. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14129 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-03Extended broadcast implementation:Gepard1-4/+4
- support for font formatting, like font-size - `bc_woe` flag to allow client-side filtering of WoE announcements - new broadcast packet 0x40C git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14120 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-06Fixed rental items can be moved into guild storage from cart.Inkfish1-2/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-04- Implemented new packets for rental items (from Jobbie and Natz and fixed ↵zephyrus1-34/+82
by me). - Rental items now can be moved to storage and cart. - Autotrade cannot be used when user is dead, and it's not dispelled if user dies to prevent abuse. - Fixed pc_checkitem to do a proper item check and remove. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14082 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-09-13* Progressbar aborts when player is attacked.Inkfish1-8/+10
* Do not stand if damage is from yourself or has no source.(bugreport:3582) * Any mobs killed by party members within view range are taken into account in questlog. * 'unit_walktobl' now uses at least 1 as the range since 'unit_can_reach_bl' always sets the target coordinates 1 cell away from the target block. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14057 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-08-21Added bMagicHPGainValue and bMagicSPGainValue.Inkfish1-0/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14018 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-08-14- Fixes and optimization to instancing. Thanks to Saithiszephyrus1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14006 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-08-12- Optimization to instance system.zephyrus1-11/+14
* Removed the crc feature to generate instance npc names. The instance npc name will be "dup_" + instanceid + "_" + srcnpcid. * Removed the big array under map structure and coded in a different way. It was only used to generate map names, but i just used the instance_id + "origin map name". * Moved all instance features to separated files. * Moved the npc duplication for instances into npc.c as Ultramage says (removed npcname_db from npc.h). * Added recomendations for scripts commands by Saithis. - Testing required, i will prepare Endless Tower script soon. I hope this do almost anything in bugreport 3276. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-27Partially reverted the fail from r13966.ultramage1-0/+3
Added support for empty lines between individual attr_fix.txt blocks, fixes crash at startup (bugreport:3426). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-09- Added documentation for 'getmobdrops' (follow up to r13101). (bugreport:3351)brianluau1-19/+20
- Added documentation for 'areamobuseskill' (follow up to r13897). (bugreport:3352) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13942 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-04* Extended ATF_SKILL to ATF_MAGIC and ATF_MISC.Inkfish1-1/+1
* r13932 Fixed a wrong check on hp in Intimidate code. (bugreport:3305) (I forgot to write the message.) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13933 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-02* Updated autobonus [Inkfish]Inkfish1-2/+5
- added documentation for autobonus. - invoke status_calc_pc to complete autobonus execution and this will refresh client display as well. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13922 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-28fixed some typos on autobonusInkfish1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13916 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-28* Implemented script command "autobonus". [Inkfish]Inkfish1-65/+113
- "autobonus" is similar to "bonusautoscript", however it has a timer of its own. - Updated itemdb changing items bonus using "bonusautoscript + sc_start" mode to "autobonus + bonus" mode. - Remove bonusautoscript and status changes that was needed by bonusautoscript and is no longer in use. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-20- Instancing System (Thanks to Sirius White who did most of the code, with ↵zephyrus1-2/+16
some of my work to implement client side information, some optimizations and bugfixes). Also thanks to contributions from UEAUP team and Orcao. - Fixed a bug on areamobuseskill and changed it to make it as Aegis. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13901 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-15Improving the r13888 crashfix to cover similar crash scenarios discovered:ultramage1-1/+1
Reordered code in status_change_end(SC_DANCING) so that an ensemble's skill unit group is deleted only after removing both performers' status changes. Modified the call to skill_delunitgroup() IN status_change_end(SC_DANCING) so that it always processes the group's true owner and not others (bugreport:3253). Replaced calls to skill_stop_dancing() with status_change_end(SC_DANCING), since it now provides identical functionality. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13891 54d463be-8e91-2dee-dedb-b68131a5f0ec