summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-14 16:34:06 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-14 16:34:06 +0000
commit21912bafe72cf7685679cf95b705ad0d115ff7c7 (patch)
tree6447e8903b3251412a5d88172f033e552f811149 /src/map/status.c
parente2b4fe133592f1bff5b6aae38a562bf095e6bea3 (diff)
downloadhercules-21912bafe72cf7685679cf95b705ad0d115ff7c7.tar.gz
hercules-21912bafe72cf7685679cf95b705ad0d115ff7c7.tar.bz2
hercules-21912bafe72cf7685679cf95b705ad0d115ff7c7.tar.xz
hercules-21912bafe72cf7685679cf95b705ad0d115ff7c7.zip
- Estimation /Sense/ whatever will no longer hide the vit bonus to mdef2, as reported by Playtester.
- Updated Summon Flora to summon the max number of possible plants on one cast. It will consume as many bottles as monsters summoned. Also cleaned up the function to be usable by non players. - Added function status_get_name git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8756 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c20
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以上