summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2007-03-26- Fixed # commands not being blocked when muted if the mute config settings ↵skotlex1-14/+18
say you should be. - Moved skill db reading before loading mobs so that the new mob condition checks work. - Cleaned up the warning/errors of the mob skill reading function. They are now warnings if the skill is read anyway (default conditions are used) and an error when the skill is not loaded. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10075 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-26- Cleaned up some the mob skill use code. The skill re-use delay is set at ↵skotlex1-81/+93
the time the skill is used rather than when it finishes casting. The invalid target check was also moved to the mob skill db reading function. - Skills can be used now when the autoskill menu is open (since there's no packet sent by the client when you hit on cancel) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10074 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-20- getpetinfo 5 will now return the pet's rename flag.skotlex1-1/+2
- Autoloot will now only work on items dropped a certain distance from the player. The distance is defined by AUTOLOOT_DISTANCE in atcommand.h and defaults to AREA_SIZE. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10039 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-13- @pvpoff and @gvgoff will make everyone in the map stop auto-attacking now.skotlex1-2/+3
- when @killer is deactivated the issuer will stop attacking. - when @killable is deactivated, everyone around the user who is attacking the issuer will stop. - Cleaned up some the code for dispell. It no longer removes food boosts. - Players will stop attacking when they change their look. - Applied Alydis's fix to the mvp item logs logging mvp items even if the player couldn't get the item. - Changed the default of debuff_on_logout to 1 since food items shouldn't dispell on logout. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-11- Added player not attached crash prevention to countitem/countitem2skotlex1-2/+2
- Probably corrected delitem not deleting pet eggs at all. - Possibly nullpo fix on npcskilleffect - Corrected a warning when using #fakename - Hopefully fixed hidenpc/disablenpc not working on Guild flag sprites. - Mob skill state "anytarget" no longer triggers when the mob has an item-target (looting). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9991 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-09- Added info on packet 0x86 (simple move packet). Not usable until a clear ↵FlavioJS1-3/+3
separation between entering sight/leaving sight/walking in sight is done. - Propagating const char* from the script engine. - ".gat" is appended to the map name before sending the changemapserver packet to the client. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-26- NPC_AGIUP now boosts flee by 100% and duration is 5+5*lv secs, as stated ↵skotlex1-4/+7
on the Ragnarok Bible. - Fixed Soul Breaker's misc part not ignoring flee. - Fixed misc attack's flee check being backwards (the less hit%, the more chance you had to connect) - Corrected the range check in vending.c (TRADE_DISTANCE -> AREA_SIZE) - Added define DEFAULT_ENEMY_TYPE in mob.c to simplify the enemy bl check (for easier reading/customization) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9922 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-23- Fixed the mob_override_name setting not working on summoned mobs.skotlex1-1/+7
- The server now prints an error message when it the produce_db reaches the max number of allowed produce recipes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9907 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-16- Modified the "guardian" spawn script command, it no longer receives a ↵skotlex1-35/+40
"amount" argument (since that only leads to trouble), if the class is negative, it'll pick a random class the same way the monster spawn script command does, and if you pass a spawn position with coordinates equal or less to 0, a random spot in the map will be taken. However you can't use "this" as a map name anymore since these script commands do not need an attached player. - Guardian spawning will now fail if you attempt to spawn a guardian that already exists on the same position. - Collapsed clif_party_main_info and clif_party_join_info into a single function: clif_party_member_info - Collapsed config settings "sg_miracle_skill_min_duration" and "sg_miracle_skill_max_duration" into "sg_miracle_skill_duration", which defaults to an hour. - Miracle of the Sun, Moon and Stars can now retrigger to lenghten it's effect, and it is cancelled on warp/map-change. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9871 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-15- Cleaned up clif_party_info a bitultramage1-10/+14
- Reverted some of my mobdb code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9870 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-08- Spider web can again be recasted on target.skotlex1-18/+25
- Modified Spider Web so it can instantly retrap a target, rather than idling on the ground waiting for a new target. - Cleaned up some the rude-attacked code, being attacked while under spider web now triggers rude-attacked. - Sped up the FrostJoke/Scream message length chat check. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9828 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06- Cleaned up homunc attack request parsing. Homunculus no longer goes into ↵skotlex1-1/+3
auto-attack (ctrl+click) mode since the client does every attack request individually. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9805 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06- Fixed char-server not sending party status update when a member logs on/offskotlex1-1/+1
- Fixed crash when parsing guild member information change from the char-server when the specified character is not found in the guild. - Fixed MvP mobs giving exp when killed even if they shouldn't git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9802 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06- Fixed @lvup, #lvup not doing a stat reset and lowering your status points ↵skotlex1-2/+2
if you had 0 status points at that time. - Fixed MvP exp and item rewards being given even when the mob_dead flag specifies you should not receive exp or items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9795 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-05- Fixed a duplicate warp name in Rachelskotlex1-2/+2
- Fixed Venom Splasher not being Poison elemental - Cleaned up #blv - Fixed the skill tree not always updating when using @allskill - Probably fixed the target-change on melee attack setting not working. - Moved the deletion of the invincible timer when using skills so that it is not deleted for skills such as Ashura (when just selecting a target) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9791 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-02- Resetting skills will now automatically remove peco, falcon, cart and ↵skotlex1-0/+1
homunculus (vaporize). - Fixed random mob picking choosing clones. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9780 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-01- Added support for mob skill target 'randomtarget', when specified, it will ↵skotlex1-0/+9
pick a random enemy from within the skill's cast range. - Updated the mob_db so that all skills from non-moving mobs that specified 'target' as enemy will use 'randomtarget' instead. - Amon Ra's meteors now use randomtarget instead of self. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9762 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-30- 'Long Range Attacked' mob skill conditions will no longer trigger on magic ↵skotlex1-1/+1
attacks. - Changed the element of Blood Drain from 'take weapon's element' to Dark. And Blood Drain/Energy Drain have a range of 7 now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9747 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-29- Corrected the homunculus deletion functions so that the homunculus is ↵skotlex1-2/+2
deleted together with the character. - Added npc_check_areanpc so that Wand of Hermod will correctly check for nearby warps. - Emergency avoid now stacks with other speed boost statuses - Item skills and skills that bring up a menu now are cleared on death. - Minor cleanings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9742 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-28Some misc cleanups (typos, formatting, forgotten changelog entry etc)ultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9733 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-16- Added function unit_escape to simplify the run-away code a bit in the mob ai.skotlex1-14/+12
- Some cleaning on the mob_ai to enable mobs to run away from their current target when they are rude-attacked by them. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-15- The NPC elemental attacks will display a skill animation again.skotlex1-2/+2
- Mob instant cast skills will use their adelay now. - Spirit of Wizard won't work on Ganbantein - The pc normalize job function will consider you as novice if you don't have maxed out basic skill. - Cleaned up pc_calc_skilltree and related functions so that the id is left as 0 when you can't raise the skill even if you meet the prerequisites. This is to prevent raising quest/soul/marriage skills through packets. - Slaves should lock unto their master's target even if they are not attacking yet (eg: in chase mode) - Updated the Summon Slave skill to use the slave distance define as valid distance to spawn from master. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9656 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-15- Fixed Joint Beat's speed penalty.skotlex1-1/+2
- Added a pc_authok check to prevent the case in which somehow another character of the same account manages to log in as well. - The pc normalize job function will now recognize you as a novice if you don't have NV_BASIC maxed. - Accessories will now by default go into the rigth-side rather than the left-side of the equip window. - Added a check in the mob_ai_subhard function to make mobs unlock targets which have their invincible timer set. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9655 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-12Disambiguationultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9645 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-10Combined most of the txt/sql mobdb reading codeultramage1-532/+277
- mob.c is now some 10kB less redundant (now using a common function) - automatically filled in some missing parts of the txt part (view_range_rate, chase_range_rate, line counting, etc) - also cleaned it up significantly git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9640 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-07Undid the memset->malloc_set replacementultramage1-21/+21
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9626 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-26- Cleaned up some more the code so it works for -DTURBOskotlex1-7/+12
- Cleaned the pvpoff @ and script commands. - mob_get_random_id now has two additional flags to specify that the monster to acquire should not be a boss type (4) or that it should give exp (8). - TK_MISSION will now pick any mob from the DB as long as it is not a boss type and it gives base exp. - Fixed the double-stone issue when hitting a petrified character. - Minor cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9573 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-23- Moved "#include <limits.h>" to cbasetypes.h to ensure it's included before ↵FlavioJS1-1/+1
checking if UINT_MAX has been defined. - Minor changes in pc_readdb related to max_level being unsigned. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9561 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-21- Added back cropping the attack delay to attack motion for those weird mobs ↵skotlex1-0/+6
that have a aDelay less than their aMotion time. - Made the Note 4 comment clearer in the battle config files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9548 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-19- Reverted the mob ThinkTime update, that field is again aDelay as it ↵skotlex1-16/+6
apparently should be. - Fixed one small compilation error. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9522 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-18- Added hom_setting to specify which homunculus 'quirks' are in effect. The ↵skotlex1-1/+2
default activates all of them, if you set them to 0 then homuncs will not be treated in any special matter, pretty much like standard mobs. if I missed any 'quirky' homunc behaviour from it, report it so it can be added to the list. - Made flooritem_lifetime a int so you can specify much longer life times (the default of 60k was already very close to the max of 65k) - Removed monster_ai 0x80 since it's now handled by hom_setting. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9519 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12- Mobs now by default are "everyone's" enemy, so mobs are able to hit each ↵skotlex1-9/+11
another. - Added monster_ai&0x400 to use the previous 'smart' criteria that prevents mobs from fighting each another. - Moved "unsetting" the angry mode from the mob_ai to the mob_damage function, where it'll work regardless of who hits the mob. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9481 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-08- Fixed crash when looters became full.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9437 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-08- Moved attackedcount to md->state and made it an unsigned char.skotlex1-28/+16
- Autospell delay time is now the skill's full delay. - Removed variable attackedplayers, since Aegis is state driven, the best approximation to Aegis would be to use the last player that hit the mob. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-07- Cleaned up implementation of NPC_EMOTION/NPC_EMOTION_ON. Now val0 is the ↵skotlex1-5/+21
emotion, val1 sets the mode, val2 adds to the mode, val3 removes from the mode. val4 asks to remove the previous mode change. - Updated the mob skill reading code so it accepts hexadecimals in the 'val' fields. Also, it will optimize the NPC values so that when you set a mob's mode to their db mode, it will just remove the previous mode. - NPC_EMOTION_ON will now automatically move it's new mode to val2 since it should add a mode, and if this mode doesn't has the aggressive bit, it will remove it. See this "ancient" hypothesis on how NPC_EMOTION_ON should work for the details: http://www.eathena.ws/board/index.php?showtopic=63606 - Updated mob_skill_db to account for the updated mob modes on NPC_EMOTION skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9433 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06- Gave a minimum think time to the dummy mob and to clones.skotlex1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9423 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06- Cleaned up the implementation of map_foreachinmovearea so that the number ↵skotlex1-117/+116
of arguments passed is less. - Moved setting a mob's chase/attack states from the mob_ai to unit_attack and unit_walktobl. - Cleaned the change-target/cast-sensor code to account for the new mob modes. - Cleaned up a bit the mob ai sub hard function. - Made the monster_active_enable config setting take effect on mob load. - Updated the doc explaining mob modes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9422 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04- Oops, fixed sql compile error.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9407 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04- Fixed HVAN_INSTRUCT int bonuses.skotlex1-104/+108
- Renamed mob_db's "adelay" column to ThinkTime and made the mob.c code use it instead of MIN_MOBTHINKTIME. The adelay of mobs will also be equal to their thinktime unless their thinktime is less than their attack motion. - Cleaned the mob_db reading code a bit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9406 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04- Repairing items via scripts no longer displays "item has been repaired"skotlex1-1/+2
- Status Recovery again makes mobs unlock their current target. - Moved requesting party/guilds from the char-server from pc_authok to pc_reg_received, since map_nick2sd and map_getallsd won't work until the characters are authentified. Also removed the guild master setting from clif_parse_LoadEndAck to pc_reg_received since guild master setting will work there. - Fixed homun hunger timer being started on login even when hom is vaporized/dead. - Fixed mvp exp attacker bonus applying incorrectly. - Removed duplicate msg_athena.conf entries 619 and 620 for Ninja/Gunslinger. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9401 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-03- Fixed even share exp flutuating as described in:FlavioJS1-2/+1
http://www.eathena.ws/board/index.php?showtopic=126139 thanks to TheUltraMague for the fix. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9397 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-02- Fixed passive mobs becoming increasingly unlikely to retaliate to attacks ↵skotlex1-1/+1
after they got inflicted by a disabling status change. - Changed the "is_boss" define to check for mode MD_BOSS instead of giving mvp exp. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9384 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29- HT_PHANTASMIC no longer knocks back even when it misses.skotlex1-14/+20
- Earned exp by dead homuns will now be lost (same treatment as earned exp from players that died) - Some minor cleaning in mob_dead git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9361 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-28- Modified the way Storm Gust freeze's counter works. Now it checks for the ↵skotlex1-2/+2
caster of the Storm Gust, if it's the same as the previous hit, the counter is increased, otherwise, the ID is updated and the counter is changed to 1. - Fixed always receiving at least 1 bexp/jexp even when the mob gives no exp at all. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9345 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-27- Fixed clif.c dumping unknown packets by default... (oops, used an #ifdef ↵skotlex1-1/+1
where an #if had to go) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9335 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-27- Corrected KiriKage's range so it works correctly when used by non-players ↵skotlex1-0/+3
or when use weapon's range is used. - Changed service for you's flags so it affects all players on range. - Corrected the skill animation for Absorb Spirits - Cleaned up a bit the implementation of how Gravity Field blocks the caster from moving. - Mob class-changing will fail if the new class is the same as the previous one. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9325 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24- Added all the missing FIFOHEADs in the login/sql servers (required for ↵skotlex1-1/+1
TURBO support) - Fixed the fact that the TURBO code breaks when you attempt to handle more than one connection at a time within the same function. However this broke map-server compilation, therefore, don't use TURBO yet! It needs more fixing (and I need more time to fix it) - While at it, cleaned a few packet implementations in the char/login servers which were not only ugly, but had some really stupid flaws within (stuff like escaping a string, and then using the non-escaped variable to insert to SQL? T_T) And will someone explain me why the TXT servers are coded much more cleanly, and without such horribly broken code as I find in the SQL ones? T_T; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9307 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-22- Modified slaves_inherit_speed and slaves_inherit_mode so you get better ↵skotlex1-21/+28
control of when to copy/remove modes/speed. - Reenabled usage of mode MD_CHANGETARGET, so mobs with mode 0x200 will be able to switch targets while attacking. - Simplified some more the chase-changetarget function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9294 54d463be-8e91-2dee-dedb-b68131a5f0ec