From 73e6a57c44a41ae7b41b295cd14d2983083188c6 Mon Sep 17 00:00:00 2001 From: Walter Pagani Date: Sun, 20 Aug 2023 23:24:14 -0300 Subject: [PATCH] feat. Fix items on the druid and add offhand in shaman heal (#10) --- .github/ISSUE_TEMPLATE/bug_report.yml | 72 +++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 33 +++++++++ .github/workflows/core_codestyle.yml | 19 +++++ .../sql/db-characters/base => apps}/.gitkeep | 0 .../updates => apps/ci}/.gitkeep | 0 apps/ci/ci-codestyle.sh | 40 +++++++++++ data/.gitkeep | 0 data/sql/db-auth/base/npc_promotion_items.sql | 4 ++ 8 files changed, 168 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/workflows/core_codestyle.yml rename {data/sql/db-characters/base => apps}/.gitkeep (100%) rename {data/sql/db-characters/updates => apps/ci}/.gitkeep (100%) create mode 100644 apps/ci/ci-codestyle.sh create mode 100644 data/.gitkeep diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..5610d2b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,72 @@ +name: Bug report +description: Create a bug report to help us improve. +title: "Bug: " +body: + - type: textarea + id: current + attributes: + label: Current Behaviour + description: | + Description of the problem or issue here. + Include entries of affected creatures / items / quests / spells etc. + If this is a crash, post the crashlog (upload to https://gist.github.com/) and include the link here. + Never upload files! Use GIST for text and YouTube for videos! + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected Behaviour + description: | + Tell us what should happen instead. + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: Steps to reproduce the problem + description: | + What does someone else need to do to encounter the same bug? + placeholder: | + 1. Step 1 + 2. Step 2 + 3. Step 3 + validations: + required: true + - type: textarea + id: extra + attributes: + label: Extra Notes + description: | + Do you have any extra notes that can help solve the issue that does not fit any other field? + placeholder: | + None + validations: + required: false + - type: textarea + id: commit + attributes: + label: AC rev. hash/commit + description: | + Copy the result of the `.server debug` command (if you need to run it from the client get a prat addon) + validations: + required: true + - type: input + id: os + attributes: + label: Operating system + description: | + The Operating System the Server is running on. + i.e. Windows 11 x64, Debian 10 x64, macOS 12, Ubuntu 20.04 + validations: + required: true + - type: textarea + id: custom + attributes: + label: Custom changes or Modules + description: | + List which custom changes or modules you have applied, i.e. Eluna module, etc. + placeholder: | + None + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..58f79dd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,33 @@ +name: Feature request +description: Suggest an idea for this project +title: "Feature: " +body: + - type: markdown + attributes: + value: | + Thank you for taking your time to fill out a feature request. Remember to fill out all fields including the title above. + An issue that is not properly filled out will be closed. + - type: textarea + id: description + attributes: + label: Describe your feature request or suggestion in detail + description: | + A clear and concise description of what you want to happen. + validations: + required: true + - type: textarea + id: solution + attributes: + label: Describe a possible solution to your feature or suggestion in detail + description: | + A clear and concise description of any alternative solutions or features you've considered. + validations: + required: false + - type: textarea + id: additional + attributes: + label: Additional context + description: | + Add any other context or screenshots about the feature request here. + validations: + required: false diff --git a/.github/workflows/core_codestyle.yml b/.github/workflows/core_codestyle.yml new file mode 100644 index 0000000..3f9a73e --- /dev/null +++ b/.github/workflows/core_codestyle.yml @@ -0,0 +1,19 @@ +name: Codestyle Checks +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + check-codestyle: + strategy: + fail-fast: false + + runs-on: ubuntu-latest + name: Check Codestyling + steps: + - uses: actions/checkout@v2 + + - name: Check Codestyling + run: source ./apps/ci/ci-codestyle.sh diff --git a/data/sql/db-characters/base/.gitkeep b/apps/.gitkeep similarity index 100% rename from data/sql/db-characters/base/.gitkeep rename to apps/.gitkeep diff --git a/data/sql/db-characters/updates/.gitkeep b/apps/ci/.gitkeep similarity index 100% rename from data/sql/db-characters/updates/.gitkeep rename to apps/ci/.gitkeep diff --git a/apps/ci/ci-codestyle.sh b/apps/ci/ci-codestyle.sh new file mode 100644 index 0000000..c96a31d --- /dev/null +++ b/apps/ci/ci-codestyle.sh @@ -0,0 +1,40 @@ +#!/bin/bash +set -e + +echo "Codestyle check script:" +echo + +declare -A singleLineRegexChecks=( + ["LOG_.+GetCounter"]="Use ObjectGuid::ToString().c_str() method instead of ObjectGuid::GetCounter() when logging. Check the lines above" + ["[[:blank:]]$"]="Remove whitespace at the end of the lines above" + ["\t"]="Replace tabs with 4 spaces in the lines above" +) + +for check in ${!singleLineRegexChecks[@]}; do + echo " Checking RegEx: '${check}'" + + if grep -P -r -I -n ${check} src; then + echo + echo "${singleLineRegexChecks[$check]}" + exit 1 + fi +done + +declare -A multiLineRegexChecks=( + ["LOG_[^;]+GetCounter"]="Use ObjectGuid::ToString().c_str() method instead of ObjectGuid::GetCounter() when logging. Check the lines above" + ["\n\n\n"]="Multiple blank lines detected, keep only one. Check the files above" +) + +for check in ${!multiLineRegexChecks[@]}; do + echo " Checking RegEx: '${check}'" + + if grep -Pzo -r -I ${check} src; then + echo + echo + echo "${multiLineRegexChecks[$check]}" + exit 1 + fi +done + +echo +echo "Everything looks good" diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/sql/db-auth/base/npc_promotion_items.sql b/data/sql/db-auth/base/npc_promotion_items.sql index 163de63..9b87c15 100644 --- a/data/sql/db-auth/base/npc_promotion_items.sql +++ b/data/sql/db-auth/base/npc_promotion_items.sql @@ -67,3 +67,7 @@ INSERT INTO `mod_npc_promotion_items` (`class`, `faction`, `function`, `head`, ` (10, 1, 'heal', 43261, 45813, 43262, 0, 43263, 43266, 43271, 43273, 43264, 43265, 45808, 45808, 36972, 37111, 45810, 36975, 0, 38366, 0), (10, 1, 'melee', 43260, 45812, 43433, 0, 43434, 43437, 43438, 43439, 43435, 43436, 45809, 45809, 37064, 38359, 45811, 36980, 0, 38365, 0), (10, 1, 'tank', 43260, 45812, 43433, 0, 43434, 43437, 43438, 43439, 43435, 43436, 45809, 45809, 37064, 38359, 45811, 36980, 0, 38365, 0); + +UPDATE `mod_npc_promotion_items` SET `class`=11 WHERE `class`=10; + +UPDATE `mod_npc_promotion_items` SET `offhand`=37061 WHERE `class`=7 AND `function`='heal';