summaryrefslogtreecommitdiff
path: root/src/map/pc.c
AgeCommit message (Collapse)AuthorFilesLines
2008-04-11More questlog code.Kevin1-0/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12556 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-06Unequip should no longer remove any buff from seven wind. (bugreport:1155)Kevin1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-04Small bug for r12481 :)Kevin1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12482 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-04Update to Auth Glitch fix: moved unit_free_pc back to where it was and ↵Kevin1-0/+3
updated it so unit_free_pc just tells the script to end(not hard delete). (bugreport:1214) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12481 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-04Bug fixes for Auth Glitch and Map server crash through script warp when ↵Kevin1-3/+1
changing map servers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12473 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-03Renamed 'connect_until_time' to 'expiration_time'.ultramage1-3/+3
Renamed 'ban_until_time' to 'unban_time'. this also applies to login table columns (see upgrade_svn12464.sql). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12464 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-27Fixed a mistake in r12223, where during warping between mapservers, a ↵ultramage1-1/+2
character's coordinates would get changed before removing the character from the map, producing an infinite loop if the character returned back to the original coordinates. (bugreport:1286) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12442 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-26Adjusted eAthena code to compile cleanly in C++ mode.ultramage1-13/+13
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-25Partially fixed the mess in status.c.ultramage1-12/+12
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12433 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-22Added a missing null-pointer check to the timed player pvp/gvg respawn ↵ultramage1-1/+3
function (mistake in r12232) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12423 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-20- Added SC_ARMOR_RESIST, used by Undead Scroll, gives you resistance against ↵zephyrus1-0/+8
elements and it's can be used with Resist Potions. - SC_ARMOR_RESIST and SC_BENEDICTIO ends if you change your armor. Tested on iRO. - If you call SC_ELEMENTALCHANGE with val3 = 1 it will use the level in val 1, and not a random value. * Barricades: - Fixed a bug when @reloadscript. Barricades should be destroyed too. - Unbreakable barricades are only wall type (not shootable) According to Doddler info. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12407 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-19- The last bug in Adoption system.zephyrus1-1/+1
- Fixed a bug on trade, if you received a trade without accept it do logout... the other player cannot trade anymore 'til restart. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12396 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-18Fixed OnPCLoginEvent not working correctly (bugreport:1182).ultramage1-4/+7
Cleaned up some code typos/engrish. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12391 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-18- Added the official adoption method.zephyrus1-47/+113
( Parents need to create a party, invite a novice/first class, both equip the wedding rings and someone just right click the future baby ). - Fixed a bug sometimes client don't show job's bonus stats. - Removed the problematic adoption script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12389 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-16- Added support for offline divorce.zephyrus1-10/+22
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12379 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-14* extended the "npc_event: event queue is full" error message to also print ↵ultramage1-3/+3
the name of the event (so that the cause can be tracked down) * removed a strange (and undocumented) event name check for "GM_MONSTER" in the npc event execution code * added effects from recent sakexes to effects list * removed ladmin from vs8 sql builds * added int_auction.c/.h to vs6 and vs7 project files * some small cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12362 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-12* Added a message to let know the client if the mail inbox is full.zephyrus1-1/+1
* On LoadEndAck added a flag to know if the client is allready changing map or just doing teleport/fly wing. - This will reduce a little bit some info send to the client that only need to be updated on map change. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12349 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-11Replaced clif_countusers() with a more efficient alternative (thanks to the ↵ultramage1-1/+1
fact that pc_db now only holds fully authed players only). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12339 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-06- Corrected pc_checkitem not behaving correctly when you had more than one ↵skotlex1-26/+14
equip with a restricted card. - Fixed non-chatroom owners being able to kick others from the chatroom. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12310 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-05- Optimized the code to handle #KAFRAPOINTS and #CASHPOINTS. Now you can ↵zephyrus1-24/+22
really edit those vars on scripts. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12304 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-05- Implemented Firepillar's 'target cannot move for 0.2 sec x hit' property.skotlex1-0/+3
- Corrected Earthquake so it behaves as explained in the development topics. - Corrected a missing opt_flag = 0 when using SC_INCATKRATE on mobs. - Added a missing line to actually unequip unallowed compounded cards when changing maps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12299 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-04- Updated firepillar so it cannot be placed on top of others.skotlex1-4/+9
- Updated the firepillar code so it behaves like the other traps. - Changed the default format for @me and @main to avoid crashes on the newer clients. - Fixed the char-sql server so it returns a valid 'not found' packet when attempting to load a non-existing homunculus. - Fixed jump to use 0,0 for random coordinates rather than -1,-1 - Added missing \n to error reporting in getmonsterinfo - Additional status changes now only get triggered if the attack did damage, not if they get absorbed. - Fixed a logical comparison in unit_free to properly remove pets/homuncs when their intimacy is reduced to 0. - Properly set the opt3 value for Moonlight, Changeundead and Soul Link - Fixed the "no equip" flag of cards not being properly applied when attemting to equip items. - Added a check to avoid invoking pet menu entries when the pet is incuvated. - Fixed the session_data de-association in chrif_auth_delete - Cleaned chrif_auth_ok so that the latest received char info is kept when previous char login data was already in there. - Corrected docs mentioning non-existing flag 'mf_nopvp' git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12293 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-02Fixed wrong mvp format string for @mobinfo (would not show big mvp exp ↵ultramage1-4/+4
rewards correctly). Added data length check to chrif_authok(), to detect a mismatch between charserver's and mapserver's mmo_charstatus structure size. Corrected some typos in the cash shop code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12277 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-29- Added @cash and @points command to manage your cash/kafra points.zephyrus1-22/+25
- Optimized code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12266 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-28- Added cash shop support. (i need to add documentation, working on it).zephyrus1-0/+63
- An charcommand is still required to add/remove points. - Scripts command only requires to work on #CASHPOINTS and #KAFRAPOINTS. - I called it "Kafra Points" just because it's how comes in the translation. I allready know this changes between Oficial servers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12264 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-27* Removed NODAMAGE and ICEWALL cell types (mem usage back to normal)ultramage1-12/+8
- Icewall now uses basic cell type 5 (nonwalkable, shootable) - as a consequence, you can now warp to a nonwalkable cell - but only via gm command or scripted warp bug (hopefully :) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12247 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-23Fixed a mistake in r12232 related to char savingultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12235 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-22* Removed code in socket.c that tries to avoid send buffer overloading, as ↵ultramage1-36/+37
there is a scenario (many players and charserver disconnect) where mass char saving produces huge ammounts of data to send (see r11503) * Cleaned up player respawning code (bugreport:1022) * Increased the max amount of different autocast skills from 5 to 10 * Added a missing function declaration, for real this time (followup to r12229) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12232 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-21- Added status_calc_life to properly calculate hp/max_hp as a ratio taking ↵skotlex1-1/+2
into accounts overflows (and for now also avoids divisions by 0). Applied this function around clif.c, mob.c and pet.c - Implemented the correct walk-speed bonus from the Bard/Dancer spirit. - Added a few error messages in case something goes wrong in the new auth db system. - Fixed logarithmic drops turning 0% drop rates into 100%. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12225 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-21- Fixed new guilds displaying online-connect member count at 0 rather than ↵skotlex1-122/+49
1, and the guild master not knowing it is one (eg: it cannot edit the guild notice of a newly created guild until relogging). - Fixed acc_reg2 parsing screwing up the char_id and subtracting 2 from it rather than passing it as it is. - Extended the auth_node/auth_db system in chrif.c to handle log in/out and mapserver-change procedures. This way players are not in the main dbs when they are not "active", which blocks potential invalid accesses to them. - Replaced states auth, waiting_disconnect and finalsave with active. - Cleaned some the party/guild login and creation procedures, removed the party_sent/guild_sent states. - Removed a redundant guild_check_member call which is beyond not-needed and into the realm of wasting resources. - clif_parse will no longer process packets from !sd->state.active players, this also makes checking for finalsave uneccessary (since players re already removed from the maps and dbs by this point, so you can't access them in any other way) - Separated the roles of unit_free and map_quit, the former will handle cleaning structures from the player so it can be free'd safely, while the latter performs additional routines which are unique to characters logging out normally (map-server changes will invoke unit_free and bypass map_quit). - Removed pc_isplaying, quit_db, map_knowsaccount, MAPIT_PCISPLAYING among other functions/defines which are no longer needed due to the new login scheme. - Cleand up a bit some code in the clif_send(_sub) functions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12223 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-20Changed pc_can_give_items() to use standard boolean logic instead of the ↵ultramage1-8/+4
inverted 1/0 one (bugreport:396) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12220 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-18- added LK's concentration +1 MDEF.skotlex1-3/+5
- Corrected delay-consume items being consumed when used while casting or being unable to act. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12216 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-17- Updated Eye of Hellion to use the new format of the input command.skotlex1-0/+7
- corrected login_fd/char_fd being uninitialized in the char servers. - Changed a bit around how status_base_atk works to avoid overflows. - Added a check to prevent using consume-delay items when you cannot use skills, since that opens an exploit if the item also has non-skill-casting components to its script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12214 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-15- Fixed S. Novice bonus not dispelling when at the moment you die once.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12207 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-15some compilation warning fixesultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12206 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-10Added two missing opt2 values, for Angelus and Bleeding status.ultramage1-129/+61
Cleaned up pc_statusup and pc_statusup2. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12190 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-07- Fixed Freezing Trap doing no damage (changed type from misc to weapon)skotlex1-0/+2
- Changed suiton's element to water (apparently fixes not being able to use water-based skills on it) - Fixed Landmine doing no damage (decreased trigger range to 0 to match its splash range) - Fixed the disguise commands using the wrong variable when attempting to disguise as an npc. - Fixed a compilation warning on CELL_CHKNODAMAGE (which is a totally bad-ripoff of basilica cells anyway) - Corrected and optimized npc_remove_map's npc array cleanup (@reloadscripts no longer report 'too many npcs per map and related dangling pointer crashes are fixed) - Removed suspicious, yet totally unused npc_data variable 'n' - HP loss item scripts can no longer kill you. - Corrected the item-drop-rate check to avoid duplicate entries in @whodrops after a @reloadmobdb - Cleaned up and optimized map_addnpc (there are never any gaps in the npc array so npc_num always points to the last valid entry) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12180 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-29- Modified pc_dead so that the src is passed on to the master when it is a ↵skotlex1-15/+21
pet or homunculus. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12150 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-23- Fixed pc_setrestartvalue not correctly setting your SP when sending to ↵skotlex1-3/+2
save to the char-server while dead. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12136 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-14Applied a temp patch to make some npc-executed atcommands work again ↵ultramage1-1/+1
(bugreport:790). Added support for right-click-gm-menu kicking NPC objects. Removed redundant function npc_checknear2(). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12073 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-10- Fixed getmonsterinfo to return "null" when returning the name of a ↵skotlex1-4/+4
non-existing mob instead of -1. - Extended the status_percent_damage define to include a bolean to specify whether or not the target can be killed from it. - Corrected CR_CULTIVATION to fail when the target cell has some BL_CHAR on it already. - Changed the meaning of 'flag' in status_percent_change, to enable differentiation between damage that can kill the object and damage that cannot. - Script command percentheal will no longer kill the player if the specified amount is negative (and not -100). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12051 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-10- Removed 'skill_steal_type' from skill.conf as said config no longer exists.skotlex1-3/+2
- Corrected @slaveclone/@clone behaving as @evilclone when you change the @ symbol. - Modified SC_ARMOR_ELEMENT so it grants elemental resist as if it they were card granted bonuses. - fixed a SA_DISPELL crash when casted on an object with no status changes. - Adjusted the autospell code so that it does not relies on card_id == 0 for subtracting rates. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12041 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-09- corrected duration of sphere mines to be 30 secs regardless of skill levelskotlex1-0/+5
- Corrected duel_count/duel_list (you DON'T place variables in a .h file! That is what 'extern' is for) - Script command warpportal now places a warp in its initial state (as if a real warp portal was casted) - Updated dispell to also not remove the following effects: Hindsight, Inc Hit/Atk Rate (NPC_POWERUP), Nen, TK stances and tumble, warm and speedup1 (the other speed potion) - Chase-walking characters can now loot. - Hiding characters can't drop items now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12036 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-08- Made the pc reg variables receive a const char* as the argument, since ↵skotlex1-2/+2
they duplicate the value anyway (and they were receiving const char* values from the setd function) - Fixed Wand of Hermod not starting the SC_HERMOD status change (which blocks spells) - Fixed a missing break in the cast cancel code. - Fixed additional def/mdef from vit/int bonuses being lost when a status change that affects def/mdef triggers (for homunculus) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12033 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-29Implemented THE official Steal skill equation and game mechanics (basically ↵ultramage1-13/+13
version from /stable plus a few tweaks) (see topic:116540). Added missing bAddStealRate reference to doc/item_bonus.txt. Removed skill_steal_rate, as it was never used in the code (see r231). Removed skill_steal_type, it's just a one-liner source mod (see r231). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-27Removed an incorrect range check and fixed a copypaste typo which caused ↵ultramage1-6/+1
script engine errors / crashes (see r11984) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11987 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-27* Corrected description of scope and npc variables in script_commands.txt.FlavioJS1-20/+34
* Made temporary character string variables not have a limited length. (now all temporary string variables don't have limited length) * Made temporary character variables reuse free positions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11984 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-26Moved distance-related functions to path.c/hultramage1-0/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11981 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-24some minor cleaning of player variable loading/savingultramage1-84/+75
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11975 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-23- Fixed horrible handling of skill_abra_db which leads to memory corruption ↵skotlex1-1/+1
(depending on the contents of yor abra_db.txt file) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11970 54d463be-8e91-2dee-dedb-b68131a5f0ec