diff options
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/admin/ladmin.cpp | 8 | ||||
-rw-r--r-- | src/char/inter.cpp | 2 | ||||
-rw-r--r-- | src/map/atcommand.cpp | 2 | ||||
-rw-r--r-- | src/map/intif.cpp | 2 | ||||
-rw-r--r-- | src/map/map.hpp | 2 | ||||
-rw-r--r-- | src/map/party.cpp | 14 | ||||
-rw-r--r-- | src/map/pc.cpp | 7 | ||||
-rw-r--r-- | src/map/script-fun.cpp | 56 | ||||
-rw-r--r-- | version.mk | 2 |
12 files changed, 78 insertions, 25 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0368723..1cc7c15 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,9 +5,7 @@ stages: variables: &base_vars DEBIAN_COMMON_PACKAGES: make git gcc g++ - # Depth of clone. If no tag is made after this many commits, then - # the git describe call and version header generation will fail. - GIT_DEPTH: 100 # Will break again eventually. + GIT_DEPTH: 0 # avoid shallow clone since version is based on latest tag GIT_SUBMODULE_STRATEGY: normal .prerequisites: &prerequisites diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d550f3..5abdffb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,7 +93,7 @@ set(VENDOR_NAME Vanilla) set(VENDOR_POINT 0) # URL where the source may be found (after searching for version number). # See AGPLv3 section 13 -set(VENDOR_SOURCE https://git.themanaworld.org/legacy/tmwa) +set(VENDOR_SOURCE https://git.themanaworld.org/tmw/tmwa) # Convenience set(VERSION_STRING "TMWA ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} dev${PROJECT_VERSION_TWEAK} +${VENDOR_POINT} (${VENDOR_NAME})") @@ -91,7 +91,7 @@ The 4 main programs listed below are typically running on the same machine, but - `tmwa-map`: Formerly known as `map-server`. This server connects to `tmwa-char`. Multiple instances of `tmwa-map` can connect to the same `tmwa-char`, with clients able to switch servers if they move to a map handled by a different map server. This has not been used by The Mana World, and may not work properly. #### About server data -To run the server, you will need a complete set of content including config files, game scripts, savefiles, and client updates. We strongly recommend setting up a web server to serve the updates. You can find a compatible set of server data at https://git.themanaworld.org/legacy/serverdata. Please follow the instructions in the [How to Develop](https://wiki.themanaworld.org/index.php/Development:How_to_Develop) article for more information. +To run the server, you will need a complete set of content including config files, game scripts, savefiles, and client updates. We strongly recommend setting up a web server to serve the updates. You can find a compatible set of server data at https://git.themanaworld.org/tmw/serverdata. Please follow the instructions in the [How to Develop](https://wiki.themanaworld.org/index.php/Development:How_to_Develop) article for more information. ## 2. Contributors We welcome contributions from developers like you! If you are interested in maintaining this server, please get in touch with the currently active maintainers first. It's important to make changes with extreme care and ensure that each change is thoroughly tested and reviewed before it goes live. diff --git a/src/admin/ladmin.cpp b/src/admin/ladmin.cpp index 240582b..872d300 100644 --- a/src/admin/ladmin.cpp +++ b/src/admin/ladmin.cpp @@ -1304,8 +1304,8 @@ void reloadGM(ZString params) send_fpacket<0x7955, 2>(login_session, fixed_55); bytes_to_read = 0; - LADMIN_LOG("Request to reload the GM configuration file sended.\n"_fmt); - PRINTF("Request to reload the GM configuration file sended.\n"_fmt); + LADMIN_LOG("Request to reload the GM configuration file sent.\n"_fmt); + PRINTF("Request to reload the GM configuration file sent.\n"_fmt); PRINTF("Check the actual GM accounts (after reloading):\n"_fmt); listaccount(params, 1); // 1: to list only GM } @@ -2422,8 +2422,8 @@ void parse_fromlogin(Session *s) } else { - PRINTF("Message successfully sended to login-server.\n"_fmt); - LADMIN_LOG("Message successfully sended to login-server.\n"_fmt); + PRINTF("Message successfully sent to login-server.\n"_fmt); + LADMIN_LOG("Message successfully sent to login-server.\n"_fmt); } bytes_to_read = 0; break; diff --git a/src/char/inter.cpp b/src/char/inter.cpp index 3f2d1aa..90c3e7c 100644 --- a/src/char/inter.cpp +++ b/src/char/inter.cpp @@ -167,7 +167,7 @@ void inter_init2() } //-------------------------------------------------------- -// sended packets to map-server +// sent packets to map-server // GMメッセージ送信 static diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp index 346b0ac..feacd52 100644 --- a/src/map/atcommand.cpp +++ b/src/map/atcommand.cpp @@ -4415,7 +4415,7 @@ ATCE atcommand_email(Session *s, dumb_ptr<map_session_data> sd, else { chrif_changeemail(sd->status_key.account_id, actual_email, new_email); - clif_displaymessage(s, "Information sended to login-server via char-server."_s); + clif_displaymessage(s, "Information sent to login-server via char-server."_s); } return ATCE::OKAY; diff --git a/src/map/intif.cpp b/src/map/intif.cpp index f64f797..bdb73b6 100644 --- a/src/map/intif.cpp +++ b/src/map/intif.cpp @@ -364,7 +364,7 @@ void mapif_parse_WisToGM(Session *, const Packet_Head<0x3803>& head, AString& me // 0x3003/0x3803 <packet_len>.w <wispname>.24B <min_gm_level>.w <message>.?B GmLevel min_gm_level = head.min_gm_level; CharName Wisp_name = head.char_name; - // information is sended to all online GM + // information is sent to all online GM for (io::FD i : iter_fds()) { Session *s2 = get_session(i); diff --git a/src/map/map.hpp b/src/map/map.hpp index 8bb5aa7..0a1bd06 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -275,7 +275,7 @@ struct map_session_data : block_list, SessionData int deal_zeny; short deal_locked; - int party_sended; + int party_sent; PartyId party_invite; AccountId party_invite_account; int party_hp, party_x, party_y; diff --git a/src/map/party.cpp b/src/map/party.cpp index ccbfd75..2210064 100644 --- a/src/map/party.cpp +++ b/src/map/party.cpp @@ -250,10 +250,10 @@ int party_recv_info(const PartyPair sp) { // 設定情報の送信 // dumb_ptr<map_session_data> sd = map_id2sd(p->member[i].account_id); dumb_ptr<map_session_data> sd = dumb_ptr<map_session_data>(p->member[i].sd); - if (sd != nullptr && sd->party_sended == 0) + if (sd != nullptr && sd->party_sent == 0) { clif_party_option(p, sd, 0x100); - sd->party_sended = 1; + sd->party_sent = 1; } } @@ -393,7 +393,7 @@ int party_member_added(PartyId party_id, AccountId account_id, int flag) } // 成功 - sd->party_sended = 0; + sd->party_sent = 0; sd->status.party_id = party_id; if (sd2 != nullptr) @@ -476,7 +476,7 @@ int party_member_leaved(PartyId party_id, AccountId account_id, CharName name) if (sd != nullptr && sd->status.party_id == party_id) { sd->status.party_id = PartyId(); - sd->party_sended = 0; + sd->party_sent = 0; } return 0; } @@ -495,7 +495,7 @@ int party_broken(PartyId party_id) p->member[i].account_id, p->member[i].name, 0x10); p->member[i].sd->status.party_id = PartyId(); - p->member[i].sd->party_sended = 0; + p->member[i].sd->party_sent = 0; } } party_db.erase(party_id); @@ -582,7 +582,7 @@ int party_send_movemap(dumb_ptr<map_session_data> sd) return 0; intif_party_changemap(sd, 1); - if (sd->party_sended != 0) // もうパーティデータは送信済み + if (sd->party_sent != 0) // もうパーティデータは送信済み return 0; // 競合確認 @@ -596,7 +596,7 @@ int party_send_movemap(dumb_ptr<map_session_data> sd) { clif_party_info(p, sd->sess); clif_party_option(p, sd, 0x100); - sd->party_sended = 1; + sd->party_sent = 1; } } diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 9ef70fe..54ea13d 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -871,6 +871,11 @@ int pc_authok(AccountId id, int login_id2, ClientVersion client_version, sd->quick_regeneration_sp.amount = 0; sd->heal_xp = 0; sd->max_weight_override = 0; + sd->activity.kills = 0; + sd->activity.casts = 0; + sd->activity.items_used = 0; + sd->activity.tiles_walked = 0; + sd->activity.attacks = 0; sd->canact_tick = tick; sd->canmove_tick = tick; sd->attackabletime = tick; @@ -899,7 +904,7 @@ int pc_authok(AccountId id, int login_id2, ClientVersion client_version, } // パーティー関係の初期化 | Initializing Party Relationships - sd->party_sended = 0; + sd->party_sent = 0; sd->party_invite = PartyId(); sd->party_x = -1; sd->party_y = -1; diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 27807b9..58bca90 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -1920,7 +1920,7 @@ void builtin_countitem(ScriptState *st) else { if (battle_config.error_log) - PRINTF("wrong item ID: countitem (%i)\n"_fmt, nameid); + PRINTF("builtin_countitem: no item ID\n"_fmt); } push_int<ScriptDataInt>(st->stack, count); @@ -2491,9 +2491,9 @@ void builtin_end(ScriptState *st) { dumb_ptr<npc_data> nd = map_id_is_npc(st->oid); if(nd) - PRINTF("Deprecated: close in a callfunc or callsub! @ %s\n"_fmt, nd->name); + PRINTF("Deprecated: end in a callfunc or callsub! @ %s\n"_fmt, nd->name); else - PRINTF("Deprecated: close in a callfunc or callsub! (no npc)\n"_fmt); + PRINTF("Deprecated: end in a callfunc or callsub! (no npc)\n"_fmt); } st->state = ScriptEndState::END; } @@ -5517,6 +5517,53 @@ void builtin_getmapnamefromhash(ScriptState *st) } /*========================================== + * Look if a map exists + * return value: + * 0 = map does not exist + * 1 = map exists + *------------------------------------------ + */ +static +void builtin_mapexists(ScriptState *st) +{ + MapName mapname = stringish<MapName>(ZString(conv_str(st, &AARG(0)))); + push_int<ScriptDataInt>(st->stack, map_mapname2mapid(mapname).is_some()); +} + +/*========================================== + * Returns number of available maps + *------------------------------------------ + */ +static +void builtin_numberofmaps(ScriptState *st) +{ + push_int<ScriptDataInt>(st->stack, maps_db.size()); +} + +/*========================================== + * Get the map name of a specific maps_db index + *------------------------------------------ + */ +static +void builtin_getmapnamebyindex(ScriptState *st) +{ + int index = conv_num(st, &AARG(0)); + int count = 0; + + for (auto& mit : maps_db) + { + if (count == index) + { + push_str<ScriptDataStr>(st->stack, mit.second->name_); + return; + } + ++count; + } + + push_str<ScriptDataStr>(st->stack, ""_s); +} + +/*========================================== * Get the NPC's info *------------------------------------------ */ @@ -5782,6 +5829,9 @@ BuiltinFunction builtin_functions[] = BUILTIN(getmapmaxy, "M"_s, 'i'), BUILTIN(getmaphash, "M"_s, 'i'), BUILTIN(getmapnamefromhash, "i"_s, 's'), + BUILTIN(mapexists, "M"_s, 'i'), + BUILTIN(numberofmaps, ""_s, 'i'), + BUILTIN(getmapnamebyindex, "i"_s, 's'), BUILTIN(mapexit, ""_s, '\0'), BUILTIN(freeloop, "i"_s, '\0'), BUILTIN(if_then_else, "iii"_s, 'v'), @@ -39,7 +39,7 @@ VENDOR_NAME := Vanilla VENDOR_POINT := 0 # URL where the source may be found (after searching for version number). # See AGPLv3 section 13 -VENDOR_SOURCE := https://git.themanaworld.org/legacy/tmwa +VENDOR_SOURCE := https://git.themanaworld.org/tmw/tmwa # Convenience VERSION_STRING := TMWA ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} dev${VERSION_DEVEL} +${VENDOR_POINT} (${VENDOR_NAME}) |