summaryrefslogtreecommitdiff
path: root/src/map/pc.c
AgeCommit message (Collapse)AuthorFilesLines
2011-02-08* Updates to various client packets.ai4rei1-3/+3
- Renamed clif_set0199 and clif_send0199 to clif_map_property and clif_map_property_mapall respectively and added an enumeration for currently known map properties. - Renamed clif_set01D6 to clif_map_type and added an enumeration for currently known map types. - Resolved undocumented field of packet 0x22e (ZC_PROPERTY_HOMUN) to attack range. - Fixed aspd field of packet 0xbd (ZC_STATUS) getting filled with karma value. - Removed commented clif_skillinfo (duplicate of clif_item_skill). - Other minor comment updates and 'FIXME' assignments. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14698 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-31* Inventory and Cart item arrays are no longer getting compacted on each ↵ai4rei1-37/+19
log-in/teleport/warp. - This also resolves yet another issue caused by r14685 (bugreport:2604). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14691 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-31* Various accumulated cleanups and fixes.ai4rei1-2/+2
- Improved the compile speed for files which include common/socket.h on windows builds (related r10471). - Moved FIFOSIZE_SERVERLINK define from common/mmo.h to common/socket.h (since it is a server connection FIFO size setting). - Fixed script command 'areamobuseskill' canceling monster's skill cast before it determined it's new target, which could be 'none' (bugreport:3272, since r13897). - Added a protection against attempts to read an empty backup / write to a full backup in skill_dance_switch as per TODO from r11347. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14690 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-30* Fixed equipped items' bonus no longer working after log-in until next ↵ai4rei1-0/+1
status recalc, due to missing pc_setequipindex which was previously called by pc_checkitem (bugreport:2604, since r14685). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14688 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-29* Fixed a map-server crash when invalid items are deleted (option ↵ai4rei1-2/+0
'item_check') from a logging-in character (bugreport:2604). - This removes the pc_checkitem call from pc_authok, as the check is done in clif_parse_LoadEndAck as well, after first status calc has taken place. - Inventory list is now sent before pc_checkitem in clif_parse_LoadEndAck, so that deleted items do not show up as 'unknown item'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14685 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-14* Removed unconditional redundant status change checks before ↵ai4rei1-20/+10
status_change_end calls (follow up to r12890). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14671 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-14* Replaced remaining occurences of '-1' with 'INVALID_TIMER', where ↵ai4rei1-37/+38
appropriate (follow up to r12998). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14670 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-10* Fixed monster level not getting updated in monster name (option ↵ai4rei1-0/+5
'show_mob_info'), when a monster levels up (option 'mobs_level_up') (follow up to r8644, related r187). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14662 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-29* Collection of random insignificant changes.ai4rei1-0/+1
- Added progress indication on map-server shutdown when objects are removed from maps, as it takes significant amount of time to complete. - Moved ers_free in db_obj_vclear, so that the node pointer is not used for comparison after it has been freed. - Some documentation of shop packets. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14639 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-26* Cleaned up script command checkweight.ai4rei1-2/+3
- Replaced some code parts with calls to pc_checkadditem and pc_inventoryblank (follow up to r13735). - Fixed item id not getting checked for validity properly. * Moved MAX_AMOUNT check in pc_checkadditem to the top of the function, to prevent unnecessary inventory scan before it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14629 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-26* Fixed two-hand weapons not getting recognized as such upon equipping, ↵ai4rei1-4/+1
causing respective one-hand weapon's base ASPD values being used instead (bugreport:4659, related r12599). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14624 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-25* Added support for new /remove and /recall packets for 2010-08-03aRagexeRE ↵ai4rei1-0/+39
and newer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14620 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18* Updates to handling of hair color/style and cloth color of characters.ai4rei1-12/+23
- Moved limit shortcut defines from mmo.h to battle.h, as they are only required in files, which include battle.h (since pre-svn 2004/10/15). - Moved hair style/color validation from char-server to map-server. This enables use of non-default limits as specified in battle config, rather than being restricted to hard-coded ones (bugreport:150). - Cleaned up related capping of values in pc_changelook (related r1708). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14604 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12* Cleaned up MOTD reading (related r292 and r4552).ai4rei1-17/+47
- Added a warning for common client crash caused by the sequence ' :' in MOTD. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14584 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-11* Fixed bAutoSpellOnSkill bonuses not working independently of each other ↵ai4rei1-7/+1
(bugreport:4617, since r13596, related r14536). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14574 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07* Reverted r14563, due to multiple issues which render the source ↵ai4rei1-20/+20
malfunctioning or uncompilable. To be redone later (bugreport:4627). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14567 54d463be-8e91-2dee-dedb-b68131a5f0ec
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