summaryrefslogtreecommitdiff
path: root/src/map/mob.h
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-01 02:23:56 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-01 02:23:56 +0000
commit53796ffafd6eb381595b77cda1b039d795940e68 (patch)
treea33bec85a09564086f6b356a9e6d0e0797e9b079 /src/map/mob.h
parent454ae6b78937da966545207b94b1e0a037fdb098 (diff)
downloadhercules-53796ffafd6eb381595b77cda1b039d795940e68.tar.gz
hercules-53796ffafd6eb381595b77cda1b039d795940e68.tar.bz2
hercules-53796ffafd6eb381595b77cda1b039d795940e68.tar.xz
hercules-53796ffafd6eb381595b77cda1b039d795940e68.zip
- Added structure view_data to handle sprite information for all characters (equipment, weapons, hair, dyes, etc). Unified a bunch of clif functions now that you only need to handle the view_data (so instead of clif_spawn[pc/mob/npc/pet] you just have clif_spawn)
- Fixed the clif_change_class packet (it should check for non players classes, not a class above MAX_PC_CLASS), it fixes morphing enemies. - Rewrote the way cloth dye packets are resent to optimize bandwidth usage. - Fixed the npc_item_flag thing (enable_items/disable_items script command) - Rewrote the disguise implementation to be bandwidth friendly. - Modified the hide options to change your class to INVISIBLE_CLASS, since such classes don't even get their view packets sent around. - Rewrote several clif functions to adapt to the new view_data class; - Added class 139 to npcdb_checkid which was required by some npcs in the swordman quest? o.O git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5833 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.h')
-rw-r--r--src/map/mob.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/map/mob.h b/src/map/mob.h
index e7e3eb07e..8fb930e1f 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -5,6 +5,7 @@
#define _MOB_H_
#include "unit.h"
+#include "map.h"
#define MAX_RANDOMMONSTER 3
#define MAX_MOB_RACE_DB 6
@@ -47,9 +48,8 @@ struct mob_db {
int mexp,mexpper;
struct { int nameid,p; } dropitem[10]; //8 -> 10 Lupus
struct { int nameid,p; } mvpitem[3];
- int view_class,sex;
- short hair,hair_color,weapon,shield,head_top,head_mid,head_buttom,option,clothes_color; // [Valaris]
- int equip; // [Valaris]
+ struct view_data vd;
+ short option;
int summonper[MAX_RANDOMMONSTER];
int maxskill;
struct mob_skill skill[MAX_MOBSKILL];
@@ -112,6 +112,7 @@ struct mob_db* mob_db(int class_);
int mobdb_searchname(const char *str);
int mobdb_searchname_array(struct mob_db** data, int size, const char *str);
int mobdb_checkid(const int id);
+struct view_data* mob_get_viewdata(int class_);
int mob_once_spawn(struct map_session_data *sd,char *mapname,
int x,int y,const char *mobname,int class_,int amount,const char *event);
int mob_once_spawn_area(struct map_session_data *sd,char *mapname,
@@ -135,27 +136,13 @@ int mob_heal(struct mob_data*,int);
#define mob_stop_walking(md, type) { if (md->ud.walktimer != -1) unit_stop_walking(&md->bl, type); }
#define mob_stop_attack(md) { if (md->ud.attacktimer != -1) unit_stop_attack(&md->bl); }
-//Defines to speed up search.
-#define mob_get_viewclass(class_) mob_db(class_)->view_class
-#define mob_get_sex(class_) mob_db(class_)->sex
-#define mob_get_hair(class_) mob_db(class_)->hair
-#define mob_get_hair_color(class_) mob_db(class_)->hair_color
-#define mob_get_weapon(class_) mob_db(class_)->weapon
-#define mob_get_shield(class_) mob_db(class_)->shield
-#define mob_get_head_top(class_) mob_db(class_)->head_top
-#define mob_get_head_mid(class_) mob_db(class_)->head_mid
-#define mob_get_head_buttom(class_) mob_db(class_)->head_buttom
-#define mob_get_clothes_color(class_) mob_db(class_)->clothes_color
-#define mob_get_equip(class_) mob_db(class_)->equip
int do_init_mob(void);
int do_final_mob(void);
int mob_timer_delete(int tid, unsigned int tick, int id, int data);
-
int mob_deleteslave(struct mob_data *md);
-
int mob_random_class (int *value, size_t count);
int mob_get_random_id(int type, int flag, int lv);
int mob_class_change(struct mob_data *md,int class_);