Skip to content

Commit

Permalink
Merge branch 'main' into house-auction
Browse files Browse the repository at this point in the history
  • Loading branch information
jprzimba committed Jan 13, 2025
2 parents 5785070 + a120e46 commit 80c000f
Show file tree
Hide file tree
Showing 40 changed files with 209 additions and 276 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/analysis-reviewdog-cppcheck.yml

This file was deleted.

121 changes: 0 additions & 121 deletions .github/workflows/analysis-reviewdog.yml

This file was deleted.

8 changes: 3 additions & 5 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
uses: gittools/actions/gitversion/execute@v0.9.15

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
uses: docker/setup-buildx-action@v2
with:
install: true

- name: Login to GitHub Container Registry
uses: docker/login-action@v3.3.0
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -73,8 +73,6 @@ jobs:
tags: ghcr.io/${{ github.repository }}:${{ steps.gitversion.outputs.semVer }}
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
secrets: |
DEBUG=1

- name: Image digest
if: ${{ github.event_name == 'push' }}
Expand All @@ -99,7 +97,7 @@ jobs:
uses: gittools/actions/gitversion/execute@v0.9.15

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
uses: docker/setup-buildx-action@v2
with:
install: true

Expand Down
1 change: 1 addition & 0 deletions cmake/modules/BaseConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ find_package(absl CONFIG REQUIRED)
find_package(asio CONFIG REQUIRED)
find_package(eventpp CONFIG REQUIRED)
find_package(magic_enum CONFIG REQUIRED)
find_package(Boost REQUIRED COMPONENTS locale)
if(FEATURE_METRICS)
find_package(opentelemetry-cpp CONFIG REQUIRED)
find_package(prometheus-cpp CONFIG REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions cmake/modules/CrystalLib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ target_link_libraries(${PROJECT_NAME}_lib
unofficial::argon2::libargon2
unofficial::libmariadb
protobuf
Boost::locale
)

if(FEATURE_METRICS)
Expand Down
8 changes: 5 additions & 3 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ toggleMaintainMode = false
-- @field [parent=#global] #string maintainModeMessage an empty string by default, set a custom message if needed.
maintainModeMessage = ""

-- toggleTestMode get player infinite health mana and soul.
toggleTestMode = false

-- Rook system
-- NOTE: Town ids: Dawnport = 2, Rookgaard = 3
toggleRookSystem = false
Expand Down Expand Up @@ -564,6 +561,11 @@ defaultRespawnTime = 60
deSpawnRange = 2
deSpawnRadius = 50

-- Surprise Bags
-- NOTE: set dropSurpriseBagsFromMonsters to false to disable drop surprise bags from monsters.
-- NOTE: Read data/items/bags.xml for more info.
dropSurpriseBagsFromMonsters = false

-- Stamina
staminaSystem = true
timeToRegenMinuteStamina = 3 * 60
Expand Down
2 changes: 1 addition & 1 deletion data-global/monster/bosses/chagorz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local monster = {}
monster.description = "Chagorz"
monster.experience = 3250000
monster.outfit = {
lookType = 1665,
lookType = 1666,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
Expand Down
2 changes: 1 addition & 1 deletion data-global/monster/bosses/vemiath.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local monster = {}
monster.description = "Vemiath"
monster.experience = 3250000
monster.outfit = {
lookType = 1665,
lookType = 1668,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
Expand Down
2 changes: 1 addition & 1 deletion data-global/monster/familiars/druid_familiar.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local mType = Game.createMonsterType("Druid Familiar")
local mType = Game.createMonsterType("Druid familiar")
local monster = {}

monster.description = "a druid familiar"
Expand Down
2 changes: 1 addition & 1 deletion data-global/monster/familiars/knight_familiar.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local mType = Game.createMonsterType("Knight Familiar")
local mType = Game.createMonsterType("Knight familiar")
local monster = {}

monster.description = "a knight familiar"
Expand Down
2 changes: 1 addition & 1 deletion data-global/monster/familiars/paladin_familiar.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local mType = Game.createMonsterType("Paladin Familiar")
local mType = Game.createMonsterType("Paladin familiar")
local monster = {}

monster.description = "a paladin familiar"
Expand Down
2 changes: 1 addition & 1 deletion data-global/monster/quests/rotten_bood/mushroom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local monster = {}
monster.description = "a Mushroom"
monster.experience = 0
monster.outfit = {
lookType = 1669, --todo get correct lookType
lookType = 1773,
lookHead = 0,
lookBody = 0,
lookLegs = 0,
Expand Down
5 changes: 5 additions & 0 deletions data/XML/groups.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,9 @@
<flag canmapclickteleport="1" />
</flags>
</group>
<group id="7" name="game tester" access="0" maxdepotitems="0" maxvipentries="200" outfit="0">
<flags>
<flag isgametester="1" />
</flags>
</group>
</groups>
12 changes: 9 additions & 3 deletions data/items/bags.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,27 @@
* If `chance` equals `maxRange`, the item will always drop.
- `maxRange`: Defines the range in which the item can drop, often used as the upper bound of a random roll.
- `maxAmount`: (Optional) Sets the maximum quantity of the item that can drop, if applicable.
- `monsterClass`: (Optional) Restricts the item drop to certain monster classes.
- `class`: (Optional) Restricts the item drop to certain monster classes.
- `raceId`: (Optional) Links the drop to a specific race or creature.
Examples:
- `<bag itemid="6571" name="Red Surprise Bag" chance="100" maxRange="1000"/>`
This bag has a 100 out of 1000 chance to drop, or 10%.
- `<bag itemid="3079" name="Boots of Haste" chance="100" maxRange="2000" monsterClass="Dragon"/>`
- `<bag itemid="3079" name="Boots of Haste" chance="100" maxRange="2000" class="Dragon"/>`
This item will drop only when a "Dragon" is defeated, with a 5% drop chance (100 out of 2000).
- `<bag itemid="3043" name="Crystal Coin" chance="100" maxAmount="100" maxRange="100"/>`
This bag has a 100 out of 100 chance (100%) to drop, with up to 100 Crystal Coins.
- `<bag itemid="3079" name="Boots of Haste" chance="50" maxRange="1000" raceId="1938"/>`
This item will drop with a 5% chance (50 out of 1000) but only for creatures with the race ID 1938 (Infernal Demon).
-->
<bag itemid="6571" name="Red Surprise Bag" chance="100" maxRange="1000"/>
<bag itemid="6570" name="Blue Surprise Bag" chance="100" maxRange="10000"/>
<bag itemid="3079" name="Boots of Haste" chance="100" maxRange="2000" monsterClass="Dragon"/>
<bag itemid="3079" name="Boots of Haste" chance="100" maxRange="2000" class="Dragon"/>
<bag itemid="6578" name="Party Hat" chance="100" maxAmount="100" maxRange="100" raceId="1938"/> <!-- Infernal Demon -->
<bag itemid="3043" name="Crystal Coin" chance="100" maxAmount="100" maxRange="100"/>
</bags>
5 changes: 3 additions & 2 deletions data/libs/functions/boss_lever.lua
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,16 @@ function BossLever:onUse(player)
end

local checkAccountType = creature:getAccountType() < ACCOUNT_TYPE_GAMEMASTER
if checkAccountType and creature:getLevel() < self.requiredLevel then
local isGameTester = player:hasFlag(PlayerFlag_IsGameTester)
if checkAccountType and not isGameTester and creature:getLevel() < self.requiredLevel then
local message = "All players need to be level " .. self.requiredLevel .. " or higher."
creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, message)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, message)
return false
end

local infoPositions = lever:getInfoPositions()
if creature:getGroup():getId() < GROUP_TYPE_GOD and checkAccountType and self:lastEncounterTime(creature) > os.time() then
if creature:getGroup():getId() < GROUP_TYPE_GOD and checkAccountType and not isGameTester and self:lastEncounterTime(creature) > os.time() then
for _, posInfo in pairs(infoPositions) do
local currentPlayer = posInfo.creature
if currentPlayer then
Expand Down
2 changes: 1 addition & 1 deletion data/scripts/actions/objects/cask_and_kegs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local targetIdList = {
local flasks = Action()

function flasks.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if not target or not target:getItem() then
if not target or not target:isItem() then
return false
end

Expand Down
1 change: 1 addition & 0 deletions data/scripts/talkactions/god/flags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ local PlayerFlags_t = {
["IsAlwaysPremium"] = IsAlwaysPremium,
["CanMapClickTeleport"] = CanMapClickTeleport,
["IgnoredByNpcs"] = IgnoredByNpcs,
["IsGameTester"] = IsGameTester,
}

local function sendValidKeys(player)
Expand Down
Loading

0 comments on commit 80c000f

Please sign in to comment.