So searching around the internet, I've come across a few possible solutions but for some reason, they all don't seem to work. As the title implies, I want to increase my max level, however every edit that I've done yielded no results in-game. I've edited the following:
map.h, client.conf, job_exp.txt, and battle.c. A combination of these did nothing, however posters seem to have gotten results. I will post the list down in code. I am unsure if help requires the entirety of the file, so I will not cut anything.
client.conf
//--------------------------------------------------------------
// rAthena Battle Configuration File
// Originally Translated by Peter Kieser <
[email protected]>
// Made in to plainer English by Ancyker
//--------------------------------------------------------------
// Note 1: Value is a config switch (on/off, yes/no or 1/0)
// Note 2: Value is in percents (100 means 100%)
// Note 3: Value is a bit field. If no description is given,
// assume unit types (1: Pc, 2: Mob, 4: Pet, 8: Homun, 16: Mercenary)
//--------------------------------------------------------------
// Set here which client version do you accept. Add all values of clients:
// Clients older than accepted versions, and versions not set to 'accepted'
// here will be rejected when logging in
// 0x00000001: Clients older than 2004-09-06aSakray (packet versions 5-9)
// 0x00000002: 2004-09-06 aSakexe (version 10)
// 0x00000004: 2004-09-20 aSakexe (version 11)
// 0x00000008: 2004-10-05 aSakexe (version 12)
// 0x00000010: 2004-10-25 aSakexe (version 13)
// 0x00000020: 2004-11-29 aSakexe (version 14)
// 0x00000040: 2005-01-10 bSakexe (version 15)
// 0x00000080: 2005-05-09 aSakexe (version 16)
// 0x00000100: 2005-06-28 aSakexe (version 17)
// 0x00000200: 2005-07-18 aSakexe (version 18)
// 0x00000400: 2005-07-19 bSakexe (version 19)
// 0x00000800: 2006-03-27 aSakexe (version 20)
// 0x00001000: 2007-01-08 aSakexe (version 21)
// 0x00002000: 2007-02-12 aSakexe (version 22)
// 0x00004000: 2008-09-10 aSakexe (version 23)
// 0x00008000: 2008-08-27 aRagexeRE (version 24)
// 0x00010000: 2008-09-10 aRagexeRE (version 25)
// 0x00020000: 2010-11-24 aRagexeRE (version 26)
// 0x00040000: 2011-10-05 aRagexeRE (version 27)
// 0x00080000: 2011-11-02 aRagexe (version 28)
// 0x00100000: 2012-03-07 fRagexeRE (version 29)
// 0x00200000: 2012-04-10 aRagexeRE (version 30)
// 0x00400000: 2012-04-18 aRagexeRE (version 31)
// 0x00800000: 2012-06-18 unknow (version 32)
// 0x01000000: 2012-07-02 aRagexeRE (version 33)
// 0x02000000: 2013-03-20 Ragexe (version 34)
// 0x04000000: 2013-05-15 aRagexe (version 35)
// 0x08000000: 2013-05-22 Ragexe (version 36)
// 0x10000000: 2013-05-29 Ragexe (version 37)
// 0x20000000: 2013-06-05 Ragexe (version 38)
// 0x40000000: 2013-06-12 Ragexe (version 39)
// default value: 0x7FFFFFFF (all clients/versions [5;39])
packet_ver_flag: 0x7FFFFFFF
// 0x00000001: 2013-06-18 Ragexe (version 40)
// 0x00000002: 2013-06-26 Ragexe (version 41)
// 0x00000004: 2013-07-03 Ragexe (version 42)
// 0x00000008: 2013-07-10 Ragexe (version 43)
// 0x00000010: 2013-07-17 Ragexe (version 44)
// 0x00000020: 2013-08-07 Ragexe (version 45)
// default value: 0x7FFFFFFF (all clients/versions [41;72])
packet_ver_flag2: 0x7FFFFFFF
// Minimum delay between whisper/global/party/guild messages (in ms)
// Messages that break this threshold are silently omitted.
min_chat_delay: 0
// Valid range of dyes and styles on the client.
min_hair_style: 0
max_hair_style: 27
min_hair_color: 0
max_hair_color: 8
min_cloth_color: 0
max_cloth_color: 4
// When set to yes, the damage field in packets sent from woe maps will be set
// to -1, making it impossible for GMs, Bots and Hexed clients to know the
// actual damage caused by attacks. (Note 1)
hide_woe_damage: no
// "hair style" number that identifies pet.
// NOTE: The client uses the "hair style" field in the mob packet to tell them apart from mobs.
// This value is always higher than the max hair-style available in said client.
// Known values to work (all 2005 clients):
// older sakexes: 20
// sakexe 0614: 24
// sakexe 0628 (and later): 100
pet_hair_style: 100
// Visible area size (how many squares away from a player they can see)
area_size: 20
// Maximum walk path (how many cells a player can walk going to cursor)
max_walk_path: 20
// Maximum allowed 'level' value that can be sent in unit packets.
// Use together with the aura_lv setting to tell when exactly to show the aura.
// NOTE: You also need to adjust the client if you want this to work.
// NOTE: Default is 99. Values above 127 will probably behave incorrectly.
// NOTE: If you don't know what this does, don't change it!!!
max_lv: 255
// Level required to display an aura.
// NOTE: This assumes that sending max_lv to the client will display the aura.
// NOTE: aura_lv must not be less than max_lv.
// Example: If max_lv is 99 and aura_lv is 150, characters with level 99~149
// will be sent as being all level 98, and only characters with level
// 150 or more will be reported as having level 99 and show an aura.
aura_lv: 255
// Units types affected by max_lv and aura_lv settings. (Note 3)
// Note: If an unit type, which normally does not show an aura, is
// set it will obtain an aura when it meets the level requirement.
// Default: 0 (none)
client_limit_unit_lv: 0
// Will tuxedo and wedding dresses be shown when worn? (Note 1)
wedding_modifydisplay: yes
// Save Clothes color. (This will degrade performance) (Note 1)
save_clothcolor: yes
// Do not display cloth colors for the wedding class?
// Note: Both save_clothcolor and wedding_modifydisplay have to be enabled
// for this option to take effect. Set this to yes if your cloth palettes
// pack doesn't has wedding palettes (or has less than the other jobs)
wedding_ignorepalette: no
// Do not display cloth colors for the Xmas costume?
// Set this to yes if your cloth palettes pack doesn't have Xmas palettes (or has less than the other jobs)
xmas_ignorepalette: no
// Do not display cloth colors for the Summer costume?
// Set this to yes if your cloth palettes pack doesn't have Summer palettes (or has less than the other jobs)
summer_ignorepalette: no
// Do not display cloth colors for the Hanbok costume?
// Set this to yes if your cloth palettes pack doesn't have Hanbok palettes (or has less than the other jobs)
hanbok_ignorepalette: no
// Do not display cloth colors for the Oktoberfest costume?
// Set this to yes if your cloth palettes pack doesn't have Oktoberfest palettes (or has less than the other jobs)
oktoberfest_ignorepalette: no
// Set this to 1 if your clients have langtype problems and can't display motd properly
motd_type: 0
// Show rAthena version to users when the login?
display_version: yes
// When affected with the "Hallucination" status effect, send the effect to client? (Note 1)
// NOTE: Set to 'no' if the client lags due to the "Wavy" screen effect.
display_hallucination: yes
// Set this to 1 if your client supports status change timers and you want to use them
// Clients from 2009 onward support this
display_status_timers: yes
// Randomizes the dice emoticon server-side, to prevent clients from forging
// packets for the desired number. (Note 1)
client_reshuffle_dice: yes
// Sorts the character and guild storage before it is sent to the client.
// Official servers do not sort storage. (Note 1)
// NOTE: Enabling this option degrades performance.
client_sort_storage: no
// Do we allow to change guilde emblem during woe_time?
emblem_woe_change: yes
// How many transparent pixel can be found in emblem before detected as invalid? (Note 2)
emblem_transparency_limit: 80
// Update enemy position while in invisible state? (Note 1)
// NOTE: Set to 'no' will make client won't update enemy position unless the players have "Intravision" effect.
// So that will help client handling WPE - Maya Purple Hack stuff.
// But it will screw 'the game animation display' while players in invisible state.
update_enemy_position: yes
job_exp.txt (I cut some of this because there were too many numbers and I think they might be irrelevant to my issue.)
// Experience Tables [Pre-Renewal]
// Supports up to base level 1000 and job level 255 (excluding Novice/High Novice).
//
// Structure of Database:
// Max Level,Class list,Type,Exp for Lv 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98
//
// Type:
// 0 = Base Exp, 1 = Job Exp
//Base - Normal and Baby Jobs
99,0:1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:23:24:25:4023:4024:4025:4026:4027:4028:4029:4030:4031:4032:4033:4034:4035:4036:4037:4038:4039:4040:4041:4042:4043:4044:4045:4046:4047:4048:4049:4050:4051:4052,0,9,16,25,36,77,112,153,200,253,320,385,490,585,700,830,970,1120,1260,1420,1620,1860,1990,2240,2504,2950,3426,3934,4474,6889,7995,9174,10425,11748,13967,15775,17678,19677,21773,30543,34212,38065,42102,46323,53026,58419,64041,69892,75973,102468,115254,128692,142784,157528,178184,196300,215198,234879,255341,330188,365914,403224,442116,482590,536948,585191,635278,687211,740988,925400,1473746,1594058,1718928,1848355,1982340,2230113,2386162,2547417,2713878,3206160,3681024,4022472,4377024,4744680,5125440,5767272,6204000,6655464,7121664,7602600,9738720,11649960,13643520,18339300,23836800,35658000,48687000,58135000,99999998,100300002,100600902,100902708,101205414,101509034,101813561,102119002,102425359,102732638,103040840,103349964,103660020,103970998,104282915,104595762,104909549,105224282,105539955,105856574,106174147,106492668,106812152,107132590,107453992,107776356,108099683,108423981,108749258,109075506,109402732,109730946,110060139,110390318...
//Base - Trans Jobs
255,4001:4002:4003:4004:4005:4006:4007:4008:4009:4010:4011:4012:4013:4014:4015:4016:4017:4018:4019:4020:4021:4022,0,10,18,28,40,85,123,168,220,278,400,481,613,731,875,1038,1213,1400,1575,1775,2268,2604,2786,3136,3506,4130,4796,5508,6264,9645,12392,14220,16159,18209,21649,24451,27401,30499,33748,47342,58160,64711,71573,78749,90144,99312,108870,118816,129154,174196,213220,238080,264150,291427,329640,363155,398116,434526,472381,610848,731828,806448,884232,965180,1073896,1170382,1270556,1374422,1481976,1850800,3389616,3666333,3953534,4251217...
//Job - Novice & Baby Novice
255,0:4023,1,4,10,18,28,40,91,151,205,268,340
//Job - 1st Classes & Baby 1st Classes
255,1:2:3:4:5:6:4024:4025:4026:4027:4028:4029:4050,1,30,43,58,76,116,180,220,272,336,520,604,699,802,948,1125,1668,1937,2226,3040,3988,5564,6272,7021,9114,11473,15290,16891,18570,23229,28359,36478,39716,43088,52417,62495,78160,84175,90404,107611,125915,153941,191781,204351,248352,286212,386371,409795,482092,509596,519787,530182,540785,551600,562631,573883...
//Job - 2nd Classes & Baby 2nd Classes
255,7:8:9:10:11:12:13:14:15:16:17:18:19:20:21:4030:4031:4032:4033:4034:4035:4036:4037:4038:4039:4040:4041:4042:4043:4044:4051:4052,1,144,184,284,348,603,887,1096,1598,2540,3676,4290,4946,6679,9492,12770,14344,16005,20642,27434,35108,38577,42206,52708,66971,82688,89544,96669,117821,144921,174201,186677,199584,238617,286366,337147,358435,380376,447685,526989,610246...
//Job - Novice High
255,4001,1,4,11,20,31,44,100,166,226,295,374
//Job - Adv First Classes
255,4002:4003:4004:4005:4006:4007,1,60,86,116,152,232,360,440,544,672,1040,1208,1398,1604,1896,2250,3336,3874,4452,6080,7976,11128,12544,14042,18228,28683,38225,42228,46425,58073,70898,91195,99290,107720,131043,156238,195400,210438,226010,269028,314788,384853,479453,510878,620880,715530,965928,1024488,1205230,1273990,1299469,1325458,1351967,1379006,1406586,1434717...
//Job - Adv Second Classes
255,4008:4009:4010:4011:4012:4013:4014:4015:4016:4017:4018:4019:4020:4021:4022,1,288,368,568,696,1206,1774,2192,3196,5080,7352,8580,9892,13358,18984,31925,35860,40013,51605,68585,87770,96443,105515,131770,167428,206720,223860,241673,294553,362303,479053,513362,548856,656197,787507,927154,985696,1046034,1231134,1449220,1678177,1773024,2182221,2534978,3043585,3782865,4461912,4672971,5971896,6250158,6875174,7562691,8318960,9150856,10065942,11877812,14015818,16538665,19515624,23028437,28094693,34275525,41816141,51015692...
//Job - Ninja/Gunslinger
255,24:25,1,72,92,142,174,301,443,548,799,1270,1838,2145,2473,3339,4746,6385,7172,8002,10321,13717,17554,19288,21103,26354,33485,41344,44772,48334,58910,72460,87100,93338,99792,119308,143183,231068,257377,274363,314246,371105,431038,476309,588548,665256,801731,916689,1130023,1188623,1377408,1551289,1746582,1845236,1954741,2124555,2345698,2548763,2759555,3021488...
//Job - Taekwon (Same EXP table as 1st Classes & Baby 1st Classes)
255,4046,1,30,43,58,76,116,180,220,272,336,520,604,699,802,948,1125,1668,1937,2226,3040,3988,5564,6272,7021,9114,11473,15290,16891,18570,23229,28359,36478,39716,43088,52417,62495,78160,84175,90404...
//Job - Star Gladiator
255,4047:4048,1,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,54868,70216,77154,84412,105416,133924,165376,179008,193338,235642,289842,348402,373354,399168,477234,572732,674294,716870,760752,895370,1053978,1220492,1289472,1587070,1843620,2213516,2521910,2974608,3115314,3981264,5166772,5218439...
//Job - Soul Linker (Same EXP table as 2nd Classes & Baby 2nd Classes)
255,4049,1,144,184,284,348,603,887,1096,1598,2540,3676,4290,4946,6679,9492,12770,14344,16005,20642,27434,35108,38577,42206,52708,66971,82688,89544,96669,117821,144921,174201,186677,199584,238617,286366,337147,358435,380376,447685,526989,610246,644736,793535,921810,1106758,1260955,1487304,1557657,1990632,2083386,2125053,2167554,2210905,2255123,2300225,2346229,2393153,2441016...
//Job - Super Novice & Baby Super Novice
255,23:4045,1,30,43,58,76,116,180,220,272,336,520,604,699,802,948,1125,1668,1937,2226,3040,3988,5564,6272,7021,9114,11473,15290,16891,18570,23229,28359,36478,39716,43088,52417,62495,78160,84175,90404,107611,125915,153941,191781,204351,248352,286212,386371,409795,482092,509596,982092,992092,1002092,1012092,1022092,1032092,1042092,1052092,1062092,1072092,1082092...
//================================
// Renewal content (required for some core features)
//================================
//Base - 3rd Jobs, Baby 3rds, Expanded Super Novice, Kagerou/Oboro, and Rebellion
//Note: (First 98 values [Level 1 - 98] are dummy values (used Adv Jobs values), because 3rd classes start at level 99.)
255,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,0,10,18,28,40,85,123,168,220,278,400,481,613,731,875,1038,1213,1400,1575,1775,2268,2604,2786,3136,3506,4130,4796,5508,6264,9645,12392,14220,16159,18209,21649,24451,27401,30499,33748,47342,58160,64711,71573,78749,90144,99312,108870,118816,129154,174196,213220,238080,264150,291427,329640,363155,398116,434526,472381,610848,731828,806448,884232,965180,1073896,1170382,1270556,1374422,1481976,1850800,3389616,3666333,3953534,4251217,4559382...
//Job - 3rd Jobs, Baby 3rds, Expanded Super Novice, Kagerou/Oboro, and Rebellion
255,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,1,368,568,696,1206,1774,2192,3196,5080,7352,8580,9892,13358,18984,31925,35860,40013,51605,68585,87770,96443,105515,131770,167428,206720,223860,241673,294553,362303,479053,513362,548856,656197,787507,927154,985696,1046034,1231134,1449220,1678177,1943306,2244059,2584282,2968115,3400000,3884688,4427246,5033064,5707855,6457661,7288852,8208125,9222500,10339317,11566230,12911197,14382470,15988583,17738338,19640789,21705223,23941143,26358244,28966392,31775600,34796000,38037819,41511350,45226922,49194872,53425513,57929105,62715823,67795725,73178721,78874542,84892710,91242506,97932943,104972733,112370263,120133566,128270295,136787699,145692601,154991375,164689926,174793673,185307530,196235893,207582627,219351052,231543938,244163492...
map.h
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _MAP_H_
#define _MAP_H_
#include "../common/cbasetypes.h"
#include "../common/core.h" // CORE_ST_LAST
#include "../common/mmo.h"
#include "../common/mapindex.h"
#include "../common/db.h"
#include "../common/msg_conf.h"
#include "../config/core.h"
#include <stdarg.h>
struct npc_data;
struct item_data;
struct Channel;
enum E_MAPSERVER_ST {
MAPSERVER_ST_RUNNING = CORE_ST_LAST,
MAPSERVER_ST_STARTING,
MAPSERVER_ST_SHUTDOWN,
MAPSERVER_ST_LAST
};
#define msg_config_read(cfgName,isnew) map_msg_config_read(cfgName,isnew)
#define msg_txt(sd,msg_number) map_msg_txt(sd,msg_number)
#define do_final_msg() map_do_final_msg()
int map_msg_config_read(char *cfgName,int lang);
const char* map_msg_txt(struct map_session_data *sd,int msg_number);
void map_do_final_msg(void);
void map_msg_reload(void);
#define MAX_NPC_PER_MAP 512
#define AREA_SIZE battle_config.area_size
#define DAMAGELOG_SIZE 30
#define LOOTITEM_SIZE 10
#define MAX_MOBSKILL 50 //Max 128, see mob skill_idx type if need this higher
#define MAX_MOB_LIST_PER_MAP 128
#define MAX_EVENTQUEUE 2
#define MAX_EVENTTIMER 32
#define NATURAL_HEAL_INTERVAL 500
#define MIN_FLOORITEM 2
#define MAX_FLOORITEM START_ACCOUNT_NUM
#define MAX_LEVEL 255
#define MAX_DROP_PER_MAP 48
#define MAX_IGNORE_LIST 20 // official is 14
#define MAX_VENDING 12
#define MAX_MAP_SIZE 512*512 // Wasn't there something like this already? Can't find it.. [Shinryo]
/** Added definitions for WoESE objects and other [L0ne_W0lf], [aleos] */
enum MOBID {
MOBID_PORING = 1002,
MOBID_RED_PLANT = 1078,
MOBID_BLACK_MUSHROOM = 1084,
MOBID_GOBLIN_1 = 1122,
MOBID_GOBLIN_2,
MOBID_GOBLIN_3,
MOBID_GOBLIN_4,
MOBID_GOBLIN_5,
MOBID_MARINE_SPHERE = 1142,
MOBID_A_GUARDIAN = 1285,
MOBID_K_GUARDIAN,
MOBID_S_GUARDIAN,
MOBID_EMPERIUM,
MOBID_TREAS01 = 1324,
MOBID_TREAS40 = 1363,
MOBID_G_PARASITE = 1555,
MOBID_G_FLORA = 1575,
MOBID_G_HYDRA = 1579,
MOBID_G_MANDRAGORA = 1589,
MOBID_G_GEOGRAPHER = 1590,
MOBID_S_GUARDIAN_ = 1899,
MOBID_A_GUARDIAN_,
MOBID_BARRICADE1 = 1905,
MOBID_BARRICADE2,
MOBID_GUARIDAN_STONE1,
MOBID_GUARIDAN_STONE2,
MOBID_FOOD_STOR,
MOBID_BLUE_CRYST = 1914,
MOBID_PINK_CRYST,
MOBID_TREAS41 = 1938,
MOBID_TREAS49 = 1946,
MOBID_TATACHO = 1986,
MOBID_CENTIPEDE,
MOBID_NEPENTHES,
MOBID_HILLSRION,
MOBID_HARDROCK_MOMMOTH,
MOBID_TENDRILRION,
MOBID_CORNUS,
MOBID_NAGA,
MOBID_LUCIOLA_VESPA,
MOBID_PINGUICULA,
MOBID_G_TATACHO = 1997,
MOBID_G_HILLSRION,
MOBID_CENTIPEDE_LARVA,
MOBID_SILVERSNIPER = 2042,
MOBID_MAGICDECOY_FIRE,
MOBID_MAGICDECOY_WATER,
MOBID_MAGICDECOY_EARTH,
MOBID_MAGICDECOY_WIND,
MOBID_ZANZOU = 2308,
MOBID_S_HORNET = 2158,
MOBID_S_GIANT_HORNET,
MOBID_S_LUCIOLA_VESPA,
};
//The following system marks a different job ID system used by the map server,
//which makes a lot more sense than the normal one. [Skotlex]
//
//These marks the "level" of the job.
#define JOBL_2_1 0x100 //256
#define JOBL_2_2 0x200 //512
#define JOBL_2 0x300
#define JOBL_UPPER 0x1000 //4096
#define JOBL_BABY 0x2000 //8192
#define JOBL_THIRD 0x4000 //16384
//for filtering and quick checking.
#define MAPID_BASEMASK 0x00ff
#define MAPID_UPPERMASK 0x0fff
#define MAPID_THIRDMASK (JOBL_THIRD|MAPID_UPPERMASK)
//First Jobs
//Note the oddity of the novice:
//Super Novices are considered the 2-1 version of the novice! Novices are considered a first class type, too...
enum e_mapid {
//Novice And 1-1 Jobs
MAPID_NOVICE = 0x0,
MAPID_SWORDMAN,
MAPID_MAGE,
MAPID_ARCHER,
MAPID_ACOLYTE,
MAPID_MERCHANT,
MAPID_THIEF,
MAPID_TAEKWON,
MAPID_WEDDING,
MAPID_GUNSLINGER,
MAPID_NINJA,
MAPID_XMAS,
MAPID_SUMMER,
MAPID_HANBOK,
MAPID_GANGSI,
MAPID_OKTOBERFEST,
//2-1 Jobs
MAPID_SUPER_NOVICE = JOBL_2_1|0x0,
MAPID_KNIGHT,
MAPID_WIZARD,
MAPID_HUNTER,
MAPID_PRIEST,
MAPID_BLACKSMITH,
MAPID_ASSASSIN,
MAPID_STAR_GLADIATOR,
MAPID_REBELLION = JOBL_2_1 | 0x09,
MAPID_KAGEROUOBORO = JOBL_2_1|0x0A,
MAPID_DEATH_KNIGHT = JOBL_2_1|0x0E,
//2-2 Jobs
MAPID_CRUSADER = JOBL_2_2|0x1,
MAPID_SAGE,
MAPID_BARDDANCER,
MAPID_MONK,
MAPID_ALCHEMIST,
MAPID_ROGUE,
MAPID_SOUL_LINKER,
MAPID_DARK_COLLECTOR = JOBL_2_2|0x0E,
//Trans Novice And Trans 1-1 Jobs
MAPID_NOVICE_HIGH = JOBL_UPPER|0x0,
MAPID_SWORDMAN_HIGH,
MAPID_MAGE_HIGH,
MAPID_ARCHER_HIGH,
MAPID_ACOLYTE_HIGH,
MAPID_MERCHANT_HIGH,
MAPID_THIEF_HIGH,
//Trans 2-1 Jobs
MAPID_LORD_KNIGHT = JOBL_UPPER|JOBL_2_1|0x1,
MAPID_HIGH_WIZARD,
MAPID_SNIPER,
MAPID_HIGH_PRIEST,
MAPID_WHITESMITH,
MAPID_ASSASSIN_CROSS,
//Trans 2-2 Jobs
MAPID_PALADIN = JOBL_UPPER|JOBL_2_2|0x1,
MAPID_PROFESSOR,
MAPID_CLOWNGYPSY,
MAPID_CHAMPION,
MAPID_CREATOR,
MAPID_STALKER,
//Baby Novice And Baby 1-1 Jobs
MAPID_BABY = JOBL_BABY|0x0,
MAPID_BABY_SWORDMAN,
MAPID_BABY_MAGE,
MAPID_BABY_ARCHER,
MAPID_BABY_ACOLYTE,
MAPID_BABY_MERCHANT,
MAPID_BABY_THIEF,
//Baby 2-1 Jobs
MAPID_SUPER_BABY = JOBL_BABY|JOBL_2_1|0x0,
MAPID_BABY_KNIGHT,
MAPID_BABY_WIZARD,
MAPID_BABY_HUNTER,
MAPID_BABY_PRIEST,
MAPID_BABY_BLACKSMITH,
MAPID_BABY_ASSASSIN,
//Baby 2-2 Jobs
MAPID_BABY_CRUSADER = JOBL_BABY|JOBL_2_2|0x1,
MAPID_BABY_SAGE,
MAPID_BABY_BARDDANCER,
MAPID_BABY_MONK,
MAPID_BABY_ALCHEMIST,
MAPID_BABY_ROGUE,
//3-1 Jobs
MAPID_SUPER_NOVICE_E = JOBL_THIRD|JOBL_2_1|0x0,
MAPID_RUNE_KNIGHT,
MAPID_WARLOCK,
MAPID_RANGER,
MAPID_ARCH_BISHOP,
MAPID_MECHANIC,
MAPID_GUILLOTINE_CROSS,
//3-2 Jobs
MAPID_ROYAL_GUARD = JOBL_THIRD|JOBL_2_2|0x1,
MAPID_SORCERER,
MAPID_MINSTRELWANDERER,
MAPID_SURA,
MAPID_GENETIC,
MAPID_SHADOW_CHASER,
//Trans 3-1 Jobs
MAPID_RUNE_KNIGHT_T = JOBL_THIRD|JOBL_UPPER|JOBL_2_1|0x1,
MAPID_WARLOCK_T,
MAPID_RANGER_T,
MAPID_ARCH_BISHOP_T,
MAPID_MECHANIC_T,
MAPID_GUILLOTINE_CROSS_T,
//Trans 3-2 Jobs
MAPID_ROYAL_GUARD_T = JOBL_THIRD|JOBL_UPPER|JOBL_2_2|0x1,
MAPID_SORCERER_T,
MAPID_MINSTRELWANDERER_T,
MAPID_SURA_T,
MAPID_GENETIC_T,
MAPID_SHADOW_CHASER_T,
//Baby 3-1 Jobs
MAPID_SUPER_BABY_E = JOBL_THIRD|JOBL_BABY|JOBL_2_1|0x0,
MAPID_BABY_RUNE,
MAPID_BABY_WARLOCK,
MAPID_BABY_RANGER,
MAPID_BABY_BISHOP,
MAPID_BABY_MECHANIC,
MAPID_BABY_CROSS,
//Baby 3-2 Jobs
MAPID_BABY_GUARD = JOBL_THIRD|JOBL_BABY|JOBL_2_2|0x1,
MAPID_BABY_SORCERER,
MAPID_BABY_MINSTRELWANDERER,
MAPID_BABY_SURA,
MAPID_BABY_GENETIC,
MAPID_BABY_CHASER,
};
//Max size for inputs to Graffiti, Talkie Box and Vending text prompts
#define MESSAGE_SIZE (79 + 1)
//String length you can write in the 'talking box'
#define CHATBOX_SIZE (70 + 1)
//Chatroom-related string sizes
#define CHATROOM_TITLE_SIZE (36 + 1)
#define CHATROOM_PASS_SIZE (8 + 1)
//Max allowed chat text length
#define CHAT_SIZE_MAX (255 + 1)
//24 for npc name + 24 for label + 2 for a "::" and 1 for EOS
#define EVENT_NAME_LENGTH ( NAME_LENGTH * 2 + 3 )
#define DEFAULT_AUTOSAVE_INTERVAL 5*60*1000
//Specifies maps where players may hit each other
#define map_flag_vs(m) (map[m].flag.pvp || map[m].flag.gvg_dungeon || map[m].flag.gvg || ((agit_flag || agit2_flag) && map[m].flag.gvg_castle) || map[m].flag.battleground)
//Specifies maps that have special GvG/WoE restrictions
#define map_flag_gvg(m) (map[m].flag.gvg || ((agit_flag || agit2_flag) && map[m].flag.gvg_castle))
//Specifies if the map is tagged as GvG/WoE (regardless of agit_flag status)
#define map_flag_gvg2(m) (map[m].flag.gvg || map[m].flag.gvg_castle)
// No Kill Steal Protection
#define map_flag_ks(m) (map[m].flag.town || map[m].flag.pvp || map[m].flag.gvg || map[m].flag.battleground)
//This stackable implementation does not means a BL can be more than one type at a time, but it's
//meant to make it easier to check for multiple types at a time on invocations such as map_foreach* calls [Skotlex]
enum bl_type {
BL_NUL = 0x000,
BL_PC = 0x001,
BL_MOB = 0x002,
BL_PET = 0x004,
BL_HOM = 0x008,
BL_MER = 0x010,
BL_ITEM = 0x020,
BL_SKILL = 0x040,
BL_NPC = 0x080,
BL_CHAT = 0x100,
BL_ELEM = 0x200,
BL_ALL = 0xFFF,
};
//For common mapforeach calls. Since pets cannot be affected, they aren't included here yet.
#define BL_CHAR (BL_PC|BL_MOB|BL_HOM|BL_MER|BL_ELEM)
enum npc_subtype { WARP, SHOP, SCRIPT, CASHSHOP, ITEMSHOP, POINTSHOP, TOMB };
enum e_race {
RC_NONE_ = -1, //don't give us bonus
RC_FORMLESS = 0,
RC_UNDEAD,
RC_BRUTE,
RC_PLANT,
RC_INSECT,
RC_FISH,
RC_DEMON,
RC_DEMIHUMAN,
RC_ANGEL,
RC_DRAGON,
RC_PLAYER,
RC_ALL,
RC_MAX //auto upd enum for array size
};
enum e_classAE {
CLASS_NONE = -1, //don't give us bonus
CLASS_NORMAL = 0,
CLASS_BOSS,
CLASS_GUARDIAN,
CLASS_ALL,
CLASS_MAX //auto upd enum for array len
};
enum e_race2 {
RC2_NONE = 0,
RC2_GOBLIN,
RC2_KOBOLD,
RC2_ORC,
RC2_GOLEM,
RC2_GUARDIAN,
RC2_NINJA,
RC2_MAX
};
/// Element list
enum e_element {
ELE_NONE=-1,
ELE_NEUTRAL=0,
ELE_WATER,
ELE_EARTH,
ELE_FIRE,
ELE_WIND,
ELE_POISON,
ELE_HOLY,
ELE_DARK,
ELE_GHOST,
ELE_UNDEAD,
ELE_ALL,
ELE_MAX
};
#define MAX_ELE_LEVEL 4 /// Maximum Element level
enum mob_ai {
AI_NONE = 0,
AI_ATTACK,
AI_SPHERE,
AI_FLORA,
AI_ZANZOU,
AI_LEGION,
AI_FAW,
AI_MAX
};
enum auto_trigger_flag {
ATF_SELF=0x01,
ATF_TARGET=0x02,
ATF_SHORT=0x04,
ATF_LONG=0x08,
ATF_WEAPON=0x10,
ATF_MAGIC=0x20,
ATF_MISC=0x40,
};
struct block_list {
struct block_list *next,*prev;
int id;
int16 m,x,y;
enum bl_type type;
};
// Mob List Held in memory for Dynamic Mobs [Wizputer]
// Expanded to specify all mob-related spawn data by [Skotlex]
struct spawn_data {
short id; //ID, used because a mob can change it's class
unsigned short m, x, y; //Spawn information (map, point, spawn-area around point)
signed short xs, ys;
unsigned short num; //Number of mobs using this structure
unsigned short active;//Number of mobs that are already spawned (for mob_remove_damaged: no)
unsigned int delay1, delay2; //Spawn delay (fixed base + random variance)
unsigned int level;
struct {
unsigned int size : 2; //Holds if mob has to be tiny/large
enum mob_ai ai; //Special ai for summoned monsters.
unsigned int dynamic : 1; //Whether this data is indexed by a map's dynamic mob list
unsigned int boss : 1; //0: Non-boss monster | 1: Boss monster
} state;
char name[NAME_LENGTH], eventname[EVENT_NAME_LENGTH]; //Name/event
};
struct flooritem_data {
struct block_list bl;
unsigned char subx,suby;
int cleartimer;
int first_get_charid,second_get_charid,third_get_charid;
unsigned int first_get_tick,second_get_tick,third_get_tick;
struct item item_data;
};
enum _sp {
SP_SPEED,SP_BASEEXP,SP_JOBEXP,SP_KARMA,SP_MANNER,SP_HP,SP_MAXHP,SP_SP, // 0-7
SP_MAXSP,SP_STATUSPOINT,SP_0a,SP_BASELEVEL,SP_SKILLPOINT,SP_STR,SP_AGI,SP_VIT, // 8-15
SP_INT,SP_DEX,SP_LUK,SP_CLASS,SP_ZENY,SP_SEX,SP_NEXTBASEEXP,SP_NEXTJOBEXP, // 16-23
SP_WEIGHT,SP_MAXWEIGHT,SP_1a,SP_1b,SP_1c,SP_1d,SP_1e,SP_1f, // 24-31
SP_USTR,SP_UAGI,SP_UVIT,SP_UINT,SP_UDEX,SP_ULUK,SP_26,SP_27, // 32-39
SP_28,SP_ATK1,SP_ATK2,SP_MATK1,SP_MATK2,SP_DEF1,SP_DEF2,SP_MDEF1, // 40-47
SP_MDEF2,SP_HIT,SP_FLEE1,SP_FLEE2,SP_CRITICAL,SP_ASPD,SP_36,SP_JOBLEVEL, // 48-55
SP_UPPER,SP_PARTNER,SP_CART,SP_FAME,SP_UNBREAKABLE, //56-60
SP_CARTINFO=99, // 99
SP_BASEJOB=119, // 100+19 - celest
SP_BASECLASS=120, //Hmm.. why 100+19? I just use the next one... [Skotlex]
SP_KILLERRID=121,
SP_KILLEDRID=122,
SP_SITTING=123,
SP_CHARMOVE=124,
// Mercenaries
SP_MERCFLEE=165, SP_MERCKILLS=189, SP_MERCFAITH=190,
// original 1000-
SP_ATTACKRANGE=1000, SP_ATKELE,SP_DEFELE, // 1000-1002
SP_CASTRATE, SP_MAXHPRATE, SP_MAXSPRATE, SP_SPRATE, // 1003-1006
SP_ADDELE, SP_ADDRACE, SP_ADDSIZE, SP_SUBELE, SP_SUBRACE, // 1007-1011
SP_ADDEFF, SP_RESEFF, // 1012-1013
SP_BASE_ATK,SP_ASPD_RATE,SP_HP_RECOV_RATE,SP_SP_RECOV_RATE,SP_SPEED_RATE, // 1014-1018
SP_CRITICAL_DEF,SP_NEAR_ATK_DEF,SP_LONG_ATK_DEF, // 1019-1021
SP_DOUBLE_RATE, SP_DOUBLE_ADD_RATE, SP_SKILL_HEAL, SP_MATK_RATE, // 1022-1025
SP_IGNORE_DEF_ELE,SP_IGNORE_DEF_RACE, // 1026-1027
SP_ATK_RATE,SP_SPEED_ADDRATE,SP_SP_REGEN_RATE, // 1028-1030
SP_MAGIC_ATK_DEF,SP_MISC_ATK_DEF, // 1031-1032
SP_IGNORE_MDEF_ELE,SP_IGNORE_MDEF_RACE, // 1033-1034
SP_MAGIC_ADDELE,SP_MAGIC_ADDRACE,SP_MAGIC_ADDSIZE, // 1035-1037
SP_PERFECT_HIT_RATE,SP_PERFECT_HIT_ADD_RATE,SP_CRITICAL_RATE,SP_GET_ZENY_NUM,SP_ADD_GET_ZENY_NUM, // 1038-1042
SP_ADD_DAMAGE_CLASS,SP_ADD_MAGIC_DAMAGE_CLASS,SP_ADD_DEF_MONSTER,SP_ADD_MDEF_MONSTER, // 1043-1046
SP_ADD_MONSTER_DROP_ITEM,SP_DEF_RATIO_ATK_ELE,SP_DEF_RATIO_ATK_RACE,SP_UNBREAKABLE_GARMENT, // 1047-1050
SP_HIT_RATE,SP_FLEE_RATE,SP_FLEE2_RATE,SP_DEF_RATE,SP_DEF2_RATE,SP_MDEF_RATE,SP_MDEF2_RATE, // 1051-1057
SP_SPLASH_RANGE,SP_SPLASH_ADD_RANGE,SP_AUTOSPELL,SP_HP_DRAIN_RATE,SP_SP_DRAIN_RATE, // 1058-1062
SP_SHORT_WEAPON_DAMAGE_RETURN,SP_LONG_WEAPON_DAMAGE_RETURN,SP_WEAPON_COMA_ELE,SP_WEAPON_COMA_RACE, // 1063-1066
SP_ADDEFF2,SP_BREAK_WEAPON_RATE,SP_BREAK_ARMOR_RATE,SP_ADD_STEAL_RATE, // 1067-1070
SP_MAGIC_DAMAGE_RETURN,SP_ALL_STATS=1073,SP_AGI_VIT,SP_AGI_DEX_STR,SP_PERFECT_HIDE, // 1071-1076
SP_NO_KNOCKBACK,SP_CLASSCHANGE, // 1077-1078
SP_HP_DRAIN_VALUE,SP_SP_DRAIN_VALUE, // 1079-1080
SP_WEAPON_ATK,SP_WEAPON_ATK_RATE, // 1081-1082
SP_DELAYRATE,SP_HP_DRAIN_VALUE_RACE, SP_SP_DRAIN_VALUE_RACE, // 1083-1085
SP_IGNORE_MDEF_RACE_RATE,SP_IGNORE_DEF_RACE_RATE,SP_SKILL_HEAL2,SP_ADDEFF_ONSKILL, //1086-1089
SP_ADD_HEAL_RATE,SP_ADD_HEAL2_RATE, SP_EQUIP_ATK, //1090-1092
SP_RESTART_FULL_RECOVER=2000,SP_NO_CASTCANCEL,SP_NO_SIZEFIX,SP_NO_MAGIC_DAMAGE,SP_NO_WEAPON_DAMAGE,SP_NO_GEMSTONE, // 2000-2005
SP_NO_CASTCANCEL2,SP_NO_MISC_DAMAGE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR, SP_UNBREAKABLE_HELM, // 2006-2010
SP_UNBREAKABLE_SHIELD, SP_LONG_ATK_RATE, // 2011-2012
SP_CRIT_ATK_RATE, SP_CRITICAL_ADDRACE, SP_NO_REGEN, SP_ADDEFF_WHENHIT, SP_AUTOSPELL_WHENHIT, // 2013-2017
SP_SKILL_ATK, SP_UNSTRIPABLE, SP_AUTOSPELL_ONSKILL, // 2018-2020
SP_SP_GAIN_VALUE, SP_HP_REGEN_RATE, SP_HP_LOSS_RATE, SP_ADDRACE2, SP_HP_GAIN_VALUE, // 2021-2025
SP_SUBSIZE, SP_HP_DRAIN_VALUE_CLASS, SP_ADD_ITEM_HEAL_RATE, SP_SP_DRAIN_VALUE_CLASS, SP_EXP_ADDRACE, // 2026-2030
SP_SP_GAIN_RACE, SP_SUBRACE2, SP_UNBREAKABLE_SHOES, // 2031-2033
SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037
SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040
SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_ADD_MONSTER_ID_DROP_ITEM, //2041-2045
SP_EMATK, SP_SP_GAIN_RACE_ATTACK, SP_HP_GAIN_RACE_ATTACK, SP_SKILL_USE_SP_RATE, //2046-2049
SP_SKILL_COOLDOWN,SP_SKILL_FIXEDCAST, SP_SKILL_VARIABLECAST, SP_FIXCASTRATE, SP_VARCASTRATE, //2050-2054
SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST, //2055-2058
SP_SET_DEF_RACE,SP_SET_MDEF_RACE,SP_HP_VANISH_RATE, //2059-2061
SP_IGNORE_DEF_CLASS, SP_DEF_RATIO_ATK_CLASS, SP_ADDCLASS, SP_SUBCLASS, SP_MAGIC_ADDCLASS, //2062-2066
SP_WEAPON_COMA_CLASS, SP_IGNORE_MDEF_CLASS_RATE, SP_EXP_ADDCLASS, SP_ADD_CLASS_DROP_ITEM, //2067-2070
SP_ADD_CLASS_DROP_ITEMGROUP, SP_ADDMAXWEIGHT, SP_ADD_ITEMGROUP_HEAL_RATE // 2071-2073
};
enum _look {
LOOK_BASE,
LOOK_HAIR,
LOOK_WEAPON,
LOOK_HEAD_BOTTOM,
LOOK_HEAD_TOP,
LOOK_HEAD_MID,
LOOK_HAIR_COLOR,
LOOK_CLOTHES_COLOR,
LOOK_SHIELD,
LOOK_SHOES,
LOOK_BODY, //Purpose Unknown. Doesen't appear to do anything.
LOOK_RESET_COSTUMES,//Makes all headgear sprites on player vanish when activated.
LOOK_ROBE,
LOOK_FLOOR
};
// used by map_setcell()
typedef enum {
CELL_WALKABLE,
CELL_SHOOTABLE,
CELL_WATER,
CELL_NPC,
CELL_BASILICA,
CELL_LANDPROTECTOR,
CELL_NOVENDING,
CELL_NOCHAT,
CELL_MAELSTROM,
CELL_ICEWALL,
} cell_t;
// used by map_getcell()
typedef enum {
CELL_GETTYPE, // Retrieves a cell's 'gat' type
CELL_CHKWALL, // Whether the cell is a wall (gat type 1)
CELL_CHKWATER, // Whether the cell is water (gat type 3)
CELL_CHKCLIFF, // Whether the cell is a cliff/gap (gat type 5)
CELL_CHKPASS, // Whether the cell is passable (gat type not 1 and 5)
CELL_CHKREACH, // Whether the cell is passable, but ignores the cell stacking limit
CELL_CHKNOPASS, // Whether the cell is non-passable (gat types 1 and 5)
CELL_CHKNOREACH, // Whether the cell is non-passable, but ignores the cell stacking limit
CELL_CHKSTACK, // Whether the cell is full (reached cell stacking limit)
CELL_CHKNPC, // Whether the cell has an OnTouch NPC
CELL_CHKBASILICA, // Whether the cell has Basilica
CELL_CHKLANDPROTECTOR, // Whether the cell has Land Protector
CELL_CHKNOVENDING, // Whether the cell denies MC_VENDING skill
CELL_CHKNOCHAT, // Whether the cell denies Player Chat Window
CELL_CHKMAELSTROM, // Whether the cell has Maelstrom
CELL_CHKICEWALL, // Whether the cell has Ice Wall
} cell_chk;
struct mapcell
{
// terrain flags
unsigned char
walkable : 1,
shootable : 1,
water : 1;
// dynamic flags
unsigned char
npc : 1,
basilica : 1,
landprotector : 1,
novending : 1,
nochat : 1,
maelstrom : 1,
icewall : 1;
#ifdef CELL_NOSTACK
unsigned char cell_bl; //Holds amount of bls in this cell.
#endif
};
struct iwall_data {
char wall_name[50];
short m, x, y, size;
int8 dir;
bool shootable;
};
#ifdef ADJUST_SKILL_DAMAGE
struct s_skill_damage {
uint16 map, skill_id;
/* additional rates */
int pc,
mob,
boss,
other;
uint8 caster; /* caster type */
};
#define MAX_MAP_SKILL_MODIFIER 5
#endif
struct questinfo {
struct npc_data *nd;
unsigned short icon;
unsigned char color;
int quest_id;
bool hasJob;
unsigned short job;/* perhaps a mapid mask would be most flexible? */
};
struct map_data {
char name[MAP_NAME_LENGTH];
uint16 index; // The map index used by the mapindex* functions.
struct mapcell* cell; // Holds the information of each map cell (NULL if the map is not on this map-server).
struct block_list **block;
struct block_list **block_mob;
int16 m;
int16 xs,ys; // map dimensions (in cells)
int16 bxs,bys; // map dimensions (in blocks)
int16 bgscore_lion, bgscore_eagle; // Battleground ScoreBoard
int npc_num;
int users;
int users_pvp;
int iwall_num; // Total of invisible walls in this map
struct map_flag {
unsigned town : 1; // [Suggestion to protect Mail System]
unsigned autotrade : 1;
unsigned allowks : 1; // [Kill Steal Protection]
unsigned nomemo : 1;
unsigned noteleport : 1;
unsigned noreturn : 1;
unsigned monster_noteleport : 1;
unsigned nosave : 1;
unsigned nobranch : 1;
unsigned noexppenalty : 1;
unsigned pvp : 1;
unsigned pvp_noparty : 1;
unsigned pvp_noguild : 1;
unsigned pvp_nightmaredrop :1;
unsigned pvp_nocalcrank : 1;
unsigned gvg_castle : 1;
unsigned gvg : 1; // Now it identifies gvg versus maps that are active 24/7
unsigned gvg_dungeon : 1; // Celest
unsigned gvg_noparty : 1;
unsigned battleground : 2; // [BattleGround System]
unsigned nozenypenalty : 1;
unsigned notrade : 1;
unsigned noskill : 1;
unsigned nowarp : 1;
unsigned nowarpto : 1;
unsigned noicewall : 1; // [Valaris]
unsigned snow : 1; // [Valaris]
unsigned clouds : 1;
unsigned clouds2 : 1; // [Valaris]
unsigned fog : 1; // [Valaris]
unsigned fireworks : 1;
unsigned sakura : 1; // [Valaris]
unsigned leaves : 1; // [Valaris]
unsigned nogo : 1; // [Valaris]
unsigned nobaseexp : 1; // [Lorky] added by Lupus
unsigned nojobexp : 1; // [Lorky]
unsigned nomobloot : 1; // [Lorky]
unsigned nomvploot : 1; // [Lorky]
unsigned nightenabled :1; //For night display. [Skotlex]
unsigned restricted : 1; // [Komurka]
unsigned nodrop : 1;
unsigned novending : 1;
unsigned loadevent : 1;
unsigned nochat :1;
unsigned partylock :1;
unsigned guildlock :1;
unsigned reset :1; // [Daegaladh]
unsigned chmautojoin : 1; //prevent to auto join map channel
unsigned nousecart : 1; //prevent open up cart @FIXME client side only atm
unsigned noitemconsumption : 1; //prevent item usage
unsigned nosumstarmiracle : 1; //allow SG miracle to happen ?
unsigned nomineeffect : 1; //allow /mineeffect
unsigned nolockon : 1;
unsigned notomb : 1;
#ifdef ADJUST_SKILL_DAMAGE
unsigned skill_damage : 1;
#endif
} flag;
struct point save;
struct npc_data *npc[MAX_NPC_PER_MAP];
struct {
int drop_id;
int drop_type;
int drop_per;
} drop_list[MAX_DROP_PER_MAP];
struct spawn_data *moblist[MAX_MOB_LIST_PER_MAP]; // [Wizputer]
int mob_delete_timer; // [Skotlex]
uint32 zone; // zone number (for item/skill restrictions)
int nocommand; //Blocks @/# commands for non-gms. [Skotlex]
struct {
int jexp; // map experience multiplicator
int bexp; // map experience multiplicator
#ifdef ADJUST_SKILL_DAMAGE
struct s_skill_damage damage;
#endif
} adjust;
#ifdef ADJUST_SKILL_DAMAGE
struct s_skill_damage skill_damage[MAX_MAP_SKILL_MODIFIER];
#endif
/**
* Ice wall reference counter for bugreport:3574
* - since there are a thounsand mobs out there in a lot of maps checking on,
* - every targetting for icewall on attack path would just be a waste, so,
* - this counter allows icewall checking be only run when there is a actual ice wall on the map
**/
int icewall_num;
// Instance Variables
int instance_id;
int instance_src_map;
/* rAthena Local Chat */
struct Channel *channel;
/* ShowEvent Data Cache */
struct questinfo *qi_data;
unsigned short qi_count;
/* speeds up clif_updatestatus processing by causing hpmeter to run only when someone with the permission can view it */
unsigned short hpmeter_visible;
};
/// Stores information about a remote map (for multi-mapserver setups).
/// Beginning of data structure matches 'map_data', to allow typecasting.
struct map_data_other_server {
char name[MAP_NAME_LENGTH];
unsigned short index; //Index is the map index used by the mapindex* functions.
struct mapcell* cell; // If this is NULL, the map is not on this map-server
uint32 ip;
uint16 port;
};
int map_getcell(int16 m,int16 x,int16 y,cell_chk cellchk);
int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk);
void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag);
void map_setgatcell(int16 m, int16 x, int16 y, int gat);
extern struct map_data map[];
extern int map_num;
extern int autosave_interval;
extern int minsave_interval;
extern int save_settings;
extern int agit_flag;
extern int agit2_flag;
extern int night_flag; // 0=day, 1=night [Yor]
extern int enable_spy; //Determines if @spy commands are active.
extern char motd_txt[];
extern char help_txt[];
extern char help2_txt[];
extern char charhelp_txt[];
extern char wisp_server_name[];
// users
void map_setusers(int);
int map_getusers(void);
int map_usercount(void);
// blocklist lock
int map_freeblock(struct block_list *bl);
int map_freeblock_lock(void);
int map_freeblock_unlock(void);
// blocklist manipulation
int map_addblock(struct block_list* bl);
int map_delblock(struct block_list* bl);
int map_moveblock(struct block_list *, int, int, unsigned int);
int map_foreachinrange(int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int type, ...);
int map_foreachinshootrange(int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int type, ...);
int map_foreachinarea(int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, ...);
int map_forcountinrange(int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int count, int type, ...);
int map_forcountinarea(int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int count, int type, ...);
int map_foreachinmovearea(int (*func)(struct block_list*,va_list), struct block_list* center, int16 range, int16 dx, int16 dy, int type, ...);
int map_foreachincell(int (*func)(struct block_list*,va_list), int16 m, int16 x, int16 y, int type, ...);
int map_foreachinpath(int (*func)(struct block_list*,va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int16 range, int length, int type, ...);
int map_foreachinmap(int (*func)(struct block_list*,va_list), int16 m, int type, ...);
//blocklist nb in one cell
int map_count_oncell(int16 m,int16 x,int16 y,int type);
struct skill_unit *map_find_skill_unit_oncell(struct block_list *,int16 x,int16 y,uint16 skill_id,struct skill_unit *, int flag);
// search and creation
int map_get_new_object_id(void);
int map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, int16 rx, int16 ry, int flag);
//
int map_quit(struct map_session_data *);
// npc
bool map_addnpc(int16 m,struct npc_data *);
// map item
int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data);
int map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data);
void map_clearflooritem(struct block_list* bl);
int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,int first_charid,int second_charid,int third_charid,int flags);
// instances
int map_addinstancemap(const char*,int);
int map_delinstancemap(int);
// player to map session
void map_addnickdb(int charid, const char* nick);
void map_delnickdb(int charid, const char* nick);
void map_reqnickdb(struct map_session_data* sd,int charid);
const char* map_charid2nick(int charid);
struct map_session_data* map_charid2sd(int charid);
struct map_session_data * map_id2sd(int id);
struct mob_data * map_id2md(int id);
struct npc_data * map_id2nd(int id);
struct homun_data* map_id2hd(int id);
struct mercenary_data* map_id2mc(int id);
struct chat_data* map_id2cd(int id);
struct block_list * map_id2bl(int id);
bool map_blid_exists( int id );
#define map_id2index(id) map[(id)].index
const char* map_mapid2mapname(int m);
int16 map_mapindex2mapid(unsigned short mapindex);
int16 map_mapname2mapid(const char* name);
int map_mapname2ipport(unsigned short name, uint32* ip, uint16* port);
int map_setipport(unsigned short map, uint32 ip, uint16 port);
int map_eraseipport(unsigned short map, uint32 ip, uint16 port);
int map_eraseallipport(void);
void map_addiddb(struct block_list *);
void map_deliddb(struct block_list *bl);
void map_foreachpc(int (*func)(struct map_session_data* sd, va_list args), ...);
void map_foreachmob(int (*func)(struct mob_data* md, va_list args), ...);
void map_foreachnpc(int (*func)(struct npc_data* nd, va_list args), ...);
void map_foreachregen(int (*func)(struct block_list* bl, va_list args), ...);
void map_foreachiddb(int (*func)(struct block_list* bl, va_list args), ...);
struct map_session_data * map_nick2sd(const char*);
struct mob_data * map_getmob_boss(int16 m);
struct mob_data * map_id2boss(int id);
// reload config file looking only for npcs
void map_reloadnpc(bool clear);
void map_add_questinfo(int m, struct questinfo *qi);
bool map_remove_questinfo(int m, struct npc_data *nd);
/// Bitfield of flags for the iterator.
enum e_mapitflags
{
MAPIT_NORMAL = 0,
// MAPIT_PCISPLAYING = 1,// Unneeded as pc_db/id_db will only hold auth'ed, active players.
};
struct s_mapiterator;
struct s_mapiterator* mapit_alloc(enum e_mapitflags flags, enum bl_type types);
void mapit_free(struct s_mapiterator* mapit);
struct block_list* mapit_first(struct s_mapiterator* mapit);
struct block_list* mapit_last(struct s_mapiterator* mapit);
struct block_list* mapit_next(struct s_mapiterator* mapit);
struct block_list* mapit_prev(struct s_mapiterator* mapit);
bool mapit_exists(struct s_mapiterator* mapit);
#define mapit_getallusers() mapit_alloc(MAPIT_NORMAL,BL_PC)
#define mapit_geteachpc() mapit_alloc(MAPIT_NORMAL,BL_PC)
#define mapit_geteachmob() mapit_alloc(MAPIT_NORMAL,BL_MOB)
#define mapit_geteachnpc() mapit_alloc(MAPIT_NORMAL,BL_NPC)
#define mapit_geteachiddb() mapit_alloc(MAPIT_NORMAL,BL_ALL)
int map_check_dir(int s_dir,int t_dir);
uint8 map_calc_dir( struct block_list *src,int16 x,int16 y);
int map_random_dir(struct block_list *bl, short *x, short *y); // [Skotlex]
int cleanup_sub(struct block_list *bl, va_list ap);
int map_delmap(char* mapname);
void map_flags_init(void);
bool map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shootable, const char* wall_name);
void map_iwall_get(struct map_session_data *sd);
void map_iwall_remove(const char *wall_name);
int map_addmobtolist(unsigned short m, struct spawn_data *spawn); // [Wizputer]
void map_spawnmobs(int16 m); // [Wizputer]
void map_removemobs(int16 m); // [Wizputer]
void do_reconnect_map(void); //Invoked on map-char reconnection [Skotlex]
void map_addmap2db(struct map_data *m);
void map_removemapdb(struct map_data *m);
#define CHK_ELEMENT(ele) ((ele) > ELE_NONE && (ele) < ELE_MAX) /// Check valid Element
#define CHK_ELEMENT_LEVEL(lv) ((lv) >= 1 && (lv) <= MAX_ELE_LEVEL) /// Check valid element level
#define CHK_RACE(race) ((race) > RC_NONE_ && (race) < RC_MAX) /// Check valid Race
#define CHK_RACE2(race2) ((race2) >= RC2_NONE && (race2) < RC2_MAX) /// Check valid Race2
#define CHK_CLASS(class_) ((class_) > CLASS_NONE && (class_) < CLASS_MAX) /// Check valid Class
//Options read in cli
extern char *INTER_CONF_NAME;
extern char *LOG_CONF_NAME;
extern char *MAP_CONF_NAME;
extern char *BATTLE_CONF_FILENAME;
extern char *ATCOMMAND_CONF_FILENAME;
extern char *SCRIPT_CONF_NAME;
extern char *MSG_CONF_NAME_EN;
extern char *GRF_PATH_FILENAME;
//Other languages supported
char *MSG_CONF_NAME_RUS;
char *MSG_CONF_NAME_SPN;
char *MSG_CONF_NAME_GRM;
char *MSG_CONF_NAME_CHN;
char *MSG_CONF_NAME_MAL;
char *MSG_CONF_NAME_IDN;
char *MSG_CONF_NAME_FRN;
char *MSG_CONF_NAME_POR;
char *MSG_CONF_NAME_THA;
//Useful typedefs from jA [Skotlex]
typedef struct map_session_data TBL_PC;
typedef struct npc_data TBL_NPC;
typedef struct mob_data TBL_MOB;
typedef struct flooritem_data TBL_ITEM;
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;
typedef struct elemental_data TBL_ELEM;
#define BL_CAST(type_, bl) \
( ((bl) == (struct block_list*)NULL || (bl)->type != (type_)) ? (T ## type_ *)NULL : (T ## type_ *)(bl) )
#ifdef BETA_THREAD_TEST
extern char default_codepage[32];
extern int map_server_port;
extern char map_server_ip[32];
extern char map_server_id[32];
extern char map_server_pw[32];
extern char map_server_db[32];
extern char log_db_ip[32];
extern int log_db_port;
extern char log_db_id[32];
extern char log_db_pw[32];
extern char log_db_db[32];
#endif
#include "../common/sql.h"
extern int db_use_sqldbs;
extern Sql* mmysql_handle;
extern Sql* logmysql_handle;
extern char buyingstores_db[32];
extern char buyingstore_items_db[32];
extern char item_db_db[32];
extern char item_db2_db[32];
extern char item_db_re_db[32];
extern char mob_db_db[32];
extern char mob_db_re_db[32];
extern char mob_db2_db[32];
extern char mob_skill_db_db[32];
extern char mob_skill_db_re_db[32];
extern char mob_skill_db2_db[32];
extern char vendings_db[32];
extern char vending_items_db[32];
void do_shutdown(void);
#endif /* _MAP_H_ */