summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/npc.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 0d3bcffd3..45ffc97fb 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1968,16 +1968,6 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4)
for(i=0;i<num;i++) {
md=(struct mob_data *)aCalloc(1,sizeof(struct mob_data));
-
- if(class>4000) { // large/tiny mobs [Valaris]
- md->size=2;
- class-=4000;
- }
- else if(class>2000) {
- md->size=1;
- class-=2000;
- }
-
md->bl.prev=NULL;
md->bl.next=NULL;
md->bl.m=m;
@@ -1996,6 +1986,18 @@ int npc_parse_mob(char *w1,char *w2,char *w3,char *w4)
memcpy(md->name,w3,24);
md->n = i;
+
+ if(class>4000) { // large/tiny mobs [Valaris]
+ md->size=2;
+ md->base_class = md->class = class-4000;
+ }
+ else if(class>2000) {
+ md->size=1;
+ md->base_class = md->class = class-2000;
+ } else {
+ md->base_class = md->class = class;
+ }
+
md->base_class = md->class = class;
md->bl.id=npc_get_new_npc_id();
md->m =m;