summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-26 20:56:39 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-26 20:56:39 +0000
commit1c82999ec3876f8198b44919fdcdd0a7806613ce (patch)
tree72e7ca246f6c2c62c3c1694a6d23a238caae4d8b
parent6f618da64a31933954f3f5cbe8b3608d16681ed1 (diff)
downloadhercules-1c82999ec3876f8198b44919fdcdd0a7806613ce.tar.gz
hercules-1c82999ec3876f8198b44919fdcdd0a7806613ce.tar.bz2
hercules-1c82999ec3876f8198b44919fdcdd0a7806613ce.tar.xz
hercules-1c82999ec3876f8198b44919fdcdd0a7806613ce.zip
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10075 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/charcommand.c3
-rw-r--r--src/map/map.c4
-rw-r--r--src/map/mob.c32
3 files changed, 23 insertions, 16 deletions
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index f531f3fc0..696abd7c7 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -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;
diff --git a/src/map/map.c b/src/map/map.c
index f16282bf4..e2815ecdd 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -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();
diff --git a/src/map/mob.c b/src/map/mob.c
index fa23e1b7b..11d44955f 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -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]);