Skip to content

Commit

Permalink
Merge branch 'master' into random_decay
Browse files Browse the repository at this point in the history
  • Loading branch information
MillhioreBT authored Mar 14, 2024
2 parents 74e969a + 8db76ef commit a89f485
Show file tree
Hide file tree
Showing 118 changed files with 2,162 additions and 1,849 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: >
sudo apt update -q &&
sudo apt install -yq build-essential libluajit-5.1-dev libmysqlclient-dev
libboost-system-dev libboost-iostreams-dev
libboost-system-dev libboost-iostreams-dev libboost-locale-dev
libpugixml-dev libcrypto++-dev libfmt-dev
- name: Build with cmake
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 501db0f17ef6df184fcdbfbe0f87cde2313b6ab1
vcpkgGitCommitId: a42af01b72c28a8e1d7b48107b33e4f286a55ef6

- name: Build with CMake
uses: lukka/run-cmake@v10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 501db0f17ef6df184fcdbfbe0f87cde2313b6ab1
vcpkgGitCommitId: a42af01b72c28a8e1d7b48107b33e4f286a55ef6

- name: Build with CMake
uses: lukka/run-cmake@v10
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ jobs:
test:
runs-on: ubuntu-latest

env:
CC: gcc
CXX: g++

steps:
- uses: actions/checkout@v3

Expand All @@ -21,13 +17,13 @@ jobs:
run: >
sudo apt update -q &&
sudo apt install -yq git build-essential libluajit-5.1-dev libmysqlclient-dev
libboost-system-dev libboost-iostreams-dev libboost-test-dev
libboost-system-dev libboost-iostreams-dev libboost-locale-dev libboost-test-dev
libpugixml-dev libcrypto++-dev libfmt-dev
- name: Build with CMake
uses: lukka/run-cmake@v10
with:
buildPreset: default
configurePreset: default
configurePresetAdditionalArgs: "['-G Ninja', '-DENABLE_TESTING=ON']"
configurePresetAdditionalArgs: "['-G Ninja', '-DBUILD_TESTING=ON']"
testPreset: default
17 changes: 14 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,13 @@ if (NOT FORCE_LUAJIT)
find_package(Lua REQUIRED)
endif ()

find_package(Boost 1.66.0 REQUIRED COMPONENTS system iostreams)
if (APPLE)
find_package(Iconv REQUIRED)
endif()

find_package(Boost 1.66.0 REQUIRED COMPONENTS system iostreams locale)

option(ENABLE_TESTING "Build unit tests" OFF)
option(BUILD_TESTING "Build unit tests" OFF)

