Skip to content

Commit

Permalink
feat. upgrade module (azerothcore#27)
Browse files Browse the repository at this point in the history
* feat. upgrade module

* upgrade misc.

* add apps folder

* codestyle

* fix sql build
  • Loading branch information
pangolp authored Aug 2, 2023
1 parent 9b4e679 commit fe113f9
Show file tree
Hide file tree
Showing 19 changed files with 324 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[*]
charset = utf-8
indent_style = space
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80
105 changes: 105 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
## AUTO-DETECT
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto eol=lf

# Text
*.conf text
*.conf.dist text
*.cmake text

## Scripts
*.sh text
*.fish text
*.lua text

## SQL
*.sql text

## C++
*.c text
*.cc text
*.cxx text
*.cpp text
*.c++ text
*.hpp text
*.h text
*.h++ text
*.hh text


## For documentation

# Documents
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

## DOCUMENTATION
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text

## GRAPHICS
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary


## ARCHIVES
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary

## EXECUTABLES
*.exe binary
*.pyc binary
72 changes: 72 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions .github/workflows/core-build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: core-build
on:
push:
branches:
- 'master'
pull_request:

jobs:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/core_codestyle.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.mailmap
*.orig
*.rej
*~
*.*~
.hg/
*.kdev*
.DS_Store
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore

## Premium Account

- Latest Premium Account build status with azerothcore: [![Build Status](https://github.com/azerothcore/mod-premium/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-premium)
- Latest Premium Account build status with azerothcore:

[![Build Status](https://github.com/azerothcore/mod-premium/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-premium)

This is a module for [AzerothCore](http://www.azerothcore.org) that adds Premium account features to players.

Expand Down Expand Up @@ -52,10 +55,8 @@ assign the script to an item such as hearthstone using the script name 'premium_

If you need to change the module configuration, go to your server configuration folder (e.g. **etc**), copy `premium.conf.dist` to `premium.conf` and edit it as you prefer.


## Test the module

There is a SQL query so you can create an item and test it quickly.

![item screenshot](/screenshots/item.png?raw=true "item screenshot")

Empty file added apps/.gitkeep
Empty file.
Empty file added apps/ci/.gitkeep
Empty file.
40 changes: 40 additions & 0 deletions apps/ci/ci-codestyle.sh
Original file line number Diff line number Diff line change
@@ -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"
1 change: 0 additions & 1 deletion cmake_install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ if(NOT CMAKE_INSTALL_COMPONENT)
set(CMAKE_INSTALL_COMPONENT)
endif()
endif()

Empty file added conf/.gitkeep
Empty file.
Loading

0 comments on commit fe113f9

Please sign in to comment.