Skip to content

Commit

Permalink
Merge branch 'main' into fix/map-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored Jun 26, 2024
2 parents 65e70d1 + 609a187 commit 79d8dbd
Show file tree
Hide file tree
Showing 236 changed files with 2,281 additions and 1,599 deletions.
4 changes: 2 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ QualifierAlignment: Left
ReferenceAlignment: Right
ReflowComments: true
RemoveBracesLLVM: false
SortIncludes: false
SortIncludes: Never
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
Expand All @@ -138,4 +138,4 @@ StatementMacros:
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
UseTab: true
UseTab: AlignWithSpaces
6 changes: 3 additions & 3 deletions .github/workflows/clang-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ jobs:

- name: Run clang format lint
if: ${{ github.ref != 'refs/heads/main' }}
uses: DoozyX/clang-format-lint-action@v0.16.2
uses: DoozyX/clang-format-lint-action@v0.17
with:
source: "src"
exclude: "src/protobuf"
extensions: "cpp,hpp,h"
clangFormatVersion: 16
clangFormatVersion: 17
inplace: true

- name: Run add and commit
if: ${{ github.ref != 'refs/heads/main' }}
uses: EndBug/add-and-commit@v9
uses: EndBug/add-and-commit@v9.1.4
with:
author_name: GitHub Actions
author_email: github-actions[bot]@users.noreply.github.com
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/mysql-schema-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: MySQL Schema Check
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "schema.sql"
merge_group:
push:
paths:
- "schema.sql"
branches:
- main

jobs:
mysql-schema-check:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: canary
MYSQL_USER: canary
MYSQL_PASSWORD: canary
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
name: Check
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: 📌 MySQL Start & init & show db
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE canary;' -uroot -proot
mysql -e "SHOW DATABASES" -uroot -proot
- name: Import Canary Schema
run: |
mysql -uroot -proot canary < schema.sql
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.22 FATAL_ERROR)
# VCPKG
# cmake -DCMAKE_TOOLCHAIN_FILE=/opt/workspace/vcpkg/scripts/buildsystems/vcpkg.cmake ..
# Needed libs is in file vcpkg.json
# Windows required libs: .\vcpkg install --triplet x64-windows asio pugixml spdlog curl protobuf parallel-hashmap magic-enum mio luajit libmariadb mpir abseil
# Windows required libs: .\vcpkg install --triplet x64-windows asio pugixml spdlog curl protobuf parallel-hashmap magic-enum mio luajit libmariadb mpir abseil bshoshany-thread-pool
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "")
Expand Down Expand Up @@ -124,4 +124,4 @@ add_subdirectory(src)

if(BUILD_TESTS)
add_subdirectory(tests)
endif()
endif()
1 change: 1 addition & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"DEBUG_LOG": "ON",
"ASAN_ENABLED": "OFF",
"BUILD_STATIC_LIBRARY": "OFF",
"SPEED_UP_BUILD_UNITY": "OFF",
"VCPKG_TARGET_TRIPLET": "x64-windows"
}
},
Expand Down
1 change: 1 addition & 0 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ bossDefaultTimeToFightAgain = 20 * 60 * 60 -- 20 hours
bossDefaultTimeToDefeat = 20 * 60 -- 20 minutes

-- Monsters
defaultRespawnTime = 60
deSpawnRange = 2
deSpawnRadius = 50

Expand Down
2 changes: 1 addition & 1 deletion data-canary/monster/demons/fury.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ monster.elements = {
{ type = COMBAT_LIFEDRAIN, percent = 0 },
{ type = COMBAT_MANADRAIN, percent = 0 },
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = 30 },
{ type = COMBAT_ICEDAMAGE, percent = 5 },
{ type = COMBAT_HOLYDAMAGE, percent = 30 },
{ type = COMBAT_DEATHDAMAGE, percent = -10 },
}
Expand Down
4 changes: 2 additions & 2 deletions data-canary/monster/demons/juggernaut.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ monster.Bestiary = {
The Blood Halls, The Vats, The Hive, The Shadow Nexus, a room deep in Formorgar Mines, Roshamuul Prison, Oramond Dungeon, Grounds of Destruction.",
}

monster.health = 20000
monster.maxHealth = 20000
monster.health = 18000
monster.maxHealth = 18000
monster.race = "blood"
monster.corpse = 6335
monster.speed = 170
Expand Down
28 changes: 0 additions & 28 deletions data-canary/scripts/actions/other/large_sea_shell.lua

This file was deleted.

101 changes: 0 additions & 101 deletions data-canary/scripts/weapons/scripted_weapons.lua

This file was deleted.

9 changes: 9 additions & 0 deletions data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3079,6 +3079,15 @@ GlobalStorage = {
DarashiaWest = 60193,
},
},
TheDreamCourts = {
-- Reserved storage from 60194 - 60196
FacelessBane = {
-- Global
StepsOn = 60194,
Deaths = 60195,
ResetSteps = 60196,
},
},
FuryGates = 65000,
Yakchal = 65001,
PitsOfInfernoLevers = 65002,
Expand Down
1 change: 0 additions & 1 deletion data-otservbr-global/lib/others/load.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dofile(DATA_DIRECTORY .. "/lib/others/dawnport.lua")
dofile(DATA_DIRECTORY .. "/lib/others/vip_system.lua")
10 changes: 5 additions & 5 deletions data-otservbr-global/migrations/45.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function onUpdateDatabase()

