summaryrefslogtreecommitdiff
path: root/src/map/status.c
AgeCommit message (Collapse)AuthorFilesLines
2008-02-26- Added new settings for autotrade on battle/misc.conf (you can read ↵zephyrus1-0/+10
descriptions there). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12243 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-21- Added status_calc_life to properly calculate hp/max_hp as a ratio taking ↵skotlex1-4/+13
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-6/+0
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-18- added LK's concentration +1 MDEF.skotlex1-1/+3
- 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-4/+11
- 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-11- 'Forget me Not' no longer blocks ASPD bonuses from working or prevents ↵skotlex1-4/+2
their re-casting, they are simply dispelled when the effect takes place. - Fixed a possible crash when a player logs out before their create-party request is accepted. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12193 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-10Added two missing opt2 values, for Angelus and Bleeding status.ultramage1-21/+12
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-04- Some code cleanups.zephyrus1-10/+11
- Added new Cell types (NoChat and NoDamage) - Added JobChangeLevel and FreeSKPoints to #stats - Added a Crash protection in clif_send with invalid fd values. - Merged a missing update in TK Mission. - Added script command 'getmapflag' - Merged some new Status Change to Stable. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12175 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-03Fixes to Devotion (see topic:153345)ultramage1-13/+8
- removed totally fake Devotion packet from Marionette Control code (see r3934) - fixed one devoted chars array management code bug which caused chars to be included in the array multiple times, producing various problems (also see r3934) - the link will now re-display when coming into view range - the link will no longer break if the devotee walks away, but instead, if he receives damage while being out of range of Devotion git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12171 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-03Added a missing client update when the mute status is manually cancelled by a GMultramage1-0/+5
(followup to r12079) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12169 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-20- Fixed a comparison whn doing item searchesskotlex1-10/+1
- Fixed hom_setting&0x2 conflicting with the 'view-range' limit check. - Stone curse now uses status_percent_damage instead of a precalculated value. - Merged the SA_MONOCELL and SA_CLASSCHANGE code. After changing class all the status changes that cannot be triggered on bosses are dispelled. - SA_CLASSCHANGE now uses the bloody branch list to pick a target MVP class. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12098 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-20Fixed yet another status code crash, this time when a stonecursed mob with ↵ultramage1-0/+7
high maxhp changes class to a Poring (see bugreport:621) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12097 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-15* Manner system fixingultramage1-1/+6
- better-than-aegis 'red bubble' packet updates; now it shows correctly - added support for /rc, which is basically mute for 60 minutes - fixed typo in r12076 making gm-mute start on the gm instead of target - fixed @mute not ending the status properly when using negative values - adde missing clif_manner_message(), sends info about manner updates git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12079 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-14Applied a temp patch to make some npc-executed atcommands work again ↵ultramage1-8/+8
(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-14Simplified the BL_CAST macro (see topic:166795)ultramage1-9/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12072 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-13- Fixed a compilation warningskotlex1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12071 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-13- Fixed dangling pointer crashes when bleeding or Deadly poison kills a ↵skotlex1-5/+11
spawn-once monster. - Fixed a possible ERS entry corruption when Deadly Poison kills a target that has kaziel active. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12069 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-13- Removed the sc_start_abort define. Since now when a status already exists, ↵skotlex1-21/+10
it is not modified in any way (no timer deleted, no sc->count reduced), it is completely safe to allow a simple return from within the rest of the function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12068 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-13- Fixed a possible ers_entry corruption if you die from bleeding while under ↵skotlex1-1/+1
the effects of kaizel. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12063 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-13* Another possible fix to ers/status_change crashing.FlavioJS1-23/+31
- same logic as r12058 but in status_change_timer. - look out for this error: "[Error]: status_change_timer: Unexpected NULL status change id: ### data: ###" getting it means that a crash was avoided and the culprit found. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12061 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-12* Possible fix to ers/status_change crashing. [FlavioJS]FlavioJS1-10/+19
- this patch is untested. Didn't find anyone willing to test it and I can't reproduce the crash so can't test the patch. symptom: status_change_entry.timer is being modified after the entry is freed. ers uses that memory location as a pointer when the entry is freed, it crashes when accessing the contents when it points to an invalid location. assumption: status_change_start starts an already existing status. as a consequence of something called inside status_change_start the status is ended. when the sce is finally being modified, it's modifying a freed entry. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12058 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-10- Fixed getmonsterinfo to return "null" when returning the name of a ↵skotlex1-7/+12
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-19/+29
- 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-08- Made the pc reg variables receive a const char* as the argument, since ↵skotlex1-3/+3
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
2008-01-06- Fixed Overthrust's timer not being able to be refreshed when recasting it ↵skotlex1-5/+11
(conflict on what val2 should mean) - Changed the code in status_change_timer so that a null pointer no longer causes a crash but prints an error instead. - Corrected clones not copying over a player's skills properly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12027 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06- Fixed a visual itemdupple bug on mail system.zephyrus1-1/+1
- Fixed Overthrusth status cannot being recalled at same skill lvl. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12023 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-04- Fixed Music Lesson's effect on Assassin Cross of Sunset.skotlex1-1/+1
- Fixed a possible crash in status_change_timer when debug mode is disabled. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12006 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-03Changes to reduce the number of map cell typesultramage1-3/+3
- Pneuma now again works via status change (see r3969) - removed unused CELL_SAFETYWALL - removed custom CELL_REGEN, it just increased regen rate (r1192, r1518) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12005 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-29Implemented THE official Steal skill equation and game mechanics (basically ↵ultramage1-1/+0
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-26Moved distance-related functions to path.c/hultramage1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11981 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-23- Fixed horrible handling of skill_abra_db which leads to memory corruption ↵skotlex1-1/+0
(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
2007-12-23- Fixed warning about unused variableskotlex1-9/+9
- Made the kaahi heal timer function uncrashable. - Fixed pc move item to cart function checking against the wrong max index. - Fixed initialization of sd issue in map_addblock - Removed redundant reinitialization when parsing item pickup. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-14Guardian hp handling code removal (see bugreport:342)ultramage1-4/+3
- removed guardian hp from the castle data structure, database, savefiles and various script functions (use upgrade_svn11914.sql) - removed guardian hp calculation and manipulation from the castle manager npc, now the hp values are updated by the server itself (glitch: when castle defense changes, all guardians are healed to full) - tweaked script function 'guardianinfo' to provide some data needed by the manager npc (currently available are hp, maxhp and visibility); also, it doesn't need a player attached to execute anymore The whole thing is experimental, use at your own risk (seems to work though...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-14- corrected Option_Xmas value in const.txtskotlex1-7/+1
- Wand of Hermode now dispells buffs only of allies. - Fixed some null pointer checks in status_change_end. - Corrected a crashy Warning message. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11910 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12* Some preparations for the guild script updateultramage1-1/+1
- cleaned up npc event execution code - cleaned up guild data loading/saving code; to be improved later - removed dummy 'account name' expulsion list management code - removed columns 'rsv1' and 'rsv2' from guild member data - removed columns 'rsv1' 'rsv2' 'rsv3' and 'acc' from guild expulsion data - added upgrade_svn11895.sql for SQL git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-11- Status change start will now fail when invoked on players that are ↵skotlex1-1/+4
disconnecting. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-09Changed Cloaking to not show an animation when it fails (thanks to Harbin ↵ultramage1-1/+1
for pointing it out). And while at it, also tweaked skill_check_cloaking() to use a more readable boolean logic instead of the previous zero-nonzero. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11877 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-08- Changed the chaotic delay from block to delay since it just a secskotlex1-1/+1
- Fixed the longing for freedom check in unit_can_move - Corrected a check while parsing refine_db.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11870 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-07- removed the timer heap correction code when the timers overflow since ↵skotlex1-1/+0
Flavio points out that it is not needed. - Modified a bit the changesex code so you get saved and quit before changing your sex rather than afterwards. - Cleaned up #changesex - Signum Crucis now works on bosses. - party_recv_data will not set the sd pointer for not-yet-authed characters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11867 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-05- Made the struct weapon_atk lhw in status_data a static member rather than ↵skotlex1-41/+14
a pointer as requested by Ultra Mage. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11858 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-02Fixed some minor inconsistencies in homunculus packets, in an attempt to ↵ultramage1-5/+4
make the lvl99 aura show to owner onSpawn. Still doesn't work as there appears to be a complex packet order dependency... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11851 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-28- Applied the required changes to handle def as a signed char (allows for ↵skotlex1-7/+6
negative def) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11837 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-28- Reverted the position of the max_hp/max_sp basic setting, modified the ↵skotlex1-4/+13
max_hp/max_sp bonuses to use casting in order to work correctly with negative bonuses. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11832 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27- Moved basic max HP/SP calculation to before parsing equipment, fixes ↵skotlex1-9/+4
negative absolute HP/SP bonuses not working. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11819 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-22- Changed the status_change structure to use dynamic rather than static ↵skotlex1-884/+901
memory to hold the individual status changes, this should have a noticeable impact on the server's memory consumption. - Had to add a few 'ugly' flags to status_change since now you can't track SC related information while said SC is not active (happens only for Storm Gust, Joint Beat and Magic Power). - Since I am unable to fully test, watch out for any bugs~ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11786 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-21- Moved subtype from struct block_list to struct npc_data.skotlex1-2/+2
- Fixed some compilation warnings. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11772 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-19- removed 'skill_fail' message when a ground skill fails as that caues ↵skotlex1-2/+2
double 'skill failed' messages in several instances. - Corrected shop freeing using free instead of aFree ,causing memory leak reports. - Corrected the sc def settings modifying tick_def in regards to sc_def instead of tick_def git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11762 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-17Removed battle_config.error_log as console_silent already handles thisultramage1-17/+11
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11751 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-15- Added 2 new status changes for Life and Regeneration Potions [Zephyrus]zephyrus1-0/+23
- Fixed some items boxes giving wrong tamings. - Fixed another item giving 48 gladius[3] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11738 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-14Fixed some guild skill offset calculation mistakes -_-ultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11732 54d463be-8e91-2dee-dedb-b68131a5f0ec