Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

mmo.h

00001 // $Id: mmo.h 549 2006-04-19 06:01:05Z akrus $
00002 
00003 #ifndef _MMO_H_
00004 #define _MMO_H_
00005 
00006 #include <time.h>
00007 #include <stdint.h>
00008 #include "../common/utils.h"
00009 
00010 #if defined __CYGWIN || defined _WIN32
00011 #define RETCODE "\r\n"
00012 #else
00013 #define RETCODE "\n"
00014 #endif
00015 
00016 #define RFIFOSIZE_SERVER (64*1024) /* memo size is 60000 bytes */
00017 #define WFIFOSIZE_SERVER (32*1024) /* a character take 17kb. it's sended often, and buffer must have at east this size */
00018 
00019 #define MAX_INVENTORY 100
00020 #define MAX_AMOUNT 30000
00021 #define MAX_ZENY 1000000000
00022 #define MAX_CART 100
00023 #define MAX_SKILL 1100
00024 #define GLOBAL_REG_NUM 700 // (dynamic allocation, but with a limit for size of str line in file)
00025 #define ACCOUNT_REG_NUM 700 // (dynamic allocation, but with a limit for size of str line in file)
00026 #define ACCOUNT_REG2_NUM 700 // (dynamic allocation, but with a limit for size of str line in file)
00027 #define DEFAULT_WALK_SPEED 150
00028 #define MIN_WALK_SPEED 0
00029 #define MAX_WALK_SPEED 1000
00030 #define MAX_STORAGE 300
00031 #define MAX_GUILD_STORAGE 1000
00032 #define MAX_PARTY 12
00033 #define GUILD_EXTENTION_BONUS 6
00034 //#define MAX_GUILD 56 // (16+4*10) SKILL Guild EXTENTION +4 (http://guide.ragnarok.co.kr/GuildSystem.asp)
00035 #define MAX_GUILD 16 + (GUILD_EXTENTION_BONUS * 10) // (16+6*10) SKILL Guild EXTENTION +6 (kRO Patch - 9/27/05: The Guild skill [Expand Capacity] which increases number of people allowed in the guild, now adds 6 people capacity per level instead of 4.)
00036 #define MAX_GUILDPOSITION 20 // increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
00037 #define MAX_GUILDEXPLUSION 32
00038 #define MAX_GUILDALLIANCE 16
00039 #define MAX_GUILDSKILL 15
00040 #define MAX_GUILDCASTLE 24 // increased to include novice castles [Valaris]
00041 #define MAX_GUILDLEVEL 50
00042 
00043 // for produce
00044 #define MIN_ATTRIBUTE 0
00045 #define MAX_ATTRIBUTE 4
00046 #define ATTRIBUTE_NORMAL 0
00047 #define MIN_STAR 0
00048 #define MAX_STAR 3
00049 
00050 //#define MIN_PORTAL_MEMO 0
00051 #define MAX_PORTAL_MEMO 3
00052 
00053 #define MAX_STATUS_TYPE 5
00054 
00055 #define WEDDING_RING_M 2634
00056 #define WEDDING_RING_F 2635
00057 
00058 #define MAX_FRIENDS 40
00059 
00060 struct item {
00061         int id;
00062         short nameid;
00063         short amount;
00064         unsigned short equip;
00065         unsigned identify : 1; // 0-1
00066         unsigned refine : 4; // 0-10
00067         char attribute;
00068         short card[4];
00069 };
00070 
00071 struct point{
00072         char map[17]; // 16 + NULL
00073         short x, y;
00074 };
00075 
00076 struct skill {
00077         unsigned short id; // 0-10015
00078         unsigned char lv; // 0-100
00079         unsigned char flag; // 0, 1, 2-12, 13
00080 };
00081 
00082 struct global_reg {
00083         char str[33]; // 32 + NULL
00084         int value;
00085 };
00086 
00087 #ifdef USE_SQL
00088 struct status_change_data {
00089         unsigned short type;
00090         int tick, val1, val2, val3, val4;
00091 };
00092 #endif
00093 
00094 struct s_pet {
00095         int account_id;
00096         int char_id;
00097         int pet_id;
00098         short class;
00099         short level;
00100         short egg_id; // pet egg id
00101         short equip; // pet equip name_id
00102         short intimate; // pet friendly
00103         short hungry; // pet hungry
00104         char name[25]; // 24 + NULL
00105         unsigned rename_flag : 4; // 0-1 (bits: 1->4)
00106         unsigned incuvate : 4; // 0-1 (bits: 1->4)
00107 };
00108 
00109 struct friend {
00110         int account_id;
00111         int char_id;
00112         char name[25]; // 24 + NULL
00113 };
00114 
00115 struct mmo_charstatus {
00116         intptr_t char_id;
00117         intptr_t account_id;
00118         intptr_t partner_id;
00119 
00120         int base_exp, job_exp, zeny;
00121 
00122         short class;
00123         short status_point, skill_point;
00124         int hp, max_hp, sp, max_sp;
00125         short option, karma, manner;
00126         short hair, hair_color, clothes_color;
00127         int party_id, guild_id, pet_id;
00128 
00129         short weapon, shield;
00130         short head_top, head_mid, head_bottom;
00131 
00132         char name[25]; // 24 + NULL
00133         unsigned char base_level, job_level;
00134         short str, agi, vit, int_, dex, luk;
00135         unsigned char_num : 5; // 0-9 (bits: 4->5)
00136         unsigned sex : 3; // 0-2 (bits: 2->3)
00137 
00138         struct point last_point, save_point, memo_point[MAX_PORTAL_MEMO];
00139         struct item inventory[MAX_INVENTORY], cart[MAX_CART];
00140         struct skill skill[MAX_SKILL];
00141 };
00142 
00143 struct storage {
00144         int account_id;
00145         unsigned char storage_status;
00146         short storage_amount;
00147         struct item storage[MAX_STORAGE];
00148 };
00149 
00150 struct guild_storage {
00151         int guild_id;
00152         unsigned char storage_status;
00153         unsigned modified_storage_flag : 1; // set to 1 when guild storage was modified
00154         short storage_amount;
00155         struct item storage[MAX_GUILD_STORAGE];
00156 };
00157 
00158 struct map_session_data;
00159 
00160 struct gm_account {
00161         int account_id;
00162         unsigned char level;
00163 };
00164 
00165 struct party_member {
00166         int account_id;
00167         char name[25]; // 24 + NULL
00168         char map[17]; // 16 + NULL
00169         unsigned leader : 1; // 0-1
00170         unsigned online : 1; // 0-1
00171         unsigned short lv;
00172         struct map_session_data *sd;
00173 };
00174 
00175 struct party {
00176         int party_id;
00177         char name[25]; // 24 - NULL
00178         unsigned char exp; // 0-1
00179         unsigned char item, itemc;
00180         struct party_member member[MAX_PARTY];
00181 };
00182 
00183 struct guild_member {
00184         int account_id, char_id;
00185         short hair, hair_color, gender, class, lv;
00186         int exp, exp_payper;
00187         short online, position;
00188         int rsv1, rsv2;
00189         char name[25]; // 24 + NULL
00190         struct map_session_data *sd;
00191 };
00192 
00193 struct guild_position {
00194         char name[25]; // 24 + NULL
00195         int mode;
00196         int exp_mode;
00197 };
00198 
00199 struct guild_alliance {
00200         int opposition;
00201         int guild_id;
00202         char name[25]; // 24 + NULL
00203 };
00204 
00205 struct guild_explusion {
00206         char name[25]; // 24 + NULL
00207         char mes[41]; // 40 + NULL
00208         char acc[41]; // 40 + NULL
00209         int account_id;
00210         int rsv1, rsv2, rsv3;
00211 };
00212 
00213 struct guild_skill {
00214         short id; // 10000-10014 (GD_SKILLBASE & MAX_GUILDSKILL)
00215         short lv;
00216 };
00217 
00218 struct guild {
00219         int guild_id;
00220         short guild_lv, connect_member, max_member, average_lv;
00221         int exp, next_exp;
00222         short skill_point;
00223 //      char castle_id; // not more used (always -1)
00224         char name[25], master[25]; // 24 + NULL
00225         struct guild_member member[MAX_GUILD];
00226         struct guild_position position[MAX_GUILDPOSITION];
00227         char mes1[61], mes2[121]; // 61 + NULL, 120 + NULL
00228         short emblem_len;
00229         int emblem_id;
00230         char emblem_data[2048];
00231         struct guild_alliance alliance[MAX_GUILDALLIANCE];
00232         struct guild_explusion explusion[MAX_GUILDEXPLUSION];
00233         struct guild_skill skill[MAX_GUILDSKILL];
00234 };
00235 
00236 struct guild_castle {
00237         int castle_id;
00238         char map_name[17]; // 16 + NULL
00239         char castle_name[25]; // 24 + NULL
00240         char castle_event[25]; // 24 + NULL
00241         int guild_id;
00242         int economy;
00243         int defense;
00244         int triggerE;
00245         int triggerD;
00246         int nextTime;
00247         int payTime;
00248         int createTime;
00249         unsigned visibleC : 1; // 0 or 1
00250         unsigned visibleG0 : 1; // 0 or 1
00251         unsigned visibleG1 : 1; // 0 or 1
00252         unsigned visibleG2 : 1; // 0 or 1
00253         unsigned visibleG3 : 1; // 0 or 1
00254         unsigned visibleG4 : 1; // 0 or 1
00255         unsigned visibleG5 : 1; // 0 or 1
00256         unsigned visibleG6 : 1; // 0 or 1
00257         unsigned visibleG7 : 1; // 0 or 1
00258         int Ghp0; // added Guardian HP
00259         int Ghp1;
00260         int Ghp2;
00261         int Ghp3;
00262         int Ghp4;
00263         int Ghp5;
00264         int Ghp6;
00265         int Ghp7;
00266         int GID0;
00267         int GID1;
00268         int GID2;
00269         int GID3;
00270         int GID4;
00271         int GID5;
00272         int GID6;
00273         int GID7;
00274 };
00275 
00276 struct square {
00277         int val1[5];
00278         int val2[5];
00279 };
00280 
00281 enum {
00282         GBI_EXP        = 1, // ギルドのEXP
00283         GBI_GUILDLV    = 2, // ギルドのLv
00284         GBI_SKILLPOINT = 3, // ギルドのスキルポイント
00285         GBI_SKILLLV    = 4, // ギルドスキルLv
00286 
00287         GMI_POSITION   = 0, // メンバーの役職変更
00288         GMI_EXP        = 1  // メンバーのEXP
00289 };
00290 
00291 enum {
00292         GD_SKILLBASE        = 10000,
00293         GD_APPROVAL         = 10000,
00294         GD_KAFRACONTACT     = 10001,
00295         GD_GUARDIANRESEARCH = 10002,
00296         GD_CHARISMA         = 10003,
00297         GD_GUARDUP          = 10003,
00298         GD_EXTENSION        = 10004,
00299         GD_GLORYGUILD       = 10005,
00300         GD_LEADERSHIP       = 10006,
00301         GD_GLORYWOUNDS      = 10007,
00302         GD_SOULCOLD         = 10008,
00303         GD_HAWKEYES         = 10009,
00304         GD_BATTLEORDER      = 10010,
00305         GD_REGENERATION     = 10011,
00306         GD_RESTORE          = 10012,
00307         GD_EMERGENCYCALL    = 10013,
00308         GD_DEVELOPMENT      = 10014
00309 };
00310 
00311 #endif // _MMO_H_

Generated on Fri Apr 28 10:20:04 2006 for OpenAthena by  doxygen 1.4.4