summaryrefslogtreecommitdiff
path: root/src/map/pc.c
AgeCommit message (Collapse)AuthorFilesLines
2006-07-11- Corrected Frost Nova's splash range and Land Protector's cast range. ↵skotlex1-2/+3
Thanks to Haplo. - Fixed Beast Strafing not having inf2 = 512 (to make it a target-auto-select skill) - Fixed the duration of Land Protector, removed unusued time2 value from their entries in skill_cast_db. Thanks to Haplo. - Corrected Warp Portal being unable to warp people who are standing on it on the moment it triggers. - Fixed @follow stopping the moment you are warped. - Fixed pc_additem messing with the equip field of the passed item data. Fixes the famous "equip stuff on your arrow slot" bug. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7607 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-10- Added a check in pc_equipitem so that when switching weapons and you have ↵skotlex1-3/+15
the skill_range_by_weapon setting active, the skill info block (which includes range) will be resent when the new weapon to equip has a range different than the previous one. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7599 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-08- Fixed the new addeff structure not working well with SC_STONE (because ↵skotlex1-3/+2
SC_STONE is 0, which was by default not handled as a valid value). - Added back the TF_MISS walking speed bonus to assassin type classes (how did that got lost?) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7583 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06- Rewrote all the item restriction functions so that they will take into ↵skotlex1-4/+4
account slotted card restrictions as well. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7552 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06- Added EQP_/EQI_ constants in pc.h to identify equip position and equip ↵skotlex1-72/+68
indexes, makes equipping related code much easier to read. - Also cleaned up pc_equipitem. When dual wielding or equipping accessories, if the client actually specifies one of the two positions, it will be taken into account. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7550 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-04- Added structure s_addeffect to handle status change additions. Cleaned up ↵skotlex1-20/+59
relevant code. It is now possible to specify ANY status change, not just the basic ones. - Added support for bonus3 bAddEff/bAddEffWhenHit as follows: bonus3 bAddEff/bAddEffWhenHit, <SC value>, <rate>, <target flag>. Target flag is 0: Self. 1: Enemy. 2: Both. - Added these descriptions to doc/item_bonus.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-03- Fixed a compile warning in login sql/txtskotlex1-7486/+7484
- Fixed pc_makesavestatus not setting your logout position. - Fixed the UF * flags of Songs/Dances in skill_unit_db. - Fixed two dances becoming BA_DISSONANCE instead of DC_UGLYDANCE. - Added the missing +100% damage modifier of Enchant Deadly Poison. - Fixed SkillStatusChangeTable not working correctly for Homun/Guild skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7454 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-30- Moved item group enumeration from itemdb.h to map.hskotlex1-7/+9
- Cleanup in itemheal related code, fixed the item heal group bonus not working on Groups beyond 7. - Fixed pet's loot not being moved to your inventory on logout. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7419 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-29- Some indentation corrections.skotlex1-3/+3
- Ending SC_CLOAK/SC_HIDE/SC_CHASEWALK will now trigger ontouch npcs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7394 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-29* [Fixed] Lance1-6/+7
- Scripting system screwing up script position after mixing timers with menus. - NPC attached AI mobs display as alive when dead. - View data not updating after buildin_unitdeadsit. [Improved] - NPCE_LOADMAP to execute after all (area) objects are sent to the player. - Simplified scripting system. sd will now use pointer to the script state itself. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7388 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-28- Added inf2 4096 (INF2_ALLOW_ENEMY) which is to be used in conjunction with ↵skotlex1-1/+1
INF2_PARTY_ONLY/INF2_GUILD_ONLY when said skill should ALSO be allowed to be used on enemies. - Updated Soul Change to use inf2 4096 (INF2_ALLOW_ENEMY). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7376 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-28- Corrected Musical Strike having a different damage equation from Throw Arrow.skotlex1-8/+3
- Some minor cleanup of Soul Change - Added state rewarp to players. It gets set when a pc_setpos call is triggered while the player is changing maps so that when the player finish loading the map, it is inmediately rewarped to where it has been rewarped/recalled to. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7370 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-26- Autospells will now again check for the skill's nk value, so that skills ↵skotlex1-1/+3
tagged "nodamage" skills will not trigger autospells. - A bit of cleaning in pc_equippoint - Corrected clif_item_sub so that pet eggs will correctly be sent as equipment (fixes them showing up "broken" and with random refine levels) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7341 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-24* [Optimized]: Lance1-6/+14
- Setting of variables with defined scope in some frequently executed script events. * [Added]: - Missing script_require_trigger flags for some power hungry events. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7325 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-23- Modified pc_setoption so that it will correctly update sprite AND clothes ↵skotlex1-29/+17
color when mounting/unmounting changing into/from xmas/wedding sprites. - Allowed itemdb_exists to return the dummy item. Enables "invalid" items to be sold, traded, dropped, etc. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7321 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-23- Added pc_bonus_autospell_del, gives support for removing autospell ↵skotlex1-0/+26
effects. When a negative rate is specified, it will decrease the chance of casting (eg: You have two different cards with autospell Heal +20% each, then do autospell -30. The second card will be cancelled, and the first one will become Heal +10%) - npc_timers now will not restore the previous timer data when there's no players attached (when it's strictly an npc timer). This should reenable the old behaviour of getnpctimer returning the total ellapsed time since "startnpctimer" even after the last label has been reached. However, this behaviour won't apply to player-attached timers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7312 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21- Added function parse_hostbyname() which takes a hostname and a char[4]. ↵skotlex1-4/+4
The hostname is resolved to an ip, whose individual components are stored in char[], the return value of the function is the inet_addr result of the lookup (or returns 0 when failed). Meant to be used in the rest of the code without the need to do socket/network related includes. - Applied use of parse_hostbyname() in chrif.c to fix compilation errors. - status_percent_change will now account for when the target's max hp/sp is above INT_MAX. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7281 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21- Some cleaning up of OPTION related code. OPTION_XMAS and OPTION_FLYING ↵skotlex1-0/+10
really ARE the same value clientside! (totally stupid), therefore I've opted from removing the flying animation since it really just displays as Xmas for others (and the correct fix involves adding a bunch of class-change packets...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7270 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-17- Devotion absorbed damage will now appear to come from oneself (instead of ↵skotlex1-1/+1
the original attacker changing directions towards the Crusader) - Updated clif_refres to send inventory, cart, and weight info. - Fixed intif_guild_memberinfoshort to not leave a dangling pointer when someone logs out <.< - Cleaned up a bit guild_check_member git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7226 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Fixed option value being reset'ed on login (fixes cart/peco/falcon being lost)skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7217 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Removed unused variable aspd_rate in map_session_data.skotlex1-2/+2
- Modified aspd_rate in status_data to hold aspd change on a base of 1000 = 100% rather than 100 = 100%. All status changes that affect aspd have been updated. Study and Single Action should now correctly give +0.5% aspd per level. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7213 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Modified the bNoMagicDamage/bNoWeaponDamage bonuses to be a 0-100 setting. ↵skotlex1-4/+8
Meaning you can do bonus bNoMagicDamage,50; To make all magic damage be reduced by half. This bonus stack, so two cards with bNoMagicDamage,50 will give magic immunity. - Removed setting gtb_pvp_only and replaced it with gtb_sc_immunity which specifies the threshold before the bNoMagicDamage starts blocking support statuses as well. ie: gtb_sc_imunity: 75 will mean that "bonus bNoMagicDamage,70;" reduces magic damage by 70%, but does not blocks heal or support status, while "bonus bNoMagicDamage,80;" does. - Updated GTB's card script to be "bonus bNoMagicDamage,100;" git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7212 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16* [Improved]: Lance1-7/+2
- Cleaned up Custom Mob Script Callback codes. Looks much better now :B. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7202 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-15- Fixed "wedding_ignore_palette: yes" not working when relogging with the ↵skotlex1-5/+5
gear already equipped. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7189 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-15- Altered a bit how status_set_viewdata behaves in regards to Wedding/Xmas ↵skotlex1-8/+14
options. - Added back OPTION_XMAS, but the actual value is missing! - Corrected chrif_save so that the player is not set offline on map-change. - Added change-look support in pc_setoption when specifying OPTION_XMAS - Fixed clif_parse_RemoveOption removing all options instead of just Falcon/Cart/Peco git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7183 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-15- Fixed and cleaned up script command 'equip'skotlex1-3/+3
- Fixed 'autoequip' items. - Fixed Aspd not being updated in your status window after Agi/Dex increasing statuses take effect. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7179 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13- Added HM_SKILLBASE, MAX_HOMUNSKILL to specify the skill level range of ↵skotlex1-10/+10
Homunculus. - Added support for reading correctly status change data from Guild and Homun skills. - Added support for reading Homun skill data (which means the HM skills are now safe to add to skill_db, skill_require_db, etc) - Moved StatusSkillChangeTable to StatusSkillChangeTableArray and made a function called StatusSkillChangeTable to do the conversions taking into account HM/GD skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7128 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-12- Fixed npc_checknear's distance check returning the opposite of what it ↵skotlex1-5/+2
should (false when the range is correct and viceversa) - SL_STIN/SL_STUN have dex-reducable casting times now. - Added a warning on item loading when an item is of equippable type but has no equippable position. - Turning an alliance to an opposition won't work now during WoE - Slaves can summon other mobs now. The only ones who can't do this are player summoned mobs. - Merged the following functions for faster processing of items: clif_storageitemlist + clif_storageequiplist = clif_storagelist clif_guildstorageitemlist + clif_guildstorageequiplist = clif_guildstoragelist clif_itemlist + clif_equiplist = clif_inventorylist - Increased max knockback value support to 25. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7109 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-10- Added structure party_data and party_member_data to the map server to hold ↵skotlex1-9/+5
party-specific required information about parties including Monk/TK/SG/SN states and party member count. - party Hp updates are no longer done each time the Hp is modified, but together with the party xy timer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-08- Cleaned clif_pvpset to not send the packet to nearby characters when the ↵skotlex1-4/+2
source is GM-hidden. May help fix the crash on PvP with gm-hidden characters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7053 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-08- Fixed Sense using mdef instead of mdef2skotlex1-1/+0
- Fixed item-skills not showing up on login. - Cleaned up clif_parseLoadEndAck, by testing which packets are required only on first-login and which ones are required on all map-changes. Skill-tree, Exp, Skill Points and most of the basic status are no longer sent on map-change (items, carts, zeny still need to be sent one very map-change). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7042 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Added pc_calcexp to calculate individual exp bonuses acquired from exp's ↵skotlex1-4/+54
source (race bonus cards, SG Exp skills, pk-mode higher level exp) - pc_gain_exp now also receives the source of the exp, when said source exists, bonuses are applicated as needed. - Added status_kill when capturing a mob, should take care of the mob not respawning after caputed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7037 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Fixed a pair of signed/unsigned mismatch comparison warnings in pc_bonus. ↵skotlex1-2/+2
Thanks to Nuisance for complaining. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6987 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Cleaned up code for SC_MINDBREAKER.skotlex1-8/+8
- Changed hit, flee, cri, flee2, def2 and mdef2 to signed short, def, mdef to signed char to correctly account for cards with penalties in said stats. - Added cap_value checks in all of the status_calc_* return paths to make sure no stat is invalid. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6986 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05- Corrected cloaking not ending on attack if you are near a wall.skotlex1-42/+65
- Moved define cap_value to map.h as it's quite handy. - Updated pc_bonus to use cap_value on all status_data modifiers to prevent overflows/underflows. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Corrected clif_parse_takeitem to ALWAYS return a NAK packet when it failsskotlex1-13/+12
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6943 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Altered status_calc_pc so that equipment scripts are ran before card-scripts.skotlex1-4/+16
- Fixed pc_bonus to not underflow/overflow when adjusting def/mdef. - These two together, should fix Tao Gunka Card. - npc_debug_warps() will now be invoked if warp_point_debug is set. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6925 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02- Updated item_db.sql/mob_db.sql to current.skotlex1-2/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6922 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01- Fixed pc_damage setting your canlog_tick even if the damage has no source ↵skotlex1-3/+6
(eg: poison, berserk) - Berserk's aspd bonus now stacks with other aspd bonuses, and is unaffected by Quagmire/Forget-me-not. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6916 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01- Corrected setting slaves_inherit_mode to not apply to morphosis skills.skotlex1-2/+12
- Added define OPTION_CART which holds the 5 cart option values. - Corrected pc_setoption to invoke status_calc_pc when getting/removing the cart. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6914 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31- Some cleaning of the fame-update code, fixing a logic bug which made the ↵skotlex1-1/+1
ranking list fail to display the correct ranker names. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31[Improved]: Lance1-6/+6
- Fake NPC interface to use real NPCs. - Scripting interface to restore and save sd->npc_id. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31- Added function pc_check_skilltree for checking if you unlocked new ↵skotlex1-11/+61
tree-skills when raising non-passive skills. - Some cleaning of pc_calc_skilltree - Fixed flee/hit calculation in status_calc_bl to account for bonuses from the base status. - Some cleaning of status_calc_pet to use the cap_value define. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6872 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30- Fixed status_damage not setting your HP to 0 when you died T.Tskotlex1-8/+8
- Fixed the pcbonus2 warnings using the wrong value before printing the invalid Element error. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6864 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30- Added a pair of missing pc_setstand in the pc_dead function.skotlex1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6861 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30- Fixed Absorb Spirit Spheresskotlex1-1/+2
- Added battle_config min_chat_delay (default 0) specifies in ms what is the min delay between player sent chats (whisper/global/party/guild). Messages that exceed this threshold are silently ignored for now (perhaps need to add a "DON'T SPAM" reply to the player?) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6859 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30- Updated attr_fix_table reading code to account for ELE_MAX (will correctly ↵skotlex1-7/+57
read bigger elemental tables if ELE_MAX is changed) - Aggressive mobs will now use battle_check_range rather than mob_can_reach to decide whether to lock-on or not to a target within sight-range. - Added warnings in mob_readdb when the mob's element is invalid. - Updated the corresponding entries in map.h to use ELE_MAX - Added error messages in pc_bonus* functions when an invalid element is passed to the relevant bonuses. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6856 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30- Removed the on-die specific code from unit_remove_map and placed it on the ↵skotlex1-29/+17
corresponding *_dead functions. unit_remove_map should never assume the char died, it is just a "remove from map" function. - Updated status_damage to handle the general death code (clearing status changes, clearing skill related data, sending death packet, etc). The return value from the *_dead functions will tell it what to do or not with the object (death aborted, clear it from map/memory, etc) - Cleaned up pc_dead to take advantage of the fact that status changes are not ended until after the function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6852 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30(I need sleep)Lance1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6845 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30Final alteration :PLance1-4/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6844 54d463be-8e91-2dee-dedb-b68131a5f0ec