summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/mob.c5
-rw-r--r--src/map/npc.c9
-rw-r--r--src/map/status.c6
4 files changed, 3 insertions, 18 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 519138d1c..8aaccde2b 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -243,7 +243,6 @@ struct spawn_data {
signed short xs,ys;
unsigned short num; //Number of mobs using this structure
unsigned short active; //Number of mobs that are already spawned (for mob_remove_damaged: no)
- unsigned int level; //Custom level.
unsigned int delay1,delay2; //Min delay before respawning after spawn/death
struct {
unsigned size :2; //Holds if mob has to be tiny/large
diff --git a/src/map/mob.c b/src/map/mob.c
index 0a774fe89..42e00b9ec 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -191,8 +191,6 @@ int mob_parse_dataset(struct spawn_data *data)
memmove(data->eventname, data->eventname+1, i-1);
}
}
- if (!data->level)
- data->level = mob_db(data->class_)->lv;
if(strcmp(data->name,"--en--")==0)
strncpy(data->name,mob_db(data->class_)->name,NAME_LENGTH-1);
@@ -221,8 +219,6 @@ struct mob_data* mob_spawn_dataset(struct spawn_data *data)
md->special_state.size = data->state.size;
if (data->eventname[0] && strlen(data->eventname) >= 4)
memcpy(md->npc_event, data->eventname, 50);
- md->level = data->level;
-
if(md->db->status.mode&MD_LOOTER)
md->lootitem = (struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item));
md->spawn_timer = INVALID_TIMER;
@@ -2706,7 +2702,6 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
else
strcpy(data.name,"--ja--");
- data.level = 0;
if (!mob_parse_dataset(&data))
continue;
diff --git a/src/map/npc.c b/src/map/npc.c
index affa5838a..cab526151 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2478,9 +2478,8 @@ void npc_parse_mob2(struct spawn_data* mob)
static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath)
{
- int level, num, class_, mode, x,y,xs,ys, i,j;
+ int num, class_, mode, x,y,xs,ys, i,j;
char mapname[32];
- char mobname[128];
struct spawn_data mob, *data;
struct mob_db* db;
@@ -2564,10 +2563,6 @@ static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const c
mob.delay2 = mob.delay2/100*battle_config.mob_spawn_delay;
}
- // parse MOB_NAME,[MOB LEVEL]
- if (sscanf(w3, "%127[^,],%d", mobname, &level) > 1)
- mob.level = level;
-
if(mob.delay1>0xfffffff || mob.delay2>0xfffffff) {
ShowError("npc_parse_mob: wrong monsters spawn delays : %s %s (file '%s', line '%d').\n", w3, w4, filepath, strline(buffer,start-buffer));
return strchr(start,'\n');// skip and continue
@@ -2579,7 +2574,7 @@ static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const c
else if (battle_config.override_mob_names==2)
strcpy(mob.name,"--ja--");
else
- strncpy(mob.name, mobname, NAME_LENGTH-1);
+ safestrncpy(mob.name, w3, sizeof(mob.name));
//Verify dataset.
if( !mob_parse_dataset(&mob) )
diff --git a/src/map/status.c b/src/map/status.c
index 3199e05f2..7b30ee37a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1351,7 +1351,6 @@ void status_calc_misc(struct block_list *bl, struct status_data *status, int lev
//Skotlex: Calculates the initial status for the given mob
//first will only be false when the mob leveled up or got a GuardUp level.
-//first&2: Class-change invoked.
int status_calc_mob(struct mob_data* md, int first)
{
struct status_data *status;
@@ -1360,10 +1359,7 @@ int status_calc_mob(struct mob_data* md, int first)
if(first)
{ //Set basic level on respawn.
- if (md->spawn && !(first&2))
- md->level = md->spawn->level;
- else
- md->level = md->db->lv; // [Valaris]
+ md->level = md->db->lv;
}
//Check if we need custom base-status