* Fixed indoorsrwstable.txt reading
* Fixed @monsterbig/@monstersmall not working * Fixed @killmonster2 not working git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1293 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
548fa69b15
commit
f9452b9683
@ -1,5 +1,11 @@
|
||||
Date Added
|
||||
|
||||
03/25
|
||||
* Fixed indoorsrwstable.txt reading even when 'indoors_override_grffile' is
|
||||
set to 'no' [celest]
|
||||
* Fixed @monsterbig/@monstersmall not working [celest]
|
||||
* Fixed @killmonster2 not working [celest]
|
||||
|
||||
03/24
|
||||
* Added some mapflags for new towns [Lupus]
|
||||
* Added timer.c optimization / timers sort fix. 'no freezing mobs anymore' Thanx 2 Yor/Freya [Lupus]
|
||||
|
@ -830,9 +830,16 @@ AtCommandType atcommand(struct map_session_data* sd, const int level, const char
|
||||
*/
|
||||
static int atkillmonster_sub(struct block_list *bl, va_list ap) {
|
||||
struct mob_data *md;
|
||||
nullpo_retr(0, md=(struct mob_data *)bl);
|
||||
int flag;
|
||||
|
||||
nullpo_retr(0, ap);
|
||||
nullpo_retr(0, md=(struct mob_data *)bl);
|
||||
flag = va_arg(ap, int);
|
||||
|
||||
if (flag)
|
||||
mob_damage(NULL, md, md->hp, 2);
|
||||
else
|
||||
mob_delete(md);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -118,18 +118,17 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
|
||||
int x, int y, const char *mobname, int class_, int amount, const char *event)
|
||||
{
|
||||
struct mob_data *md = NULL;
|
||||
int m,count,lv=255,r=class_;
|
||||
int m, count, lv = 255;
|
||||
int i, j;
|
||||
|
||||
if( sd )
|
||||
lv=sd->status.base_level;
|
||||
if(sd) lv = sd->status.base_level;
|
||||
|
||||
if(sd && strcmp(mapname,"this")==0)
|
||||
m = sd->bl.m;
|
||||
else
|
||||
m = map_mapname2mapid(mapname);
|
||||
|
||||
if(m<0 || amount<=0 || (class_>=0 && class_<=1000) || class_>MAX_MOB_DB) // 値が異常なら召喚を止める
|
||||
if (m < 0 || amount <= 0 || (class_ >= 0 && class_ <= 1000) || class_ > MAX_MOB_DB + 4000) // 値が異常なら召喚を止める
|
||||
return 0;
|
||||
|
||||
if (class_ < 0) { // ƒ‰ƒ“ƒ_ƒ€‚É<E2809A>¢Š«
|
||||
@ -141,13 +140,11 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
|
||||
class_ = rand() % 1000 + 1001;
|
||||
k = rand() % 1000000;
|
||||
} while ((mob_db[class_].max_hp <= 0 || mob_db[class_].summonper[j] <= k ||
|
||||
(lv<mob_db[class_].lv && battle_config.random_monster_checklv)) && (i++) < 2000);
|
||||
if(i>=2000){
|
||||
(battle_config.random_monster_checklv && lv < mob_db[class_].lv)) && (i++) < 2000);
|
||||
if(i >= 2000)
|
||||
class_ = mob_db[0].summonper[j];
|
||||
}
|
||||
}else{
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
// if(battle_config.etc_log)
|
||||
// printf("mobclass=%d try=%d\n",class_,i);
|
||||
}
|
||||
@ -173,16 +170,14 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (count = 0; count < amount; count++) {
|
||||
md = (struct mob_data *)aCalloc(1,sizeof(struct mob_data));
|
||||
memset (md, '\0', sizeof *md);
|
||||
|
||||
if(class_>4000) { // large/tiny mobs [Valaris]
|
||||
if (class_ > MAX_MOB_DB + 2000) { // large/tiny mobs [Valaris]
|
||||
md->size = 2;
|
||||
class_-=4000;
|
||||
}
|
||||
else if(class_>MAX_MOB_DB) {
|
||||
class_ -= (MAX_MOB_DB + 2000);
|
||||
} else if (class_ > MAX_MOB_DB) {
|
||||
md->size = 1;
|
||||
class_ -= MAX_MOB_DB;
|
||||
}
|
||||
@ -196,7 +191,8 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
|
||||
md->bl.m = m;
|
||||
md->bl.x = x;
|
||||
md->bl.y = y;
|
||||
if(r<0&&battle_config.dead_branch_active) md->mode=0x1+0x4+0x80; //移動してアクティブで反撃する
|
||||
if (class_ < 0 && battle_config.dead_branch_active)
|
||||
md->mode = 0x1 + 0x4 + 0x80; //移動してアクティブで反撃する
|
||||
md->m = m;
|
||||
md->x0 = x;
|
||||
md->y0 = y;
|
||||
@ -218,8 +214,6 @@ int mob_once_spawn(struct map_session_data *sd,char *mapname,
|
||||
md->hp = mob_db[class_].max_hp;
|
||||
}
|
||||
} // end addition [Valaris]
|
||||
|
||||
|
||||
}
|
||||
return (amount > 0) ? md->bl.id : 0;
|
||||
}
|
||||
|
@ -2399,6 +2399,7 @@ int do_init_npc(void)
|
||||
char c = '-';
|
||||
|
||||
// indoorrswtable.txt and etcinfo.txt [Celest]
|
||||
if (battle_config.indoors_override_grffile)
|
||||
npc_read_indoors();
|
||||
//npc_read_weather();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user