summaryrefslogtreecommitdiff
path: root/src/map/pc.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-22- Added the new mail system. Requires optimization and tests.zephyrus1-6/+4
- Updated the maildb sql structure. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11548 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-19- Added bonusautoscript and bonusautoscript2. These are used to attach a ↵skotlex1-0/+30
script to a player which gets executed on attack (or when attacked). Required for several of the more recent items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11519 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Fixed numerous /W4 warnings (and created more :)ultramage1-6/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Some code cleaning...ultramage1-10/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11505 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17Using predefined constants as parameters to the exit() function.ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11501 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-11Removed the check that prevented Warp Portal from opening after you picked ↵ultramage1-8/+12
the destination, if there was someone blocking the cell. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11406 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-06 * the mapserver won't exit when no mapcache is found, with use_grf: yesultramage1-12/+10
* Fixed some \r uses, now looks better; /thx to Ai4rei (topic:165952) * Removed that ridiculous spinner that displays during map/npc loading, and added a more informative progress indicator (idea from jA/eapp) * Checked/fixed/removed some old script and npc commands * cmdothernpc - a specialized 'donpcevent' with the event specified as two arguments * enablearena/disablearena - completely equivalent to enablewaitingroomevent & co. * inittimer/stoptimer - removed since its logic was incompatible with the code it depended on * Removed loads of code that supported these functions. Result: -100b per npc => -1,5MB of wasted memory * Fixed related npcs that erroneously used 'stoptimer' git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11374 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-05* Completed the code for SC_LIFEINSURANCE and it's status icon.zephyrus1-1/+1
- Added the summer_ignorepalette to client.conf. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11359 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04* Added SC_EXPBOOST (Field Manual), SC_ITEMBOOST (Bubble Gum) to const.txt. ↵zephyrus1-2/+2
Allready working. - Added SC_LIFEINSURANCE and SC_BOSSMAPINFO to const.txt. (not implemented but i will work on it) - Updated Field Manual and Bubble Gum in the itemdb.txt file. - As L0ne Wolf reported to me and based on Doddler information, the Bubble Gum only do a second try of the item drop, and it don't increase the drop rates. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11356 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-03* Added the code for Field Manual (SC_BONUSEXP) and Bubble Gum (SC_BONUSDROP)zephyrus1-0/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11351 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-01* Fixed various trading/vending glitchesultramage1-34/+37
- fixed vending_tax not working at all (integer division in r10182) - undid change from r8273 where pc_getzeny() treated zeny overflow as an error condition; officially, the value is just bounded to MAX_ZENY - fixed stupid code that, instead of properly checking and filtering invalid items during shop setup, opted to 'hide' these items from the vending list instead... - removed some custom error message packets related to vending - fixed a glitch where the server would open a shop with no items when all entered items were tagged as invalid - split zeny handling from trade_tradeadditem() into a separate func (trade_tradeaddzeny()) - removed loads of redundant code from vending.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11344 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-28* Implemented Summer Outfit care of Zephyrus_CR.L0ne_W0lf1-2/+14
- Increased MAX_GUILDCASTLE in mmo.h to 29 for future implementation of the 12.1 Guild Castles. * Added constants for Summer Outfit and updated the Summer_Event_Suit item script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11321 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-27* Loot code using charid's instead of id's in pick priority.FlavioJS1-7/+7
* configure script using svn:eol-style LF and require mysql/pcre when --with-mysql/pcre is used. Added a forgotten file from r11311. (script_commands.txt) Note: charid's are globally unique, id's are equal for characters in the same account. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11312 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-26- Pretend this never happened.skotlex1-2/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11306 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25- Fixed bAddEff2 causing the effect on the enemy rather than on yourself.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11299 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25- Modified a bit the hard/lazy ai triggers to match aegis:skotlex1-0/+2
- Mobs go into active AI when they are 2 cells from entering a player's view (ACTIVE_AI_RANGE) - Mobs in passive AI no longer use skills. - Mobs in passive AI do not random walk UNLESS they have entered active AI before (random walk frequency is not lost during passive AI). - Added an additional check to prevent support skills from being blocked if the target has an armor element that blocks it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11294 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25* Disabled tick cache (to enable it: define TICK_CACHE to the number of ↵FlavioJS1-2/+1
calls that should be cached). * Added a charid2sd database for fast charid searches. * Reworked the nick cache to only contain offline characters. Note: The tick cache was causing _some_ of the desync problems in eA. Gameplay should be much smother, but desync problems still exist. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11290 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-23* map_addflooritem and struct item_drop_list using id's instead of struct ↵FlavioJS1-2/+2
map_session_data's (fixes bugreport:36). * Fixed buildin_escape_sql not properly escaping in sql servers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11279 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS1-1/+2
- Abstraction for the sql code (sql.c/h). - New configure script and makefiles. - Restored txt zeny logging code. (r10814) - Rewrote mapserver's sql code - itemdb, mobdb, mapreg, logs. (r10814) - Fixed a precedence issue (&& and ) in char_sql/char.c. (r10833) - Improved db reading code a bit for consistency. (r11077) - Added separate atcommand for mail deletion. (r11077) - Corrected a few messages that said "new" instead of "unread". (r11077) - Broadcast (*) messages now use "*" as the target's name (not ""). (r11077) - Moved StringBuf code from utils.c/h to strlib.c/h. (r11084 r11117) - Some misc login server cleanups (reformatting etc). (r11136) - Corrected/modified some header entries. (r11141 r11147 11148) - Adjusted VS project files. (r11147) - Adjusted the way the sql charserver does item saving. (r11192) - Corrected usage of reserved keyword 'friend' in mmo.h. (r11192) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-17- Applied various crash-protections to script commands that deal with the ↵skotlex1-2/+0
equip-position array. - Corrected and simplified the skill_magic_reflect function. Fixed damage reflection being based on the caster rather than the target. - Potions are now usable inside Gospel by the casting Paladin (as per Aegis tests done by AuronX) - The unequip script command now takes a position from 1 to 10 rather than 0 to 9 (to make it consistant with all the other equip position related script commands) - Added the EQI_* constants to db/const.txt in a format usable by the equip-position related script commands. - Updated some items to use the new EQI constants. - Also updated doc/script_commands.txt to refer to the EQI list. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11230 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-15Getting some (mostly atcommand) code cleaning out of the way...ultramage1-2/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11222 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-10- Removed bonus bAddEffWhenHitShort as it is unneeded and unused.skotlex1-12/+10
- Corrected getpetinfo so it actually returns "null" when there's no pet and you request the name (the docs state it so). - Also cleaned up a bit getpetinfo - Added gethominfo (which behaves in the same way as getpetinfo). - The 'maxcount' skill_db field now can store independant values per skill-level, required for Kamaitachi since it uses different range values per level. - Corrected bonus3 bAutoSpell(WhenHit) to select target enemy (rather than self) for skills with inf self and inf2 'don't target self' (aka: auto-select target skills). - Corrected map_foreachinpath to do a wall check for targets beyond the initially selected tile. - Corrected Kamaitachi's range to be 9, and the path range to be 4+SkillLv git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11169 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-09- Modified bonus3 bAddEff/bAddEffWhenHit so that the last parameter is now ↵skotlex1-12/+11
passed directly as "trigger" flag. The possible trigger values are ATF_LONG, ATF_SHORT, ATF_TARGET, ATF_SELF. Explanation added to doc/item_bonus.txt - Updated some cards to use the new format of bonus3 bAddEff* git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11157 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-04- bonus3 autospell (and autospell when hit) will now select for spell target ↵skotlex1-2/+6
self when the skill is tagged a support skill. - Increased the amount of autospells that can be held at a time from 10 to 15 - Updated several item scripts to use bonus3 autospells rather than bonus4 ones. - Changed the "autocasted strip skills don't have a duration" to apply only to Full Strip. - Cleaned up some the Signum Crucis code. - Added initialization of hp_loss/sp_loss/hp_regen/sp_regen which somehow was not commited before. - Magic Mirror's duration now is reduced /15 when used on players. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11124 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-04- Removed usage of MAX_PC_BONUS all over the code, it is now only used in ↵skotlex1-102/+83
map.h (this is done so that individual bonuses can have their array length modified without having to change all the other bonuses as well). - Removed bonus bAddDamageByClass since it is not needed, and implemented bAddDefClass which can be used for the same (but previously was doing nothing). - Cleaned up the weapon_data structure to use a sub-structure to hold the add_dmg information. - Cleaned up some of the add dmg/def bonuses so the 'count' variable is not needed anymore. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11121 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03- Made regen work always, like Hp/Sp Loss, it no longer displays healing ↵skotlex1-4/+4
numbers as well. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11118 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03fixed && -> || typo in r11113 ...ultramage1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11115 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03Fixed a copy-paste typo in r11112.ultramage1-4/+4
Applied the useful ARR_FIND() macro to 4 item bonuses. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11113 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03- Added bonuses bSPRegenRate, bHPRegenRate. They behave like the opposite of ↵skotlex1-39/+95
bHPLossRate/bSPLossRate, making you gain x Hp/Sp every y ms. - Added bonus bIgnoreMdefRate, used to ignore a % of the target's mdef when using magic attacks (bonus2 will ignore part of the mdef of all targets, bonus3 receives a race argument) - You can now use bonus2 bCastRate to adjust the cast rate of a single skill. - Cleaned the code for bleeding (hp-loss) and extended it to handle regen as well. - Some small cleanups in the pc_bonus functions - Removed bonus3 bHpLossRate since it was doing nothing and is not used. - Corrected bGetZeny bonus to be like in Aegis. The amount received is from 1 to the given amount, you can use negative zeny values to use an amount dependant on mob's level (amount*lv). - Updated doc/item_bonus.txt with all these changes - Anti-Magic/Stone-Skin now increase/decrease def/mdef only and in an absolute mode (+20*lv rather than +20%*lv). Also the duration is greatly decreased (x/15) when used on players. - Now when a player uses a strip skill without having it in the skill tree (auto-casted) the duration will be 0, the equipment will be stripped without causing the status change that blocks reequipping. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11112 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03- Merged @whereis from my server (displays normal spawn maps for given ↵skotlex1-2/+2
mobs). This command should be working correctly considering I've been using it since July. I was meant to merge it as soon as I got my hard-drive back, but I kinda forgot @_@ - bonus3 autospell (and autospell when hit) will change the target to self when the skill to be casted is inf&4 (self skill). - Corrected script homevolution not making the homunculus /swt if it is invoked when not loyal. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11110 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-29- oops, fixed bSkillHeal raising bSkillAtk insteadskotlex1-7/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11086 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-29- Added bonus bSkillHeal to distinguish offensive skill damage increases ↵skotlex1-3/+41
from healing power boosts. - Moved battle_skillatk_bonus to pc.c, cleaned up the related skillatk bonus code to consider the skillheal bonus option. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11085 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19Fixed a gcc compilation error and some warnings.ultramage1-0/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11046 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19* Cleaned/clarified some #include relationships between headersultramage1-28/+25
* Changed clif_sitting() to use 'bl' instead of 'sd' (for non-player objects) * Removed way messed-up script function 'unitdeadsit' * Tagged 'FIXME' lines written by myself git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19- Cleaned up some the pet armor display code.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11034 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-14- Modified map_foreachinrange so that you can also specify the max length of ↵skotlex1-0/+7
the path to use. The max_count field in the skill_db is used to specify this range for path-type skills (Sharpshooting, Kamaitachi and the NPC Breath skills. - Implemented the 'new' NPC skills described here: http://ro.doddlercon.com/wiki/index.php?title=Monster_Skills . It is mostly complete, but the new status changes (slow cast, critical wounds, etc) don't have any visual effects yet (icon or opt changes? I don't know if they should have). Also I could not find the unit_id for Evil Land, so it looks just like Sanctuary for now. Apart from those, the only skills which I couldn't get to display properly are the Breath skills (with the exception of Fire Breath). - skill_calc_heal now takes the target as argument to properly support Critical Wounds - battle_calc_return_damage now takes a flag to know if the attack was direct or not, needed since Magic Mirror also reflects indirect attacks. - cleaned up the 'description' field in skill.c, added skill_get_desc to it - Removed 'splash' support from Lex Divina as it is no longer needed. - Modified the way Sight/Sightblaster work so that the skill id is no longer guessed (needed to properly acquire the splash range for Wide Sight) - Corrected gtb_sc_immunity setting not taking effect if your block value was the same (that is, if the config said 30%, then you would only get status change immunity at 31%, nor 30%) - Uncommented the 'new' npc skills from mob_skill_db as they are implemented now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-09- stable -> trunk syncultramage1-222/+98
- battle.c and pc.c formatting - fixed one badly defined npc shop format string - removed the "selling item for no buying price" warning when the item has a buying price of 20 (see topic:157465) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10971 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-31Renamed menuskill_lv -> Renamed menuskill_val, because people also used it ↵ultramage1-1/+1
to store stuff like map coords, inventory offsets and object IDs... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10937 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-27* Simplified exp gain equations (now more FPU-friendly and precise), also ↵ultramage1-11/+2
fixes the uninitialized variable problem * Corrected one exp calculation overflow (mainly affected high-rate pk servers) * Fixed Neuralizer item script typo git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10921 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-08* Fixed typo in 'deletearray' messing up the script engineultramage1-2/+8
* Added a check to pc_skill() to prevent crashes on unknown skill ids git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10868 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01Cleaned up some parts of the code.ultramage1-4/+3
Removed obsolete script function 'hasitems'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-22* Changed behavior of some guild-related code (according to X.4 tests):ultramage1-3/+4
- removed code that prevented Homunculus Resurrection during WoE - logging in doesn't activate the 5 minute guild skill block anymore - non-Urgent guild skills can now only be cast on WoE grounds during WoE - all guild skills now have no cast delay (previously was 1 second) - casting guild skills will now block FreeCast sages from walking - Battle Orders and Regeneration are now instacast - Restoration now has a 10 second cast time, reducible only by dex - Urgent Call's cast cannot be reduced anymore (not even by items) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10807 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-04- Fixed the compilation problem from r10668ultramage1-32/+22
- Cleaned up the duel code a bit git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10692 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-03- Fixed missing client update when 'return to savepoint' failsultramage1-8/+11
- Fixed a bad copy-paste from r10028 letting players escape jail (char was dead on login, so statuses (SC_JAILED) couln't be applied) - Added clif_standing() to clif_sitting(), and used them in clif.c - Cleaned up clif.c a bit - clif_clearchar->clif_clearunit_area, clif_clearchar_id->clif_clearunit_single git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-27Cleaned up a hack from r10112 (forward declaration does the trick)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10633 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25Corrected some weird fgets() statements, plus reformatted themultramage1-5/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-23- Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast ↵ultramage1-2/+2
time and delay reducibility by item scripts (cards and such) - Fixed Martyr's Reckoning never triggering for gms with all skills - Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter - Made gm_skill_unconditional bypass skill blocking (guild timer, etc) - Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059) - Changed a few memsets to strncpy (reading past buffer is a bad idea) - Sped up some memset operations (multiples of 4 are faster) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-21- Removed the TURBO socket mechanism - it was in fact just using a variable ↵ultramage1-1/+0
to cache a few arithmetic operations (premature optimization) - Since the fifohead mess is gone, fixed leftover bad code structuring git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10599 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19Reformatting @_@ultramage1-237/+176
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-05- imported the latest working grfio code from stableultramage1-1/+1
- re-added usage of managed allocation routines in grfio - eol-styled some new files - some cosmetic fixes here and there git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10468 54d463be-8e91-2dee-dedb-b68131a5f0ec