summaryrefslogtreecommitdiff
path: root/src/map/pet.c
AgeCommit message (Collapse)AuthorFilesLines
2010-10-09Replaced all nullpo_retr() calls which returned 0 with nullpo_ret() calls.Paradox924X1-8/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14414 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-19- Implemented usage of packets 0x7fa and 0x7f7, 0x7f8, 0x7f9. These are used ↵Skotlex1-3/+3
for proper deletion of items as well as movement/spawn packets for Renewal clients. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14383 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-03- Merged a few minor bugfixesSkotlex1-3/+1
- Merged in a bunch of the eA renewal support patch. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14368 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-09-13* Progressbar aborts when player is attacked.Inkfish1-1/+1
* Do not stand if damage is from yourself or has no source.(bugreport:3582) * Any mobs killed by party members within view range are taken into account in questlog. * 'unit_walktobl' now uses at least 1 as the range since 'unit_can_reach_bl' always sets the target coordinates 1 cell away from the target block. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14057 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-25- Implemented new Pet Bonus System. Enjoy!! :Dzephyrus1-55/+124
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13491 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-22* Hunted down the simpler 64bit pointer truncations.FlavioJS1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13380 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-25- Fixed crash on Pet hatch. Resorted the way a Pet is initialized. (Bug ↵zephyrus1-14/+14
Report 2121) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13134 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-24- Implemented unit_calc_pos (copy from pet_calc_pos) to implement it on ↵zephyrus1-55/+2
Mercenary/Homunculus and don't use x,y-1 always. - Implemented Mercenary walk to master (same packet as Homunculus). - Starting work on Stats but i will need lot of help. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13121 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26Replaced occurences of '-1' with the more appropriate 'INVALID_TIMER' value ↵ultramage1-7/+7
where appropriate. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12998 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-14* Corrected compiler warning and error made from r12959 and r12953, ↵sketchyphoenix1-0/+1
respectively. [SketchyPhoenix] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12954 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-13added missing pick_logLupus1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12952 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-02Replaced the very ineffective clif_foreachclient() with map_foreachpc() ↵ultramage1-1/+1
since they essentially do the same thing (bugreport:1174). Rewrote map_foreachpc() so that its callback function signature now uses a more natural 'sd' instead of a DBKey/void* pair. Rewrote atcommand_users() to use a single function, instead of depending on two helper functions and global objects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12683 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-01Replaced the integers+checking approach in r12679 with usage of floating ↵ultramage1-5/+5
point arithmetic. Applied search&replace to use the new name of the function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12680 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-01Implemented get_percentage() for compact and safe calculation of percentual ↵ultramage1-6/+6
values. Fixed integer arithmetic overflows that were occuring in several supernovice checks (bugreport:1135). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12679 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21* Changed the data field of timers from int to intptr.FlavioJS1-7/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12633 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-04- Updated firepillar so it cannot be placed on top of others.skotlex1-1/+1
- Updated the firepillar code so it behaves like the other traps. - Changed the default format for @me and @main to avoid crashes on the newer clients. - Fixed the char-sql server so it returns a valid 'not found' packet when attempting to load a non-existing homunculus. - Fixed jump to use 0,0 for random coordinates rather than -1,-1 - Added missing \n to error reporting in getmonsterinfo - Additional status changes now only get triggered if the attack did damage, not if they get absorbed. - Fixed a logical comparison in unit_free to properly remove pets/homuncs when their intimacy is reduced to 0. - Properly set the opt3 value for Moonlight, Changeundead and Soul Link - Fixed the "no equip" flag of cards not being properly applied when attemting to equip items. - Added a check to avoid invoking pet menu entries when the pet is incuvated. - Fixed the session_data de-association in chrif_auth_delete - Cleaned chrif_auth_ok so that the latest received char info is kept when previous char login data was already in there. - Corrected docs mentioning non-existing flag 'mf_nopvp' git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12293 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-27Fixed @reloadmobdb producing memory leaks in pet db (bugreport:1030)ultramage1-2/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12250 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-21- Added status_calc_life to properly calculate hp/max_hp as a ratio taking ↵skotlex1-5/+6
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
2007-12-26Moved distance-related functions to path.c/hultramage1-0/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11981 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-22- Changed the status_change structure to use dynamic rather than static ↵skotlex1-1/+1
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-1/+0
- Fixed some compilation warnings. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11772 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-17Removed battle_config.error_log as console_silent already handles thisultramage1-21/+11
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11751 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-31Commented out msg_athena.conf strings disabled in r11625.ultramage1-1/+2
Reverted changes in r11625 that used enum sc_type where it shouldn't have been used. Removed leftover npc/other/arena.txt. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11627 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27Removed 'petid', a command from r284 to look up pet ids by name.ultramage1-43/+37
Cleaned up some pet-related code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11586 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-08* Delayed the check for required items when a skill is cast to when they are ↵FlavioJS1-1/+1
consumed. Now skills only fail due to lack of items after being cast. - Please make a bug report if you know of any skill that doesn't work like this in official. * Fixed hp of other party members not being sent when you join a party. * Removed unused global array names_id and renamed some structures that are used with variables of the same name. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11384 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-24- Changed Greed Scroll's type to 11 (all itemskill items should use this)skotlex1-1/+1
- Ignore %MDef bonuses now only reduce target's base MDEF, not MDEF2. - Updated the 'skills that cause no damage are blocked now if the skill element is blocked by the target' to only apply if the skill has a status change associated (fixes Resurrection/Heal being blocked). - Reverted the opt_flag2 change in status_change_start (clif_changeoption2) since it never served its purpose. - Added a warning to prevent loading mobs with IDs that belong to the clone range. - Changed MAX_MOB_DB to 3000, updated the definitions of the clone range defines so they are updated automatically with the change of MAX_MOB_DB. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11287 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-23* map_addflooritem and struct item_drop_list using id's instead of struct ↵FlavioJS1-7/+7
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-0/+1
- 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-15Getting some (mostly atcommand) code cleaning out of the way...ultramage1-5/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11222 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19* Cleaned/clarified some #include relationships between headersultramage1-5/+6
* 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-13/+13
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11034 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-30* Corrected pet taming code; items are consumed immediately and only 1xultramage1-35/+13
- TODO: add proper code for people who want delayed consumption git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10930 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-11- Fixed pet equip not displaying correctly at all (closes topic:153753)ultramage1-8/+8
- Removed old fixpos packet (the 'new' one is way smaller) - Fixed some major logical typos in the code, cleaned up many places git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10746 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25Corrected some weird fgets() statements, plus reformatted themultramage1-2/+2
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-3/+3
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-19Reformatting @_@ultramage1-14/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-27- Moved the pet rename code from int_pet.c to inter.c and normalized it so ↵skotlex1-9/+15
it can be used for any object. - Made homunculus renaming go through the char-server so it can be validated against the allowed characters setting. - Added battle config hom_rename so you can enable renaming multiple times your homunc. - Updated the hardcoded defaults for gvg-damage to what they should be. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9720 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-21Typo huntultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9684 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-07Undid the memset->malloc_set replacementultramage1-6/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9626 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-22- Change strncpy to memcpy when parsing switches in the script engine since ↵FlavioJS1-1/+1
it's guaranteed to be a word of that size (skip_word). - Made scriptlabel_db duplicate the key. When str_buf is reallocated, the keys in scriptlabel_db could become invalid, causing a crash in npc_convertlabel_db. ( removed the readded >=0x81 equivalent ) - Now npc_convertlabel_db clears scriptlabel_db after using it. - parse_script has an extra parameter options. At the moment it only indicates if scriptlabel_db should be used or not. - Fixed "UINT_MAX undeclared" on systems that don't declare it in limits.h git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9557 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12- Minor changes to ers.FlavioJS1-2/+2
- Removed unused/hardly used cbasetypes typedefs. - Updated txt-converter's makefile to include utils.o git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9473 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05- Massive EOL normalization & 'svn:eol-style native' flag setting for all ↵FlavioJS1-1400/+1400
txt/conf/h/c files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-22- Fixed the Auto-Berserk giving you back defense when it triggers during ↵skotlex1-10/+18
berserk's HP penalty. - Some small changes in the pet ai to make it more responsive. - Rewrote the pet looting behaviour (taken from the mob's), pets are much more smarter now when looting from multiple possible items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9291 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-20- Fixed itemskill variable being cleared before parsing the skill, this ↵skotlex1-7/+8
causes auto-casted teleport to fail to skip the skill menu. It is now cleared on castend_pos/id directly. - The item skill/lv variables now use 0 as default to signal they aren't being used (instead of -1) - Skills with state 'move_enable' will now do a "walk path" check between target cell/object and caster instead of a "shoot path" check, this would fix skills like snap or charge from letting you "teleport" across pits. - Fixed a possible double map_addblock when hatching a pet egg right before going through a warp. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-14- Corrected Smokie's pet script to use petskillbonus instead of "bonus"skotlex1-10/+11
- Added constant map_flag_gvg2 which tags gvg maps independently of whether woe is on or off. - battle_calc_gvg_damage will be invoked in gvg maps regardless of woe time. - NPC_MENTALBREAKER now zaps matk*lv SP based on observations by Tharis. - md->class_ will be changed on mob-class-change to fix all class-change related bugs. On respawn, the spawn data will be used to revert to the original class. - Improved the pet skillbonus timer for "eternal bonuses" cases where the bonus delay is 0. - Adjusted gvg long damage rate to 80%, magic damage rate to 60% git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8748 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-02- Corrected script_commands description of getequipid, it returns -1, not 0 ↵skotlex1-3/+7
on fail. - Fixed the mob-id check during pet_db loading, it will also now print when a pet is not loaded due to having an invalid mob class specified. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8587 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27* Optional macro MEMSET_TURBO for faster low-level memory initializations.Lance1-6/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-24- Reverted the previous change, changed the pet capture code to try to ↵skotlex1-8/+4
capture a mob based on their view class rather than actual class. - Changed various instances of md->db->lv for md->level, since the later is the actual mob level. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Little code cleanuptoms1-3/+0
- Cleaned merc_hom_evolution to avoid free'ing/realloc'ing - Fixed "args of aFree is freed pointer" on Homunc deletion git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8341 54d463be-8e91-2dee-dedb-b68131a5f0ec