db.query([[
CREATE TABLE IF NOT EXISTS `account_vipgroups` (
`id` tinyint(3) UNSIGNED NOT NULL,
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`account_id` int(11) UNSIGNED NOT NULL COMMENT 'id of account whose vip group entry it is',
`name` varchar(128) NOT NULL,
`customizable` BOOLEAN NOT NULL DEFAULT '1',
Expand All @@ -13,17 +13,17 @@ function onUpdateDatabase()

db.query([[
CREATE TRIGGER `oncreate_accounts` AFTER INSERT ON `accounts` FOR EACH ROW BEGIN
INSERT INTO `account_vipgroups` (`id`, `account_id`, `name`, `customizable`) VALUES (1, NEW.`id`, 'Enemies', 0);
INSERT INTO `account_vipgroups` (`id`, `account_id`, `name`, `customizable`) VALUES (2, NEW.`id`, 'Friends', 0);
INSERT INTO `account_vipgroups` (`id`, `account_id`, `name`, `customizable`) VALUES (3, NEW.`id`, 'Trading Partner', 0);
INSERT INTO `account_vipgroups` (`account_id`, `name`, `customizable`) VALUES (NEW.`id`, 'Enemies', 0);
INSERT INTO `account_vipgroups` (`account_id`, `name`, `customizable`) VALUES (NEW.`id`, 'Friends', 0);
INSERT INTO `account_vipgroups` (`account_id`, `name`, `customizable`) VALUES (NEW.`id`, 'Trading Partner', 0);
END;
]])

db.query([[
CREATE TABLE IF NOT EXISTS `account_vipgrouplist` (
`account_id` int(11) UNSIGNED NOT NULL COMMENT 'id of account whose viplist entry it is',
`player_id` int(11) NOT NULL COMMENT 'id of target player of viplist entry',
`vipgroup_id` tinyint(3) UNSIGNED NOT NULL COMMENT 'id of vip group that player belongs',
`vipgroup_id` int(11) UNSIGNED NOT NULL COMMENT 'id of vip group that player belongs',
INDEX `account_id` (`account_id`),
INDEX `player_id` (`player_id`),
INDEX `vipgroup_id` (`vipgroup_id`),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local mType = Game.createMonsterType("Quara Constrictor")
local monster = {}

monster.description = "a quara constrictor"
monster.experience = 250
monster.experience = 380
monster.outfit = {
lookType = 46,
lookHead = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local mType = Game.createMonsterType("Quara Hydromancer")
local monster = {}

monster.description = "a quara hydromancer"
monster.experience = 800
monster.experience = 950
monster.outfit = {
lookType = 47,
lookHead = 0,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/monster/aquatics/quara_mantassin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local mType = Game.createMonsterType("Quara Mantassin")
local monster = {}

monster.description = "a quara mantassin"
monster.experience = 400
monster.experience = 600
monster.outfit = {
lookType = 72,
lookHead = 0,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/monster/aquatics/quara_pincher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local mType = Game.createMonsterType("Quara Pincher")
local monster = {}

monster.description = "a quara pincher"
monster.experience = 1200
monster.experience = 1500
monster.outfit = {
lookType = 77,
lookHead = 0,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/monster/aquatics/quara_predator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local mType = Game.createMonsterType("Quara Predator")
local monster = {}

monster.description = "a quara predator"
monster.experience = 1600
monster.experience = 1850
monster.outfit = {
lookType = 20,
lookHead = 0,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/monster/bosses/splasher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local mType = Game.createMonsterType("Splasher")
local monster = {}

monster.description = "Splasher"
monster.experience = 500
monster.experience = 1500
monster.outfit = {
lookType = 47,
lookHead = 0,
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/monster/constructs/clay_guardian.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ monster.elements = {
{ type = COMBAT_LIFEDRAIN, percent = 0 },
{ type = COMBAT_MANADRAIN, percent = 0 },
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = 35 },
{ type = COMBAT_ICEDAMAGE, percent = 20 },
{ type = COMBAT_HOLYDAMAGE, percent = 0 },
{ type = COMBAT_DEATHDAMAGE, percent = 40 },
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ monster.elements = {
{ type = COMBAT_PHYSICALDAMAGE, percent = 50 },
{ type = COMBAT_ENERGYDAMAGE, percent = 25 },
{ type = COMBAT_EARTHDAMAGE, percent = 100 },
{ type = COMBAT_FIREDAMAGE, percent = 100 },
{ type = COMBAT_FIREDAMAGE, percent = -100 },
{ type = COMBAT_LIFEDRAIN, percent = 0 },
{ type = COMBAT_MANADRAIN, percent = 0 },
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
Expand Down
Loading

0 comments on commit 79d8dbd

Please sign in to comment.