summaryrefslogtreecommitdiff
path: root/src/map/pc.c
AgeCommit message (Collapse)AuthorFilesLines
2007-11-29- Allowed disguising while riding a peco-peco (this does not seem to cause ↵skotlex1-10/+14
problems anymore) - Adjusted pc_disguise to work properly if invoked while a player is not in a map. - The pvp rank packet is no longer sent to other players when disguised, as this leads to crashes when you die. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11842 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-29- Integrated the SG related info of hate_mob and feel_map into a single ↵skotlex1-22/+11
structure (sg_info). - Modified skill_blown and skill_attack so that reflected spells do not cause knockback. - SG Blessing skills now grant the extra experience to everyone when the SG killed the mob. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11840 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-28- Reverted the position of the max_hp/max_sp basic setting, modified the ↵skotlex1-12/+10
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-25Giant Fly Wings are now blocked on noteleport maps and duels.L0ne_W0lf1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11804 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-22- Changed the status_change structure to use dynamic rather than static ↵skotlex1-47/+50
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-20- Implemented SL_SUPERNOVICE erasing the death record 1% of the casts.skotlex1-18/+35
- Implemented current exp being capped to the exp required to level up from the previous level when we are at max level (required for some S. Novice buffs) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11764 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-17Removed battle_config.error_log as console_silent already handles thisultramage1-84/+43
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/+4
- 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 homunculus skill offset calculation mistakes (bugreport:363)ultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11731 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-12Added error reporting to buildin_warp when it fails.ultramage1-4/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11727 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-11- Added missing include npc.h to map.cskotlex1-2/+18
- Now when job changing to another class tree, status changes from skills that belong to your previous class are cleared. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11716 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-11- Cleaned up pc_calc_weapontypeskotlex1-19/+33
- made on-touch areas work with walking npcs. Note that the implementation is performance may not be optimal, but I am not sure if it can be done in any better way. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11713 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-09Replaced several 'int' variables with enums that they represent.ultramage1-16/+18
Expanded weapon_type enum with dual-wield constants (bugreport:384). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11704 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08- Added a new setting 'guild_skill_relog_delay' to activate the guild skills ↵zephyrus1-2/+2
delay on Guild Master relog. - The official setting is 'No', but this is an option for game masters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11699 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-31* Added names to the SC_ and SI_ enums, now they can be used to properly ↵ultramage1-29/+27
indicate where such values are to be used (replaces usage of 'int') * removed MIN_/MAX_PORTAL_MEMO, set MAX_MEMOPOINTS from 10 to 3 * removed support for @go-ing to your memo points * simplified the overly verbose @memo command; now re-uses pc_memo() * cleaned up pc_memo(), now uses semi-correct packet replies * Minor code cleaning/formatting git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11625 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-31- Fixed the pc_additem weight check breaking when your current weight is ↵skotlex1-1/+1
above your max. - Some minor cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11621 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-29Command code cleaning (refer to topic:169759)ultramage1-1/+1
* separated the execution part of command code into interface part and internal part to better see which checks are done and when (fixes problem where 'nocommand' mapflag blocked server npcs) * moved the internal commands list (array) to the end of the file, this let me discard that long block of ACMD_FUNC() declarations * removed enum AtCommandType from command headers and commands array; its purpose was perhaps to identify aliased commands, but apparently it was never finished because the rest of the code doesn't use it (also doing aliases like this is not a very good idea) * internally, commands are now referenced to using their function name * removed the @/# symbols from the command lists; all lookup functions will now properly deal with strings with- and without a command symbol (commands interface still requires the symbol tho', so TODO for later) * removed several unneeded commands (*id2 code, dmalloc debug commands) * reverted atcommand config from alphabetically-sorted to how it was before (with additional fixes; see /conf changelog) * added missing code for #dropall / #storeall * added a warning when trying to set gm level of an undefined command The structure of the commands table has changed, please adjust docs/guides to match the new format (sorry for the inconvenience). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11607 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-26Moved the new novending cell check from the internal code to the ↵ultramage1-2/+2
client-server interface (allows server to force-open shop if needed) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11580 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24- added defines JOB_MAX_BASIC and JOB_MAX to mmo.h so the code can know ↵skotlex1-34/+52
which are the max valid classes. - @/#jobchange no longer strip your equipment since pc_jobchange removes any unequippables already. - removed the wasteful define MAX_PC_CLASS and replaced it by the CLASS_COUNT define (which is automatically updated using the previous JOB_MAX* defines) + pc_class2idx function (which converts high class IDs into values that fit in CLASS_COUNT) - Made status_charge a function rather than a define to get rid of those warnings that have been there since forever. - Merged the CELL_NOVENDING code (see topic #129209) - Small check that disables the pet catching process if you try to use another item. - Added a check to fix a warning and prevent a crash in the npc duplicate check (even though I have no idea what this check is supposed to do, therefore I can't fix it properly other than to avoid the crash) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11572 54d463be-8e91-2dee-dedb-b68131a5f0ec
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