diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-14 11:34:59 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-14 11:34:59 +0000 |
commit | 6aab03b220d3d65be71f56b4ff77ac4fa261571b (patch) | |
tree | 0156201c8bf17e71fe066336cd508417fda2c9cd /src/map/status.c | |
parent | c59ea57a893908f54d2960a1e18d2473a1bb8196 (diff) | |
download | hercules-6aab03b220d3d65be71f56b4ff77ac4fa261571b.tar.gz hercules-6aab03b220d3d65be71f56b4ff77ac4fa261571b.tar.bz2 hercules-6aab03b220d3d65be71f56b4ff77ac4fa261571b.tar.xz hercules-6aab03b220d3d65be71f56b4ff77ac4fa261571b.zip |
Applied a temp patch to make some npc-executed atcommands work again (bugreport:790).
Added support for right-click-gm-menu kicking NPC objects.
Removed redundant function npc_checknear2().
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12073 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/status.c b/src/map/status.c index 1176bd219..4108359d8 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4035,14 +4035,14 @@ const char* status_get_name(struct block_list *bl) int status_get_class(struct block_list *bl) { nullpo_retr(0, bl); - if(bl->type==BL_MOB) //Class used on all code should be the view class of the mob. - return ((struct mob_data *)bl)->vd->class_; - if(bl->type==BL_PC) - return ((struct map_session_data *)bl)->status.class_; - if(bl->type==BL_PET) - return ((struct pet_data *)bl)->pet.class_; - if(bl->type==BL_HOM) - return ((struct homun_data *)bl)->homunculus.class_; + switch( bl->type ) + { + case BL_PC: return ((TBL_PC*)bl)->status.class_; + case BL_MOB: return ((TBL_MOB*)bl)->vd->class_; //Class used on all code should be the view class of the mob. + case BL_PET: return ((TBL_PET*)bl)->pet.class_; + case BL_HOM: return ((TBL_HOM*)bl)->homunculus.class_; + case BL_NPC: return ((TBL_NPC*)bl)->class_; + } return 0; } /*========================================== |