summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2010-10-09Replaced all nullpo_retr() calls which returned 0 with nullpo_ret() calls.Paradox924X1-27/+27
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14414 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-22Follow up to r14392, forgot to remove the old snprintf.L0ne_W0lf1-1/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14393 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-22Mob chat now strips "#unique" names off monsters, curtosy of Daegaladh.L0ne_W0lf1-0/+4
Touched up the Airship scripts. Fixed up some content based on official files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14392 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-03- Merged a few minor bugfixesSkotlex1-2/+2
- 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
2010-06-10* Updated SC_ITEMBOOST to work similar to how it used to in r11351.L0ne_W0lf1-3/+4
- Will not boost drop rates past 90%, but ignores those already greater than. - Now uses val2 in the sc_start as the drop rate modifier, see item_db for example. * Corrected number of slots on several newer items. * Added HE Bubble Gum and adjusted existing gum bonuses. * Removed monster chat for porings npc_emotion skill use. * Updated several modes for monsters episode 13.1+ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14336 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-02* Corrected warnings (and errors on some compilers) from r14327.L0ne_W0lf1-2/+2
* Actually added Manul/Splendide shop files from r14327. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14329 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-06-01* Implemented the Manuk and Splendide item status effects, thanks to Epoque.L0ne_W0lf1-0/+4
* Implemented Manuk and Splendide consumable items. * Added Splendide and Manuk merchants. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14327 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-03-24* Implemented NPC_TALK (Credit to SnakeDrak and Daegaladh)L0ne_W0lf1-3/+129
- Also added in the ability to use '@npctalkc' as a GM command. - Added supporting information to the databases. - Sneaking in a fix to the Refined Ballista. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14270 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-21Adjusted the 'rare drop announce' code to only process if there's a valid ↵ultramage1-2/+2
mvp_sd. This eliminates "??? won item" announces that occured when there were no damagelog entries and the killer src was NULL. Examples include @killmonster use, and cases where a homunculus gets killed while attacking, and its delayed damage kills the target. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14249 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-062010/02/06Inkfish1-2/+2
* Added official packet to display received expirience. (info provided by papkil) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14240 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-24* Fixed the logged damage from pets doesn't count when ↵Inkfish1-13/+19
'pet_attack_exp_to_master' is inactive. * Uncommented the codes that stop pc_bleeding when dead (shouldn't have been commented out.....) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14166 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-08Fixed the flag from my last commit not workingInkfish1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14137 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-08Fixed mob is removed from map right after his rebirth.Inkfish1-3/+5
Fixed dead event does not trigger when a mob has rebirth skill and dies for the second time. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14136 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-03Extended broadcast implementation:Gepard1-2/+2
- support for font formatting, like font-size - `bc_woe` flag to allow client-side filtering of WoE announcements - new broadcast packet 0x40C git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14120 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-03* Added battle_config.mob_slave_keep_target config option (monster.conf)L0ne_W0lf1-2/+2
- When yes (default) MVP slaves will always keep their prior targets. - When no the old behavior of switching to the closest target is enabled. * Updated MAX_MOB_DB to 4000 (Monsters are starting to appear in the 2k ranges) * Changed default respawn time (when 0) to 500 from 5000. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14119 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-09-13* Progressbar aborts when player is attacked.Inkfish1-3/+5
* 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-07-28Corrected two mistakes when I was trying to do some tricks...Inkfish1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13974 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-28* Some more updates to Quest LogInkfish1-3/+3
- Implemented a new saving mechanism. Now they can be saved every 'autosave_time' in case the char-server is not online when you get a quest. - Improved 'changequest' code. - Increase MAX_QUEST_DB to 1200. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13973 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-25Rewrote Quest Log system.Inkfish1-0/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13959 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-18- Fixed the config description for 'random_monster_checklv' (follow up to ↵brianluau1-1/+1
r13952). (bugreport:3378) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13954 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-18* Dead branches no longer check for players' level. (bugreport:3378)Inkfish1-1/+1
* The Lovers Card won't teleport anyone on PVP/WoE/BG maps. (bugreport:3371) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13952 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-11* Some updates for range check. (bugreport:3339)Inkfish1-2/+4
- Monsters shouldn't use skills if the target is within its attack range but is out of the skill range. - Monsters' skill range is no longer 9 by default. - Range for players' attacks and skills should always check for a circular area. - The range of Magnetic Earth is 2. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13944 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-19* Implemented script command "areamobuseskill" and skill NPC_INVINCIBLE and ↵Inkfish1-2/+0
NPC_INVINCIBLEOFF. (topic:217330) * Using items no longer cancels invincibility(but using target and ground skills through items does). (bugreport:3259) * Fixed Butterfly Wings not working during GVG. (bugreport:3264) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13897 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-13Changed a few sprintf's that had no format arguments to strcpy's.Paradox924X1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13887 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-08Follow up to r13867, corrected the newly added MD_TARGETWEAK. Monsters with ↵L0ne_W0lf1-1/+1
this mode will now only target players five level LOWER than itself. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13869 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-08- Added mob mode 0x4000, MD_TARGETWEAK: It makes aggro monsters only chase ↵skotlex1-1/+6
characters whose level is no higher than the monster's +5. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13867 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-08- Fixed Swordsman Medallion to be usable by Star Gladiators.skotlex1-0/+1
- Fixed Thief Medallion to be usable by Ninjas. - Fixed Valorous Assassin's Damascus to reduce the strength of its effect. - Corrected the AUTOLOOT_DISTANCE code not checking for map changes. - Fixed clif_change_option's "unknown field" to be the character's karma. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13864 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-08Fixed bHPGainValue and bSPGainValue worked on all types of attacks and was ↵Inkfish1-7/+0
only activated on mob's death.(bugreport:3193) [Inkfish] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13863 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-25Now we can use 'boss_monster' to summon whatever monsters that need to be ↵Inkfish1-0/+1
radared by Convex Mirror. (bugreport:2653) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-20* Now fiberlocking a fiberlocked target doesn't renew the timer but instead ↵Inkfish1-2/+2
increases its fireweakness [Inkfish] - This makes doublecasting firebolts on a double fiberlocked target having double damage from both 2 bolts possible = =(bugreport:3061) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13799 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-17- Fixed a couple of crashes that could ensue from the last memory corruption ↵skotlex1-1/+4
fix to free'ing clones. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13787 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-15Cleaning/fixing the previous commits a bitultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13775 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-15- Fixed a bunch of invalid memory access bugs as reported by Valgrind.skotlex1-2/+5
- Updated unit_stop_walking to not move character an extra cell when it is already half-way there unless flag 0x4 is passed. (bugreport:3078) - Fixed the monster MD_CASTSENSOR code not correctly setting the monster's aggressive state. - Corrected a few compiler warnings - Changed a bit the code for SC_BOSSMAPINFO so it is not so hideously ugly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13774 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-15Removed the undocumented custom level feature from monster spawn lines ↵ultramage1-5/+0
(bugreport:3076). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13772 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-11* Fixed a crash when mob uses self-destruct skills (bugreport:2568) [Inkfish]Inkfish1-6/+11
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13754 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-03* Do not log damage if it's done by mob itself (bugreport:2933) [Inkfish]Inkfish1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13716 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-04-23Added length check to functions clif_parse_CreateChatRoom and ↵ultramage1-1/+0
clif_parse_ChatRoomStatusChange (bugreport:2999). This prevents a signed/unsigned integer overflow when calling the safestrncpy function. Also added a note regarding a potential out-of-bounds access issue in these functions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13690 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-04-21- Now when the mob picks and attacks a player target, he is added to the ↵skotlex1-0/+3
"log" of attacked chars (counts for the total number of attackers bonus) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13685 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-04-11Inverted the way monster_ai 0x200 works, default is 0 again (followup to ↵ultramage1-1/+1
r13667). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-04-10- Set mob delay to a max of 24 hours so that mob_skill_db entries with huge ↵skotlex1-7/+10
delay values won't cause the skill to never trigger. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13666 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-04-06Modified the lazy mob AI code to fix some very annoying behavior ↵ultramage1-28/+13
(bugreport:2258) - mobs will no longer get scattered across the whole map as soon as the last player leaves - mobs will now random-walk indefinitely even if there are no players on the map (might have a performance impact) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13664 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-26- Fixed item Nemesis.zephyrus1-0/+45
- Fixed Tarot Card being used on Emperium. - First Part of BattleGround Implementation (please wait). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13550 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-23* Made mob_timer_delete check the deletetimer in the mob.FlavioJS1-7/+18
* Added missing delete_timer's every time deletetimer is being set. (except when allocating) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13544 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-23* Made mob_delayspawn check the spawn_timer in the mob.FlavioJS1-4/+24
* Added missing delete_timer's every time spawn_timer is being set. (except when allocating) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13543 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-29Fixed mob_spawn_dataset() not initializing the spawn_timer variable ↵ultramage1-0/+1
(followup to r13497). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13498 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-29- Fixed a little spawn_timer bug. Discovered with a previous fix from ↵zephyrus1-10/+8
ultramage and because of this spawn line: npc/mobs/fields/prontera.txt: prt_fild06,222,30,40,10 monster Green Plant 1080,15,900000,450000,1 This is an impossible spawn area, and the engine just keep trying each 5 seconds to spawn it again. So we need to fix this line with a correct spawn too. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13497 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-13Mobs with nonzero spawn time can now be cached as well, saving some more ↵ultramage1-1/+1
cpu/memory (bugreport:1197). Fixed dynamic mobs being unloaded without stopping their respawn timer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13445 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-22* Hunted down improper uses of va_list variables.FlavioJS1-5/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13383 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-22* Hunted down the simpler 64bit pointer truncations.FlavioJS1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13380 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-10Added a check to make sure killed monster's level was greater than half of ↵Paradox924X1-1/+1
the mercenary owner's level before incrementing mercenary's killcount. (bugreport:2410) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13367 54d463be-8e91-2dee-dedb-b68131a5f0ec