summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-22 18:53:11 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-22 18:53:11 +0000
commit507d5f485deddbd551d844aefb5c6646ad18b461 (patch)
treede1c61b30e8f77d801aa1b6e46f310e46d26253d
parentdb0184a272d0fbb1b09d4eba6527181b85890357 (diff)
downloadhercules-507d5f485deddbd551d844aefb5c6646ad18b461.tar.gz
hercules-507d5f485deddbd551d844aefb5c6646ad18b461.tar.bz2
hercules-507d5f485deddbd551d844aefb5c6646ad18b461.tar.xz
hercules-507d5f485deddbd551d844aefb5c6646ad18b461.zip
- Mercenary data structures.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13110 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/common/mmo.h18
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/mercenary.c12
-rw-r--r--src/map/mercenary.h14
-rw-r--r--src/map/pc.h1
5 files changed, 44 insertions, 3 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h
index f497cfdc0..da036005c 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -107,6 +107,8 @@
//Mercenary System
#define MC_SKILLBASE 8201
#define MAX_MERCSKILL 37
+#define MAX_MERCENARY_CLASS 30
+#define MAX_MERCENARY_SKILL 4
enum item_types {
IT_HEALING = 0,
@@ -233,6 +235,15 @@ struct s_homunculus { //[orn]
int luk ;
};
+struct s_mercenary {
+ int mercenary_id;
+ int char_id;
+ short class_;
+ int hp, sp;
+ unsigned int kill_count;
+ unsigned int remain_life_time;
+};
+
struct s_friend {
int account_id;
int char_id;
@@ -265,9 +276,14 @@ struct mmo_charstatus {
short manner;
unsigned char karma;
short hair,hair_color,clothes_color;
- int party_id,guild_id,pet_id,hom_id;
+ int party_id,guild_id,pet_id,hom_id,mer_id;
int fame;
+ // Mercenary Guilds Rank
+ int arch_loyalty, arch_count;
+ int spear_loyalty, spear_count;
+ int sword_loyalty, sword_count;
+
short weapon; // enum weapon_type
short shield; // view-id
short head_top,head_mid,head_bottom;
diff --git a/src/map/map.h b/src/map/map.h
index 5a7fed46e..bb4b0a94c 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -176,6 +176,7 @@ enum bl_type {
BL_SKILL = 0x020,
BL_NPC = 0x040,
BL_CHAT = 0x080,
+ BL_MER = 0x100,
BL_ALL = 0xFFF,
};
@@ -631,6 +632,7 @@ typedef struct chat_data TBL_CHAT;
typedef struct skill_unit TBL_SKILL;
typedef struct pet_data TBL_PET;
typedef struct homun_data TBL_HOM;
+typedef struct mercenary_data TBL_MER;
#define BL_CAST(type_, bl) \
( ((bl) == (struct block_list*)NULL || (bl)->type != (type_)) ? (T ## type_ *)NULL : (T ## type_ *)(bl) )
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index da58da7ee..d3b2b7677 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -37,12 +37,22 @@
#include <string.h>
#include <math.h>
-
//Better equiprobability than rand()% [orn]
#define rand(a, b) (a+(int) ((float)(b-a+1)*rand()/(RAND_MAX+1.0)))
+/*==========================================
+ * Mercenary's System
+ *------------------------------------------*/
struct s_mercenary_db mercenary_db[MAX_MERCENARY_CLASS]; // Mercenary Database
+int merc_create(struct map_session_data *sd, int class_)
+{
+ return 1;
+}
+
+/*==========================================
+ * Homunculus's System
+ *------------------------------------------*/
struct s_homunculus_db homunculus_db[MAX_HOMUNCULUS_CLASS]; //[orn]
struct skill_tree_entry hskill_tree[MAX_HOMUNCULUS_CLASS][MAX_SKILL_TREE];
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index 726fae4e4..51fdea787 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -23,6 +23,18 @@ struct s_mercenary_db {
extern struct s_mercenary_db mercenary_db[MAX_MERCENARY_CLASS];
+struct mercenary_data {
+ struct block_list bl;
+ struct unit_data ud;
+ struct view_data *vd;
+ struct status_change *base_status, battle_status;
+ struct status_change sc;
+ struct regen_data regen;
+
+ struct s_mercenary_db *db;
+ struct s_mercenary mercenary;
+};
+
// Homunculus DB Structures
// ===================================
@@ -58,7 +70,7 @@ struct homun_data {
struct status_change sc;
struct regen_data regen;
struct s_homunculus_db *homunculusDB; //[orn]
- struct s_homunculus homunculus ; //[orn]
+ struct s_homunculus homunculus; //[orn]
struct map_session_data *master; //pointer back to its master
int hungry_timer; //[orn]
diff --git a/src/map/pc.h b/src/map/pc.h
index 9c3768c7b..16ee1936b 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -313,6 +313,7 @@ struct map_session_data {
struct pet_data *pd;
struct homun_data *hd; // [blackhole89]
+ struct mercenary_data *md;
struct{
int m; //-1 - none, other: map index corresponding to map name.