Skip to content

Commit

Permalink
Merge branch 'main' into Fix-uptime
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored Jun 11, 2024
2 parents 397dbd1 + ede4b03 commit 284a0b7
Show file tree
Hide file tree
Showing 117 changed files with 648 additions and 486 deletions.
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 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.

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
3 changes: 1 addition & 2 deletions data-otservbr-global/monster/constructs/lava_golem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local mType = Game.createMonsterType("Lava Golem")
local monster = {}

monster.description = "a lava golem"
monster.experience = 6200
monster.experience = 7900
monster.outfit = {
lookType = 491,
lookHead = 0,
Expand Down Expand Up @@ -109,7 +109,6 @@ monster.loot = {
monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 },
{ name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -700, length = 8, spread = 0, effect = CONST_ME_FIREATTACK, target = false },
{ name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -600, maxDamage = -1300, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false },
{ name = "lava golem soulfire", interval = 2000, chance = 15, target = false },
{ name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -220, maxDamage = -350, radius = 4, effect = CONST_ME_FIREAREA, target = true },
{ name = "speed", interval = 2000, chance = 10, speedChange = -800, length = 5, spread = 3, effect = CONST_ME_BLOCKHIT, target = false, duration = 30000 },
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/monster/constructs/magma_crawler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local mType = Game.createMonsterType("Magma Crawler")
local monster = {}

monster.description = "a magma crawler"
monster.experience = 2700
monster.experience = 3900
monster.outfit = {
lookType = 492,
lookHead = 0,
Expand Down Expand Up @@ -35,7 +35,7 @@ monster.manaCost = 0

monster.changeTarget = {
interval = 4000,
chance = 10,
chance = 5,
}

monster.strategiesTarget = {
Expand Down Expand Up @@ -118,7 +118,7 @@ monster.defenses = {
defense = 45,
armor = 84,
mitigation = 2.51,
{ name = "invisible", interval = 2000, chance = 10, effect = CONST_ME_MAGIC_BLUE },
{ name = "invisible", interval = 2000, chance = 5, effect = CONST_ME_MAGIC_BLUE },
}

monster.elements = {
Expand All @@ -129,7 +129,7 @@ monster.elements = {
{ type = COMBAT_LIFEDRAIN, percent = 0 },
{ type = COMBAT_MANADRAIN, percent = 0 },
{ type = COMBAT_DROWNDAMAGE, percent = 0 },
{ type = COMBAT_ICEDAMAGE, percent = 10 },
{ type = COMBAT_ICEDAMAGE, percent = 0 },
{ type = COMBAT_HOLYDAMAGE, percent = 0 },
{ type = COMBAT_DEATHDAMAGE, percent = 25 },
}
Expand Down
3 changes: 1 addition & 2 deletions data-otservbr-global/monster/constructs/orewalker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local mType = Game.createMonsterType("Orewalker")
local monster = {}

monster.description = "an orewalker"
monster.experience = 4800
monster.experience = 5900
monster.outfit = {
lookType = 490,
lookHead = 0,
Expand Down Expand Up @@ -112,7 +112,6 @@ monster.attacks = {
{ name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -1500, length = 6, spread = 3, effect = CONST_ME_GROUNDSHAKER, target = false },
-- poison
{ name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -800, maxDamage = -1080, radius = 3, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_SMALLPLANTS, target = true },
{ name = "drunk", interval = 2000, chance = 15, radius = 4, effect = CONST_ME_SOUND_PURPLE, target = false, duration = 6000 },
{ name = "speed", interval = 2000, chance = 15, speedChange = -800, radius = 2, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 },
}

Expand Down
Loading

0 comments on commit 284a0b7

Please sign in to comment.