summaryrefslogtreecommitdiff
path: root/src/map/pc.h
AgeCommit message (Collapse)AuthorFilesLines
2007-11-09Replaced several 'int' variables with enums that they represent.ultramage1-6/+14
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-03Tried to make sense out of timer.c ... and failedultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11647 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-31* Added names to the SC_ and SI_ enums, now they can be used to properly ↵ultramage1-1/+1
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-26Moved the new novending cell check from the internal code to the ↵ultramage1-1/+1
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-3/+6
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-19- Added bonusautoscript and bonusautoscript2. These are used to attach a ↵skotlex1-0/+3
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-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-15Implemented new skill "Enlarge Weight Limit R", and increased MAX_SKILL_TREE ↵L0ne_W0lf1-2/+2
by 1. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11476 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-11Removed the check that prevented Warp Portal from opening after you picked ↵ultramage1-3/+2
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-09-29Renamed&moved macros clif_trading() and clif_cant_act() to pc.c since ↵ultramage1-17/+19
they're completely player-status related. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11331 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-28* Corrected Summer Outfit not included as a PC class. (Zephyrus_CR)L0ne_W0lf1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11326 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03- Made regen work always, like Hp/Sp Loss, it no longer displays healing ↵skotlex1-1/+1
numbers as well. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11118 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03- Added bonuses bSPRegenRate, bHPRegenRate. They behave like the opposite of ↵skotlex1-0/+1
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-08-29- Added bonus bSkillHeal to distinguish offensive skill damage increases ↵skotlex1-0/+3
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-19* Cleaned/clarified some #include relationships between headersultramage1-4/+7
* 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-16Added pc_isidle() to simplify a few idle-no-share checks.ultramage1-0/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11026 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-17- Expanded the autospell structure to hold a flag, which contains the ↵skotlex1-0/+1
required Battle Flag conditions required for a skill to trigger. - Added the required constants to const.txt to specify the autospell trigger properties. - Added bonus5 bAutoSpell/bAutoSpellWhenHit. The new parameter is used to specify when the spell should trigger (melee/range + weapon/magic/misc attack), see item_bonus for details. - Applied use of packet 0x28a (clif_changeoption2) to transmit opt3 changes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10278 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-21Applied a consistent look to all header files (copyright, ifdefs)ultramage1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-24- Made the pc_deleteinvincibletimer function a define so it auto-checks for ↵skotlex1-1/+3
the timer value. - Fixed a missing tab in the skill require info of TWILIGHT3 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9709 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-09- Changes to script buildin functions:FlavioJS1-4/+4
* functions checking if a player is attached as soon as possible. * functions that required a player attached and would crash if none was there terminate the script now. (others keep the current behaviour to maintain full backward compatibility) * removed the unused flag argument in guildskill. * bonus,bonus2,bonus3,bonus4 use the same function now (remains the same script-wise) * added an optional parameter to setcart,setfalcon,setriding so it's possible to remove the cart/falcon/mount or select a specific cart * other cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9636 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-31* Refer to http://www.eathena.ws/board/index.php?showtopic=130285FlavioJS1-3/+3
- Renamed pc_checkweighticon to pc_updateweightstatus and cleaned it. - Updated pc_is50overweight to use battle_config.natural_heal_weight_rate. - Added 90% weight check when attacking. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9600 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12- Removed CART_MASK as OPTION_CART can take care of that.skotlex1-4/+2
- Moved the OPTION_MASK define to status.h - Reverted the knockback implementation to use clif_slide instead of clif_fixpos git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9469 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05- Massive EOL normalization & 'svn:eol-style native' flag setting for all ↵FlavioJS1-318/+318
txt/conf/h/c files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-08- Moved the duel functions to pc.c since they are so totally out of place in ↵skotlex1-0/+9
atcommand.c - Fixed Spider Web not ending when hit by a fireelemental attack. - Cast-time reductions from status changes will not be executed until right before casting, to prevent status changes from ending when attempting to cast and the attempt fails (invalid cells, not enough sp, wrong target, etc, etc) - Added check to prevent Wand of Hermod from seeking for a partner to encore, since the partner is supposed to be the warp. - Moved the duel auto-reject on logout from map_quit to unit_free - Corrected the mob spawn reading code so that the event-name can be up to 50 characters long (which is the actual event length) and so that it can read spaces within them, it will also strip the leading/trailing quotes if you use them so that the event is actually found on mob-death (so you can do stuff like "My NPC::OnDead" as a valid event). - Moved the homunc inherit speed from the master from status_calc_pc to LoadEndAck, since the hom's speed matches that of the master each time the master changes maps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9173 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-25- Cleaned up some more the event dequeue code, it will no longer clear out ↵skotlex1-1/+0
the npc_id if there's no events waiting to be executed (why does it clears the npc_id anyway?) - Because of possible conflicts with this change and the on-login script, now the on-login script is executed when the player has finished loading into their start-up map rather than as soon as receiving the registry variables from the char-server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9073 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-19- Added the Monk combos to skill_castnodex so their delay is not decreased ↵skotlex1-1/+1
by skills. - Added the actual skill delay of 1000ms to Triple Attack and Chain combo in skill_cast_db. Added Combo Finish and TigerFist as well with a delay of 700ms. - Phantasmic arrow now knockbacks even if it misses. - Adjusted the way Monk combo times work. The combo time is now always 300ms (adjusted by combo_delay_rate) which takes effect inmediately AFTER your current skill's canact-delay (which is why the particular skill delays were moved to skillcast_db) - Modified skill_delayfix so it performs the can-act reduction from agi/dex for combos there. - Modified pc_steal_item so that it behaves more closely to the way it does on Aegis. - Commented out the monster_noteleport mapflag from the guild castles as this is the Aegis behaviour git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9012 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-12- Updated battle_switch to use strncmpi instead of strcmpi, it makes it so ↵skotlex1-0/+1
using "yessir" will match "yes", this is actually needed because if you set a config setting to "yes " (notice the trailing space), then the map config engine fails to read it right, and will set the config setting to 0 (no). - Added function pc_resethate to more easily handle Angel trigger - Made feel_var and hate_var static variables to pc.c to simplify things and avoid errors due to redundancy. - Updated the show_mob_info setting to add another space to the separating pipes, so that each field is separated by " | " instead of " |". git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8721 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-08- Cleaned up SG_HATE to use a new function, pc_set_hate_mob to handle setting.skotlex1-2/+3
- Updated pc_authok to initialize all mob_hate vars to -1 - Updated clif_hate_mob to receive the hate-type instead of skill-lv. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8680 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-21- Cleaned up some more the regen_data structure, so that skill/sitting-skill ↵skotlex1-3/+0
related data is optional (since only players have it). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Applied use of structure regen_data for a unified regen module. Natural ↵skotlex1-1/+5
and skill-heal is handled by this structure, while sitting-skill-heal is still player dependant (mostly because the other object types can't sit) - Added SCB_REGEN constant to identify status changes which alter regeneration - Modified SC_REGENERATION so that if val4 is set, the status actually blocks regen rather than increase it, this is what now Frenzy uses instead of "canregen_tick" - Cleaned up the status calc code for homun by moving it from status_calc_bl_sub_homun to status_calc_homun (where it should had always been) - Moved the Fleet watk code to status_calc_watk where it belongs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8334 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-08- Changed define EQP_WEAPON to specify only the right-hand weapon, added ↵skotlex1-1/+2
define EQP_ARMS to specify both arm-slots. - Some minor code cleanups to take account for the above, fixed Strip shield/weapon removing both. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8177 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-29- Added A_* constants to identify ammo types.skotlex1-0/+9
- Added Ishizu's code to check ammo type on attack. No more using Grenade rounds with Guns. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7959 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-20- Added pc_check_weapontype to do a proper skill weapon check that takes ↵skotlex1-0/+3
into account dual-wielding. That is, if a skill can be used with daggers/axes, you'll be able to use the skill when dual-wielding them. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7779 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06- Rewrote all the item restriction functions so that they will take into ↵skotlex1-1/+1
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-0/+37
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-06-30- Moved item group enumeration from itemdb.h to map.hskotlex1-1/+1
- 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-07- Added pc_calcexp to calculate individual exp bonuses acquired from exp's ↵skotlex1-1/+1
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-05-28- Added functions status_revive, pc_revive and mob_revive to handle revival ↵skotlex1-0/+1
(it doesn't handles player respawning, though) - Corrected alive, raisemap, raiseall to use these functions. - Updated resurrection/mob-kaizel to use status_revive - Added SC_BLADESTOP to the skill enum at the beginning of status.c (fixes Bladestop causing an unknown status change message) - Fixed MSS_DEAD state skills not triggering. - Corrected some compilation warnings on the merc.* files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6807 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-27- Added structure status_data which holds status-related information (str, ↵skotlex1-7/+5
agi, etc, speed, amotion, adelay, dmotion, weapon-damage, race, size, etc) and weapon_atk structure with the weapon specific info (atk, atk2, element) to be used by all combat structures (TODO: Homun needs to be updated to use it) - Cleaned up TBL_PC, TBL_MOB, TBL_PC and mob_db structures to use status_data. - Set the NPC-Change Attribute duration on Time1, updated their max to 1 in the db. - Berserk's HP cost interval is now defined as time2. - Split damage received functions into pc_damage/pc_dead and mob_damage/mob_dead - Rewrote the @heal related functions to use the new status_* healing functions. - Added status functions to deal with damage and healing (status_damage, status_heal, status_percent_change) and a bunch of defines for easier handling of them (status_percent_heal, status_percent_damage, status_fix_damage, status_kill, etc) - Splitted mob_once_spawn into two. mob_once_spawn_sub creates the mob instance without spawning it. - Added defines for Elements (ELE_*) - Modified battle_calc_(weapon/magic/misc)_attack to use the status data structure. - Rewrote and cleaned up battle_calc_misc_attack - Merged config options pc_attack_attr_none, mob_attack_attr_none, pet_attack_attr_none into attack_attr_none (type 4) - Removed config options player_defense_type, monster_defense_type, pet_defense_type in favor of weapon_defense_type - Cleaned up pet.c to stop invoking status_calc_pc when unnecessary - Modified skill_calc_heal to take into account the MEDITATION bonus. - Cleaned up code of Adjustment, Madness Cancel and other GS/NJ skills inside skill_check_condition - Added status change SC_MODECHANGE which handles mob state changes (this SC is continous until manually ended, eg: like Weight50) - Modified Slim Pitcher so it will work when casted by non-players. Will now also work with SP-healing items. - Rewrote Freedom of Cast code to use function status_freecast_switch to switch adelay/speed when cast begins/ends. - Modified Magic Power to store amplified MATK/MATK2 in val3/val4 for easier updating when used in conjunction with ground skills. - Fixed Asura Strike being usable from within a combo regardless of combo skill. - Modifed SC_DANCING to store speed-change in val3 (it is shared with skill duration...) - Added StatusChangeFlagTable to store which statuses are changed by each SC - Added SCB_* constants to specify the different stats that each sc changes. SCB_PC is the only one that means a change hardcoded in status_calc_pc, the rest are handled by status_calc_bl - Added some helper functions to simplify with basic status calculations (status_base_atk, status_calc_misc, status_base_pc_maxhp, status_base_pc_maxsp) - Added status_calc_mob which calculates initial status and special base status alterations (HP changes, stat changes due to big/small mobs, etc) - Made all the status_calc functions static. - Added status_calc_bl_sub_pc for PC related calculations that must happen after status-change adjustments. - Added status_calc_bl which does status-change related calculations using as base the base_status of the bl object and the SCB_* flag passed. - Added status_get_status_data and status_get_base_status to retrieve the bl objects current status_data and basic status_data (current never returns null, instead it returns a dummy structure with basic data) - The main switch in status_change_start now only sets the tick and val values, therefore it is skipped when loading (flag&4) - Cleaned up status_change_start and replaced many of the ex-japanese comments for english ones. - Changed Hiding to store the speed penalty on val3. val4 stores interval SP cost. - Changed Chase Walk to store Speed adjustment on val3, sp cost in val4 - Changed Cloaking to store speed penalty on val3, val4&2 signals wall-present, val4&1 is infinite cloaking. - Changed Wind walk to store speed bonus on val3 - Rewrote Marionette Control to store the status to add/substract in val3/val4, it now works on anyone (players/mobs) - Changed Improve concentration to store Card bonuses (which are not counted for total % increase) on val3/val4 - Changed SC_ADRENALINE, SC_CONCENTRATION, SC_ANGELUS, SC_IMPOSITIO, SC_MELTDOWN, SC_TRUESIGHT, SC_SUN_COMFORT, SC_MOON_COMFORT, SC_STAR_COMFORT, SC_QUAGMIRE, SC_GATLINGFEVER to store the bonus modifiers in their val values rather than calculate them in status_calc_* - Status_change_start/end will use clif_status_load rather than clif_status_change when related bl is not on a map. - Modified status_change_timer to use the status_charge function rather than directly substracting SP - Added SC_ELEMENTALCHANGE to modify someone's base defense element. - pc_clean_skilltree will now also remove item-granted skills. - Learning skills will now only invoke status_calc_pc when the skill is passive. - Cleaned up pc_steal_coin - Cleaned up pc_check_base/job_lvup to only invoke the lv-up related packets and functions ONCE regardless of skill-levls earned. - Cleaned up pc_ regen related functions. - Made player-sprite mobs have item pickup animation and walkdelay when taking items. - Cleaned up mob_dead code. - Removed paramb, parame from struct map_session_data, replaced them by param_bonus[6],param_equip[6] - mob special ai state 3 signals summon flora. - Moved petDB pet_hungry_timer vars from TBL_PC to TBL_PET - Cleaned up some pet functions, made the menu functions receive as argument both pet and master. - Clones will copy a player's base status rather than battle status (so status-change alterations are not cloned) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6791 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-26I'm still here!DracoRPG1-1/+1
Rewrote fame ranking lists git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6764 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-08- Increased max number of tries to find a random spot in maps to 1000 since ↵skotlex1-1/+1
some maps have so many non-walkable tiles it's hard to find one in just 100 tries. - Reduced Stun duration of multiple skills to 3 secs. Skills affected: Meteor Storm, Land Mine, Bash (fatal blow), Throw Stone, NPC_LICK, Raid, shield Charge, Cart Termination. - status_set_viewdata will remove the Wedding Option status when you set a class that is not wedding. - Removed the Job_Novice range check in pcdb_checkid since it's causing warnings when checking versus vd->class_ (and when will we use a negative value class anyway?) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6518 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-22- Added SC_KEEPING/SC_BARRIER to calc_flag in status_change_endskotlex1-8/+0
- Added Option constants for Carts, fixed OPTION_FLYING (it conflicts with OPTION_XMAS?) - Updated clif.c to check for OPTION_WEDDING|OPTION_XMAS instead of view class to block attacks and skill usage. - Removed struct pc_base_job and functions pc_calc_base_job/pc_calc_base_job2 which are no longer used anywhere (were long ago deprecated infavor of the new jobid system) - Cleaned up change-cart code. - Modified SC_XMAS to not change your view anymore and only set the proper option value (OPTION_XMAS) - Cleaned up the code regarding char_gm reading. - Changed the option field to unsigned short to make room for the higher values. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6229 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- skill_clear_unitgroup is now invoked in unit_remove_map only on death if ↵skotlex1-1/+1
the applicable battle setting is set. It is now also invoked in unit_free. - Changed setting clear_unit_ondeath to a type 4 (bl-based) which defaults to BL_ALL. - Fixed Absorb spirit sphere not working on mobs, thanks to Vividd. - Cleared the ud->target on pc_stop_attack to prevent attack resuming an other such oddities. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6145 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17- Added state.running to unit_data to make it easier to check for running ↵skotlex1-2/+0
characters (saves having to get the sc data and check for the corresponding timer all the time) - removed pc_run, pc_walktodir, replaced with unit_run. - moved the code that makes you walk that extra cell to unit_stop_walking, which is now invoked before resetting the walk-target. - Flag &2 in unit_stop_walking is now to make the character force-move that extra tile if the walkpath pos is 0 at hit time. - Added variable walk_count to unit_data to be use as a counter for cells walked for walk-triggered skills (walk path_pos is not good enough since it keeps resetting each time the walk path is updated) - Increased WALK_SKILL_INTERVAL to 5 (it is the closest value that makes the average mob trigger a chase skill every second) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6137 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05added missing weapon type, W_HUUMA(or kazema.. but huuma would be more.. ↵Vicious1-0/+1
correct) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5913 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05- Added a define list for weapon types in pc.hskotlex1-0/+26
- Cleaned up pc_checkallowskill and moved the Gatling fever check to it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5912 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01- Added structure view_data to handle sprite information for all characters ↵skotlex1-4/+4
(equipment, weapons, hair, dyes, etc). Unified a bunch of clif functions now that you only need to handle the view_data (so instead of clif_spawn[pc/mob/npc/pet] you just have clif_spawn) - Fixed the clif_change_class packet (it should check for non players classes, not a class above MAX_PC_CLASS), it fixes morphing enemies. - Rewrote the way cloth dye packets are resent to optimize bandwidth usage. - Fixed the npc_item_flag thing (enable_items/disable_items script command) - Rewrote the disguise implementation to be bandwidth friendly. - Modified the hide options to change your class to INVISIBLE_CLASS, since such classes don't even get their view packets sent around. - Rewrote several clif functions to adapt to the new view_data class; - Added class 139 to npcdb_checkid which was required by some npcs in the swordman quest? o.O git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5833 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22- Merged the unit_data structure from jA for handling unit-related data ↵skotlex1-9/+6
(attack times, walking, auto-attack timers, skill related data) - Modified unit_skillcastcancel to receive flag&2, which stands for "cancel casting only if current skill is cancellable" - Battle config options changed from yes/no to BL_TYPE settings: skillrange_by_distance, skill_noreiteration, skill_nofootset, gvg_traps_target_all, skill_log, attack_direction_change, auto_counter_type - Clif.c will disconnect sessions that send an unknown command packet above 0x30000 instead of just ignoring it. - Cleaned up/rewrite of the pet ai, same for pet_calc_pos - Implemented use of mob variable attacked_players as it is used on jA - Cleaned up error reporting during mob-skill loading to be less spamy with non-loaded mobs. - Corrected water_height reading. I forgot to give credits to LittleWolf for providing the water-reading function :X git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5707 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-20- Small fix to prevent killer/killable states from allowing you to target ↵skotlex1-2/+0
yourself. - Added Explosion Spirits to list of effects that dispel on logout. - Fixed handling of guild skills by pc_blockskill_start, renamed it to skill_blockpc_start as it needs some constants available only in skill.c - Fixed autoguard icon showing with stun. - Fixed splash area of Ganbantein - Fixed acid demonstration breaking shield instead of armor. - Fixed Slim Pitcher crashing server ocassionally. - Hopefully fixed Ankle Snare lasting the whole trap's duration - Added sc_start(SC_ENDURE) on infinite endure bonus. - Fixed Berserk Pitcher consuming required items twice. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5681 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-08-pc_jobid2mapid and pc_mapid2jobid now return int, and will return -1 when ↵skotlex1-2/+2
the class couldn't be deciphered. - pc_authok will change you to notice if your current class is invalid. - rewrote pc_jobchange to be much more simple and less of a hassle by using pc_jobid2mapid and pc_mapid2jobid as necessary. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5520 54d463be-8e91-2dee-dedb-b68131a5f0ec