include_directories(${Boost_INCLUDE_DIRS} ${Crypto++_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${PUGIXML_INCLUDE_DIR})

Expand All @@ -78,7 +82,8 @@ add_subdirectory(src)
add_executable(tfs ${tfs_MAIN})
target_link_libraries(tfs tfslib)

if (ENABLE_TESTING)
if (BUILD_TESTING)
message(STATUS "Building unit tests")
enable_testing()
add_subdirectory(src/tests)
endif()
Expand Down Expand Up @@ -110,4 +115,10 @@ if(NOT SKIP_GIT)
endif()
### END Git Version ###

# Option to disable unity builds
option(ENABLE_UNITY_BUILD "Enable unity build" ON)
if(ENABLE_UNITY_BUILD)
set_target_properties(tfslib PROPERTIES UNITY_BUILD ON)
endif()

target_precompile_headers(tfs PUBLIC src/otpch.h)
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ FROM alpine:3.17.3
# crypto++ is in edge/community
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ \
boost-iostreams \
boost-locale \
boost-system \
crypto++ \
fmt \
Expand Down
41 changes: 25 additions & 16 deletions data/XML/mounts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<mount id="21" clientid="406" name="Scorpion King" speed="20" premium="yes" />
<mount id="22" clientid="421" name="Rented Horse" speed="20" premium="no" />
<mount id="23" clientid="426" name="Armoured War Horse" speed="20" premium="no" />
<mount id="24" clientid="427" name="Shadow Draptor" speed="20" premium="yes" />
<mount id="24" clientid="427" name="Shadow Draptor" speed="20" premium="no" />
<mount id="25" clientid="437" name="Rented Horse" speed="20" premium="no" />
<mount id="26" clientid="438" name="Rented Horse" speed="20" premium="no" />
<mount id="27" clientid="447" name="Lady Bug" speed="20" premium="yes" />
Expand Down Expand Up @@ -105,7 +105,7 @@
<mount id="103" clientid="905" name="Jackalope" speed="20" premium="no" />
<mount id="104" clientid="906" name="Dreadhare" speed="20" premium="no" />
<mount id="105" clientid="907" name="Wolpertinger" speed="20" premium="no" />
<mount id="106" clientid="937" name="Stone Rhino" speed="20" premium="no" />
<mount id="106" clientid="937" name="Stone Rhino" speed="20" premium="yes" />
<mount id="107" clientid="950" name="Gold Sphinx" speed="20" premium="no" />
<mount id="108" clientid="951" name="Emerald Sphinx" speed="20" premium="no" />
<mount id="109" clientid="952" name="Shadow Sphinx" speed="20" premium="no" />
Expand All @@ -118,14 +118,14 @@
<mount id="116" clientid="1025" name="Cranium Spider" speed="20" premium="no" />
<mount id="117" clientid="1026" name="Cave Tarantula" speed="20" premium="no" />
<mount id="118" clientid="1027" name="Gloom Widow" speed="20" premium="no" />
<mount id="119" clientid="1049" name="Mole" speed="20" premium="no" />
<mount id="119" clientid="1049" name="Mole" speed="20" premium="yes" />
<mount id="120" clientid="1052" name="Marsh Toad" speed="20" premium="no" />
<mount id="121" clientid="1053" name="Sanguine Frog" speed="20" premium="no" />
<mount id="122" clientid="1054" name="Toxic Toad" speed="20" premium="no" />
<mount id="123" clientid="1091" name="Ebony Tiger" speed="20" premium="no" />
<mount id="124" clientid="1092" name="Feral Tiger" speed="20" premium="no" />
<mount id="125" clientid="1093" name="Jungle Tiger" speed="20" premium="no" />
<mount id="126" clientid="1101" name="Fleeting Knowledge" speed="20" premium="no" />
<mount id="126" clientid="1101" name="Fleeting Knowledge" speed="20" premium="yes" />
<mount id="127" clientid="1104" name="Tawny Owl" speed="20" premium="no" />
<mount id="128" clientid="1105" name="Snowy Owl" speed="20" premium="no" />
<mount id="129" clientid="1106" name="Boreal Owl" speed="20" premium="no" />
Expand All @@ -137,15 +137,15 @@
<mount id="135" clientid="1167" name="Festive Snowman" speed="20" premium="no" />
<mount id="136" clientid="1168" name="Muffled Snowman" speed="20" premium="no" />
<mount id="137" clientid="1169" name="Caped Snowman" speed="20" premium="no" />
<mount id="138" clientid="1179" name="Rabbit Rickshaw" speed="20" premium="yes" />
<mount id="139" clientid="1180" name="Bunny Dray" speed="20" premium="yes" />
<mount id="140" clientid="1181" name="Cony Cart" speed="20" premium="yes" />
<mount id="138" clientid="1179" name="Rabbit Rickshaw" speed="20" premium="no" />
<mount id="139" clientid="1180" name="Bunny Dray" speed="20" premium="no" />
<mount id="140" clientid="1181" name="Cony Cart" speed="20" premium="no" />
<mount id="141" clientid="1183" name="River Crocovile" speed="20" premium="no" />
<mount id="142" clientid="1184" name="Swamp Crocovile" speed="20" premium="no" />
<mount id="143" clientid="1185" name="Nightmarish Crocovile" speed="20" premium="no" />
<mount id="144" clientid="1191" name="Gryphon" speed="20" premium="yes" />
<mount id="145" clientid="1208" name="Jousting Eagle" speed="20" premium="yes" />
<mount id="146" clientid="1209" name="Cerberus Champion" speed="20" premium="yes" />
<mount id="145" clientid="1208" name="Jousting Eagle" speed="20" premium="no" />
<mount id="146" clientid="1209" name="Cerberus Champion" speed="20" premium="no" />
<mount id="147" clientid="1229" name="Cold Percht Sleigh Variant" speed="20" premium="yes" />
<mount id="148" clientid="1230" name="Bright Percht Sleigh Variant" speed="20" premium="yes" />
<mount id="149" clientid="1231" name="Dark Percht Sleigh Variant" speed="20" premium="yes" />
Expand All @@ -155,18 +155,18 @@
<mount id="153" clientid="1247" name="Battle Badger" speed="20" premium="no" />
<mount id="154" clientid="1248" name="Ether Badger" speed="20" premium="no" />
<mount id="155" clientid="1249" name="Zaoan Badger" speed="20" premium="no" />
<mount id="156" clientid="1257" name="Blue Rolling Barrel" speed="20" premium="no" />
<mount id="157" clientid="1258" name="Red Rolling Barrel" speed="20" premium="no" />
<mount id="158" clientid="1259" name="Green Rolling Barrel" speed="20" premium="no" />
<mount id="156" clientid="1257" name="Blue Rolling Barrel" speed="20" premium="yes" />
<mount id="157" clientid="1258" name="Red Rolling Barrel" speed="20" premium="yes" />
<mount id="158" clientid="1259" name="Green Rolling Barrel" speed="20" premium="yes" />
<mount id="159" clientid="1264" name="Floating Sage" speed="20" premium="no" />
<mount id="160" clientid="1265" name="Floating Scholar" speed="20" premium="no" />
<mount id="161" clientid="1266" name="Floating Augur" speed="20" premium="no" />
<mount id="162" clientid="1269" name="Haze" speed="20" premium="yes" />
<mount id="163" clientid="1281" name="Antelope" speed="20" premium="yes" />
<mount id="164" clientid="1284" name="Snow Strider" speed="20" premium="yes" />
<mount id="165" clientid="1285" name="Dusk Pryer" speed="20" premium="yes" />
<mount id="166" clientid="1286" name="Dawn Strayer" speed="20" premium="yes" />
<mount id="167" clientid="1321" name="Spectral Horse" speed="20" premium="yes" />
<mount id="164" clientid="1284" name="Snow Strider" speed="20" premium="no" />
<mount id="165" clientid="1285" name="Dusk Pryer" speed="20" premium="no" />
<mount id="166" clientid="1286" name="Dawn Strayer" speed="20" premium="no" />
<mount id="167" clientid="1321" name="Phantasmal Jade" speed="20" premium="yes" />
<mount id="168" clientid="1324" name="Savanna Ostrich" speed="20" premium="yes" />
<mount id="169" clientid="1325" name="Coral Rhea" speed="20" premium="yes" />
<mount id="170" clientid="1326" name="Eventide Nandu" speed="20" premium="yes" />
Expand Down Expand Up @@ -200,4 +200,13 @@
<mount id="198" clientid="1526" name="Poppy Ibex" speed="20" premium="no" />
<mount id="199" clientid="1527" name="Mint Ibex" speed="20" premium="no" />
<mount id="200" clientid="1528" name="Cinnamon Ibex" speed="20" premium="no" />
<mount id="201" clientid="1536" name="Giant Beaver" speed="20" premium="yes" />
<mount id="202" clientid="1577" name="Ripptor" speed="20" premium="yes" />
<mount id="203" clientid="1578" name="Parade Horse" speed="20" premium="no" />
<mount id="204" clientid="1579" name="Jousting Horse" speed="20" premium="no" />
<mount id="205" clientid="1580" name="Tourney Horse" speed="20" premium="no" />
<mount id="206" clientid="1599" name="Mutated Abomination" speed="20" premium="yes" />
<mount id="207" clientid="1608" name="Tangerine Flecked Koi" speed="20" premium="no" />
<mount id="208" clientid="1609" name="Brass Speckled Koi" speed="20" premium="no" />
<mount id="209" clientid="1610" name="Ink Spotted Koi" speed="20" premium="no" />
</mounts>
28 changes: 18 additions & 10 deletions data/XML/outfits.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<outfit type="0" looktype="963" name="Retro Warrior" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="965" name="Retro Summoner" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="967" name="Retro Noblewoman" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="969" name="Retro Wizard" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="969" name="Retro Mage" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="971" name="Retro Knight" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="973" name="Retro Hunter" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="975" name="Retro Citizen" premium="no" unlocked="no" enabled="yes" />
Expand All @@ -83,13 +83,13 @@
<outfit type="0" looktype="1203" name="Void Master" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1205" name="Veteran Paladin" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1207" name="Lion of War" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1211" name="Golden Outfit" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1246" name="Breezy Garb" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1211" name="Golden Outfit" premium="yes" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1244" name="Hand of the Inquisition" premium="yes" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1252" name="Traditionalist" premium="yes" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1246" name="Breezy Garb" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1252" name="Orcsoberfest Garb" premium="yes" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1271" name="Poltergeist" premium="yes" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1280" name="Herder" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1283" name="Falconer" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1283" name="Falconer" premium="yes" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1289" name="Dragon Slayer" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1293" name="Trailblazer" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1323" name="Revenant" premium="yes" unlocked="no" enabled="yes" />
Expand All @@ -107,6 +107,10 @@
<outfit type="0" looktype="1461" name="Formal Dress" premium="yes" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1490" name="Ghost Blade" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1501" name="Nordic Chieftain" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1569" name="Fire-Fighter" premium="yes" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1576" name="Fencer" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1582" name="Shadowlotus Disciple" premium="no" unlocked="no" enabled="yes" />
<outfit type="0" looktype="1598" name="Ancient Aucar" premium="yes" unlocked="no" enabled="yes" />

<!-- Male outfits -->
<outfit type="1" looktype="128" name="Citizen" premium="no" unlocked="yes" enabled="yes" />
Expand Down Expand Up @@ -171,7 +175,7 @@
<outfit type="1" looktype="962" name="Retro Warrior" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="964" name="Retro Summoner" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="966" name="Retro Nobleman" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="968" name="Retro Wizard" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="968" name="Retro Mage" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="970" name="Retro Knight" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="972" name="Retro Hunter" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="974" name="Retro Citizen" premium="no" unlocked="no" enabled="yes" />
Expand All @@ -191,13 +195,13 @@
<outfit type="1" looktype="1202" name="Void Master" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1204" name="Veteran Paladin" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1206" name="Lion of War" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1210" name="Golden Outfit" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1245" name="Breezy Garb" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1210" name="Golden Outfit" premium="yes" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1243" name="Hand of the Inquisition" premium="yes" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1251" name="Traditionalist" premium="yes" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1245" name="Breezy Garb" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1251" name="Orcsoberfest Garb" premium="yes" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1270" name="Poltergeist" premium="yes" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1279" name="Herder" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1282" name="Falconer" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1282" name="Falconer" premium="yes" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1288" name="Dragon Slayer" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1292" name="Trailblazer" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1322" name="Revenant" premium="yes" unlocked="no" enabled="yes" />
Expand All @@ -215,4 +219,8 @@
<outfit type="1" looktype="1460" name="Formal Dress" premium="yes" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1489" name="Ghost Blade" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1500" name="Nordic Chieftain" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1568" name="Fire-Fighter" premium="yes" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1575" name="Fencer" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1581" name="Shadowlotus Disciple" premium="no" unlocked="no" enabled="yes" />
<outfit type="1" looktype="1597" name="Ancient Aucar" premium="yes" unlocked="no" enabled="yes" />
</outfits>
6 changes: 0 additions & 6 deletions data/actions/actions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,10 @@
<action itemid="486" script="others/snow_heap.lua" />
<action itemid="1369" script="others/draw_well.lua" />
<action itemid="1386" script="others/teleport.lua" />
<action fromid="1728" toid="1731" script="others/watch.lua" />
<action fromid="1816" toid="1817" script="others/wall_mirror.lua" />
<action fromid="1843" toid="1844" script="others/wall_mirror.lua" />
<action fromid="1846" toid="1847" script="others/wall_mirror.lua" />
<action fromid="1849" toid="1850" script="others/wall_mirror.lua" />
<action itemid="2036" script="others/watch.lua" />
<action itemid="2093" script="others/water_pipe.lua" />
<action itemid="2095" script="others/bird_cage.lua" />
<action itemid="2099" script="others/water_pipe.lua" />
Expand All @@ -170,16 +168,12 @@
<action itemid="2694" script="others/create_bread.lua" />
<action itemid="2785" script="others/blueberry_bush.lua" />
<action itemid="3678" script="others/teleport.lua" />
<action itemid="3900" script="others/watch.lua" />
<action itemid="5543" script="others/teleport.lua" />
<action fromid="5792" toid="5797" script="others/die.lua" />
<action itemid="6092" script="others/watch.lua" />
<action itemid="6576" script="others/fireworks_rocket.lua" />
<action itemid="6578" script="others/party_hat.lua" />
<action itemid="7552" script="others/large_seashell.lua" />
<action itemid="7828" script="others/watch.lua" />
<action fromid="7904" toid="7907" script="others/bed_modification_kits.lua" />
<action fromid="9443" toid="9444" script="others/watch.lua" />
<action fromid="18488" toid="18492" script="others/skill_trainer.lua" />
<action itemid="20252" script="others/bed_modification_kits.lua" />
<action fromid="22845" toid="22846" script="others/teleport.lua" />
Expand Down
2 changes: 1 addition & 1 deletion data/actions/scripts/others/enchanting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey)
end

local storageValue = player:getStorageValue(storage.key)
if storageValue == -1 then
if not storageValue then
return false
end

Expand Down
4 changes: 0 additions & 4 deletions data/actions/scripts/others/watch.lua

This file was deleted.

Loading

0 comments on commit a89f485

Please sign in to comment.