diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/mob.c | 6 | ||||
-rw-r--r-- | src/map/status.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 0d7fceb83..d0d182b4e 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3172,6 +3172,9 @@ static int mob_readdb(void) memcpy(mob_db_data[class_]->jname, str[2], NAME_LENGTH-1); memcpy(mob_db_data[class_]->name, str[3], NAME_LENGTH-1); mob_db_data[class_]->lv = atoi(str[4]); + if (mob_db_data[class_]->lv < 1) + mob_db_data[class_]->lv = 1; + status = &mob_db_data[class_]->status; status->max_hp = atoi(str[5]); @@ -3870,6 +3873,9 @@ static int mob_read_sqldb(void) memcpy(mob_db_data[class_]->jname, TO_STR(2), NAME_LENGTH-1); memcpy(mob_db_data[class_]->name, TO_STR(3), NAME_LENGTH-1); mob_db_data[class_]->lv = TO_INT(4); + if (mob_db_data[class_]->lv < 1) + mob_db_data[class_]->lv = 1; + status = &mob_db_data[class_]->status; status->max_hp = TO_INT(5); status->max_sp = TO_INT(6); diff --git a/src/map/status.c b/src/map/status.c index f73513ca2..9e39d814b 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4911,6 +4911,16 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val break;
case SC_REFLECTSHIELD:
val2=10+val1*3; //% Dmg reflected
+ if (sd)
+ { //Pass it to devoted chars.
+ struct map_session_data *tsd;
+ int i;
+ for (i = 0; i < 5; i++)
+ { //Pass the status to the other affected chars. [Skotlex]
+ if (sd->devotion[i] && (tsd = map_id2sd(sd->devotion[i])))
+ status_change_start(&tsd->bl,SC_AUTOGUARD,10000,val1,val2,0,0,tick,1);
+ }
+ }
break;
case SC_STRIPWEAPON:
if (bl->type != BL_PC) //Watk reduction
|