summaryrefslogtreecommitdiff
path: root/src/map/map.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/map.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/map.h')
-rw-r--r--src/map/map.h35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 9a75028ef..716f61c5d 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -347,23 +347,23 @@ struct skill_unit_group_tickset {
struct unit_data {
struct block_list *bl;
- int walktimer;
struct walkpath_data walkpath;
+ struct skill_timerskill skilltimerskill[MAX_SKILLTIMERSKILL];
+ struct skill_unit_group skillunit[MAX_SKILLUNITGROUP];
+ struct skill_unit_group_tickset skillunittick[MAX_SKILLUNITGROUPTICKSET];
+ short attacktarget_lv;
short to_x,to_y;
- unsigned char dir;
short skillx,skilly;
short skillid,skilllv;
int skilltarget;
int skilltimer;
- struct skill_timerskill skilltimerskill[MAX_SKILLTIMERSKILL];
- struct skill_unit_group skillunit[MAX_SKILLUNITGROUP];
- struct skill_unit_group_tickset skillunittick[MAX_SKILLUNITGROUPTICKSET];
- int attacktimer;
int attacktarget;
- short attacktarget_lv;
+ int attacktimer;
+ int walktimer;
unsigned int attackabletime;
unsigned int canact_tick;
unsigned int canmove_tick;
+ unsigned char dir;
struct {
unsigned change_walk_target : 1 ;
unsigned skillcastcancel : 1 ;
@@ -430,6 +430,19 @@ struct weapon_data {
int add_damage_class_count;
};
+struct view_data {
+ short class_;
+ short weapon;
+ short shield; //Or left-hand weapon.
+ short head_top;
+ short head_mid;
+ short head_bottom;
+ short hair_style;
+ short hair_color;
+ short cloth_color;
+ char sex;
+ unsigned dead_sit : 2;
+};
struct npc_data;
struct pet_db;
struct item_data;
@@ -438,6 +451,7 @@ struct square;
struct map_session_data {
struct block_list bl;
struct unit_data ud;
+ struct view_data vd;
struct status_change sc;
//NOTE: When deciding to add a flag to state or special_state, take into consideration that state is preserved in
//status_calc_pc, while special_state is recalculated in each call. [Skotlex]
@@ -469,7 +483,6 @@ struct map_session_data {
unsigned showexp :1;
unsigned showzeny :1;
unsigned mainchat :1; //[LuzZza]
- unsigned disguised :1; //[Valaris]
unsigned deal_locked :2;
unsigned party_sent :1;
unsigned guild_sent :1;
@@ -547,7 +560,6 @@ struct map_session_data {
int hp_sub,sp_sub;
int inchealhptick,inchealsptick,inchealspirithptick,inchealspiritsptick;
- short view_class;
short weapontype1,weapontype2;
short disguise; // [Valaris]
@@ -766,6 +778,7 @@ struct npc_item_list {
struct npc_data {
struct block_list bl;
struct unit_data ud; //Because they need to be able to move....
+ struct view_data *vd;
struct status_change sc; //They can't have status changes, but.. they want the visual opt values.
short n;
short class_;
@@ -833,6 +846,7 @@ struct spawn_data {
struct mob_data {
struct block_list bl;
struct unit_data ud;
+ struct view_data *vd;
struct status_change sc;
struct mob_db *db; //For quick data access (saves doing mob_db(md->class_) all the time) [Skotlex]
char name[NAME_LENGTH];
@@ -885,7 +899,8 @@ struct mob_data {
struct pet_data {
struct block_list bl;
- struct unit_data ud;
+ struct unit_data ud;
+ struct view_data vd;
struct mob_db *db;
int target_id;
short n;