diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-23 13:09:50 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-23 13:09:50 +0000 |
commit | 94281a398ef3a288a23cebb9f2d9a5227c570996 (patch) | |
tree | b55207b5a40b9c019d150772ddbb1ffc6661f80c /src/map/status.c | |
parent | 59b08db5fcebd6e3d94f5353602fc685dbf9e3f5 (diff) | |
download | hercules-94281a398ef3a288a23cebb9f2d9a5227c570996.tar.gz hercules-94281a398ef3a288a23cebb9f2d9a5227c570996.tar.bz2 hercules-94281a398ef3a288a23cebb9f2d9a5227c570996.tar.xz hercules-94281a398ef3a288a23cebb9f2d9a5227c570996.zip |
- Mercenary Packets (Server to Client). Still need a little more info.
- Packet for Mercenary Menu.
- Some other progress as creation but need more code.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13116 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c index 3925a86d2..c77e0ffcc 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4046,7 +4046,8 @@ int status_get_lv(struct block_list *bl) case BL_MOB: return ((TBL_MOB*)bl)->level; case BL_PET: return ((TBL_PET*)bl)->pet.level; case BL_HOM: return ((TBL_HOM*)bl)->homunculus.level; - } + case BL_MER: return ((TBL_MER*)bl)->db->lv; + } return 1; } @@ -4162,6 +4163,10 @@ int status_get_guild_id(struct block_list *bl) if (((TBL_HOM*)bl)->master) return ((TBL_HOM*)bl)->master->status.guild_id; break; + case BL_MER: + if (((TBL_MER*)bl)->master) + return ((TBL_MER*)bl)->master->status.guild_id; + break; case BL_NPC: if (((TBL_NPC*)bl)->subtype == SCRIPT) return ((TBL_NPC*)bl)->u.scr.guild_id; @@ -4196,6 +4201,10 @@ int status_get_emblem_id(struct block_list *bl) if (((TBL_HOM*)bl)->master) return ((TBL_HOM*)bl)->master->guild_emblem_id; break; + case BL_MER: + if (((TBL_MER*)bl)->master) + return ((TBL_MER*)bl)->master->guild_emblem_id; + break; case BL_NPC: if (((TBL_NPC*)bl)->subtype == SCRIPT && ((TBL_NPC*)bl)->u.scr.guild_id > 0) { struct guild *g = guild_search(((TBL_NPC*)bl)->u.scr.guild_id); @@ -4253,6 +4262,7 @@ struct view_data* status_get_viewdata(struct block_list *bl) case BL_PET: return &((TBL_PET*)bl)->vd; case BL_NPC: return ((TBL_NPC*)bl)->vd; case BL_HOM: return ((TBL_HOM*)bl)->vd; + case BL_MER: return ((TBL_MER*)bl)->vd; } return NULL; } @@ -4267,6 +4277,8 @@ void status_set_viewdata(struct block_list *bl, int class_) vd = npc_get_viewdata(class_); else if (homdb_checkid(class_)) vd = merc_get_hom_viewdata(class_); + else if (merc_class(class_)) + vd = merc_get_viewdata(class_); else vd = NULL; @@ -4365,6 +4377,15 @@ void status_set_viewdata(struct block_list *bl, int class_) ShowError("status_set_viewdata (HOMUNCULUS): No view data for class %d\n", class_); } break; + case BL_MER: + { + struct mercenary_data *md = (struct mercenary_data*)bl; + if (vd) + md->vd = vd; + else + ShowError("status_set_viewdata (MERCENARY): No view data for class %d\n", class_); + } + break; } vd = status_get_viewdata(bl); if (vd && vd->cloth_color && ( @@ -4383,6 +4404,7 @@ struct status_change *status_get_sc(struct block_list *bl) case BL_MOB: return &((TBL_MOB*)bl)->sc; case BL_NPC: return &((TBL_NPC*)bl)->sc; case BL_HOM: return &((TBL_HOM*)bl)->sc; + case BL_MER: return &((TBL_MER*)bl)->sc; } return NULL; } |