diff options
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c index ccff0a457..5a116e5bf 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1312,6 +1312,9 @@ int status_calc_mob(struct mob_data* md, int first) if (flag&16 && mbl)
{ //Max HP setting from Summon Flora/marine Sphere
struct unit_data *ud = unit_bl2ud(mbl);
+ //Remove special AI when this is used by regular mobs.
+ if (mbl->type == BL_MOB && !((TBL_MOB*)mbl)->special_state.ai)
+ md->special_state.ai = 0;
if (ud)
{ // different levels of HP according to skill level
if (ud->skillid == AM_SPHEREMINE) {
@@ -3911,6 +3914,23 @@ void status_freecast_switch(struct map_session_data *sd) clif_updatestatus(sd,SP_SPEED);
}
+const char * status_get_name(struct block_list *bl)
+{
+ nullpo_retr(0, bl);
+ switch (bl->type) {
+ case BL_MOB:
+ return ((struct mob_data *)bl)->name;
+ case BL_PC:
+ return ((struct map_session_data *)bl)->status.name;
+ case BL_PET:
+ return ((struct pet_data *)bl)->pet.name;
+ case BL_HOM:
+ return ((struct homun_data *)bl)->master->homunculus.name;
+ default:
+ return "Unknown";
+ }
+}
+
/*==========================================
* 対象のClassを返す(汎用)
* 戻りは整数で0以上
|