-
-
Notifications
You must be signed in to change notification settings - Fork 647
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fixTraceable
- Loading branch information
Showing
144 changed files
with
2,493 additions
and
856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,18 +19,20 @@ env: | |
VCPKG_BINARY_SOURCES: clear;default,readwrite | ||
|
||
jobs: | ||
cancel-runs: | ||
if: github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
sonarcloud: | ||
name: SonarCloud | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
if: github.ref != 'refs/heads/main' | ||
uses: fkirc/skip-duplicate-actions@master | ||
with: | ||
concurrent_skipping: 'same_content' | ||
cancel_others: true | ||
|
||
- uses: actions/checkout@v3 | ||
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,19 @@ on: | |
- main | ||
|
||
jobs: | ||
cancel-runs: | ||
if: github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
build_docker_x86: | ||
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
if: github.ref != 'refs/heads/main' | ||
uses: fkirc/skip-duplicate-actions@master | ||
with: | ||
concurrent_skipping: 'same_content' | ||
cancel_others: true | ||
|
||
- name: Checkout | ||
uses: actions/checkout@main | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,15 @@ env: | |
MAKEFLAGS: '-j 2' | ||
|
||
jobs: | ||
cancel-runs: | ||
if: github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
job: | ||
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} | ||
name: ${{ matrix.os }}-${{ matrix.buildtype }} | ||
|
@@ -35,13 +44,6 @@ jobs: | |
triplet: x64-linux | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
if: github.ref != 'refs/heads/main' | ||
uses: fkirc/skip-duplicate-actions@master | ||
with: | ||
concurrent_skipping: 'same_content' | ||
cancel_others: true | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@main | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,15 @@ env: | |
CMAKE_BUILD_PARALLEL_LEVEL: 2 | ||
MAKEFLAGS: '-j 2' | ||
jobs: | ||
cancel-runs: | ||
if: github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
job: | ||
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} | ||
name: ${{ matrix.os }}-${{ matrix.buildtype }} | ||
|
@@ -29,13 +38,6 @@ jobs: | |
packages: > | ||
sccache | ||
steps: | ||
- name: Cancel Previous Runs | ||
if: github.ref != 'refs/heads/main' | ||
uses: fkirc/skip-duplicate-actions@master | ||
with: | ||
concurrent_skipping: 'same_content' | ||
cancel_others: true | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@main | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,15 @@ env: | |
MAKEFLAGS: '-j 2' | ||
|
||
jobs: | ||
cancel-runs: | ||
if: github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
job: | ||
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} | ||
name: ${{ matrix.os }}-${{ matrix.buildtype }} | ||
|
@@ -32,13 +41,6 @@ jobs: | |
packages: > | ||
sccache | ||
steps: | ||
- name: Cancel Previous Runs | ||
if: github.ref != 'refs/heads/main' | ||
uses: fkirc/skip-duplicate-actions@master | ||
with: | ||
concurrent_skipping: 'same_content' | ||
cancel_others: true | ||
|
||
- name: Setup MSBuild.exe | ||
uses: microsoft/[email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,15 @@ on: | |
paths: | ||
- 'src/**' | ||
jobs: | ||
cancel-runs: | ||
if: github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,15 @@ on: | |
- cron: '30 1 * * *' | ||
|
||
jobs: | ||
cancel-runs: | ||
if: github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,15 @@ on: | |
- pull_request_target | ||
|
||
jobs: | ||
cancel-runs: | ||
if: github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
triage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
function onUpdateDatabase() | ||
logger.info("Updating database to version 41 (optimize house_lists)") | ||
db.query([[ | ||
ALTER TABLE `house_lists` DROP COLUMN `id`; | ||
]]) | ||
|
||
db.query([[ | ||
ALTER TABLE `house_lists` | ||
ADD COLUMN `version` bigint NOT NULL DEFAULT 0 AFTER `listid`, | ||
ADD INDEX `version` (`version`), | ||
ADD PRIMARY KEY (`house_id`, `listid`); | ||
]]) | ||
|
||
db.query([[ | ||
ALTER TABLE `house_lists` | ||
MODIFY `version` bigint(20) NOT NULL DEFAULT '0'; | ||
]]) | ||
|
||
return true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
local npcName = "John" | ||
local npcType = Game.createNpcType("John (Bounac)") | ||
local npcConfig = {} | ||
|
||
npcConfig.name = npcName | ||
npcConfig.description = npcName | ||
|
||
npcConfig.health = 100 | ||
npcConfig.maxHealth = npcConfig.health | ||
npcConfig.walkInterval = 2000 | ||
npcConfig.walkRadius = 2 | ||
|
||
npcConfig.outfit = { | ||
lookType = 1245, | ||
lookHead = 40, | ||
lookBody = 0, | ||
lookLegs = 99, | ||
lookFeet = 28, | ||
lookAddons = 3, | ||
} | ||
|
||
npcConfig.flags = { | ||
floorchange = false, | ||
} | ||
|
||
local keywordHandler = KeywordHandler:new() | ||
local npcHandler = NpcHandler:new(keywordHandler) | ||
|
||
npcType.onThink = function(npc, interval) | ||
npcHandler:onThink(npc, interval) | ||
end | ||
|
||
npcType.onAppear = function(npc, creature) | ||
npcHandler:onAppear(npc, creature) | ||
end | ||
|
||
npcType.onDisappear = function(npc, creature) | ||
npcHandler:onDisappear(npc, creature) | ||
end | ||
|
||
npcType.onMove = function(npc, creature, fromPosition, toPosition) | ||
npcHandler:onMove(npc, creature, fromPosition, toPosition) | ||
end | ||
|
||
npcType.onSay = function(npc, creature, type, message) | ||
npcHandler:onSay(npc, creature, type, message) | ||
end | ||
|
||
npcType.onCloseChannel = function(npc, creature) | ||
npcHandler:onCloseChannel(npc, creature) | ||
end | ||
|
||
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) | ||
|
||
npcConfig.shop = { | ||
{ clientId = 36951, buy = 10000 }, | ||
{ clientId = 36952, buy = 10000 }, | ||
{ clientId = 36953, buy = 10000 }, | ||
{ clientId = 36954, buy = 10000 }, | ||
{ clientId = 36955, buy = 10000 }, | ||
{ clientId = 36956, buy = 10000 }, | ||
} | ||
-- On buy npc shop message | ||
npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) | ||
npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) | ||
end | ||
-- On sell npc shop message | ||
npcType.onSellItem = function(npc, player, itemId, subtype, amount, ignore, name, totalCost) | ||
player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("Sold %ix %s for %i gold.", amount, name, totalCost)) | ||
end | ||
-- On check npc shop message (look item) | ||
npcType.onCheckItem = function(npc, player, clientId, subType) end | ||
|
||
npcType:register(npcConfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.