diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-29 08:47:14 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-29 08:47:14 +0000 |
commit | b098c36a440f8052ab3c548420920bad92c7d872 (patch) | |
tree | c6a8382322944e6951ea748ecb870230274d5632 /src/map/mob.c | |
parent | 19ae14bb0f371886508be6d51c1b851e03ba65e1 (diff) | |
download | hercules-b098c36a440f8052ab3c548420920bad92c7d872.tar.gz hercules-b098c36a440f8052ab3c548420920bad92c7d872.tar.bz2 hercules-b098c36a440f8052ab3c548420920bad92c7d872.tar.xz hercules-b098c36a440f8052ab3c548420920bad92c7d872.zip |
* [Fixed]
- Scripting system screwing up script position after mixing timers with menus.
- NPC attached AI mobs display as alive when dead.
- View data not updating after buildin_unitdeadsit.
[Improved]
- NPCE_LOADMAP to execute after all (area) objects are sent to the player.
- Simplified scripting system. sd will now use pointer to the script state itself.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7388 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index ab195ecac..63b71b941 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -774,12 +774,12 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap) if ((*target) == bl || !status_check_skilluse(&md->bl, bl, 0, 0)) return 0; - if(md->nd && mob_script_callback(md, bl, CALLBACK_DETECT)) - return 1; // We have script handling the work. - if(battle_check_target(&md->bl,bl,BCT_ENEMY)<=0) return 0; + if(md->nd && mob_script_callback(md, bl, CALLBACK_DETECT)) + return 1; // We have script handling the work. + switch (bl->type) { case BL_PC: @@ -2120,9 +2120,10 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if(pcdb_checkid(md->vd->class_)) { //Player mobs are not removed automatically by the client. - if(md->nd) + if(md->nd){ + md->vd->dead_sit = 1; return 1; // Let the dead body stay there.. we have something to do with it :D - else + } else clif_clearchar_delay(tick+3000,&md->bl,0); } @@ -2400,8 +2401,13 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id) md= mob_spawn_dataset(&data); md->special_state.cached= battle_config.dynamic_mobs; //[Skotlex] - if(skill_id == NPC_SUMMONSLAVE) + if(skill_id == NPC_SUMMONSLAVE){ md->master_id=md2->bl.id; + md->state.killer = md2->state.killer; + md->special_state.ai = md2->special_state.ai; + md->nd = md2->nd; + md->callback_flag = md2->callback_flag; + } mob_spawn(md); if (hp_rate) //Scale HP @@ -2418,9 +2424,6 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id) clif_skill_nodamage(&md->bl,&md->bl,skill_id,amount,1); } - if(md2->nd) - mob_convertslave(md2); - return 0; } |