diff options
author | Taylor Locke <kisuka@kisuka.com> | 2015-09-05 16:21:53 -0700 |
---|---|---|
committer | Taylor Locke <kisuka@kisuka.com> | 2015-09-05 16:21:53 -0700 |
commit | 6bb416f305c8d814561d611365ad8a1e91120b30 (patch) | |
tree | 7cd656d12ddde4efaaa5edc670525451720422cd | |
parent | 8229ecb0f71629f840f57d714f0fbf293dade9d5 (diff) | |
download | hercules-6bb416f305c8d814561d611365ad8a1e91120b30.tar.gz hercules-6bb416f305c8d814561d611365ad8a1e91120b30.tar.bz2 hercules-6bb416f305c8d814561d611365ad8a1e91120b30.tar.xz hercules-6bb416f305c8d814561d611365ad8a1e91120b30.zip |
Added RE/Pre-RE start_point ability.
-rw-r--r-- | conf/char-server.conf | 1 | ||||
-rw-r--r-- | src/char/char.c | 51 |
2 files changed, 39 insertions, 13 deletions
diff --git a/conf/char-server.conf b/conf/char-server.conf index 152340532..1fee6df06 100644 --- a/conf/char-server.conf +++ b/conf/char-server.conf @@ -96,6 +96,7 @@ save_log: yes // Start point, Map name followed by coordinates (x,y) start_point: iz_int,97,90 +start_point_pre: new_1-1,53,111 // Starting items for new characters // Format is: id1,quantity1,stackable1,idN,quantityN,stackableN diff --git a/src/char/char.c b/src/char/char.c index 819cd2ef8..c54fedb8c 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -140,7 +140,11 @@ struct fame_list chemist_fame_list[MAX_FAME_LIST]; struct fame_list taekwon_fame_list[MAX_FAME_LIST]; // Initial position (it's possible to set it in conf file) -struct point start_point = { 0, 53, 111 }; +#ifdef RENEWAL + struct point start_point = { 0, 97, 90 }; +#else + struct point start_point = { 0, 53, 111 }; +#endif unsigned short skillid2idx[MAX_SKILL_ID]; @@ -5639,17 +5643,33 @@ int char_config_read(const char* cfgName) autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; } else if (strcmpi(w1, "save_log") == 0) { save_log = config_switch(w2); - } else if (strcmpi(w1, "start_point") == 0) { - char map[MAP_NAME_LENGTH_EXT]; - int x, y; - if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3) - continue; - start_point.map = mapindex->name2id(map); - if (!start_point.map) - ShowError("Specified start_point %s not found in map-index cache.\n", map); - start_point.x = x; - start_point.y = y; - } else if (strcmpi(w1, "start_items") == 0) { + } + #ifdef RENEWAL + else if (strcmpi(w1, "start_point") == 0) { + char map[MAP_NAME_LENGTH_EXT]; + int x, y; + if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3) + continue; + start_point.map = mapindex->name2id(map); + if (!start_point.map) + ShowError("Specified start_point %s not found in map-index cache.\n", map); + start_point.x = x; + start_point.y = y; + } + #else + else if (strcmpi(w1, "start_point_pre") == 0) { + char map[MAP_NAME_LENGTH_EXT]; + int x, y; + if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3) + continue; + start_point.map = mapindex->name2id(map); + if (!start_point.map) + ShowError("Specified start_point_pre %s not found in map-index cache.\n", map); + start_point.x = x; + start_point.y = y; + } + #endif + else if (strcmpi(w1, "start_items") == 0) { int i; char *split; @@ -5876,7 +5896,12 @@ int do_init(int argc, char **argv) { //Read map indexes mapindex->init(); - start_point.map = mapindex->name2id("new_zone01"); + + #ifdef RENEWAL + start_point.map = mapindex->name2id("iz_int"); + #else + start_point.map = mapindex->name2id("new_1-1"); + #endif cmdline->exec(argc, argv, CMDLINE_OPT_NORMAL); chr->config_read(chr->CHAR_CONF_NAME); |