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/map/pc.cpp | 5 | ||||
-rw-r--r-- | src/map/script-fun.cpp | 51 | ||||
-rw-r--r-- | src/map/skill.cpp | 2 | ||||
-rw-r--r-- | src/mmo/skill.t.hpp | 1 | ||||
-rw-r--r-- | version.mk | 2 |
8 files changed, 63 insertions, 6 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/map/pc.cpp b/src/map/pc.cpp index 9ef70fe..ecfd50e 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; diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index c471da1..64ba542 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -3881,6 +3881,7 @@ void builtin_sc_start(ScriptState *st) case StatusChange::SC_COOLDOWN_KOY: case StatusChange::SC_COOLDOWN_UPMARMU: case StatusChange::SC_COOLDOWN_SG: + case StatusChange::SC_COOLDOWN_CG: case StatusChange::SC_SLOWMOVE: case StatusChange::SC_CANTMOVE: break; @@ -5516,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 *------------------------------------------ */ @@ -5781,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'), diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 7454cc3..f70a626 100644 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -768,6 +768,7 @@ void skill_status_change_end(dumb_ptr<block_list> bl, StatusChange type, TimerDa case StatusChange::SC_COOLDOWN_KOY: case StatusChange::SC_COOLDOWN_UPMARMU: case StatusChange::SC_COOLDOWN_SG: + case StatusChange::SC_COOLDOWN_CG: case StatusChange::SC_CANTMOVE: break; @@ -1050,6 +1051,7 @@ int skill_status_effect(dumb_ptr<block_list> bl, StatusChange type, case StatusChange::SC_COOLDOWN_KOY: case StatusChange::SC_COOLDOWN_UPMARMU: case StatusChange::SC_COOLDOWN_SG: + case StatusChange::SC_COOLDOWN_CG: case StatusChange::SC_CANTMOVE: break; case StatusChange::SC_FLYING_BACKPACK: diff --git a/src/mmo/skill.t.hpp b/src/mmo/skill.t.hpp index b0b6b8d..bab10f4 100644 --- a/src/mmo/skill.t.hpp +++ b/src/mmo/skill.t.hpp @@ -61,6 +61,7 @@ enum class StatusChange : uint16_t SC_COOLDOWN_KOY = 77, // Koyntety cooldown SC_COOLDOWN_UPMARMU = 78, // Upmarmu cooldown SC_COOLDOWN_SG = 79, // Stone Golem cooldown + SC_COOLDOWN_CG = 80, // Coal Golem cooldown SC_POISON = 132, // bad; actually used SC_SLOWMOVE = 133, // slows down movement @@ -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}) |