- Fixed # commands not being blocked when muted if the mute config settings 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://svn.code.sf.net/p/rathena/svn/trunk@10075 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2007-03-26 20:56:39 +00:00
parent 13b13a43df
commit 0b9f915d9c
3 changed files with 23 additions and 16 deletions

View File

@ -181,6 +181,9 @@ is_charcommand(const int fd, struct map_session_data* sd, const char* message) {
nullpo_retr(CharCommand_None, sd);
if (sd->sc.count && sd->sc.data[SC_NOCHAT].timer != -1 && sd->sc.data[SC_NOCHAT].val1&MANNER_NOCOMMAND)
return CharCommand_None;
if (!message || !*message)
return CharCommand_None;

View File

@ -3316,13 +3316,13 @@ int do_init(int argc, char *argv[]) {
do_init_clif();
do_init_script();
do_init_itemdb();
do_init_mob(); // npcの初期化・でmob_spawnして、mob_dbを?照するのでinit_npcより先
do_init_skill();
do_init_mob();
do_init_pc();
do_init_status();
do_init_party();
do_init_guild();
do_init_storage();
do_init_skill();
do_init_pet();
do_init_merc(); //[orn]
do_init_npc();

View File

@ -3744,7 +3744,7 @@ static int mob_readskilldb(void)
if (mob_id > 0 && mob_db(mob_id) == mob_dummy)
{
if (mob_id != last_mob_id) {
ShowWarning("mob_skill: Non existant Mob id %d at %s, line %d\n", mob_id, filename[x], count);
ShowError("mob_skill: Non existant Mob id %d at %s, line %d\n", mob_id, filename[x], count);
last_mob_id = mob_id;
}
continue;
@ -3767,7 +3767,7 @@ static int mob_readskilldb(void)
break;
if(i==MAX_MOBSKILL){
if (mob_id != last_mob_id) {
ShowWarning("mob_skill: readdb: too many skill! Line %d in %d[%s]\n",
ShowError("mob_skill: readdb: too many skill! Line %d in %d[%s]\n",
count,mob_id,mob_db_data[mob_id]->sprite);
last_mob_id = mob_id;
}
@ -3780,17 +3780,19 @@ static int mob_readskilldb(void)
for(j=0;j<tmp && strcmp(sp[2],state[j].str);j++);
if (j < tmp)
ms->state=state[j].id;
else
ShowError("mob_skill: Unrecognized state %s at %s, line %d\n", sp[2], filename[x], count);
else if (!ms->state) {
ShowWarning("mob_skill: Unrecognized state %s at %s, line %d\n", sp[2], filename[x], count);
ms->state=MSS_ANY;
}
//Skill ID
j=atoi(sp[3]);
if (j<=0 || j>MAX_SKILL_DB) //fixed Lupus
{
if (mob_id < 0)
ShowWarning("Invalid Skill ID (%d) for all mobs\n", j);
ShowError("Invalid Skill ID (%d) for all mobs\n", j);
else
ShowWarning("Invalid Skill ID (%d) for mob %d (%s)\n", j, mob_id, mob_db_data[mob_id]->sprite);
ShowError("Invalid Skill ID (%d) for mob %d (%s)\n", j, mob_id, mob_db_data[mob_id]->sprite);
continue;
}
ms->skill_id=j;
@ -3826,26 +3828,28 @@ static int mob_readskilldb(void)
if (ms->target > MST_AROUND)
{
if (battle_config.error_log)
ShowWarning("Wrong mob skill target for ground skill %d (%s) for %s\n",
ms->skill_id, skill_get_name(ms[i].skill_id),
ShowWarning("Wrong mob skill target for ground skill %d (%s) for %s.\n",
ms->skill_id, skill_get_name(ms->skill_id),
mob_id < 0?"all mobs":mob_db_data[mob_id]->sprite);
ms->target = MST_TARGET;
}
} else if (ms[i].target > MST_MASTER) {
} else if (ms->target > MST_MASTER) {
if (battle_config.error_log)
ShowWarning("Wrong mob skill target 'around' for non-ground skill %d (%s). for %s\n",
ms[i].skill_id, skill_get_name(ms[i].skill_id),
ShowWarning("Wrong mob skill target 'around' for non-ground skill %d (%s) for %s\n.",
ms->skill_id, skill_get_name(ms->skill_id),
mob_id < 0?"all mobs":mob_db_data[mob_id]->sprite);
ms->target = MST_TARGET;
}
ms->cond1=-1;
tmp = sizeof(cond1)/sizeof(cond1[0]);
for(j=0;j<tmp && strcmp(sp[10],cond1[j].str);j++);
if (j < tmp)
ms->cond1=cond1[j].id;
else
ShowError("mob_skill: Unrecognized condition 1 %s at %s, line %d\n", sp[10], filename[x], count);
else {
ShowWarning("mob_skill: Unrecognized condition 1 %s at %s, line %d\n",
sp[10], filename[x], count);
ms->cond1=-1;
}
ms->cond2=atoi(sp[11]);
tmp = sizeof(cond2)/sizeof(cond2[0]);