new version commit

This commit is contained in:
mikx
2025-09-29 02:27:58 -04:00
commit 3e8d31e686
9244 changed files with 7357899 additions and 0 deletions

0
modules/.gitkeep Normal file
View File

385
modules/CMakeLists.txt Normal file
View File

@@ -0,0 +1,385 @@
#
# This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Make the script module list available in the current scope
GetModuleSourceList(MODULES_MODULE_LIST)
# Make the native install offset available in this scope
GetInstallOffset(INSTALL_OFFSET)
# Sets the MODULES_${SOURCE_MODULE} variables
# when using predefined templates for script building
# like dynamic, static
# Sets MODULES_DEFAULT_LINKAGE
if(MODULES MATCHES "dynamic")
set(MODULES_DEFAULT_LINKAGE "dynamic")
elseif(MODULES MATCHES "static")
set(MODULES_DEFAULT_LINKAGE "static")
else()
set(MODULES_DEFAULT_LINKAGE "disabled")
endif()
# Add support old api modules
CU_GET_GLOBAL("AC_ADD_SCRIPTS_LIST")
CU_GET_GLOBAL("AC_ADD_SCRIPTS_INCLUDE")
set("AC_SCRIPTS_INCLUDES" "")
set("AC_MODULE_LIST" "")
set("AC_SCRIPTS_LIST" "")
set(MOD_ELUNA_FOUND 0)
set(MOD_ELUNA_PATH "")
foreach(include ${AC_ADD_SCRIPTS_INCLUDE})
set("AC_SCRIPTS_INCLUDES" "#include \"${include}\"\n${AC_SCRIPTS_INCLUDES}")
endforeach()
foreach(void ${AC_ADD_SCRIPTS_LIST})
set("AC_MODULE_LIST" "void ${void};\n${AC_MODULE_LIST}")
endforeach()
foreach(scriptName ${AC_ADD_SCRIPTS_LIST})
set("AC_SCRIPTS_LIST" " ${scriptName};\n${AC_SCRIPTS_LIST}")
endforeach()
function(ConfigureElunaModule moduleName)
set(MOD_ELUNA_FOUND 1 PARENT_SCOPE)
GetPathToModuleSource(${SOURCE_MODULE} MODULE_SOURCE_PATH)
set(MOD_ELUNA_PATH ${MODULE_SOURCE_PATH} PARENT_SCOPE)
# Define eluna compile options
target_compile_options(game-interface
INTERFACE
-DAZEROTHCORE
-DWOTLK)
endfunction()
# Set the MODULES_${SOURCE_MODULE} variables from the
# variables set above
foreach(SOURCE_MODULE ${MODULES_MODULE_LIST})
ModuleNameToVariable(${SOURCE_MODULE} MODULE_MODULE_VARIABLE)
if(${MODULE_MODULE_VARIABLE} STREQUAL "default")
set(${MODULE_MODULE_VARIABLE} ${MODULES_DEFAULT_LINKAGE})
endif()
# Use only static for deprecated api loaders
if (AC_SCRIPTS_INCLUDES MATCHES "${SOURCE_MODULE}")
set(${MODULE_MODULE_VARIABLE} "static")
endif()
# Use only static for mod-eluna
if (SOURCE_MODULE MATCHES "mod-eluna")
ConfigureElunaModule(${SOURCE_MODULE})
endif()
# Build the Graph values
if(${MODULE_MODULE_VARIABLE} MATCHES "dynamic")
GetProjectNameOfModuleName(${SOURCE_MODULE} MODULE_SOURCE_PROJECT_NAME)
GetNativeSharedLibraryName(${MODULE_SOURCE_PROJECT_NAME} MODULE_PROJECT_LIBRARY)
list(APPEND MODULE_GRAPH_KEYS ${MODULE_SOURCE_PROJECT_NAME})
set(MODULE_GRAPH_VALUE_DISPLAY_${MODULE_SOURCE_PROJECT_NAME} ${MODULE_PROJECT_LIBRARY})
list(APPEND MODULE_GRAPH_VALUE_CONTAINS_MODULES_${MODULE_SOURCE_PROJECT_NAME} ${SOURCE_MODULE})
elseif(${MODULE_MODULE_VARIABLE} MATCHES "static")
list(APPEND MODULE_GRAPH_KEYS worldserver)
set(MODULE_GRAPH_VALUE_DISPLAY_worldserver worldserver)
list(APPEND MODULE_GRAPH_VALUE_CONTAINS_MODULES_worldserver ${SOURCE_MODULE})
else()
list(APPEND MODULE_GRAPH_KEYS disabled)
set(MODULE_GRAPH_VALUE_DISPLAY_disabled disabled)
list(APPEND MODULE_GRAPH_VALUE_CONTAINS_MODULES_disabled ${SOURCE_MODULE})
endif()
endforeach()
list(SORT MODULE_GRAPH_KEYS)
list(REMOVE_DUPLICATES MODULE_GRAPH_KEYS)
# Display the module graph
message("* Modules configuration (${MODULES}):
|")
foreach(MODULE_GRAPH_KEY ${MODULE_GRAPH_KEYS})
if(NOT MODULE_GRAPH_KEY STREQUAL "disabled")
message(" +- ${MODULE_GRAPH_VALUE_DISPLAY_${MODULE_GRAPH_KEY}}")
else()
message(" | ${MODULE_GRAPH_VALUE_DISPLAY_${MODULE_GRAPH_KEY}}")
endif()
foreach(MODULE_GRAPH_PROJECT_ENTRY ${MODULE_GRAPH_VALUE_CONTAINS_MODULES_${MODULE_GRAPH_KEY}})
message(" | +- ${MODULE_GRAPH_PROJECT_ENTRY}")
endforeach()
message(" |")
endforeach()
message("")
# Base sources which are used by every script project
if (USE_SCRIPTPCH)
set(PRIVATE_PCH_HEADER ModulesPCH.h)
endif()
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
# Configures the scriptloader with the given name and stores the output in the LOADER_OUT variable.
# It is possible to expose multiple subdirectories from the same scriptloader through passing
# it to the variable arguments
function(ConfigureScriptLoader SCRIPTLOADER_NAME LOADER_OUT IS_DYNAMIC_SCRIPTLOADER)
# Deduces following variables which are referenced by thge template:
# ACORE_IS_DYNAMIC_SCRIPTLOADER
# ACORE_SCRIPTS_FORWARD_DECL
# ACORE_SCRIPTS_INVOKE
# ACORE_CURRENT_SCRIPT_PROJECT
# To generate export macros
set(ACORE_IS_DYNAMIC_SCRIPTLOADER ${IS_DYNAMIC_SCRIPTLOADER})
# To generate forward declarations of the loading functions
unset(ACORE_SCRIPTS_FORWARD_DECL)
unset(ACORE_SCRIPTS_INVOKE)
# The current script project which is built in
set(ACORE_CURRENT_SCRIPT_PROJECT ${SCRIPTLOADER_NAME})
foreach(LOCALE_SCRIPT_MODULE ${ARGN})
# Replace bad words
string(REGEX REPLACE - "_" LOCALE_SCRIPT_MODULE ${LOCALE_SCRIPT_MODULE})
# Determine the loader function ("Add##${NameOfDirectory}##Scripts()")
set(LOADER_FUNCTION
"Add${LOCALE_SCRIPT_MODULE}Scripts()")
# Generate the funciton call and the forward declarations
set(ACORE_SCRIPTS_FORWARD_DECL
"${ACORE_SCRIPTS_FORWARD_DECL}void ${LOADER_FUNCTION};\n")
set(ACORE_SCRIPTS_INVOKE
"${ACORE_SCRIPTS_INVOKE} ${LOADER_FUNCTION};\n")
endforeach()
set(GENERATED_LOADER ${CMAKE_CURRENT_BINARY_DIR}/gen_scriptloader/${SCRIPTLOADER_NAME}/ModulesLoader.cpp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ModulesLoader.cpp.in.cmake ${GENERATED_LOADER})
set(${LOADER_OUT} ${GENERATED_LOADER} PARENT_SCOPE)
endfunction()
# Generates the actual module projects
# Fills the STATIC_SCRIPT_MODULES and DYNAMIC_SCRIPT_MODULE_PROJECTS variables
# which contain the names which scripts are linked statically/dynamically and
# adds the sources of the static modules to the PRIVATE_SOURCES_MODULES variable.
foreach(SOURCE_MODULE ${MODULES_MODULE_LIST})
GetPathToModuleSource(${SOURCE_MODULE} MODULE_SOURCE_PATH)
ModuleNameToVariable(${SOURCE_MODULE} MODULE_MODULE_VARIABLE)
if(NOT (${MODULE_MODULE_VARIABLE} STREQUAL "disabled"))
list(APPEND MODULE_LIST__ ${SOURCE_MODULE})
endif()
if((${MODULE_MODULE_VARIABLE} STREQUAL "disabled") OR
(${MODULE_MODULE_VARIABLE} STREQUAL "static"))
# Uninstall disabled modules
GetProjectNameOfModuleName(${SOURCE_MODULE} MODULE_SOURCE_PROJECT_NAME)
GetNativeSharedLibraryName(${MODULE_SOURCE_PROJECT_NAME} SCRIPT_MODULE_OUTPUT_NAME)
list(APPEND DISABLED_SCRIPT_MODULE_PROJECTS ${INSTALL_OFFSET}/${SCRIPT_MODULE_OUTPUT_NAME})
if(${MODULE_MODULE_VARIABLE} STREQUAL "static")
# Add the module content to the whole static module
CollectSourceFiles(${MODULE_SOURCE_PATH} PRIVATE_SOURCES_MODULES)
CollectIncludeDirectories(${MODULE_SOURCE_PATH} PUBLIC_INCLUDES)
# Skip deprecated api loaders
if (AC_SCRIPTS_INCLUDES MATCHES "${SOURCE_MODULE}")
message("> Module (${SOURCE_MODULE}) using deprecated loader api")
continue()
endif()
# Add the module name to STATIC_SCRIPT_MODULES
list(APPEND STATIC_SCRIPT_MODULES ${SOURCE_MODULE})
endif()
elseif(${MODULE_MODULE_VARIABLE} STREQUAL "dynamic")
# Generate an own dynamic module which is loadable on runtime
# Add the module content to the whole static module
unset(MODULE_SOURCE_PRIVATE_SOURCES)
CollectSourceFiles(${MODULE_SOURCE_PATH} MODULE_SOURCE_PRIVATE_SOURCES)
CollectIncludeDirectories(${MODULE_SOURCE_PATH} PUBLIC_INCLUDES)
# Configure the scriptloader
ConfigureScriptLoader(${SOURCE_MODULE} SCRIPT_MODULE_PRIVATE_SCRIPTLOADER ON ${SOURCE_MODULE})
GetProjectNameOfModuleName(${SOURCE_MODULE} MODULE_SOURCE_PROJECT_NAME)
# Add the module name to DYNAMIC_SCRIPT_MODULES
list(APPEND DYNAMIC_SCRIPT_MODULE_PROJECTS ${MODULE_SOURCE_PROJECT_NAME})
# Create the script module project
add_library(${MODULE_SOURCE_PROJECT_NAME} SHARED
${MODULE_SOURCE_PRIVATE_SOURCES}
${SCRIPT_MODULE_PRIVATE_SCRIPTLOADER})
target_link_libraries(${MODULE_SOURCE_PROJECT_NAME}
PRIVATE
acore-core-interface
PUBLIC
game)
target_include_directories(${MODULE_SOURCE_PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${PUBLIC_INCLUDES})
set_target_properties(${MODULE_SOURCE_PROJECT_NAME}
PROPERTIES
FOLDER
"modules")
if(UNIX)
install(TARGETS ${MODULE_SOURCE_PROJECT_NAME}
DESTINATION ${INSTALL_OFFSET} COMPONENT ${MODULE_SOURCE_PROJECT_NAME})
elseif(WIN32)
install(TARGETS ${MODULE_SOURCE_PROJECT_NAME}
RUNTIME DESTINATION ${INSTALL_OFFSET} COMPONENT ${MODULE_SOURCE_PROJECT_NAME})
if(MSVC)
# Place the script modules in the script subdirectory
set_target_properties(${MODULE_SOURCE_PROJECT_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/Debug/scripts
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/Release/scripts
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/bin/RelWithDebInfo/scripts
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/bin/MinSizeRel/scripts)
endif()
endif()
else()
message(FATAL_ERROR "Unknown value \"${${MODULE_MODULE_VARIABLE}}\" for module (${SOURCE_MODULE})!")
endif()
endforeach()
# Add the dynamic script modules to the worldserver as dependency
set(WORLDSERVER_DYNAMIC_SCRIPT_MODULES_DEPENDENCIES ${DYNAMIC_SCRIPT_MODULE_PROJECTS} PARENT_SCOPE)
ConfigureScriptLoader("static" SCRIPT_MODULE_PRIVATE_SCRIPTLOADER OFF ${STATIC_SCRIPT_MODULES})
list(REMOVE_DUPLICATES SCRIPT_MODULE_PRIVATE_SCRIPTLOADER)
if (MOD_ELUNA_FOUND)
list(REMOVE_ITEM PRIVATE_SOURCES_MODULES ${MOD_ELUNA_PATH}/lualib/lua.c)
list(REMOVE_ITEM PRIVATE_SOURCES_MODULES ${MOD_ELUNA_PATH}/lualib/luac.c)
endif()
add_library(modules STATIC
ModulesScriptLoader.h
${SCRIPT_MODULE_PRIVATE_SCRIPTLOADER}
${PRIVATE_SOURCES_MODULES})
if (MOD_ELUNA_FOUND)
target_link_libraries(modules PUBLIC lualib)
endif()
target_link_libraries(modules
PRIVATE
acore-core-interface
PUBLIC
game-interface)
target_include_directories(modules
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${PUBLIC_INCLUDES})
# Enables Devs to Include a cmake file in their module that will get run inline with the config.
foreach(SOURCE_MODULE ${MODULES_MODULE_LIST})
include("${CMAKE_SOURCE_DIR}/modules/${SOURCE_MODULE}/${SOURCE_MODULE}.cmake" OPTIONAL)
endforeach()
set_target_properties(modules
PROPERTIES
FOLDER
"modules")
# Generate precompiled header
# if (USE_SCRIPTPCH)
# list(APPEND ALL_SCRIPT_PROJECTS modules ${DYNAMIC_SCRIPT_MODULE_PROJECTS})
# add_cxx_pch("${ALL_SCRIPT_PROJECTS}" ${PRIVATE_PCH_HEADER})
# endif()
# Remove all shared libraries in the installl directory which
# are contained in the static library already.
if (DISABLED_SCRIPT_MODULE_PROJECTS)
install(CODE "
foreach(SCRIPT_TO_UNINSTALL ${DISABLED_SCRIPT_MODULE_PROJECTS})
if(EXISTS \"\${SCRIPT_TO_UNINSTALL}\")
message(STATUS \"Uninstalling: \${SCRIPT_TO_UNINSTALL}\")
file(REMOVE \"\${SCRIPT_TO_UNINSTALL}\")
endif()
endforeach()
")
endif()
# Stores the absolut path of the given config module in the variable
function(GetPathToModuleConfig module variable)
set(${variable} "${CMAKE_SOURCE_DIR}/modules/${module}/conf" PARENT_SCOPE)
endfunction()
message(STATUS "* Modules config list:
|")
foreach(ModuleName ${MODULE_LIST__})
GetPathToModuleConfig(${ModuleName} MODULE_CONFIG_PATH)
set(MODULE_LIST ${MODULE_LIST}${ModuleName},)
file(GLOB MODULE_CONFIG_LIST RELATIVE
${MODULE_CONFIG_PATH}
${MODULE_CONFIG_PATH}/*.conf.dist)
message(STATUS " +- ${ModuleName}")
foreach(configFileName ${MODULE_CONFIG_LIST})
CopyModuleConfig("${MODULE_CONFIG_PATH}/${configFileName}")
set(CONFIG_LIST ${CONFIG_LIST}${configFileName},)
message(STATUS " | * ${configFileName}")
endforeach()
endforeach()
# Define modules list
target_compile_options(modules
INTERFACE
-DAC_MODULES_LIST=$<1:"${MODULE_LIST}">)
# Define modules config list
target_compile_options(modules
INTERFACE
-DCONFIG_FILE_LIST=$<1:"${CONFIG_LIST}">)
if (MOD_ELUNA_FOUND)
if (APPLE)
target_compile_definitions(modules
PUBLIC
LUA_USE_MACOSX)
elseif (UNIX)
target_compile_definitions(modules
PUBLIC
LUA_USE_LINUX)
endif()
if (WIN32)
if (MSVC)
set(MSVC_CONFIGURATION_NAME $(ConfigurationName)/)
endif()
add_custom_command(TARGET modules
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bin/${MSVC_CONFIGURATION_NAME}lua_scripts/extensions/"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${MOD_ELUNA_PATH}/LuaEngine/extensions" "${CMAKE_BINARY_DIR}/bin/${MSVC_CONFIGURATION_NAME}lua_scripts/extensions/")
endif()
install(DIRECTORY "${MOD_ELUNA_PATH}/LuaEngine/extensions" DESTINATION "${CMAKE_INSTALL_PREFIX}/bin/lua_scripts/")
endif()
message("")

View File

@@ -0,0 +1,64 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// This file was created automatically from your script configuration!
// Use CMake to reconfigure this file, never change it on your own!
#cmakedefine ACORE_IS_DYNAMIC_SCRIPTLOADER
#include "Define.h"
#include <vector>
#include <string>
// Add deprecated api loaders include
@AC_SCRIPTS_INCLUDES@
// Includes list
@ACORE_SCRIPTS_FORWARD_DECL@
#ifdef ACORE_IS_DYNAMIC_SCRIPTLOADER
# include "revision.h"
# define AC_MODULES_API AC_API_EXPORT
extern "C" {
/// Exposed in script module to return the name of the script module
/// contained in this shared library.
AC_MODULES_API char const* GetScriptModule()
{
return "@ACORE_CURRENT_SCRIPT_PROJECT@";
}
#else
# include "ModulesScriptLoader.h"
# define AC_MODULES_API
#endif
/// Exposed in script modules to register all scripts to the ScriptMgr.
AC_MODULES_API void AddModulesScripts()
{
// Modules
@ACORE_SCRIPTS_INVOKE@
// Deprecated api modules
@AC_SCRIPTS_LIST@}
/// Exposed in script modules to get the build directive of the module.
AC_MODULES_API char const* GetModulesBuildDirective()
{
return _BUILD_DIRECTIVE;
}
#ifdef ACORE_IS_DYNAMIC_SCRIPTLOADER
} // extern "C"
#endif

26
modules/ModulesPCH.h Normal file
View File

@@ -0,0 +1,26 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MODULES_PRECOMPILED_H_
#define _MODULES_PRECOMPILED_H_
#include "ObjectMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptMgr.h"
#endif

View File

@@ -0,0 +1,23 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MODULES_SCRIPT_LOADER_H_
#define _MODULES_SCRIPT_LOADER_H_
void AddModulesScripts();
#endif

105
modules/create_module.sh Normal file
View File

@@ -0,0 +1,105 @@
#!/bin/bash
## Just run it with bash or `git bash` on windows, and it will ask for the module's name and tada!
## By Barbz
##------------------------------- VARIABLES ---------------------------------##
MODULE_TEMPLATE_URL="https://github.com/azerothcore/skeleton-module/"
GIT_COMMIT_MSG_SETUP="setup_git_commit_template.sh"
##------------------------------- CODE ---------------------------------##
read -p "Enter the name of your future module: " "MODULE_NAME"
echo $MODULE_NAME | fgrep -q ' '
while [ $? -eq 0 ]
do
echo 'Blanks are not allowed!'
read -p "Enter the name of your future module: " MODULE_NAME
echo $MODULE_NAME | fgrep -q ' '
done
if test -n "$MODULE_NAME"
then
echo "--- Cloning 'skeleton-module' as $MODULE_NAME/"
git clone --depth 1 -b master $MODULE_TEMPLATE_URL $MODULE_NAME
echo "--- Removing 'skeleton-module/.git/' history"
cd $MODULE_NAME && rm -rf .git/
echo "--- Init new git repository"
git init && git add -A && git commit -m "Initial commit - $MODULE_NAME"
echo "--- Configure git for nice commit messages"
source "$GIT_COMMIT_MSG_SETUP" || bash "$GIT_COMMIT_MSG_SETUP"
echo "--- Ready to code"
fi
# ## TODO Set the remote origin with username, repo url etc
# $USER_NAME/$MODULE_NAME.git
# echo "Do you want to set your git remote?"
# select yn in "Yes" "No"; do
# case $yn in
# Yes )
# CONFIGURE_GIT=1; break;;
# No )
# CONFIGURE_GIT=0;
# exit;;
# esac
# done
# if test "$CONFIGURE_GIT" == "1"
# then
# PS3='Where do you want to push your module?'
# options=("github.com" "gitlab.com" "bitbucket.org" "Quit")
# select opt in "${options[@]}"
# do
# case $opt in
# "github.com")
# echo "you chose choice 1"
# break
# ;;
# "gitlab.com")
# echo "you chose choice 2"
# break
# ;;
# "bitbucket.org")
# echo "you chose choice $REPLY which is $opt"
# break
# ;;
# "Quit")
# break
# ;;
# *) echo "invalid option $REPLY";;
# esac
# done
# REMOTE_HOST="$opt"
# PS3='HTTPS or SSH?'
# options=("HTTPS (default)" "SSH" "Quit")
# select opt in "${options[@]}"
# do
# case $opt in
# "HTTPS")
# echo "you chose choice 1"
# break
# ;;
# "SSH")
# echo "you chose choice $REPLY which is $opt"
# break
# ;;
# "Quit")
# break
# ;;
# *) echo "invalid option $REPLY";;
# esac
# done
# REMOTE_PROTOCOL="$opt"
# fi

View File

@@ -0,0 +1,22 @@
# CREATE A NEW AZEROTHCORE MODULE
1) Read this page first:
http://www.azerothcore.org/wiki/Create-a-Module
2) Run the script `create_module.sh`:
- If you're on windows, execute it with Git Bash (right click on it and choose Git bash) if you have installed Git extensions
- If you're on linux, just run it with bash or with ./create_module.sh
This script will create the base of your module, with a clean history and add a git configuration option to this repository only (local config).
NOTE: You can also clone our skeleton-module manually, clean the history, and configure but you should use the script instead https://github.com/azerothcore/skeleton-module/
3) Share it with the community!
Join us on our discord, share it there, then we might fork it officially and it will appear in the module catalogue.
Note: For Advanced CMake implementations a <ModuleName>.cmake file in your module folder will be included in the config of Modules if it exists. See: ./CMakeList.txt around line #290

View File

@@ -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

62
modules/mod-ah-bot/.gitattributes vendored Normal file
View File

@@ -0,0 +1,62 @@
## 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
*.conf.dist
*.txt
*.md
*.cmake
# Bash
*.sh text
# Lua if lua module?
*.lua
# SQL
*.sql
# 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
# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as an asset (binary) by default. If you want to treat it as text,
# comment-out the following line and uncomment the line after.
*.svg binary
#*.svg text
*.eps binary

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,12 @@
name: core-build
on:
push:
branches:
- 'master'
pull_request:
jobs:
build:
uses: azerothcore/reusable-workflows/.github/workflows/core_build_modules.yml@main
with:
module_repo: ${{ github.event.repository.name }}

48
modules/mod-ah-bot/.gitignore vendored Normal file
View File

@@ -0,0 +1,48 @@
!.gitignore
#
#Generic
#
.directory
.mailmap
*.orig
*.rej
*~
.hg/
*.kdev*
.DS_Store
CMakeLists.txt.user
*.bak
*.patch
*.diff
*.REMOTE.*
*.BACKUP.*
*.BASE.*
*.LOCAL.*
#
# IDE & other softwares
#
/.settings/
/.externalToolBuilders/*
# exclude in all levels
nbproject/
.sync.ffs_db
*.kate-swp
#
# Eclipse
#
*.pydevproject
.metadata
.gradle
tmp/
*.tmp
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.cproject

View File

@@ -0,0 +1,70 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
## Mod-AHBOT
- Latest build status with azerothcore: [![Build Status](https://github.com/azerothcore/mod-ah-bot/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-ah-bot)
## Important notes
You have to use at least AzerothCore commit [9adba48](https://github.com/azerothcore/azerothcore-wotlk/commit/9adba482c236f1087d66a672e97a99f763ba74b3).
If you use an old version of this module please update the table structure using this SQL statement:
```sql
ALTER TABLE `auctionhousebot` RENAME TO `mod_auctionhousebot`;
```
## Description
An auction house bot for the best core: AzerothCore.
This mod works by selling and bidding auctions in the factions auction house. It can be instructed to do both the operations independently.
## Installation
```
1. Simply place the module under the `modules` directory of your AzerothCore source.
1. Import the SQL manually to the right Database (auth, world or characters).
1. Re-run cmake and launch a clean build of AzerothCore.
```
## Usage
Edit the module configuration and add a player account ID and a character ID.
This character will sell and buy items in the auction house so give him a good name.
If you only specify the account ID, all the characters created within that account will be involved in selling and bidding on the markets.
Specify what operation must be performed (`EnableSeller`, `EnableBuyer` or both).
Notes:
- The account used does not need any security level and can be a player account.
- The character used by the ahbot is not meant to be used ingame. If you use it to browse the auction house, you might have issues like "Searching for items..." displaying forever.
## Edit module configuration (optional)
If you need to change the module configuration, go to your server configuration folder (where your `worldserver` or `worldserver.exe` is) in `modules` you will have to copy and rename (the copy) the file `mod_ahbot.conf.dist` to `mod_ahbot.conf` and edit it. This will change the overall behavior of the bot.
If you need to change a more specific value (for example the quotas of item sold), you will need to update values int the `mod_auctionhousebot` table or use the command line.
The default quotas of all the auction houses for trade goods are:
- Gray = 0
- White = 27
- Green = 12
- Blue = 10
- Purple = 1
- Orange = 0
- Yellow = 0
The default quotas of all the auction houses for non trade goods items are:
- Gray = 0
- White = 10
- Green = 30
- Blue = 8
- Purple = 2
- Orange = 0
- Yellow = 0
The sum of the percentage for these categories must always be 100, or otherwise the defaults values will be used and the modifications will not be accepted.
## Credits
- Ayase: ported the bot to AzerothCore
- Other contributors (check the contributors list)

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
#
# CUSTOM
#
DB_WORLD_CUSTOM_PATHS+=(
$MOD_AH_BOT_ROOT"/sql/world/base/"
)

View File

@@ -0,0 +1,350 @@
[worldserver]
###############################################################################
# AUCTION HOUSE BOT SETTINGS
#
# AuctionHouseBot.DEBUG
# Enable/Disable Debugging output
# Default 0 (disabled)
#
# AuctionHouseBot.DEBUG_CONFIG
# Enable/Disable Debugging output from the configuration
# Default 0 (disabled)
#
# AuctionHouseBot.DEBUG_FILTERS
# Enable/Disable Debugging output from Filters
# Default 0 (disabled)
#
# AuctionHouseBot.DEBUG_BUYER
# Enable/Disable Debugging output from buyer
# Default 0 (disabled)
#
# AuctionHouseBot.DEBUG_SELLER
# Enable/Disable Debugging output from seller
# Default 0 (disabled)
#
# AuctionHouseBot.TRACE_SELLER
# Enable/Disable tracing for the sold items
# Default 0 (disabled)
#
# AuctionHouseBot.TRACE_BUYER
# Enable/Disable tracing for the bought items
# Default 0 (disabled)
#
# AuctionHouseBot.EnableSeller
# Enable/Disable the part of AHBot that puts items up for auction
# Default 0 (disabled)
#
# AuctionHouseBot.EnableBuyer
# Enable/Disable the part of AHBot that buys items from players
# Default 0 (disabled)
#
# AuctionHouseBot.UseBuyPriceForSeller
# Should the Seller use BuyPrice or SellPrice to determine Bid Prices
# Default 0 (use SellPrice)
#
# AuctionHouseBot.UseBuyPriceForBuyer
# Should the Buyer use BuyPrice or SellPrice to determine Bid Prices
# Default 0 (use SellPrice)
#
# AuctionHouseBot.UseMarketPriceForSeller
# Should the Seller use the market price for its auctions?
# Default 0 (disabled)
#
# AuctionHouseBot.MarketResetThreshold
# How many auctions of the same item are necessary before the plain priceis adopted.
# Before reaching this threshold, the price increase/decrease according to an heuristic.
# Set this variable to a lower value to have a fast reacting market price,
# to an high value to smooth the oscillations in prices.
# Default 25
#
# Auction House Bot character data
# AuctionHouseBot.Account is the account number
# (in realmd->account table) of the player you want to run
# as the auction bot.
# AuctionHouseBot.GUID is the GUID (in characters->characters table)
# of the player you want to run as the auction bot.
# Default: 0 (Auction House Bot disabled)
#
# AuctionHouseBot.ItemsPerCycle
# Number of Items to Add/Remove from the AH during mass operations
# Default 200
#
# AuctionHouseBot.ConsiderOnlyBotAuctions
# Ignore player auctions and consider only bot ones when keeping track of the numer of auctions in place.
# This allow to keep a background noise in the market even when lot of players are in.
# If this is not set, players acutions are counted in the valid auctions and you will need to greatly increase the maxitems SQL values to
# allow the bot to operate on the market. If this is set the players auctions will not be considered.
# Default 0 (False)
#
# AuctionHouseBot.DuplicatesCount
# The maximum amount of duplicates stacks present in the market sold by the bot.
# If set to zero then no limits are set in place.
# Default 0
#
# AuctionHouseBot.DivisibleStacks
# Sell items in stack sizes which depends on the maximum amount per stack.
# For example, an item with max stack size 20 will be sold in 5, 10 15 and 20 stacks, and not at random.
# Default 0 (False)
#
# AuctionHouseBot.ElapsingTimeClass
# The elapsing time for the sold items. There are three classes:
# 0 = long, auctions lasts from one to three days
# 1 = medium, auctions lasts within a day
# 2 = shorts, auctions lasts within an hour
# Default 1
#
###############################################################################
AuctionHouseBot.DEBUG = 0
AuctionHouseBot.DEBUG_CONFIG = 0
AuctionHouseBot.DEBUG_FILTERS = 0
AuctionHouseBot.DEBUG_BUYER = 0
AuctionHouseBot.DEBUG_SELLER = 0
AuctionHouseBot.TRACE_SELLER = 0
AuctionHouseBot.TRACE_BUYER = 0
AuctionHouseBot.EnableSeller = 0
AuctionHouseBot.EnableBuyer = 0
AuctionHouseBot.UseBuyPriceForSeller = 0
AuctionHouseBot.UseBuyPriceForBuyer = 0
AuctionHouseBot.UseMarketPriceForSeller = 0
AuctionHouseBot.MarketResetThreshold = 25
AuctionHouseBot.Account = 0
AuctionHouseBot.GUID = 0
AuctionHouseBot.ItemsPerCycle = 200
AuctionHouseBot.ConsiderOnlyBotAuctions = 0
AuctionHouseBot.DuplicatesCount = 0
AuctionHouseBot.DivisibleStacks = 0
AuctionHouseBot.ElapsingTimeClass = 1
###############################################################################
# AUCTION HOUSE BOT FILTERS PART 1
#
# AuctionHouseBot.VendorItems
# Include items that can be bought from vendors.
# Default 0 (False)
#
# AuctionHouseBot.VendorTradeGoods
# Include Trade Goods that can be bought from vendors.
# Default 0 (False)
#
# AuctionHouseBot.LootItems
# Include items that can be looted or fished for.
# Default 1 (True)
#
# AuctionHouseBot.LootTradeGoods
# Include Trade Goods that can be looted or fished for.
# Default 1 (True)
#
# AuctionHouseBot.OtherItems
# Include misc. items.
# Default 0 (False)
#
# AuctionHouseBot.OtherTradeGoods
# Include misc. Trade Goods.
# Default 0 (False)
#
# AuctionHouseBot.ProfessionItems
# Include items that are necessary for professions
# Default 0 (False)
#
# AuctionHouseBot.Bonding_types
# Indicates which bonding types to allow seller to put up for auction
# No_Bind
# Default 1 (True)
# Bind_When_Picked_Up
# Default 0 (False)
# Bind_When_Equipped
# Default 1 (True)
# Bind_When_Use
# Default 1 (True)
# Bind_Quest_Item
# Default 0 (False)
#
# AuctionHouseBot.DisablePermEnchant
# Disable Items with a Permanent Enchantment
# Default 0 (False)
#
# AuctionHouseBot.DisableConjured
# Disable Conjured Items
# Default 0 (False)
#
# AuctionHouseBot.DisableGems
# Disable Gems
# Default 0 (False)
#
# AuctionHouseBot.DisableMoney
# Disable Items that are used as money
# Default 0 (False)
#
# AuctionHouseBot.DisableMoneyLoot
# Disable Items that have Money as a loot
# Default 0 (False)
#
# AuctionHouseBot.DisableLootable
# Disable Items that have other items as loot
# Default 0 (False)
#
# AuctionHouseBot.DisableKeys
# Disable Items that are keys
# Default 0 (False)
#
# AuctionHouseBot.DisableDuration
# Disable Items with a duration
# Default 0 (False)
#
# AuctionHouseBot.DisableBOP_Or_Quest_NoReqLevel
# Disable items that are BOP or Quest Item
# with a Required level that is less than the Item Level
# (This prevents a level 10 with a level 60 weapon or armor)
# (May need further refinement)
# Default 0 (False)
#
###############################################################################
AuctionHouseBot.VendorItems = 0
AuctionHouseBot.VendorTradeGoods = 0
AuctionHouseBot.LootItems = 1
AuctionHouseBot.LootTradeGoods = 1
AuctionHouseBot.OtherItems = 0
AuctionHouseBot.OtherTradeGoods = 0
AuctionHouseBot.ProfessionItems = 0
AuctionHouseBot.No_Bind = 1
AuctionHouseBot.Bind_When_Picked_Up = 0
AuctionHouseBot.Bind_When_Equipped = 1
AuctionHouseBot.Bind_When_Use = 1
AuctionHouseBot.Bind_Quest_Item = 0
AuctionHouseBot.DisablePermEnchant = 0
AuctionHouseBot.DisableConjured = 0
AuctionHouseBot.DisableGems = 0
AuctionHouseBot.DisableMoney = 0
AuctionHouseBot.DisableMoneyLoot = 0
AuctionHouseBot.DisableLootable = 0
AuctionHouseBot.DisableKeys = 0
AuctionHouseBot.DisableDuration = 0
AuctionHouseBot.DisableBOP_Or_Quest_NoReqLevel = 0
###############################################################################
# AUCTION HOUSE BOT FILTERS PART 2
#
# These Filters are boolean (0 or 1) and will disable items that are
# specifically meant for the Class named.
# (UnusedClass is Class 10, which was skipped for some reason)
# Default 0 (allowed)
#
###############################################################################
AuctionHouseBot.DisableWarriorItems = 0
AuctionHouseBot.DisablePaladinItems = 0
AuctionHouseBot.DisableHunterItems = 0
AuctionHouseBot.DisableRogueItems = 0
AuctionHouseBot.DisablePriestItems = 0
AuctionHouseBot.DisableDKItems = 0
AuctionHouseBot.DisableShamanItems = 0
AuctionHouseBot.DisableMageItems = 0
AuctionHouseBot.DisableWarlockItems = 0
AuctionHouseBot.DisableUnusedClassItems = 0
AuctionHouseBot.DisableDruidItems = 0
###############################################################################
# AUCTION HOUSE BOT FILTERS PART 3
#
# AuctionHouseBot.DisabledItems
# Prevent Seller from listing specific item(s)
# (not used anymore, see table "mod_auctionhousebot_disabled_items")
#
# AuctionHouseBot.DisableItemsBelowLevel
# Prevent Seller from listing Items below this Level
# Default 0 (Off)
#
# AuctionHouseBot.DisableItemsAboveLevel
# Prevent Seller from listing Items above this Level
# Default 0 (Off)
#
# AuctionHouseBot.DisableTGsBelowLevel
# Prevent Seller from listing Trade Goods below this Level
# Default 0 (Off)
#
# AuctionHouseBot.DisableTGsAboveLevel
# Prevent Seller from listing Trade Goods above this Level
# Default 0 (Off)
#
# AuctionHouseBot.DisableItemsBelowGUID
# Prevent Seller from listing Items below this GUID
# Default 0 (Off)
#
# AuctionHouseBot.DisableItemsAboveGUID
# Prevent Seller from listing Items above this GUID
# Default 0 (Off)
#
# AuctionHouseBot.DisableTGsBelowGUID
# Prevent Seller from listing Trade Goods below this GUID
# Default 0 (Off)
#
# AuctionHouseBot.DisableTGsAboveGUID
# Prevent Seller from listing Trade Goods above this GUID
# Default 0 (Off)
#
# AuctionHouseBot.DisableItemsBelowReqLevel
# Prevent Seller from listing Items below this Required Level
# Default 0 (Off)
#
# AuctionHouseBot.DisableItemsAboveReqLevel
# Prevent Seller from listing Items above this Required Level
# Default 0 (Off)
#
# AuctionHouseBot.DisableTGsBelowReqLevel
# Prevent Seller from listing Trade Goods below this Required Level
# Default 0 (Off)
#
# AuctionHouseBot.DisableTGsAboveReqLevel
# Prevent Seller from listing Trade Goods above this Required Level
# Default 0 (Off)
#
# AuctionHouseBot.DisableItemsBelowReqSkillRank
# Prevent Seller from listing Items below this Required Skill Rank
# Default 0 (Off)
#
# AuctionHouseBot.DisableItemsAboveReqSkillRank
# Prevent Seller from listing Items above this Required Skill Rank
# Default 0 (Off)
#
# AuctionHouseBot.DisableTGsBelowReqSkillRank
# Prevent Seller from listing Trade Goods below this Required Skill Rank
# Default 0 (Off)
#
# AuctionHouseBot.DisableTGsAboveReqSkillRank
# Prevent Seller from listing Trade Goods above this Required Skill Rank
# Default 0 (Off)
#
###############################################################################
AuctionHouseBot.DisableItemsBelowLevel = 0
AuctionHouseBot.DisableItemsAboveLevel = 0
AuctionHouseBot.DisableTGsBelowLevel = 0
AuctionHouseBot.DisableTGsAboveLevel = 0
AuctionHouseBot.DisableItemsBelowGUID = 0
AuctionHouseBot.DisableItemsAboveGUID = 0
AuctionHouseBot.DisableTGsBelowGUID = 0
AuctionHouseBot.DisableTGsAboveGUID = 0
AuctionHouseBot.DisableItemsBelowReqLevel = 0
AuctionHouseBot.DisableItemsAboveReqLevel = 0
AuctionHouseBot.DisableTGsBelowReqLevel = 0
AuctionHouseBot.DisableTGsAboveReqLevel = 0
AuctionHouseBot.DisableItemsBelowReqSkillRank = 0
AuctionHouseBot.DisableItemsAboveReqSkillRank = 0
AuctionHouseBot.DisableTGsBelowReqSkillRank = 0
AuctionHouseBot.DisableTGsAboveReqSkillRank = 0
###############################################################################
# AUCTION HOUSE BOT FILTERS PART 4
#
# AuctionHouseBot.SellerWhiteList
# Bypass the values of the disabled items table and only allows selling of the selected items
# Values here must be the item template id separated with a comma (eg "1, 2, 3")
# Default "" (Empty)
#
###############################################################################
AuctionHouseBot.SellerWhiteList = ""

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,382 @@
--
-- Main configuration for the auction houses
--
DROP TABLE IF EXISTS `mod_auctionhousebot`;
CREATE TABLE `mod_auctionhousebot` (
`auctionhouse` int(11) NOT NULL DEFAULT '0' COMMENT 'mapID of the auctionhouse.',
`name` char(25) DEFAULT NULL COMMENT 'Text name of the auctionhouse.',
`minitems` int(11) DEFAULT '0' COMMENT 'This is the minimum number of items you want to keep in the auction house. a 0 here will make it the same as the maximum.',
`maxitems` int(11) DEFAULT '0' COMMENT 'This is the number of items you want to keep in the auction house.',
`percentgreytradegoods` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the Grey Trade Goods auction items',
`percentwhitetradegoods` int(11) DEFAULT '27' COMMENT 'Sets the percentage of the White Trade Goods auction items',
`percentgreentradegoods` int(11) DEFAULT '12' COMMENT 'Sets the percentage of the Green Trade Goods auction items',
`percentbluetradegoods` int(11) DEFAULT '10' COMMENT 'Sets the percentage of the Blue Trade Goods auction items',
`percentpurpletradegoods` int(11) DEFAULT '1' COMMENT 'Sets the percentage of the Purple Trade Goods auction items',
`percentorangetradegoods` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the Orange Trade Goods auction items',
`percentyellowtradegoods` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the Yellow Trade Goods auction items',
`percentgreyitems` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the non trade Grey auction items',
`percentwhiteitems` int(11) DEFAULT '10' COMMENT 'Sets the percentage of the non trade White auction items',
`percentgreenitems` int(11) DEFAULT '30' COMMENT 'Sets the percentage of the non trade Green auction items',
`percentblueitems` int(11) DEFAULT '8' COMMENT 'Sets the percentage of the non trade Blue auction items',
`percentpurpleitems` int(11) DEFAULT '2' COMMENT 'Sets the percentage of the non trade Purple auction items',
`percentorangeitems` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the non trade Orange auction items',
`percentyellowitems` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the non trade Yellow auction items',
`minpricegrey` int(11) DEFAULT '100' COMMENT 'Minimum price of Grey items (percentage).',
`maxpricegrey` int(11) DEFAULT '150' COMMENT 'Maximum price of Grey items (percentage).',
`minpricewhite` int(11) DEFAULT '150' COMMENT 'Minimum price of White items (percentage).',
`maxpricewhite` int(11) DEFAULT '250' COMMENT 'Maximum price of White items (percentage).',
`minpricegreen` int(11) DEFAULT '800' COMMENT 'Minimum price of Green items (percentage).',
`maxpricegreen` int(11) DEFAULT '1400' COMMENT 'Maximum price of Green items (percentage).',
`minpriceblue` int(11) DEFAULT '1250' COMMENT 'Minimum price of Blue items (percentage).',
`maxpriceblue` int(11) DEFAULT '1750' COMMENT 'Maximum price of Blue items (percentage).',
`minpricepurple` int(11) DEFAULT '2250' COMMENT 'Minimum price of Purple items (percentage).',
`maxpricepurple` int(11) DEFAULT '4550' COMMENT 'Maximum price of Purple items (percentage).',
`minpriceorange` int(11) DEFAULT '3250' COMMENT 'Minimum price of Orange items (percentage).',
`maxpriceorange` int(11) DEFAULT '5550' COMMENT 'Maximum price of Orange items (percentage).',
`minpriceyellow` int(11) DEFAULT '5250' COMMENT 'Minimum price of Yellow items (percentage).',
`maxpriceyellow` int(11) DEFAULT '6550' COMMENT 'Maximum price of Yellow items (percentage).',
`minbidpricegrey` int(11) DEFAULT '70' COMMENT 'Starting bid price of Grey items as a percentage of the randomly chosen buyout price. Default: 70',
`maxbidpricegrey` int(11) DEFAULT '100' COMMENT 'Starting bid price of Grey items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpricewhite` int(11) DEFAULT '70' COMMENT 'Starting bid price of White items as a percentage of the randomly chosen buyout price. Default: 70',
`maxbidpricewhite` int(11) DEFAULT '100' COMMENT 'Starting bid price of White items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpricegreen` int(11) DEFAULT '80' COMMENT 'Starting bid price of Green items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpricegreen` int(11) DEFAULT '100' COMMENT 'Starting bid price of Green items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpriceblue` int(11) DEFAULT '75' COMMENT 'Starting bid price of Blue items as a percentage of the randomly chosen buyout price. Default: 75',
`maxbidpriceblue` int(11) DEFAULT '100' COMMENT 'Starting bid price of Blue items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpricepurple` int(11) DEFAULT '80' COMMENT 'Starting bid price of Purple items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpricepurple` int(11) DEFAULT '100' COMMENT 'Starting bid price of Purple items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpriceorange` int(11) DEFAULT '80' COMMENT 'Starting bid price of Orange items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpriceorange` int(11) DEFAULT '100' COMMENT 'Starting bid price of Orange items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpriceyellow` int(11) DEFAULT '80' COMMENT 'Starting bid price of Yellow items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpriceyellow` int(11) DEFAULT '100' COMMENT 'Starting bid price of Yellow items as a percentage of the randomly chosen buyout price. Default: 100',
`maxstackgrey` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackwhite` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackgreen` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackblue` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackpurple` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackorange` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackyellow` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`buyerpricegrey` int(11) DEFAULT '1' COMMENT 'Multiplier to vendorprice when buying grey items from auctionhouse',
`buyerpricewhite` int(11) DEFAULT '3' COMMENT 'Multiplier to vendorprice when buying white items from auctionhouse',
`buyerpricegreen` int(11) DEFAULT '5' COMMENT 'Multiplier to vendorprice when buying green items from auctionhouse',
`buyerpriceblue` int(11) DEFAULT '12' COMMENT 'Multiplier to vendorprice when buying blue items from auctionhouse',
`buyerpricepurple` int(11) DEFAULT '15' COMMENT 'Multiplier to vendorprice when buying purple items from auctionhouse',
`buyerpriceorange` int(11) DEFAULT '20' COMMENT 'Multiplier to vendorprice when buying orange items from auctionhouse',
`buyerpriceyellow` int(11) DEFAULT '22' COMMENT 'Multiplier to vendorprice when buying yellow items from auctionhouse',
`buyerbiddinginterval` int(11) DEFAULT '1' COMMENT 'Interval how frequently AHB bids on each AH. Time in minutes',
`buyerbidsperinterval` int(11) DEFAULT '1' COMMENT 'number of bids to put in per bidding interval',
PRIMARY KEY (`auctionhouse`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- AHBot auction houses default configuration values
--
INSERT INTO `mod_auctionhousebot` (`auctionhouse`, `name`, `minitems`, `maxitems`, `percentgreytradegoods`, `percentwhitetradegoods`, `percentgreentradegoods`, `percentbluetradegoods`, `percentpurpletradegoods`, `percentorangetradegoods`, `percentyellowtradegoods`, `percentgreyitems`, `percentwhiteitems`, `percentgreenitems`, `percentblueitems`, `percentpurpleitems`, `percentorangeitems`, `percentyellowitems`, `minpricegrey`, `maxpricegrey`, `minpricewhite`, `maxpricewhite`, `minpricegreen`, `maxpricegreen`, `minpriceblue`, `maxpriceblue`, `minpricepurple`, `maxpricepurple`, `minpriceorange`, `maxpriceorange`, `minpriceyellow`, `maxpriceyellow`, `minbidpricegrey`, `maxbidpricegrey`, `minbidpricewhite`, `maxbidpricewhite`, `minbidpricegreen`, `maxbidpricegreen`, `minbidpriceblue`, `maxbidpriceblue`, `minbidpricepurple`, `maxbidpricepurple`, `minbidpriceorange`, `maxbidpriceorange`, `minbidpriceyellow`, `maxbidpriceyellow`, `maxstackgrey`, `maxstackwhite`, `maxstackgreen`, `maxstackblue`, `maxstackpurple`, `maxstackorange`, `maxstackyellow`, `buyerpricegrey`, `buyerpricewhite`, `buyerpricegreen`, `buyerpriceblue`, `buyerpricepurple`, `buyerpriceorange`, `buyerpriceyellow`, `buyerbiddinginterval`, `buyerbidsperinterval`)
VALUES
(2,'Alliance',250,250,0,27,12,10,1,0,0,0,10,30,8,2,0,0,100,150,150,250,800,1400,1250,1750,2250,4550,3250,5550,5250,6550,70,100,70,100,80,100,75,100,80,100,80,100,80,100,0,0,3,2,1,1,1,1,3,5,12,15,20,22,1,1),
(6,'Horde',250,250,0,27,12,10,1,0,0,0,10,30,8,2,0,0,100,150,150,250,800,1400,1250,1750,2250,4550,3250,5550,5250,6550,70,100,70,100,80,100,75,100,80,100,80,100,80,100,0,0,3,2,1,1,1,1,3,5,12,15,20,22,1,1),
(7,'Neutral',250,250,0,27,12,10,1,0,0,0,10,30,8,2,0,0,100,150,150,250,800,1400,1250,1750,2250,4550,3250,5550,5250,6550,70,100,70,100,80,100,75,100,80,100,80,100,80,100,0,0,3,2,1,1,1,1,3,5,12,15,20,22,1,1);
--
-- Items blacklist
--
DROP TABLE IF EXISTS `mod_auctionhousebot_disabled_items`;
CREATE TABLE `mod_auctionhousebot_disabled_items` (
`item` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Blacklist default values
--
INSERT INTO `mod_auctionhousebot_disabled_items`
VALUES
(17), (3895), (1700), (862), (4196), (3934), (2275), (4213), (4988), (4989), (4990), (4110), (4111), (4116), (3463), (3068),
(913), (2016), (3738), (1189), (3222), (2664), (2273), (4763), (2444), (1041), (1133), (1134), (2413), (2415), (2927), (2932),
(2443), (1487), (1623), (3031), (3034), (3762), (3772), (4981), (2693), (2808), (1254), (2442), (3137), (4191), (4193), (931),
(1114), (1450), (2136), (1352), (2441), (3884), (4200), (2588), (2922), (3005), (3122), (1193), (1057), (3107), (3135), (3144),
(4273), (1113), (2288), (2556), (2921), (3004), (763), (1146), (1255), (2929), (4143), (2064), (3648), (1162), (1167), (2377),
(2920), (3003), (4965), (2497), (2499), (2501), (2599), (3320), (964), (2496), (2498), (2503), (2946), (3131), (1389), (2500),
(2502), (4959), (1166), (1386), (2133), (4930), (1029), (2055), (2128), (2481), (2484), (2487), (3260), (2482), (2483), (2485),
(2486), (2947), (3111), (37), (996), (119), (138), (734), (876), (895), (896), (900), (956), (958), (960), (997),
(1014), (1020), (1021), (1024), (1025), (1027), (1324), (1356), (1672), (1923), (1977), (2410), (2477), (2586), (2638), (2668),
(2755), (2891), (3316), (3513), (3516), (3536), (3584), (3686), (3707), (3744), (4278), (4524), (4703), (4704), (4749), (4851),
(4868), (192), (3958), (3978), (4014), (3952), (3981), (3991), (4011), (3957), (3979), (4012), (3959), (3982), (4010), (3954),
(3983), (3988), (4009), (3953), (3984), (4013), (3956), (3977), (4008), (3955), (3980), (4015), (2931), (3776), (1914), (4858),
(3713), (3777), (3063), (2918), (3046), (3052), (3062), (4912), (2995), (1028), (1192), (2692), (1298), (1363), (4688), (4774),
(4773), (4761), (2305), (2306), (4471), (88), (91), (100), (128), (143), (156), (813), (1222), (1259), (1902), (1911),
(2081), (2184), (2550), (2705), (2715), (2810), (3148), (3168), (3245), (3368), (3675), (3774), (5828), (9372), (8708), (8586),
(9240), (9380), (9484), (9417), (10579), (9718), (7187), (10978), (9685), (9214), (9653), (7987), (7988), (7986), (7550), (7547),
(7548), (7994), (7748), (7953), (9888), (5010), (7497), (7466), (5008), (8840), (5004), (5005), (7467), (7427), (7426), (7948),
(7949), (7950), (7951), (7952), (6589), (6360), (6376), (10049), (5821), (5822), (7188), (6478), (10998), (6345), (5748), (5255),
(5968), (8350), (10939), (6343), (9602), (10595), (8079), (8008), (9421), (8076), (8078), (10683), (8171), (8546), (10662), (10818),
(8007), (5510), (8075), (8077), (10664), (8147), (8993), (5663), (5874), (5875), (8583), (8589), (8590), (8627), (8628), (8630),
(8633), (9254), (10620), (5513), (5522), (6357), (8365), (8366), (5509), (6715), (5108), (5518), (6355), (5632), (5845), (6352),
(6359), (6363), (6364), (6647), (6766), (5654), (5657), (5511), (5105), (6354), (6366), (6374), (6650), (8964), (5232), (5517),
(5660), (5013), (5024), (5603), (5823), (6292), (6294), (6295), (6309), (6310), (6311), (6351), (6353), (6358), (6645), (6754),
(7678), (5150), (6651), (5512), (6182), (6183), (6619), (6649), (5229), (6356), (5235), (5043), (5044), (5349), (5350), (6216),
(6291), (6643), (6891), (7807), (7808), (6648), (5056), (5184), (5220), (5330), (5333), (5353), (5389), (5400), (5410), (5417),
(5418), (5455), (5515), (5531), (5562), (5563), (5639), (5645), (5646), (5681), (5768), (5769), (5833), (5859), (5878), (6130),
(6276), (6277), (6278), (6279), (6280), (6435), (6490), (6491), (6492), (6495), (6496), (6497), (6498), (6500), (6501), (6516),
(6544), (6623), (6717), (6718), (6834), (6927), (6988), (7134), (7206), (7208), (7268), (7271), (7286), (7287), (7333), (7392),
(7679), (7680), (7681), (7716), (7725), (7733), (7737), (7867), (7923), (7970), (8072), (8426), (9280), (9281), (9282), (9284),
(9316), (9319), (9325), (9330), (9365), (9593), (9594), (9595), (9596), (9597), (10464), (10691), (10692), (10693), (10694), (5495),
(5863), (6307), (7769), (7770), (7771), (8164), (8383), (8585), (9311), (9438), (9440), (9441), (9443), (10790), (5550), (5549),
(5555), (8368), (8688), (6951), (5560), (7428), (7190), (5625), (6174), (7170), (5106), (8427), (5379), (5259), (5283), (5362),
(5363), (5364), (5367), (5370), (5371), (5377), (5435), (5600), (6131), (6150), (6225), (6227), (6232), (6297), (6301), (6455),
(7135), (8425), (9700), (9701), (10457), (10450), (10791), (11264), (12947), (15780), (14550), (12302), (12303), (12330), (12351), (12353),
(12354), (13317), (13326), (13327), (13328), (13329), (15292), (15293), (12731), (12588), (12970), (13080), (13090), (13092), (13936), (13950),
(14543), (13148), (13164), (13173), (15410), (15769), (11768), (12105), (11743), (14344), (11671), (11672), (14343), (12469), (11178), (11177),
(13325), (11139), (11138), (11084), (12325), (12326), (12327), (13323), (13324), (12616), (12617), (12615), (12904), (12104), (12106), (12107),
(13175), (13242), (13247), (12866), (11175), (12258), (11174), (11135), (11134), (11082), (13727), (13728), (13730), (13731), (13736), (13737),
(13738), (13739), (13740), (13741), (13742), (13743), (13744), (13745), (13746), (13747), (13748), (13749), (13762), (13763), (13764), (13765),
(13766), (13767), (13768), (13769), (13770), (13771), (13772), (13773), (13775), (13776), (13777), (13778), (13779), (13780), (13781), (13782),
(13783), (13784), (13785), (13788), (13791), (13794), (13797), (13798), (13801), (13802), (13803), (13804), (13805), (13806), (13807), (13808),
(13809), (13603), (15756), (13701), (14488), (11950), (11951), (11952), (13480), (13888), (13889), (13890), (13891), (13893), (13901), (13902),
(13903), (13904), (13905), (13906), (13907), (13908), (13910), (13911), (13912), (13914), (13915), (13916), (13917), (13918), (14481), (13477),
(14894), (15409), (15415), (15417), (15419), (15886), (13602), (13700), (11176), (13422), (13754), (13755), (13756), (13758), (13759), (13760),
(13875), (13876), (13877), (13878), (13879), (13880), (13881), (13882), (13883), (13884), (13885), (13886), (13887), (11903), (14062), (15326),
(15327), (11111), (13699), (11137), (11083), (12238), (12446), (12447), (12448), (12449), (14891), (14083), (11024), (11131), (11149), (11170),
(11222), (11230), (11282), (11364), (11413), (11470), (11507), (11508), (11512), (11513), (11582), (11602), (11609), (11613), (11616), (11947),
(11949), (11954), (12064), (12241), (12263), (12347), (12349), (12563), (12567), (12648), (12649), (12723), (12847), (12885), (13155), (13159),
(13370), (13673), (13726), (13732), (13733), (13734), (13787), (13790), (13793), (13796), (14339), (14390), (14392), (14645), (15448), (15843),
(15845), (11270), (11283), (11511), (11514), (12468), (15422), (15423), (12348), (12787), (12943), (12991), (13316), (13337), (13612), (14586),
(18582), (18583), (18584), (17182), (17782), (18881), (17142), (17067), (17068), (18608), (18609), (18713), (18715), (17075), (18813), (17078),
(17064), (18205), (17223), (18538), (18970), (18241), (18242), (18243), (18244), (18245), (18246), (18247), (18248), (18768), (17886), (17982),
(16369), (16391), (16392), (16393), (16396), (16397), (16401), (16403), (16405), (16406), (16409), (16410), (16413), (16414), (16415), (16416),
(16417), (16418), (16419), (16420), (16421), (16422), (16423), (16424), (16425), (16426), (16427), (16428), (16429), (16430), (16431), (16432),
(16433), (16434), (16435), (16436), (16485), (16487), (16489), (16490), (16491), (16492), (16494), (16496), (16498), (16499), (16501), (16502),
(16503), (16504), (16505), (16506), (16507), (16508), (16509), (16510), (16513), (16514), (16515), (16516), (16518), (16519), (16521), (16522),
(16523), (16524), (16525), (16526), (16527), (16528), (16530), (16531), (17562), (17564), (17566), (17567), (17568), (17569), (17570), (17571),
(17572), (17573), (17576), (17577), (17594), (17596), (17598), (17599), (17600), (17601), (17610), (17611), (17612), (17613), (17616), (17617),
(16337), (17967), (17968), (16999), (17733), (16334), (16336), (16340), (18303), (18304), (18320), (18341), (18342), (16315), (16203), (17966),
(16664), (16202), (17769), (16792), (16165), (17224), (17364), (16026), (16339), (16350), (16366), (16374), (16896), (17012), (18142), (16320),
(16362), (16378), (16356), (16387), (16047), (16171), (16330), (16383), (18636), (16041), (16042), (16373), (16389), (18651), (16325), (16349),
(16361), (16895), (17024), (16319), (16355), (16365), (16386), (16377), (16382), (16082), (16085), (16971), (16329), (16372), (16360), (16390),
(17019), (16348), (16354), (16385), (16893), (16967), (16318), (16324), (16381), (16364), (16371), (16388), (17027), (16057), (16328), (16359),
(16376), (16353), (16380), (16384), (16347), (16892), (16317), (16368), (16323), (16358), (16379), (16327), (16352), (16363), (16375), (16346),
(18964), (16316), (16357), (16351), (16322), (16326), (16331), (16302), (17195), (17302), (17305), (17308), (18002), (16321), (16180), (16642),
(16643), (16644), (16968), (16969), (16970), (16973), (17126), (17242), (17262), (17323), (17324), (17325), (17333), (17353), (17362), (17363),
(17442), (17505), (17506), (17507), (17696), (17758), (17882), (17887), (18151), (18153), (18492), (18540), (18566), (18643), (18799), (18154),
(18642), (20880), (19158), (20142), (20329), (21584), (21587), (21588), (21594), (21612), (21613), (21614), (21339), (20487), (20488), (21124),
(21125), (21127), (21890), (19879), (19951), (19952), (19953), (19954), (19955), (19956), (19957), (19958), (19959), (20698), (20725), (20887),
(19875), (20720), (20721), (20722), (19105), (19110), (20696), (20706), (20368), (21281), (21282), (21283), (21293), (21302), (19986), (20003),
(20005), (20502), (20522), (20524), (21044), (20381), (21785), (21786), (21878), (21772), (21773), (20086), (20965), (19803), (19805), (19806),
(19808), (20591), (20596), (20962), (20957), (20953), (20829), (20952), (20825), (20822), (20819), (19213), (19322), (20256), (20560), (21992),
(21159), (21175), (19012), (19013), (19696), (20498), (20500), (20501), (19010), (19011), (19807), (20065), (21228), (21243), (21153), (19450),
(20067), (21150), (21164), (19008), (19009), (21113), (19006), (19007), (19054), (19055), (21071), (21168), (21212), (21043), (20708), (21162),
(19004), (19005), (20913), (20979), (20981), (19160), (19422), (19642), (19725), (19775), (19880), (19882), (20018), (20020), (20021), (20364),
(20393), (20416), (20418), (20419), (20420), (20432), (20433), (20435), (20436), (20447), (20448), (20449), (20450), (20454), (20455), (20456),
(20709), (20902), (20903), (20904), (20977), (20984), (21106), (21107), (21109), (21111), (21114), (21131), (21152), (21158), (21160), (21161),
(21171), (21442), (21519), (21536), (21560), (21577), (21578), (21591), (21815), (21816), (21817), (21818), (21819), (21820), (21821), (21822),
(21823), (21831), (21975), (21979), (21980), (21981), (19960), (21140), (19924), (20030), (21141), (22736), (22726), (22819), (22821), (22798),
(22799), (22802), (22812), (22691), (22947), (22954), (22800), (22801), (22804), (22807), (22808), (22809), (22811), (22816), (22818), (22820),
(22935), (22936), (22937), (22938), (22939), (22940), (22941), (22943), (22960), (22961), (22967), (22968), (22981), (22983), (22988), (22994),
(22803), (22806), (22810), (22813), (22814), (22815), (22942), (22805), (22817), (22450), (22349), (22350), (22351), (22352), (22353), (22354),
(22355), (22356), (22357), (22358), (22359), (22360), (22361), (22362), (22363), (22364), (22365), (22366), (22367), (22368), (22369), (22370),
(22371), (22372), (22373), (22374), (22375), (22376), (22891), (22230), (22273), (22446), (22447), (22782), (22018), (22019), (22103), (22104),
(22105), (22116), (22182), (22187), (22189), (22797), (22044), (22179), (22186), (22788), (22128), (22184), (22646), (22795), (22895), (22181),
(22185), (22190), (22183), (22180), (22188), (22972), (22710), (22020), (22042), (22045), (22140), (22141), (22142), (22143), (22144), (22145),
(22154), (22155), (22156), (22157), (22158), (22159), (22160), (22161), (22162), (22163), (22164), (22165), (22166), (22167), (22168), (22169),
(22170), (22171), (22172), (22178), (22202), (22260), (22262), (22263), (22283), (22284), (22285), (22286), (22287), (22288), (22289), (22290),
(22291), (22292), (22293), (22294), (22295), (22296), (22297), (22298), (22299), (22300), (22386), (22387), (22584), (22733), (22754), (22822),
(22896), (22899), (22058), (22059), (22709), (23051), (25596), (24526), (24561), (24567), (27965), (24550), (24557), (24265), (23053), (23057),
(23058), (23040), (23041), (23043), (23045), (23046), (23047), (23048), (23049), (23050), (23072), (23362), (23363), (23054), (23056), (23577),
(23242), (23000), (23001), (23025), (23027), (23037), (23038), (23042), (23069), (23070), (23219), (23220), (23663), (23664), (23665), (23666),
(23667), (23668), (23004), (23005), (23006), (23009), (23017), (23018), (23019), (23020), (23021), (23023), (23028), (23029), (23030), (23031),
(23032), (23033), (23034), (23035), (23036), (23039), (23044), (23068), (23071), (23073), (23075), (23221), (23226), (23237), (23238), (23014),
(23457), (23458), (23459), (23461), (23462), (23193), (23545), (23547), (23548), (23549), (23714), (23705), (23709), (23716), (23773), (24412),
(25641), (24137), (25667), (23854), (23855), (24288), (27388), (27446), (24071), (23885), (23882), (23364), (23366), (27774), (27811), (27002),
(27007), (26368), (26372), (26655), (26738), (26128), (26129), (26130), (26131), (26132), (26133), (26134), (26135), (26464), (26465), (26513),
(26527), (26541), (26569), (26765), (26779), (25573), (25574), (25575), (25576), (25580), (25581), (25582), (26235), (26792), (25627), (27196),
(27718), (27719), (27720), (26324), (25145), (25159), (25173), (25285), (26843), (26548), (26180), (26173), (26174), (26175), (27218), (23147),
(23151), (23153), (23229), (23076), (23157), (26015), (26029), (26041), (23420), (23421), (23422), (23432), (23433), (23434), (23233), (23234),
(23235), (27864), (26045), (27863), (24243), (23731), (23755), (23840), (24315), (25877), (23137), (23131), (23141), (23730), (23130), (23135),
(23140), (23144), (23148), (23152), (23162), (23194), (23195), (23196), (23684), (23745), (25469), (25699), (25700), (27422), (27437), (27481),
(27511), (27513), (23578), (25900), (23579), (23683), (23711), (23734), (23846), (23365), (23368), (24227), (24100), (23003), (23008), (23010),
(23011), (23012), (23013), (23016), (23024), (23055), (23214), (23227), (23248), (23340), (23341), (23342), (23350), (23352), (23360), (23378),
(23471), (23486), (23552), (23567), (23584), (23586), (23670), (23686), (23726), (23754), (23878), (23879), (23880), (24156), (24226), (24317),
(24494), (24538), (24573), (25635), (25677), (25747), (25748), (25749), (25750), (25754), (25755), (25756), (25757), (25850), (27317), (27419),
(27590), (23560), (23561), (23562), (23750), (23858), (23866), (23867), (23868), (25814), (27443), (25407), (24242), (27441), (24235), (24190),
(24234), (24188), (23330), (23355), (23952), (23980), (24283), (24506), (24509), (25813), (24140), (28294), (28295), (28297), (28298), (28299),
(28300), (28302), (28305), (28307), (28308), (28309), (28310), (28312), (28313), (28314), (28319), (28320), (28346), (28358), (28383), (28385),
(28402), (28404), (28409), (28410), (28422), (28423), (28443), (28444), (28446), (28447), (28449), (28450), (28476), (28629), (28630), (28639),
(28640), (28641), (28642), (28644), (28645), (28974), (28975), (28976), (28977), (28980), (28982), (28983), (28985), (28986), (28987), (28990),
(28991), (28993), (28994), (28995), (28997), (28998), (28355), (28356), (28357), (28244), (28245), (28381), (28405), (28411), (28424), (28445),
(28448), (28451), (28605), (28638), (28643), (28646), (28973), (28978), (28981), (28984), (28988), (28989), (28992), (28996), (28999), (28117),
(28122), (28388), (28389), (28482), (28293), (28613), (28614), (28615), (28616), (28617), (28618), (28619), (28620), (28622), (28623), (28624),
(28625), (28626), (28627), (28628), (28679), (28680), (28681), (28683), (28684), (28685), (28686), (28687), (28688), (28689), (28690), (28691),
(28692), (28693), (28694), (28695), (28696), (28697), (28698), (28699), (28700), (28701), (28702), (28703), (28704), (28705), (28706), (28707),
(28708), (28709), (28710), (28711), (28712), (28713), (28714), (28715), (28716), (28717), (28718), (28719), (28720), (28721), (28722), (28723),
(28724), (28805), (28806), (28807), (28808), (28809), (28811), (28812), (28813), (28814), (28815), (28817), (28818), (28819), (28820), (28821),
(28831), (28832), (28833), (28834), (28835), (28836), (28837), (28838), (28839), (28840), (28841), (28842), (28843), (28844), (28845), (28846),
(28847), (28848), (28849), (28850), (28851), (28852), (28853), (28854), (28855), (28856), (28857), (28858), (28859), (28860), (28861), (28862),
(28863), (28864), (28865), (28866), (28867), (28868), (28869), (28870), (28871), (28872), (28873), (28874), (28875), (28917), (28918), (28919),
(28920), (28921), (28922), (28923), (28924), (28925), (28926), (28928), (28929), (28930), (28931), (28933), (28935), (28937), (28938), (28939),
(28940), (28941), (28942), (28943), (28944), (28945), (28946), (28947), (28948), (28949), (28950), (28951), (28952), (28953), (28954), (28955),
(28956), (28957), (28959), (28960), (28043), (28044), (28045), (28291), (28408), (28145), (28073), (28112), (28068), (28596), (28072), (28110),
(28131), (28071), (28047), (28099), (28500), (28676), (28738), (28739), (28784), (28039), (28023), (28489), (28905), (30320), (29828), (31958),
(31959), (31965), (31966), (31978), (31984), (31985), (31986), (30448), (29000), (29001), (29003), (29004), (29005), (30491), (31594), (31595),
(31596), (31597), (29885), (29002), (29006), (31598), (31599), (29237), (30559), (29120), (29225), (31584), (31585), (31586), (31587), (31588),
(31589), (31590), (31591), (31592), (31593), (31620), (31621), (31622), (31623), (31624), (31625), (31626), (31627), (31628), (31629), (31630),
(31631), (31632), (31633), (31634), (31635), (31636), (31637), (31638), (31639), (31640), (31641), (31642), (31643), (31644), (31646), (31647),
(31648), (31649), (31650), (31942), (31490), (31491), (31802), (31492), (31493), (31494), (31246), (29210), (30418), (30287), (30288), (30289),
(31730), (30845), (29024), (30427), (30703), (30760), (29539), (29547), (29548), (29569), (30309), (30499), (29041), (29311), (29749), (29751),
(29769), (29839), (29840), (29841), (29842), (29852), (29856), (29857), (29860), (29861), (29863), (29868), (29871), (29872), (29874), (29887),
(29961), (29963), (30193), (30197), (30430), (30438), (30524), (30525), (30526), (30539), (30567), (30595), (30613), (30630), (30658), (30659),
(30717), (31122), (31123), (31130), (31252), (31266), (31346), (31365), (31518), (31607), (31665), (31813), (31843), (31845), (31849), (29790),
(29805), (30632), (30805), (31530), (29410), (29419), (29565), (29571), (29575), (29576), (29645), (29712), (30414), (31824), (32824), (32466),
(32419), (32760), (32761), (32956), (32959), (32416), (32003), (32014), (32025), (32026), (32027), (32028), (32044), (32045), (32046), (32052),
(32053), (32054), (32055), (32961), (32962), (32963), (32964), (32944), (32418), (32422), (32482), (32955), (32958), (32450), (32451), (32452),
(32974), (32975), (32976), (32978), (32982), (32984), (32985), (32987), (32992), (32993), (32995), (32996), (32415), (32417), (32954), (32957),
(32973), (32977), (32983), (32986), (32991), (32994), (32093), (32094), (32095), (32096), (32097), (32098), (32099), (32100), (32101), (32102),
(32103), (32104), (32105), (32106), (32107), (32108), (32109), (32110), (32111), (32112), (32113), (32114), (32115), (32116), (32117), (32118),
(32119), (32120), (32121), (32122), (32123), (32124), (32125), (32126), (32127), (32128), (32129), (32130), (32131), (32132), (32133), (32134),
(32135), (32136), (32137), (32138), (32139), (32140), (32141), (32142), (32143), (32144), (32145), (32146), (32147), (32148), (32149), (32150),
(32151), (32152), (32153), (32154), (32155), (32156), (32157), (32158), (32159), (32160), (32161), (32162), (32163), (32164), (32165), (32166),
(32167), (32168), (32169), (32170), (32171), (32172), (32173), (32174), (32175), (32176), (32177), (32178), (32179), (32180), (32181), (32182),
(32183), (32184), (32185), (32186), (32187), (32188), (32189), (32190), (32192), (32414), (32421), (32655), (32656), (32914), (32735), (32895),
(32896), (32407), (32658), (32659), (32660), (32661), (32662), (32663), (32664), (32665), (32949), (32950), (32412), (32915), (32917), (32918),
(32919), (32920), (32465), (32542), (32566), (32594), (32773), (32764), (32765), (32766), (32618), (32642), (32543), (32544), (32545), (32546),
(32547), (32548), (32549), (32550), (32551), (32552), (32553), (32554), (32555), (32556), (32557), (32558), (32559), (32560), (32561), (32595),
(32598), (32601), (32840), (32844), (32845), (32846), (32847), (32762), (32763), (32767), (32972), (32320), (32364), (32408), (32626), (32627),
(32628), (32629), (32630), (32631), (32688), (32689), (32690), (32691), (32692), (32693), (32700), (32701), (32702), (32703), (32704), (32705),
(32706), (32707), (32708), (32709), (32710), (32711), (32712), (32713), (32734), (32911), (32971), (32578), (32906), (32725), (32615), (32633),
(32841), (33475), (34146), (34149), (34145), (34148), (34144), (34147), (34219), (34335), (34209), (34212), (33668), (33671), (33674), (33676),
(33679), (33682), (33684), (33690), (33693), (33699), (33700), (33703), (33717), (33720), (33726), (33729), (33732), (33744), (33747), (33753),
(33767), (33770), (33920), (33921), (33922), (33923), (33076), (33077), (33078), (33309), (33313), (33937), (33940), (33943), (33946), (33949),
(33952), (34576), (34577), (34578), (34579), (34580), (33987), (33997), (33054), (33065), (33066), (33067), (33068), (33482), (33964), (33936),
(33939), (33942), (33945), (33948), (33951), (33957), (33959), (34073), (34074), (34075), (34622), (34057), (33132), (33137), (33138), (33139),
(33141), (33142), (33809), (34544), (33080), (33225), (33182), (33184), (34835), (33350), (34138), (34139), (33803), (34143), (34142), (34221),
(33060), (33147), (34627), (34967), (34415), (34107), (33224), (33993), (34955), (33017), (33018), (33019), (33020), (33021), (33176), (33183),
(33219), (33223), (34492), (34499), (34518), (34519), (33197), (34484), (34486), (33455), (34025), (34030), (33312), (34062), (34024), (34126),
(34469), (34735), (34737), (34738), (34739), (34740), (34741), (34742), (34743), (34744), (34745), (34746), (34864), (34865), (34867), (34868),
(33823), (33824), (34467), (34663), (33096), (33218), (33041), (33081), (33087), (33105), (33111), (33121), (33315), (33336), (33341), (33477),
(33558), (33599), (33604), (33610), (33614), (33615), (33616), (33617), (33634), (33781), (33784), (33839), (33848), (33850), (33929), (34044),
(34077), (34112), (34115), (34116), (34117), (34120), (34123), (34135), (34158), (34187), (34191), (34494), (34497), (34501), (34623), (34645),
(34647), (34716), (34718), (34842), (33051), (33063), (33797), (34171), (33316), (34476), (33089), (34589), (34590), (34591), (34694), (34784),
(34880), (34907), (36942), (35290), (35291), (35292), (35317), (35319), (35327), (35494), (35495), (35496), (35497), (35507), (35508), (35509),
(35511), (35514), (35213), (35539), (35541), (35545), (35546), (35549), (35550), (35202), (35209), (35226), (35517), (35518), (35519), (35520),
(35521), (35522), (35523), (35524), (35525), (35526), (35527), (35528), (35529), (35530), (35531), (35532), (35533), (35535), (35537), (35538),
(35544), (35548), (35551), (35553), (35555), (35664), (35665), (35666), (36866), (36867), (35728), (35729), (35730), (35731), (35225), (36941),
(36454), (36477), (36491), (36505), (36519), (36533), (36547), (36561), (36575), (36589), (36603), (36617), (36631), (36645), (36659), (36673),
(36687), (36701), (36715), (35876), (36910), (36915), (35626), (36899), (36900), (36970), (36892), (36893), (36894), (36965), (36897), (36955),
(36967), (36895), (36960), (36912), (36914), (36968), (36959), (36889), (36890), (36891), (36966), (36896), (36964), (35285), (35286), (35396),
(35397), (35398), (35399), (35400), (35417), (35418), (35419), (35420), (35421), (35422), (35423), (35424), (35425), (35426), (35427), (35428),
(35429), (35430), (35431), (35432), (35433), (35434), (35435), (35436), (35437), (35438), (35439), (35440), (35441), (35442), (35443), (35444),
(35445), (35446), (35447), (35448), (35449), (35450), (35451), (35452), (35453), (35454), (35455), (35456), (35457), (35458), (35459), (35460),
(35461), (35462), (35313), (35946), (35126), (35229), (35289), (35692), (35701), (35718), (35722), (35738), (35777), (35803), (35840), (35854),
(36733), (36748), (36765), (36768), (36772), (36799), (36828), (36836), (36846), (36848), (35512), (35792), (35806), (36862), (36863), (35757),
(36794), (36795), (36829), (36830), (38691), (37739), (37740), (37611), (37127), (37128), (37597), (38287), (38288), (38289), (38290), (38282),
(38307), (38377), (38378), (38265), (37598), (37719), (38576), (38484), (38309), (38310), (38311), (38312), (38313), (38314), (37174), (37175),
(37176), (37196), (37197), (37243), (37244), (37245), (37290), (37364), (37365), (37366), (37410), (37587), (37590), (37624), (37625), (37646),
(37647), (37648), (37649), (37671), (37672), (37673), (37697), (37698), (37699), (37799), (37800), (37801), (37856), (37857), (37858), (37109),
(38442), (38443), (38444), (38445), (38387), (38388), (38389), (38390), (38572), (38468), (38243), (38244), (38245), (38246), (38247), (38248),
(38471), (38480), (38481), (38469), (37430), (37311), (37313), (38292), (38538), (38658), (38683), (37164), (37827), (37893), (37894), (37895),
(37896), (37897), (37297), (37298), (38301), (38578), (38916), (37955), (37967), (37976), (38052), (38140), (38204), (38383), (38524), (38525),
(38527), (37210), (37225), (37273), (37278), (37279), (37281), (37284), (37285), (37286), (37295), (37296), (37315), (37316), (37317), (37318),
(37321), (37323), (37324), (37385), (37386), (37400), (37420), (37433), (37444), (37448), (37450), (37451), (37453), (37454), (37455), (37457),
(37466), (37468), (37469), (37470), (37472), (37473), (37474), (37477), (37485), (37510), (37511), (37534), (37536), (37544), (38164), (38254),
(38255), (38256), (37343), (37345), (37346), (37338), (37326), (37329), (37335), (37336), (37337), (37710), (37312), (37163), (37154), (37126),
(37348), (38640), (38970), (38994), (38996), (38983), (37706), (38958), (37452), (38270), (38271), (38272), (38561), (38597), (38643), (38625),
(38957), (38567), (37161), (37157), (37158), (37489), (37898), (37900), (37901), (37902), (37903), (37904), (37905), (37906), (37907), (37908),
(37909), (37100), (37250), (37303), (37372), (37501), (37815), (37837), (37859), (37860), (37925), (38089), (38186), (38233), (38266), (38324),
(38380), (38382), (38483), (38498), (38512), (38577), (38600), (38606), (38619), (38621), (38622), (38623), (38624), (38629), (38630), (38631),
(37063), (37089), (37090), (37148), (37301), (37711), (37742), (37878), (38333), (38587), (38644), (38687), (38448), (37839), (38497), (38496),
(38626), (37467), (37579), (38261), (38263), (38264), (38268), (38269), (38273), (38274), (38605), (40481), (41900), (41911), (41995), (40549),
(39715), (40406), (40407), (40408), (40409), (40410), (40412), (40414), (40650), (39263), (39427), (39467), (39468), (39470), (39472), (39473),
(40307), (40553), (40440), (40441), (40442), (40443), (40444), (39769), (41749), (41342), (39303), (40480), (41605), (41606), (40762), (40777),
(40599), (40727), (40754), (40832), (40839), (40725), (41403), (41404), (41405), (41406), (41407), (41408), (41409), (41410), (41411), (41412),
(41413), (41414), (41415), (41416), (41417), (41418), (41419), (41420), (41421), (41422), (41423), (41796), (41125), (39370), (40232), (41133),
(39364), (39410), (39440), (39460), (39819), (39828), (41756), (41757), (41758), (41759), (39707), (39708), (39709), (39710), (39711), (41178),
(41750), (41753), (39685), (41147), (41166), (41174), (41196), (39644), (39687), (39738), (39969), (40199), (40776), (41091), (41093), (41111),
(41118), (41173), (39526), (39527), (41195), (39148), (39213), (39343), (39692), (41741), (41800), (41801), (41802), (41803), (41804), (41805),
(41806), (41807), (41808), (41809), (41810), (41811), (41812), (41813), (41814), (40773), (41194), (39342), (40484), (40948), (41193), (41172),
(39341), (41192), (41171), (39340), (41169), (41191), (39339), (41170), (39338), (39302), (39334), (39151), (39162), (39163), (39314), (39575),
(39576), (39614), (39739), (39748), (39903), (39904), (40110), (40218), (40219), (40220), (40221), (40222), (40223), (40224), (40225), (40226),
(40227), (40228), (40229), (40230), (40231), (40389), (40686), (41132), (41585), (39506), (39883), (39153), (39743), (39754), (42000), (42007),
(42013), (42019), (42083), (42238), (42207), (42226), (42231), (42236), (42241), (42254), (42259), (42264), (42269), (42274), (42279), (42284),
(42289), (42316), (42321), (42326), (42331), (42345), (42351), (42359), (42383), (42389), (42449), (42484), (42489), (42494), (42501), (42512),
(42518), (42524), (42530), (42536), (42558), (42563), (42569), (42577), (42582), (42587), (42596), (42601), (42606), (42613), (42619), (42654),
(42655), (42656), (42657), (42658), (42851), (42664), (42665), (42666), (42667), (42668), (42625), (42626), (42627), (42628), (42629), (42659),
(42660), (42661), (42662), (42663), (42690), (42691), (42692), (42693), (42694), (42695), (42696), (42697), (42698), (42699), (42630), (42631),
(42632), (42633), (42634), (42635), (42636), (42637), (42638), (42639), (42669), (42670), (42671), (42672), (42673), (42674), (42675), (42676),
(42677), (42678), (42680), (42681), (42682), (42683), (42684), (42685), (42686), (42687), (42688), (42689), (42703), (42704), (42705), (42706),
(42707), (42708), (42709), (42710), (42711), (42712), (42713), (42714), (42715), (42716), (42717), (42718), (42719), (42720), (42721), (42722),
(42197), (42198), (42199), (42200), (42201), (42202), (42976), (42206), (42212), (42213), (42214), (42215), (42216), (42217), (42218), (42219),
(42220), (42221), (42222), (42223), (42224), (42294), (42295), (42296), (42297), (42343), (42344), (42356), (42382), (42388), (42444), (42445),
(42446), (42447), (42448), (42511), (42517), (42523), (42529), (42535), (42556), (42557), (42568), (42574), (42575), (42576), (42593), (42594),
(42595), (42611), (42612), (42618), (42755), (42953), (42975), (42977), (42978), (42979), (42980), (42981), (42982), (42983), (42875), (42885),
(42886), (42174), (42179), (42425), (42147), (42434), (42171), (42545), (42180), (42181), (42182), (42186), (42189), (42190), (42191), (42192),
(42193), (42194), (42195), (42196), (42432), (42433), (42170), (42986), (42590), (42474), (42440), (42894), (42733), (42342), (42350), (42381),
(42776), (42940), (43651), (43727), (43728), (43729), (43730), (43731), (43460), (43611), (43612), (43613), (43732), (43733), (43734), (43735),
(43736), (43737), (43738), (43739), (43740), (43741), (43742), (43743), (43744), (43745), (43746), (43747), (43748), (43749), (43750), (43751),
(43752), (43753), (43754), (43755), (43756), (43757), (43758), (43759), (43760), (43761), (43762), (43763), (43764), (43765), (43766), (43767),
(43768), (43769), (43770), (43771), (43772), (43773), (43774), (43775), (43776), (43777), (43778), (43779), (43780), (43781), (43782), (43783),
(43784), (43785), (43786), (43787), (43788), (43789), (43790), (43791), (43792), (43793), (43794), (43795), (43796), (43797), (43798), (43799),
(43800), (43801), (43802), (43803), (43804), (43805), (43806), (43807), (43808), (43809), (43810), (43811), (43812), (43813), (43814), (43815),
(43816), (43817), (43818), (43819), (43820), (43822), (43069), (43071), (43072), (43075), (43076), (43079), (43080), (43083), (43267), (43963),
(43964), (43475), (43476), (43302), (43303), (43304), (43949), (43517), (43698), (43648), (43848), (43878), (43895), (43922), (43936), (43938),
(43109), (43563), (43108), (43298), (43562), (43107), (43561), (43106), (43560), (43105), (43559), (43104), (43558), (43103), (43557), (43150),
(43523), (43087), (43097), (43518), (43468), (43571), (43572), (43614), (43620), (43621), (43647), (43652), (43038), (43646), (43002), (43099),
(43136), (43144), (43149), (43269), (43270), (43272), (43274), (43275), (43276), (43308), (43336), (43337), (43384), (43362), (43006), (43093),
(43288), (43307), (43471), (43486), (43489), (43617), (43618), (43619), (43627), (43628), (43629), (43630), (43631), (43632), (43633), (43634),
(43635), (43636), (43637), (43638), (43639), (43640), (43641), (43650), (43695), (43215), (43493), (43659), (43003), (43321), (43325), (43326),
(43328), (43329), (43330), (43333), (43341), (43576), (43577), (43643), (43644), (43645), (43653), (43658), (43675), (43676), (43677), (43678),
(43679), (43680), (43681), (43682), (43683), (43684), (43685), (43686), (43687), (43694), (43701), (43702), (43703), (43704), (43705), (43706),
(43707), (43708), (43709), (43710), (43711), (43712), (43713), (43714), (43715), (43716), (43717), (43718), (43719), (43720), (43721), (43722),
(43723), (44090), (44807), (45457), (45459), (45460), (45461), (45462), (45605), (45455), (45538), (45539), (45540), (45541), (45542), (45543),
(45544), (45547), (45548), (45549), (45350), (45464), (44310), (44311), (44333), (44417), (44418), (44869), (44870), (44926), (44948), (45924),
(44924), (44555), (44556), (44557), (44871), (44872), (44873), (44874), (44164), (44175), (45280), (45024), (45037), (45173), (44191), (44415),
(44416), (45172), (44505), (45174), (45175), (44391), (44392), (45850), (45851), (45852), (45853), (44945), (44563), (44875), (44876), (44877),
(44878), (44879), (44880), (44881), (44882), (44883), (44884), (45705), (44451), (44619), (44627), (44629), (44600), (44811), (44158), (44148),
(45180), (44260), (44261), (44262), (44263), (44264), (44265), (44266), (44267), (44268), (44269), (44270), (44271), (44272), (44273), (44274),
(44275), (44277), (44278), (44279), (44280), (44281), (44282), (44284), (44285), (44286), (44287), (44288), (44289), (44290), (44291), (44292),
(44293), (44866), (44972), (45063), (44703), (45575), (45126), (44428), (45052), (45050), (45629), (44849), (45127), (45229), (45230), (45231),
(45500), (44817), (44607), (45006), (45007), (45008), (45009), (44506), (44507), (45279), (45863), (45901), (45909), (44221), (44229), (44598),
(44608), (44609), (44475), (45276), (45277), (44432), (45908), (44743), (44604), (45942), (44462), (44480), (44508), (44620), (44646), (44680),
(44832), (44851), (44852), (44856), (44915), (44981), (44988), (44989), (44991), (44992), (44993), (44994), (44996), (44997), (45003), (45026),
(45028), (45029), (45030), (45031), (45032), (45033), (45036), (45045), (45049), (45082), (45120), (45278), (45328), (45569), (45728), (45729),
(45730), (45748), (45749), (45750), (45751), (45752), (45754), (45759), (45765), (45860), (45899), (45902), (45903), (45904), (45905), (44304),
(44434), (44656), (44718), (45034), (45035), (45568), (44299), (45630), (44728), (44236), (44298), (44300), (44578), (44580), (44705), (44755),
(44760), (44761), (44833), (45061), (45176), (45177), (45178), (45179), (45188), (45189), (45190), (45191), (45194), (45195), (45196), (45197),
(45198), (45199), (45200), (45201), (45202), (45900), (45907), (46105), (46104), (46214), (46215), (46217), (46218), (46219), (46220), (46222),
(46225), (46227), (46228), (46230), (46232), (46233), (46234), (46235), (46236), (46237), (46238), (46239), (46240), (46241), (46242), (46243),
(46244), (46245), (46246), (46248), (46255), (46256), (46257), (46273), (46274), (46275), (46276), (46277), (46288), (46289), (46290), (46291),
(46292), (46293), (46294), (46295), (46296), (46297), (46298), (46299), (46300), (46301), (46302), (46303), (46304), (46305), (46306), (46307),
(46103), (46213), (46216), (46221), (46223), (46224), (46226), (46231), (46247), (46249), (46250), (46251), (46252), (46253), (46254), (46258),
(46259), (46260), (46261), (46262), (46263), (46264), (46265), (46266), (46267), (46268), (46269), (46270), (46271), (46272), (46278), (46279),
(46280), (46281), (46282), (46283), (46284), (46285), (46286), (46287), (46309), (46339), (46340), (46341), (46342), (46343), (46344), (46345),
(46346), (46347), (46350), (46351), (47497), (47229), (46101), (46778), (46331), (47246), (46709), (46767), (46802), (46892), (46780), (46765),
(46766), (46849), (47507), (47395), (46399), (46400), (46401), (46402), (46403), (46055), (46847), (47030), (46887), (46054), (46735), (46069),
(46070), (46106), (46319), (46395), (46783), (46830), (46978), (47036), (46852), (46957), (49686), (48435), (48438), (48440), (48442), (48444),
(48507), (48509), (48511), (48513), (48515), (48517), (48519), (48521), (48523), (49191), (49497), (48725), (48726), (48727), (48728), (48729),
(48730), (48731), (48732), (48733), (48734), (48735), (48736), (48737), (48738), (48739), (48740), (48741), (48742), (48743), (48744), (48745),
(48746), (48747), (48748), (48749), (48750), (48751), (48752), (48753), (48754), (48755), (48756), (48757), (48758), (48759), (48760), (48761),
(48762), (48763), (48764), (48769), (48770), (48771), (48772), (48773), (48774), (48775), (48776), (48777), (48778), (48781), (48782), (48783),
(48784), (48785), (48786), (48787), (48788), (48789), (48790), (48794), (48795), (48796), (48797), (48798), (48799), (48800), (48801), (48802),
(48803), (48804), (48805), (48806), (48807), (48808), (48809), (48810), (48811), (48812), (48813), (48814), (48815), (48816), (48817), (48818),
(48819), (48820), (48821), (48822), (48823), (48824), (48825), (48826), (48827), (48828), (48829), (48830), (48831), (48832), (48833), (48836),
(48837), (48838), (48839), (48840), (48841), (48842), (48843), (48844), (48845), (48846), (48847), (48848), (48849), (48850), (48851), (48852),
(48853), (48854), (48855), (48860), (48861), (48862), (48863), (48864), (48865), (48866), (48867), (48868), (48869), (48870), (48871), (48872),
(48873), (48874), (48875), (48876), (48877), (48878), (48879), (48880), (48881), (48882), (48883), (48884), (48885), (48886), (48887), (48888),
(48889), (48890), (48891), (48892), (48893), (48894), (48895), (48896), (48897), (48898), (48899), (48900), (48901), (48902), (48903), (48904),
(48905), (48906), (48907), (48908), (48909), (48910), (48911), (48912), (48913), (48914), (48915), (48916), (48917), (48918), (48919), (48922),
(48923), (48924), (48925), (48926), (48927), (48928), (48929), (48930), (48931), (49301), (49312), (49313), (49314), (49852), (49853), (49854),
(49855), (49334), (49703), (49704), (49706), (48945), (49050), (48527), (49662), (49663), (49665), (49693), (49343), (49640), (49917), (48601),
(49288), (49289), (48679), (49362), (49223), (49278), (49340), (49373), (49655), (49680), (49739), (49750), (49915), (49916), (49209), (49645),
(49689), (49708), (49733), (49873), (49984), (50442), (50204), (51682), (51683), (51684), (51685), (51686), (51687), (51688), (51689), (51690),
(51691), (51692), (51693), (51694), (51695), (51696), (51697), (51698), (51699), (51700), (51701), (51702), (51703), (51704), (51705), (51706),
(51707), (51708), (51709), (51710), (51711), (51712), (51713), (51714), (51715), (51716), (51717), (51718), (51719), (51720), (51721), (51722),
(51723), (51724), (51725), (51726), (51727), (51728), (51729), (51730), (51731), (51732), (51733), (51734), (51735), (51736), (51737), (51738),
(51739), (51740), (51741), (51742), (51743), (51744), (51745), (51746), (51747), (51748), (51749), (51750), (51751), (51752), (51753), (51754),
(51755), (51756), (51757), (51758), (51759), (51760), (51761), (51762), (51763), (51764), (51765), (51766), (51767), (51768), (51769), (51770),
(51771), (51772), (51773), (51774), (51775), (51776), (53491), (53492), (53493), (53494), (53495), (53496), (53497), (53498), (53499), (53500),
(53501), (53502), (53503), (53504), (53505), (53506), (53507), (53508), (53509), (54592), (50315), (50318), (50319), (52567), (50815), (53889),
(53890), (54069), (54860), (50840), (53891), (53924), (51997), (51998), (54847), (54857), (56806), (54212), (54452), (54810), (50093), (54822),
(50289), (50301), (50307), (52189), (52202), (52272), (52275), (52276), (52345), (52562), (52563), (52565), (52729), (53510), (54218), (54455),
(54467), (50248), (50431), (52011), (52062), (54291), (54470);

View File

@@ -0,0 +1,66 @@
INSERT IGNORE INTO mod_auctionhousebot_disabled_items (item)
SELECT entry
FROM item_template
WHERE (
NAME LIKE '%tablet%' OR
NAME LIKE '%sulfuron%' OR
NAME LIKE '%nightcrawlers%' OR
NAME LIKE '%throwing dagger%' OR
NAME LIKE '%shot pouch%' OR
NAME LIKE '%brimstone%' OR
NAME LIKE '%small pouch%' OR
NAME LIKE '%dye%' OR
NAME LIKE '%ironwood seed%' OR
NAME LIKE '%stranglethorn seed%' OR
NAME LIKE '%simple wood%' OR
NAME LIKE '%bleach%' OR
NAME LIKE '%flour%' OR
NAME LIKE '%brew%' OR
NAME LIKE '%parchment%' OR
NAME LIKE '%light quiver%' OR
NAME LIKE '%honey%' OR
NAME LIKE '%/%' OR
NAME LIKE '%creeping anguish%' OR
NAME LIKE '%felcloth bag%' OR
NAME LIKE '%elementium ore%' OR
NAME LIKE '%unused%' OR
NAME LIKE '%lava core%' OR
NAME LIKE '%fiery core%' OR
NAME LIKE '%sulfuron ingot%' OR
NAME LIKE '%sak%' OR
NAME LIKE '%gigantique%' OR
NAME LIKE '%portable hole%' OR
NAME LIKE '%deptecated%' OR
NAME LIKE '%durability%' OR
NAME LIKE '%big sack%' OR
NAME LIKE '%decoded%' OR
NAME LIKE '%knowledge:%' OR
NAME LIKE '%manual%' OR
NAME LIKE '%gnome head%' OR
NAME LIKE '%critter enlarger%' OR
NAME LIKE '%box of%' OR
NAME LIKE '%summoning%' OR
NAME LIKE '%turtle egg%' OR
NAME LIKE '%heavy crate%' OR
NAME LIKE '%assasin throwing axe%' OR
NAME LIKE '%sack of gems%' OR
NAME LIKE '%plans: darkspear%' OR
NAME LIKE '%of swords%' OR
NAME LIKE '%gnomish alarm%' OR
NAME LIKE '%world enlarger%' OR
NAME LIKE '%tome%' OR
NAME LIKE '%ornate spyglass%' OR
NAME LIKE '%test%' OR
NAME LIKE '%darkmoon prize%' OR
NAME LIKE '%codex%' OR
NAME LIKE '%grimoire%' OR
NAME LIKE '%deprecated%' OR
NAME LIKE '%book%' OR
NAME LIKE '%libram%' OR
NAME LIKE '%guide%'
)
OR UPPER(NAME) LIKE '%OLD%'
OR UPPER(NAME) LIKE '%NPC%'
OR UPPER(NAME) LIKE '%QA%'
OR (CLASS = 0 AND SUBCLASS = 5 AND REQUIREDLEVEL < 40);

View File

View File

@@ -0,0 +1,25 @@
<!-- First of all, THANK YOU for your contribution. -->
## Changes Proposed:
-
-
## Issues Addressed:
<!-- If your fix has a relating issue, link it below -->
- Closes
## SOURCE:
<!-- If you can, include a source that can strengthen your claim -->
## Tests Performed:
<!-- Does it build without errors? Did you test in-game? What did you test? On which OS did you test? Describe any other tests performed -->
-
-
## How to Test the Changes:
<!-- Describe in a detailed step-by-step order how to test the changes -->
1.
2.
3.

View File

@@ -0,0 +1,368 @@
DROP TABLE IF EXISTS `mod_auctionhousebot`;
CREATE TABLE `mod_auctionhousebot` (
`auctionhouse` int(11) NOT NULL DEFAULT '0' COMMENT 'mapID of the auctionhouse.',
`name` char(25) DEFAULT NULL COMMENT 'Text name of the auctionhouse.',
`minitems` int(11) DEFAULT '0' COMMENT 'This is the minimum number of items you want to keep in the auction house. a 0 here will make it the same as the maximum.',
`maxitems` int(11) DEFAULT '0' COMMENT 'This is the number of items you want to keep in the auction house.',
`percentgreytradegoods` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the Grey Trade Goods auction items',
`percentwhitetradegoods` int(11) DEFAULT '27' COMMENT 'Sets the percentage of the White Trade Goods auction items',
`percentgreentradegoods` int(11) DEFAULT '12' COMMENT 'Sets the percentage of the Green Trade Goods auction items',
`percentbluetradegoods` int(11) DEFAULT '10' COMMENT 'Sets the percentage of the Blue Trade Goods auction items',
`percentpurpletradegoods` int(11) DEFAULT '1' COMMENT 'Sets the percentage of the Purple Trade Goods auction items',
`percentorangetradegoods` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the Orange Trade Goods auction items',
`percentyellowtradegoods` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the Yellow Trade Goods auction items',
`percentgreyitems` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the non trade Grey auction items',
`percentwhiteitems` int(11) DEFAULT '10' COMMENT 'Sets the percentage of the non trade White auction items',
`percentgreenitems` int(11) DEFAULT '30' COMMENT 'Sets the percentage of the non trade Green auction items',
`percentblueitems` int(11) DEFAULT '8' COMMENT 'Sets the percentage of the non trade Blue auction items',
`percentpurpleitems` int(11) DEFAULT '2' COMMENT 'Sets the percentage of the non trade Purple auction items',
`percentorangeitems` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the non trade Orange auction items',
`percentyellowitems` int(11) DEFAULT '0' COMMENT 'Sets the percentage of the non trade Yellow auction items',
`minpricegrey` int(11) DEFAULT '100' COMMENT 'Minimum price of Grey items (percentage).',
`maxpricegrey` int(11) DEFAULT '150' COMMENT 'Maximum price of Grey items (percentage).',
`minpricewhite` int(11) DEFAULT '150' COMMENT 'Minimum price of White items (percentage).',
`maxpricewhite` int(11) DEFAULT '250' COMMENT 'Maximum price of White items (percentage).',
`minpricegreen` int(11) DEFAULT '800' COMMENT 'Minimum price of Green items (percentage).',
`maxpricegreen` int(11) DEFAULT '1400' COMMENT 'Maximum price of Green items (percentage).',
`minpriceblue` int(11) DEFAULT '1250' COMMENT 'Minimum price of Blue items (percentage).',
`maxpriceblue` int(11) DEFAULT '1750' COMMENT 'Maximum price of Blue items (percentage).',
`minpricepurple` int(11) DEFAULT '2250' COMMENT 'Minimum price of Purple items (percentage).',
`maxpricepurple` int(11) DEFAULT '4550' COMMENT 'Maximum price of Purple items (percentage).',
`minpriceorange` int(11) DEFAULT '3250' COMMENT 'Minimum price of Orange items (percentage).',
`maxpriceorange` int(11) DEFAULT '5550' COMMENT 'Maximum price of Orange items (percentage).',
`minpriceyellow` int(11) DEFAULT '5250' COMMENT 'Minimum price of Yellow items (percentage).',
`maxpriceyellow` int(11) DEFAULT '6550' COMMENT 'Maximum price of Yellow items (percentage).',
`minbidpricegrey` int(11) DEFAULT '70' COMMENT 'Starting bid price of Grey items as a percentage of the randomly chosen buyout price. Default: 70',
`maxbidpricegrey` int(11) DEFAULT '100' COMMENT 'Starting bid price of Grey items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpricewhite` int(11) DEFAULT '70' COMMENT 'Starting bid price of White items as a percentage of the randomly chosen buyout price. Default: 70',
`maxbidpricewhite` int(11) DEFAULT '100' COMMENT 'Starting bid price of White items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpricegreen` int(11) DEFAULT '80' COMMENT 'Starting bid price of Green items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpricegreen` int(11) DEFAULT '100' COMMENT 'Starting bid price of Green items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpriceblue` int(11) DEFAULT '75' COMMENT 'Starting bid price of Blue items as a percentage of the randomly chosen buyout price. Default: 75',
`maxbidpriceblue` int(11) DEFAULT '100' COMMENT 'Starting bid price of Blue items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpricepurple` int(11) DEFAULT '80' COMMENT 'Starting bid price of Purple items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpricepurple` int(11) DEFAULT '100' COMMENT 'Starting bid price of Purple items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpriceorange` int(11) DEFAULT '80' COMMENT 'Starting bid price of Orange items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpriceorange` int(11) DEFAULT '100' COMMENT 'Starting bid price of Orange items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpriceyellow` int(11) DEFAULT '80' COMMENT 'Starting bid price of Yellow items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpriceyellow` int(11) DEFAULT '100' COMMENT 'Starting bid price of Yellow items as a percentage of the randomly chosen buyout price. Default: 100',
`maxstackgrey` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackwhite` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackgreen` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackblue` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackpurple` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackorange` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackyellow` int(11) DEFAULT '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`buyerpricegrey` int(11) DEFAULT '1' COMMENT 'Multiplier to vendorprice when buying grey items from auctionhouse',
`buyerpricewhite` int(11) DEFAULT '3' COMMENT 'Multiplier to vendorprice when buying white items from auctionhouse',
`buyerpricegreen` int(11) DEFAULT '5' COMMENT 'Multiplier to vendorprice when buying green items from auctionhouse',
`buyerpriceblue` int(11) DEFAULT '12' COMMENT 'Multiplier to vendorprice when buying blue items from auctionhouse',
`buyerpricepurple` int(11) DEFAULT '15' COMMENT 'Multiplier to vendorprice when buying purple items from auctionhouse',
`buyerpriceorange` int(11) DEFAULT '20' COMMENT 'Multiplier to vendorprice when buying orange items from auctionhouse',
`buyerpriceyellow` int(11) DEFAULT '22' COMMENT 'Multiplier to vendorprice when buying yellow items from auctionhouse',
`buyerbiddinginterval` int(11) DEFAULT '1' COMMENT 'Interval how frequently AHB bids on each AH. Time in minutes',
`buyerbidsperinterval` int(11) DEFAULT '1' COMMENT 'number of bids to put in per bidding interval',
PRIMARY KEY (`auctionhouse`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `mod_auctionhousebot_disabled_items`;
CREATE TABLE `mod_auctionhousebot_disabled_items` (
`item` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- AHBot auctionhouse configuration
INSERT INTO `mod_auctionhousebot` (`auctionhouse`, `name`, `minitems`, `maxitems`, `percentgreytradegoods`, `percentwhitetradegoods`, `percentgreentradegoods`, `percentbluetradegoods`, `percentpurpletradegoods`, `percentorangetradegoods`, `percentyellowtradegoods`, `percentgreyitems`, `percentwhiteitems`, `percentgreenitems`, `percentblueitems`, `percentpurpleitems`, `percentorangeitems`, `percentyellowitems`, `minpricegrey`, `maxpricegrey`, `minpricewhite`, `maxpricewhite`, `minpricegreen`, `maxpricegreen`, `minpriceblue`, `maxpriceblue`, `minpricepurple`, `maxpricepurple`, `minpriceorange`, `maxpriceorange`, `minpriceyellow`, `maxpriceyellow`, `minbidpricegrey`, `maxbidpricegrey`, `minbidpricewhite`, `maxbidpricewhite`, `minbidpricegreen`, `maxbidpricegreen`, `minbidpriceblue`, `maxbidpriceblue`, `minbidpricepurple`, `maxbidpricepurple`, `minbidpriceorange`, `maxbidpriceorange`, `minbidpriceyellow`, `maxbidpriceyellow`, `maxstackgrey`, `maxstackwhite`, `maxstackgreen`, `maxstackblue`, `maxstackpurple`, `maxstackorange`, `maxstackyellow`, `buyerpricegrey`, `buyerpricewhite`, `buyerpricegreen`, `buyerpriceblue`, `buyerpricepurple`, `buyerpriceorange`, `buyerpriceyellow`, `buyerbiddinginterval`, `buyerbidsperinterval`)
VALUES
(2,'Alliance',250,250,0,27,12,10,1,0,0,0,10,30,8,2,0,0,100,150,150,250,800,1400,1250,1750,2250,4550,3250,5550,5250,6550,70,100,70,100,80,100,75,100,80,100,80,100,80,100,0,0,3,2,1,1,1,1,3,5,12,15,20,22,1,1),
(6,'Horde',250,250,0,27,12,10,1,0,0,0,10,30,8,2,0,0,100,150,150,250,800,1400,1250,1750,2250,4550,3250,5550,5250,6550,70,100,70,100,80,100,75,100,80,100,80,100,80,100,0,0,3,2,1,1,1,1,3,5,12,15,20,22,1,1),
(7,'Neutral',250,250,0,27,12,10,1,0,0,0,10,30,8,2,0,0,100,150,150,250,800,1400,1250,1750,2250,4550,3250,5550,5250,6550,70,100,70,100,80,100,75,100,80,100,80,100,80,100,0,0,3,2,1,1,1,1,3,5,12,15,20,22,1,1);
-- Items unavailable to players
INSERT INTO `mod_auctionhousebot_disabled_items`
VALUES
(17), (3895), (1700), (862), (4196), (3934), (2275), (4213), (4988), (4989), (4990), (4110), (4111), (4116), (3463), (3068),
(913), (2016), (3738), (1189), (3222), (2664), (2273), (4763), (2444), (1041), (1133), (1134), (2413), (2415), (2927), (2932),
(2443), (1487), (1623), (3031), (3034), (3762), (3772), (4981), (2693), (2808), (1254), (2442), (3137), (4191), (4193), (931),
(1114), (1450), (2136), (1352), (2441), (3884), (4200), (2588), (2922), (3005), (3122), (1193), (1057), (3107), (3135), (3144),
(4273), (1113), (2288), (2556), (2921), (3004), (763), (1146), (1255), (2929), (4143), (2064), (3648), (1162), (1167), (2377),
(2920), (3003), (4965), (2497), (2499), (2501), (2599), (3320), (964), (2496), (2498), (2503), (2946), (3131), (1389), (2500),
(2502), (4959), (1166), (1386), (2133), (4930), (1029), (2055), (2128), (2481), (2484), (2487), (3260), (2482), (2483), (2485),
(2486), (2947), (3111), (37), (996), (119), (138), (734), (876), (895), (896), (900), (956), (958), (960), (997),
(1014), (1020), (1021), (1024), (1025), (1027), (1324), (1356), (1672), (1923), (1977), (2410), (2477), (2586), (2638), (2668),
(2755), (2891), (3316), (3513), (3516), (3536), (3584), (3686), (3707), (3744), (4278), (4524), (4703), (4704), (4749), (4851),
(4868), (192), (3958), (3978), (4014), (3952), (3981), (3991), (4011), (3957), (3979), (4012), (3959), (3982), (4010), (3954),
(3983), (3988), (4009), (3953), (3984), (4013), (3956), (3977), (4008), (3955), (3980), (4015), (2931), (3776), (1914), (4858),
(3713), (3777), (3063), (2918), (3046), (3052), (3062), (4912), (2995), (1028), (1192), (2692), (1298), (1363), (4688), (4774),
(4773), (4761), (2305), (2306), (4471), (88), (91), (100), (128), (143), (156), (813), (1222), (1259), (1902), (1911),
(2081), (2184), (2550), (2705), (2715), (2810), (3148), (3168), (3245), (3368), (3675), (3774), (5828), (9372), (8708), (8586),
(9240), (9380), (9484), (9417), (10579), (9718), (7187), (10978), (9685), (9214), (9653), (7987), (7988), (7986), (7550), (7547),
(7548), (7994), (7748), (7953), (9888), (5010), (7497), (7466), (5008), (8840), (5004), (5005), (7467), (7427), (7426), (7948),
(7949), (7950), (7951), (7952), (6589), (6360), (6376), (10049), (5821), (5822), (7188), (6478), (10998), (6345), (5748), (5255),
(5968), (8350), (10939), (6343), (9602), (10595), (8079), (8008), (9421), (8076), (8078), (10683), (8171), (8546), (10662), (10818),
(8007), (5510), (8075), (8077), (10664), (8147), (8993), (5663), (5874), (5875), (8583), (8589), (8590), (8627), (8628), (8630),
(8633), (9254), (10620), (5513), (5522), (6357), (8365), (8366), (5509), (6715), (5108), (5518), (6355), (5632), (5845), (6352),
(6359), (6363), (6364), (6647), (6766), (5654), (5657), (5511), (5105), (6354), (6366), (6374), (6650), (8964), (5232), (5517),
(5660), (5013), (5024), (5603), (5823), (6292), (6294), (6295), (6309), (6310), (6311), (6351), (6353), (6358), (6645), (6754),
(7678), (5150), (6651), (5512), (6182), (6183), (6619), (6649), (5229), (6356), (5235), (5043), (5044), (5349), (5350), (6216),
(6291), (6643), (6891), (7807), (7808), (6648), (5056), (5184), (5220), (5330), (5333), (5353), (5389), (5400), (5410), (5417),
(5418), (5455), (5515), (5531), (5562), (5563), (5639), (5645), (5646), (5681), (5768), (5769), (5833), (5859), (5878), (6130),
(6276), (6277), (6278), (6279), (6280), (6435), (6490), (6491), (6492), (6495), (6496), (6497), (6498), (6500), (6501), (6516),
(6544), (6623), (6717), (6718), (6834), (6927), (6988), (7134), (7206), (7208), (7268), (7271), (7286), (7287), (7333), (7392),
(7679), (7680), (7681), (7716), (7725), (7733), (7737), (7867), (7923), (7970), (8072), (8426), (9280), (9281), (9282), (9284),
(9316), (9319), (9325), (9330), (9365), (9593), (9594), (9595), (9596), (9597), (10464), (10691), (10692), (10693), (10694), (5495),
(5863), (6307), (7769), (7770), (7771), (8164), (8383), (8585), (9311), (9438), (9440), (9441), (9443), (10790), (5550), (5549),
(5555), (8368), (8688), (6951), (5560), (7428), (7190), (5625), (6174), (7170), (5106), (8427), (5379), (5259), (5283), (5362),
(5363), (5364), (5367), (5370), (5371), (5377), (5435), (5600), (6131), (6150), (6225), (6227), (6232), (6297), (6301), (6455),
(7135), (8425), (9700), (9701), (10457), (10450), (10791), (11264), (12947), (15780), (14550), (12302), (12303), (12330), (12351), (12353),
(12354), (13317), (13326), (13327), (13328), (13329), (15292), (15293), (12731), (12588), (12970), (13080), (13090), (13092), (13936), (13950),
(14543), (13148), (13164), (13173), (15410), (15769), (11768), (12105), (11743), (14344), (11671), (11672), (14343), (12469), (11178), (11177),
(13325), (11139), (11138), (11084), (12325), (12326), (12327), (13323), (13324), (12616), (12617), (12615), (12904), (12104), (12106), (12107),
(13175), (13242), (13247), (12866), (11175), (12258), (11174), (11135), (11134), (11082), (13727), (13728), (13730), (13731), (13736), (13737),
(13738), (13739), (13740), (13741), (13742), (13743), (13744), (13745), (13746), (13747), (13748), (13749), (13762), (13763), (13764), (13765),
(13766), (13767), (13768), (13769), (13770), (13771), (13772), (13773), (13775), (13776), (13777), (13778), (13779), (13780), (13781), (13782),
(13783), (13784), (13785), (13788), (13791), (13794), (13797), (13798), (13801), (13802), (13803), (13804), (13805), (13806), (13807), (13808),
(13809), (13603), (15756), (13701), (14488), (11950), (11951), (11952), (13480), (13888), (13889), (13890), (13891), (13893), (13901), (13902),
(13903), (13904), (13905), (13906), (13907), (13908), (13910), (13911), (13912), (13914), (13915), (13916), (13917), (13918), (14481), (13477),
(14894), (15409), (15415), (15417), (15419), (15886), (13602), (13700), (11176), (13422), (13754), (13755), (13756), (13758), (13759), (13760),
(13875), (13876), (13877), (13878), (13879), (13880), (13881), (13882), (13883), (13884), (13885), (13886), (13887), (11903), (14062), (15326),
(15327), (11111), (13699), (11137), (11083), (12238), (12446), (12447), (12448), (12449), (14891), (14083), (11024), (11131), (11149), (11170),
(11222), (11230), (11282), (11364), (11413), (11470), (11507), (11508), (11512), (11513), (11582), (11602), (11609), (11613), (11616), (11947),
(11949), (11954), (12064), (12241), (12263), (12347), (12349), (12563), (12567), (12648), (12649), (12723), (12847), (12885), (13155), (13159),
(13370), (13673), (13726), (13732), (13733), (13734), (13787), (13790), (13793), (13796), (14339), (14390), (14392), (14645), (15448), (15843),
(15845), (11270), (11283), (11511), (11514), (12468), (15422), (15423), (12348), (12787), (12943), (12991), (13316), (13337), (13612), (14586),
(18582), (18583), (18584), (17182), (17782), (18881), (17142), (17067), (17068), (18608), (18609), (18713), (18715), (17075), (18813), (17078),
(17064), (18205), (17223), (18538), (18970), (18241), (18242), (18243), (18244), (18245), (18246), (18247), (18248), (18768), (17886), (17982),
(16369), (16391), (16392), (16393), (16396), (16397), (16401), (16403), (16405), (16406), (16409), (16410), (16413), (16414), (16415), (16416),
(16417), (16418), (16419), (16420), (16421), (16422), (16423), (16424), (16425), (16426), (16427), (16428), (16429), (16430), (16431), (16432),
(16433), (16434), (16435), (16436), (16485), (16487), (16489), (16490), (16491), (16492), (16494), (16496), (16498), (16499), (16501), (16502),
(16503), (16504), (16505), (16506), (16507), (16508), (16509), (16510), (16513), (16514), (16515), (16516), (16518), (16519), (16521), (16522),
(16523), (16524), (16525), (16526), (16527), (16528), (16530), (16531), (17562), (17564), (17566), (17567), (17568), (17569), (17570), (17571),
(17572), (17573), (17576), (17577), (17594), (17596), (17598), (17599), (17600), (17601), (17610), (17611), (17612), (17613), (17616), (17617),
(16337), (17967), (17968), (16999), (17733), (16334), (16336), (16340), (18303), (18304), (18320), (18341), (18342), (16315), (16203), (17966),
(16664), (16202), (17769), (16792), (16165), (17224), (17364), (16026), (16339), (16350), (16366), (16374), (16896), (17012), (18142), (16320),
(16362), (16378), (16356), (16387), (16047), (16171), (16330), (16383), (18636), (16041), (16042), (16373), (16389), (18651), (16325), (16349),
(16361), (16895), (17024), (16319), (16355), (16365), (16386), (16377), (16382), (16082), (16085), (16971), (16329), (16372), (16360), (16390),
(17019), (16348), (16354), (16385), (16893), (16967), (16318), (16324), (16381), (16364), (16371), (16388), (17027), (16057), (16328), (16359),
(16376), (16353), (16380), (16384), (16347), (16892), (16317), (16368), (16323), (16358), (16379), (16327), (16352), (16363), (16375), (16346),
(18964), (16316), (16357), (16351), (16322), (16326), (16331), (16302), (17195), (17302), (17305), (17308), (18002), (16321), (16180), (16642),
(16643), (16644), (16968), (16969), (16970), (16973), (17126), (17242), (17262), (17323), (17324), (17325), (17333), (17353), (17362), (17363),
(17442), (17505), (17506), (17507), (17696), (17758), (17882), (17887), (18151), (18153), (18492), (18540), (18566), (18643), (18799), (18154),
(18642), (20880), (19158), (20142), (20329), (21584), (21587), (21588), (21594), (21612), (21613), (21614), (21339), (20487), (20488), (21124),
(21125), (21127), (21890), (19879), (19951), (19952), (19953), (19954), (19955), (19956), (19957), (19958), (19959), (20698), (20725), (20887),
(19875), (20720), (20721), (20722), (19105), (19110), (20696), (20706), (20368), (21281), (21282), (21283), (21293), (21302), (19986), (20003),
(20005), (20502), (20522), (20524), (21044), (20381), (21785), (21786), (21878), (21772), (21773), (20086), (20965), (19803), (19805), (19806),
(19808), (20591), (20596), (20962), (20957), (20953), (20829), (20952), (20825), (20822), (20819), (19213), (19322), (20256), (20560), (21992),
(21159), (21175), (19012), (19013), (19696), (20498), (20500), (20501), (19010), (19011), (19807), (20065), (21228), (21243), (21153), (19450),
(20067), (21150), (21164), (19008), (19009), (21113), (19006), (19007), (19054), (19055), (21071), (21168), (21212), (21043), (20708), (21162),
(19004), (19005), (20913), (20979), (20981), (19160), (19422), (19642), (19725), (19775), (19880), (19882), (20018), (20020), (20021), (20364),
(20393), (20416), (20418), (20419), (20420), (20432), (20433), (20435), (20436), (20447), (20448), (20449), (20450), (20454), (20455), (20456),
(20709), (20902), (20903), (20904), (20977), (20984), (21106), (21107), (21109), (21111), (21114), (21131), (21152), (21158), (21160), (21161),
(21171), (21442), (21519), (21536), (21560), (21577), (21578), (21591), (21815), (21816), (21817), (21818), (21819), (21820), (21821), (21822),
(21823), (21831), (21975), (21979), (21980), (21981), (19960), (21140), (19924), (20030), (21141), (22736), (22726), (22819), (22821), (22798),
(22799), (22802), (22812), (22691), (22947), (22954), (22800), (22801), (22804), (22807), (22808), (22809), (22811), (22816), (22818), (22820),
(22935), (22936), (22937), (22938), (22939), (22940), (22941), (22943), (22960), (22961), (22967), (22968), (22981), (22983), (22988), (22994),
(22803), (22806), (22810), (22813), (22814), (22815), (22942), (22805), (22817), (22450), (22349), (22350), (22351), (22352), (22353), (22354),
(22355), (22356), (22357), (22358), (22359), (22360), (22361), (22362), (22363), (22364), (22365), (22366), (22367), (22368), (22369), (22370),
(22371), (22372), (22373), (22374), (22375), (22376), (22891), (22230), (22273), (22446), (22447), (22782), (22018), (22019), (22103), (22104),
(22105), (22116), (22182), (22187), (22189), (22797), (22044), (22179), (22186), (22788), (22128), (22184), (22646), (22795), (22895), (22181),
(22185), (22190), (22183), (22180), (22188), (22972), (22710), (22020), (22042), (22045), (22140), (22141), (22142), (22143), (22144), (22145),
(22154), (22155), (22156), (22157), (22158), (22159), (22160), (22161), (22162), (22163), (22164), (22165), (22166), (22167), (22168), (22169),
(22170), (22171), (22172), (22178), (22202), (22260), (22262), (22263), (22283), (22284), (22285), (22286), (22287), (22288), (22289), (22290),
(22291), (22292), (22293), (22294), (22295), (22296), (22297), (22298), (22299), (22300), (22386), (22387), (22584), (22733), (22754), (22822),
(22896), (22899), (22058), (22059), (22709), (23051), (25596), (24526), (24561), (24567), (27965), (24550), (24557), (24265), (23053), (23057),
(23058), (23040), (23041), (23043), (23045), (23046), (23047), (23048), (23049), (23050), (23072), (23362), (23363), (23054), (23056), (23577),
(23242), (23000), (23001), (23025), (23027), (23037), (23038), (23042), (23069), (23070), (23219), (23220), (23663), (23664), (23665), (23666),
(23667), (23668), (23004), (23005), (23006), (23009), (23017), (23018), (23019), (23020), (23021), (23023), (23028), (23029), (23030), (23031),
(23032), (23033), (23034), (23035), (23036), (23039), (23044), (23068), (23071), (23073), (23075), (23221), (23226), (23237), (23238), (23014),
(23457), (23458), (23459), (23461), (23462), (23193), (23545), (23547), (23548), (23549), (23714), (23705), (23709), (23716), (23773), (24412),
(25641), (24137), (25667), (23854), (23855), (24288), (27388), (27446), (24071), (23885), (23882), (23364), (23366), (27774), (27811), (27002),
(27007), (26368), (26372), (26655), (26738), (26128), (26129), (26130), (26131), (26132), (26133), (26134), (26135), (26464), (26465), (26513),
(26527), (26541), (26569), (26765), (26779), (25573), (25574), (25575), (25576), (25580), (25581), (25582), (26235), (26792), (25627), (27196),
(27718), (27719), (27720), (26324), (25145), (25159), (25173), (25285), (26843), (26548), (26180), (26173), (26174), (26175), (27218), (23147),
(23151), (23153), (23229), (23076), (23157), (26015), (26029), (26041), (23420), (23421), (23422), (23432), (23433), (23434), (23233), (23234),
(23235), (27864), (26045), (27863), (24243), (23731), (23755), (23840), (24315), (25877), (23137), (23131), (23141), (23730), (23130), (23135),
(23140), (23144), (23148), (23152), (23162), (23194), (23195), (23196), (23684), (23745), (25469), (25699), (25700), (27422), (27437), (27481),
(27511), (27513), (23578), (25900), (23579), (23683), (23711), (23734), (23846), (23365), (23368), (24227), (24100), (23003), (23008), (23010),
(23011), (23012), (23013), (23016), (23024), (23055), (23214), (23227), (23248), (23340), (23341), (23342), (23350), (23352), (23360), (23378),
(23471), (23486), (23552), (23567), (23584), (23586), (23670), (23686), (23726), (23754), (23878), (23879), (23880), (24156), (24226), (24317),
(24494), (24538), (24573), (25635), (25677), (25747), (25748), (25749), (25750), (25754), (25755), (25756), (25757), (25850), (27317), (27419),
(27590), (23560), (23561), (23562), (23750), (23858), (23866), (23867), (23868), (25814), (27443), (25407), (24242), (27441), (24235), (24190),
(24234), (24188), (23330), (23355), (23952), (23980), (24283), (24506), (24509), (25813), (24140), (28294), (28295), (28297), (28298), (28299),
(28300), (28302), (28305), (28307), (28308), (28309), (28310), (28312), (28313), (28314), (28319), (28320), (28346), (28358), (28383), (28385),
(28402), (28404), (28409), (28410), (28422), (28423), (28443), (28444), (28446), (28447), (28449), (28450), (28476), (28629), (28630), (28639),
(28640), (28641), (28642), (28644), (28645), (28974), (28975), (28976), (28977), (28980), (28982), (28983), (28985), (28986), (28987), (28990),
(28991), (28993), (28994), (28995), (28997), (28998), (28355), (28356), (28357), (28244), (28245), (28381), (28405), (28411), (28424), (28445),
(28448), (28451), (28605), (28638), (28643), (28646), (28973), (28978), (28981), (28984), (28988), (28989), (28992), (28996), (28999), (28117),
(28122), (28388), (28389), (28482), (28293), (28613), (28614), (28615), (28616), (28617), (28618), (28619), (28620), (28622), (28623), (28624),
(28625), (28626), (28627), (28628), (28679), (28680), (28681), (28683), (28684), (28685), (28686), (28687), (28688), (28689), (28690), (28691),
(28692), (28693), (28694), (28695), (28696), (28697), (28698), (28699), (28700), (28701), (28702), (28703), (28704), (28705), (28706), (28707),
(28708), (28709), (28710), (28711), (28712), (28713), (28714), (28715), (28716), (28717), (28718), (28719), (28720), (28721), (28722), (28723),
(28724), (28805), (28806), (28807), (28808), (28809), (28811), (28812), (28813), (28814), (28815), (28817), (28818), (28819), (28820), (28821),
(28831), (28832), (28833), (28834), (28835), (28836), (28837), (28838), (28839), (28840), (28841), (28842), (28843), (28844), (28845), (28846),
(28847), (28848), (28849), (28850), (28851), (28852), (28853), (28854), (28855), (28856), (28857), (28858), (28859), (28860), (28861), (28862),
(28863), (28864), (28865), (28866), (28867), (28868), (28869), (28870), (28871), (28872), (28873), (28874), (28875), (28917), (28918), (28919),
(28920), (28921), (28922), (28923), (28924), (28925), (28926), (28928), (28929), (28930), (28931), (28933), (28935), (28937), (28938), (28939),
(28940), (28941), (28942), (28943), (28944), (28945), (28946), (28947), (28948), (28949), (28950), (28951), (28952), (28953), (28954), (28955),
(28956), (28957), (28959), (28960), (28043), (28044), (28045), (28291), (28408), (28145), (28073), (28112), (28068), (28596), (28072), (28110),
(28131), (28071), (28047), (28099), (28500), (28676), (28738), (28739), (28784), (28039), (28023), (28489), (28905), (30320), (29828), (31958),
(31959), (31965), (31966), (31978), (31984), (31985), (31986), (30448), (29000), (29001), (29003), (29004), (29005), (30491), (31594), (31595),
(31596), (31597), (29885), (29002), (29006), (31598), (31599), (29237), (30559), (29120), (29225), (31584), (31585), (31586), (31587), (31588),
(31589), (31590), (31591), (31592), (31593), (31620), (31621), (31622), (31623), (31624), (31625), (31626), (31627), (31628), (31629), (31630),
(31631), (31632), (31633), (31634), (31635), (31636), (31637), (31638), (31639), (31640), (31641), (31642), (31643), (31644), (31646), (31647),
(31648), (31649), (31650), (31942), (31490), (31491), (31802), (31492), (31493), (31494), (31246), (29210), (30418), (30287), (30288), (30289),
(31730), (30845), (29024), (30427), (30703), (30760), (29539), (29547), (29548), (29569), (30309), (30499), (29041), (29311), (29749), (29751),
(29769), (29839), (29840), (29841), (29842), (29852), (29856), (29857), (29860), (29861), (29863), (29868), (29871), (29872), (29874), (29887),
(29961), (29963), (30193), (30197), (30430), (30438), (30524), (30525), (30526), (30539), (30567), (30595), (30613), (30630), (30658), (30659),
(30717), (31122), (31123), (31130), (31252), (31266), (31346), (31365), (31518), (31607), (31665), (31813), (31843), (31845), (31849), (29790),
(29805), (30632), (30805), (31530), (29410), (29419), (29565), (29571), (29575), (29576), (29645), (29712), (30414), (31824), (32824), (32466),
(32419), (32760), (32761), (32956), (32959), (32416), (32003), (32014), (32025), (32026), (32027), (32028), (32044), (32045), (32046), (32052),
(32053), (32054), (32055), (32961), (32962), (32963), (32964), (32944), (32418), (32422), (32482), (32955), (32958), (32450), (32451), (32452),
(32974), (32975), (32976), (32978), (32982), (32984), (32985), (32987), (32992), (32993), (32995), (32996), (32415), (32417), (32954), (32957),
(32973), (32977), (32983), (32986), (32991), (32994), (32093), (32094), (32095), (32096), (32097), (32098), (32099), (32100), (32101), (32102),
(32103), (32104), (32105), (32106), (32107), (32108), (32109), (32110), (32111), (32112), (32113), (32114), (32115), (32116), (32117), (32118),
(32119), (32120), (32121), (32122), (32123), (32124), (32125), (32126), (32127), (32128), (32129), (32130), (32131), (32132), (32133), (32134),
(32135), (32136), (32137), (32138), (32139), (32140), (32141), (32142), (32143), (32144), (32145), (32146), (32147), (32148), (32149), (32150),
(32151), (32152), (32153), (32154), (32155), (32156), (32157), (32158), (32159), (32160), (32161), (32162), (32163), (32164), (32165), (32166),
(32167), (32168), (32169), (32170), (32171), (32172), (32173), (32174), (32175), (32176), (32177), (32178), (32179), (32180), (32181), (32182),
(32183), (32184), (32185), (32186), (32187), (32188), (32189), (32190), (32192), (32414), (32421), (32655), (32656), (32914), (32735), (32895),
(32896), (32407), (32658), (32659), (32660), (32661), (32662), (32663), (32664), (32665), (32949), (32950), (32412), (32915), (32917), (32918),
(32919), (32920), (32465), (32542), (32566), (32594), (32773), (32764), (32765), (32766), (32618), (32642), (32543), (32544), (32545), (32546),
(32547), (32548), (32549), (32550), (32551), (32552), (32553), (32554), (32555), (32556), (32557), (32558), (32559), (32560), (32561), (32595),
(32598), (32601), (32840), (32844), (32845), (32846), (32847), (32762), (32763), (32767), (32972), (32320), (32364), (32408), (32626), (32627),
(32628), (32629), (32630), (32631), (32688), (32689), (32690), (32691), (32692), (32693), (32700), (32701), (32702), (32703), (32704), (32705),
(32706), (32707), (32708), (32709), (32710), (32711), (32712), (32713), (32734), (32911), (32971), (32578), (32906), (32725), (32615), (32633),
(32841), (33475), (34146), (34149), (34145), (34148), (34144), (34147), (34219), (34335), (34209), (34212), (33668), (33671), (33674), (33676),
(33679), (33682), (33684), (33690), (33693), (33699), (33700), (33703), (33717), (33720), (33726), (33729), (33732), (33744), (33747), (33753),
(33767), (33770), (33920), (33921), (33922), (33923), (33076), (33077), (33078), (33309), (33313), (33937), (33940), (33943), (33946), (33949),
(33952), (34576), (34577), (34578), (34579), (34580), (33987), (33997), (33054), (33065), (33066), (33067), (33068), (33482), (33964), (33936),
(33939), (33942), (33945), (33948), (33951), (33957), (33959), (34073), (34074), (34075), (34622), (34057), (33132), (33137), (33138), (33139),
(33141), (33142), (33809), (34544), (33080), (33225), (33182), (33184), (34835), (33350), (34138), (34139), (33803), (34143), (34142), (34221),
(33060), (33147), (34627), (34967), (34415), (34107), (33224), (33993), (34955), (33017), (33018), (33019), (33020), (33021), (33176), (33183),
(33219), (33223), (34492), (34499), (34518), (34519), (33197), (34484), (34486), (33455), (34025), (34030), (33312), (34062), (34024), (34126),
(34469), (34735), (34737), (34738), (34739), (34740), (34741), (34742), (34743), (34744), (34745), (34746), (34864), (34865), (34867), (34868),
(33823), (33824), (34467), (34663), (33096), (33218), (33041), (33081), (33087), (33105), (33111), (33121), (33315), (33336), (33341), (33477),
(33558), (33599), (33604), (33610), (33614), (33615), (33616), (33617), (33634), (33781), (33784), (33839), (33848), (33850), (33929), (34044),
(34077), (34112), (34115), (34116), (34117), (34120), (34123), (34135), (34158), (34187), (34191), (34494), (34497), (34501), (34623), (34645),
(34647), (34716), (34718), (34842), (33051), (33063), (33797), (34171), (33316), (34476), (33089), (34589), (34590), (34591), (34694), (34784),
(34880), (34907), (36942), (35290), (35291), (35292), (35317), (35319), (35327), (35494), (35495), (35496), (35497), (35507), (35508), (35509),
(35511), (35514), (35213), (35539), (35541), (35545), (35546), (35549), (35550), (35202), (35209), (35226), (35517), (35518), (35519), (35520),
(35521), (35522), (35523), (35524), (35525), (35526), (35527), (35528), (35529), (35530), (35531), (35532), (35533), (35535), (35537), (35538),
(35544), (35548), (35551), (35553), (35555), (35664), (35665), (35666), (36866), (36867), (35728), (35729), (35730), (35731), (35225), (36941),
(36454), (36477), (36491), (36505), (36519), (36533), (36547), (36561), (36575), (36589), (36603), (36617), (36631), (36645), (36659), (36673),
(36687), (36701), (36715), (35876), (36910), (36915), (35626), (36899), (36900), (36970), (36892), (36893), (36894), (36965), (36897), (36955),
(36967), (36895), (36960), (36912), (36914), (36968), (36959), (36889), (36890), (36891), (36966), (36896), (36964), (35285), (35286), (35396),
(35397), (35398), (35399), (35400), (35417), (35418), (35419), (35420), (35421), (35422), (35423), (35424), (35425), (35426), (35427), (35428),
(35429), (35430), (35431), (35432), (35433), (35434), (35435), (35436), (35437), (35438), (35439), (35440), (35441), (35442), (35443), (35444),
(35445), (35446), (35447), (35448), (35449), (35450), (35451), (35452), (35453), (35454), (35455), (35456), (35457), (35458), (35459), (35460),
(35461), (35462), (35313), (35946), (35126), (35229), (35289), (35692), (35701), (35718), (35722), (35738), (35777), (35803), (35840), (35854),
(36733), (36748), (36765), (36768), (36772), (36799), (36828), (36836), (36846), (36848), (35512), (35792), (35806), (36862), (36863), (35757),
(36794), (36795), (36829), (36830), (38691), (37739), (37740), (37611), (37127), (37128), (37597), (38287), (38288), (38289), (38290), (38282),
(38307), (38377), (38378), (38265), (37598), (37719), (38576), (38484), (38309), (38310), (38311), (38312), (38313), (38314), (37174), (37175),
(37176), (37196), (37197), (37243), (37244), (37245), (37290), (37364), (37365), (37366), (37410), (37587), (37590), (37624), (37625), (37646),
(37647), (37648), (37649), (37671), (37672), (37673), (37697), (37698), (37699), (37799), (37800), (37801), (37856), (37857), (37858), (37109),
(38442), (38443), (38444), (38445), (38387), (38388), (38389), (38390), (38572), (38468), (38243), (38244), (38245), (38246), (38247), (38248),
(38471), (38480), (38481), (38469), (37430), (37311), (37313), (38292), (38538), (38658), (38683), (37164), (37827), (37893), (37894), (37895),
(37896), (37897), (37297), (37298), (38301), (38578), (38916), (37955), (37967), (37976), (38052), (38140), (38204), (38383), (38524), (38525),
(38527), (37210), (37225), (37273), (37278), (37279), (37281), (37284), (37285), (37286), (37295), (37296), (37315), (37316), (37317), (37318),
(37321), (37323), (37324), (37385), (37386), (37400), (37420), (37433), (37444), (37448), (37450), (37451), (37453), (37454), (37455), (37457),
(37466), (37468), (37469), (37470), (37472), (37473), (37474), (37477), (37485), (37510), (37511), (37534), (37536), (37544), (38164), (38254),
(38255), (38256), (37343), (37345), (37346), (37338), (37326), (37329), (37335), (37336), (37337), (37710), (37312), (37163), (37154), (37126),
(37348), (38640), (38970), (38994), (38996), (38983), (37706), (38958), (37452), (38270), (38271), (38272), (38561), (38597), (38643), (38625),
(38957), (38567), (37161), (37157), (37158), (37489), (37898), (37900), (37901), (37902), (37903), (37904), (37905), (37906), (37907), (37908),
(37909), (37100), (37250), (37303), (37372), (37501), (37815), (37837), (37859), (37860), (37925), (38089), (38186), (38233), (38266), (38324),
(38380), (38382), (38483), (38498), (38512), (38577), (38600), (38606), (38619), (38621), (38622), (38623), (38624), (38629), (38630), (38631),
(37063), (37089), (37090), (37148), (37301), (37711), (37742), (37878), (38333), (38587), (38644), (38687), (38448), (37839), (38497), (38496),
(38626), (37467), (37579), (38261), (38263), (38264), (38268), (38269), (38273), (38274), (38605), (40481), (41900), (41911), (41995), (40549),
(39715), (40406), (40407), (40408), (40409), (40410), (40412), (40414), (40650), (39263), (39427), (39467), (39468), (39470), (39472), (39473),
(40307), (40553), (40440), (40441), (40442), (40443), (40444), (39769), (41749), (41342), (39303), (40480), (41605), (41606), (40762), (40777),
(40599), (40727), (40754), (40832), (40839), (40725), (41403), (41404), (41405), (41406), (41407), (41408), (41409), (41410), (41411), (41412),
(41413), (41414), (41415), (41416), (41417), (41418), (41419), (41420), (41421), (41422), (41423), (41796), (41125), (39370), (40232), (41133),
(39364), (39410), (39440), (39460), (39819), (39828), (41756), (41757), (41758), (41759), (39707), (39708), (39709), (39710), (39711), (41178),
(41750), (41753), (39685), (41147), (41166), (41174), (41196), (39644), (39687), (39738), (39969), (40199), (40776), (41091), (41093), (41111),
(41118), (41173), (39526), (39527), (41195), (39148), (39213), (39343), (39692), (41741), (41800), (41801), (41802), (41803), (41804), (41805),
(41806), (41807), (41808), (41809), (41810), (41811), (41812), (41813), (41814), (40773), (41194), (39342), (40484), (40948), (41193), (41172),
(39341), (41192), (41171), (39340), (41169), (41191), (39339), (41170), (39338), (39302), (39334), (39151), (39162), (39163), (39314), (39575),
(39576), (39614), (39739), (39748), (39903), (39904), (40110), (40218), (40219), (40220), (40221), (40222), (40223), (40224), (40225), (40226),
(40227), (40228), (40229), (40230), (40231), (40389), (40686), (41132), (41585), (39506), (39883), (39153), (39743), (39754), (42000), (42007),
(42013), (42019), (42083), (42238), (42207), (42226), (42231), (42236), (42241), (42254), (42259), (42264), (42269), (42274), (42279), (42284),
(42289), (42316), (42321), (42326), (42331), (42345), (42351), (42359), (42383), (42389), (42449), (42484), (42489), (42494), (42501), (42512),
(42518), (42524), (42530), (42536), (42558), (42563), (42569), (42577), (42582), (42587), (42596), (42601), (42606), (42613), (42619), (42654),
(42655), (42656), (42657), (42658), (42851), (42664), (42665), (42666), (42667), (42668), (42625), (42626), (42627), (42628), (42629), (42659),
(42660), (42661), (42662), (42663), (42690), (42691), (42692), (42693), (42694), (42695), (42696), (42697), (42698), (42699), (42630), (42631),
(42632), (42633), (42634), (42635), (42636), (42637), (42638), (42639), (42669), (42670), (42671), (42672), (42673), (42674), (42675), (42676),
(42677), (42678), (42680), (42681), (42682), (42683), (42684), (42685), (42686), (42687), (42688), (42689), (42703), (42704), (42705), (42706),
(42707), (42708), (42709), (42710), (42711), (42712), (42713), (42714), (42715), (42716), (42717), (42718), (42719), (42720), (42721), (42722),
(42197), (42198), (42199), (42200), (42201), (42202), (42976), (42206), (42212), (42213), (42214), (42215), (42216), (42217), (42218), (42219),
(42220), (42221), (42222), (42223), (42224), (42294), (42295), (42296), (42297), (42343), (42344), (42356), (42382), (42388), (42444), (42445),
(42446), (42447), (42448), (42511), (42517), (42523), (42529), (42535), (42556), (42557), (42568), (42574), (42575), (42576), (42593), (42594),
(42595), (42611), (42612), (42618), (42755), (42953), (42975), (42977), (42978), (42979), (42980), (42981), (42982), (42983), (42875), (42885),
(42886), (42174), (42179), (42425), (42147), (42434), (42171), (42545), (42180), (42181), (42182), (42186), (42189), (42190), (42191), (42192),
(42193), (42194), (42195), (42196), (42432), (42433), (42170), (42986), (42590), (42474), (42440), (42894), (42733), (42342), (42350), (42381),
(42776), (42940), (43651), (43727), (43728), (43729), (43730), (43731), (43460), (43611), (43612), (43613), (43732), (43733), (43734), (43735),
(43736), (43737), (43738), (43739), (43740), (43741), (43742), (43743), (43744), (43745), (43746), (43747), (43748), (43749), (43750), (43751),
(43752), (43753), (43754), (43755), (43756), (43757), (43758), (43759), (43760), (43761), (43762), (43763), (43764), (43765), (43766), (43767),
(43768), (43769), (43770), (43771), (43772), (43773), (43774), (43775), (43776), (43777), (43778), (43779), (43780), (43781), (43782), (43783),
(43784), (43785), (43786), (43787), (43788), (43789), (43790), (43791), (43792), (43793), (43794), (43795), (43796), (43797), (43798), (43799),
(43800), (43801), (43802), (43803), (43804), (43805), (43806), (43807), (43808), (43809), (43810), (43811), (43812), (43813), (43814), (43815),
(43816), (43817), (43818), (43819), (43820), (43822), (43069), (43071), (43072), (43075), (43076), (43079), (43080), (43083), (43267), (43963),
(43964), (43475), (43476), (43302), (43303), (43304), (43949), (43517), (43698), (43648), (43848), (43878), (43895), (43922), (43936), (43938),
(43109), (43563), (43108), (43298), (43562), (43107), (43561), (43106), (43560), (43105), (43559), (43104), (43558), (43103), (43557), (43150),
(43523), (43087), (43097), (43518), (43468), (43571), (43572), (43614), (43620), (43621), (43647), (43652), (43038), (43646), (43002), (43099),
(43136), (43144), (43149), (43269), (43270), (43272), (43274), (43275), (43276), (43308), (43336), (43337), (43384), (43362), (43006), (43093),
(43288), (43307), (43471), (43486), (43489), (43617), (43618), (43619), (43627), (43628), (43629), (43630), (43631), (43632), (43633), (43634),
(43635), (43636), (43637), (43638), (43639), (43640), (43641), (43650), (43695), (43215), (43493), (43659), (43003), (43321), (43325), (43326),
(43328), (43329), (43330), (43333), (43341), (43576), (43577), (43643), (43644), (43645), (43653), (43658), (43675), (43676), (43677), (43678),
(43679), (43680), (43681), (43682), (43683), (43684), (43685), (43686), (43687), (43694), (43701), (43702), (43703), (43704), (43705), (43706),
(43707), (43708), (43709), (43710), (43711), (43712), (43713), (43714), (43715), (43716), (43717), (43718), (43719), (43720), (43721), (43722),
(43723), (44090), (44807), (45457), (45459), (45460), (45461), (45462), (45605), (45455), (45538), (45539), (45540), (45541), (45542), (45543),
(45544), (45547), (45548), (45549), (45350), (45464), (44310), (44311), (44333), (44417), (44418), (44869), (44870), (44926), (44948), (45924),
(44924), (44555), (44556), (44557), (44871), (44872), (44873), (44874), (44164), (44175), (45280), (45024), (45037), (45173), (44191), (44415),
(44416), (45172), (44505), (45174), (45175), (44391), (44392), (45850), (45851), (45852), (45853), (44945), (44563), (44875), (44876), (44877),
(44878), (44879), (44880), (44881), (44882), (44883), (44884), (45705), (44451), (44619), (44627), (44629), (44600), (44811), (44158), (44148),
(45180), (44260), (44261), (44262), (44263), (44264), (44265), (44266), (44267), (44268), (44269), (44270), (44271), (44272), (44273), (44274),
(44275), (44277), (44278), (44279), (44280), (44281), (44282), (44284), (44285), (44286), (44287), (44288), (44289), (44290), (44291), (44292),
(44293), (44866), (44972), (45063), (44703), (45575), (45126), (44428), (45052), (45050), (45629), (44849), (45127), (45229), (45230), (45231),
(45500), (44817), (44607), (45006), (45007), (45008), (45009), (44506), (44507), (45279), (45863), (45901), (45909), (44221), (44229), (44598),
(44608), (44609), (44475), (45276), (45277), (44432), (45908), (44743), (44604), (45942), (44462), (44480), (44508), (44620), (44646), (44680),
(44832), (44851), (44852), (44856), (44915), (44981), (44988), (44989), (44991), (44992), (44993), (44994), (44996), (44997), (45003), (45026),
(45028), (45029), (45030), (45031), (45032), (45033), (45036), (45045), (45049), (45082), (45120), (45278), (45328), (45569), (45728), (45729),
(45730), (45748), (45749), (45750), (45751), (45752), (45754), (45759), (45765), (45860), (45899), (45902), (45903), (45904), (45905), (44304),
(44434), (44656), (44718), (45034), (45035), (45568), (44299), (45630), (44728), (44236), (44298), (44300), (44578), (44580), (44705), (44755),
(44760), (44761), (44833), (45061), (45176), (45177), (45178), (45179), (45188), (45189), (45190), (45191), (45194), (45195), (45196), (45197),
(45198), (45199), (45200), (45201), (45202), (45900), (45907), (46105), (46104), (46214), (46215), (46217), (46218), (46219), (46220), (46222),
(46225), (46227), (46228), (46230), (46232), (46233), (46234), (46235), (46236), (46237), (46238), (46239), (46240), (46241), (46242), (46243),
(46244), (46245), (46246), (46248), (46255), (46256), (46257), (46273), (46274), (46275), (46276), (46277), (46288), (46289), (46290), (46291),
(46292), (46293), (46294), (46295), (46296), (46297), (46298), (46299), (46300), (46301), (46302), (46303), (46304), (46305), (46306), (46307),
(46103), (46213), (46216), (46221), (46223), (46224), (46226), (46231), (46247), (46249), (46250), (46251), (46252), (46253), (46254), (46258),
(46259), (46260), (46261), (46262), (46263), (46264), (46265), (46266), (46267), (46268), (46269), (46270), (46271), (46272), (46278), (46279),
(46280), (46281), (46282), (46283), (46284), (46285), (46286), (46287), (46309), (46339), (46340), (46341), (46342), (46343), (46344), (46345),
(46346), (46347), (46350), (46351), (47497), (47229), (46101), (46778), (46331), (47246), (46709), (46767), (46802), (46892), (46780), (46765),
(46766), (46849), (47507), (47395), (46399), (46400), (46401), (46402), (46403), (46055), (46847), (47030), (46887), (46054), (46735), (46069),
(46070), (46106), (46319), (46395), (46783), (46830), (46978), (47036), (46852), (46957), (49686), (48435), (48438), (48440), (48442), (48444),
(48507), (48509), (48511), (48513), (48515), (48517), (48519), (48521), (48523), (49191), (49497), (48725), (48726), (48727), (48728), (48729),
(48730), (48731), (48732), (48733), (48734), (48735), (48736), (48737), (48738), (48739), (48740), (48741), (48742), (48743), (48744), (48745),
(48746), (48747), (48748), (48749), (48750), (48751), (48752), (48753), (48754), (48755), (48756), (48757), (48758), (48759), (48760), (48761),
(48762), (48763), (48764), (48769), (48770), (48771), (48772), (48773), (48774), (48775), (48776), (48777), (48778), (48781), (48782), (48783),
(48784), (48785), (48786), (48787), (48788), (48789), (48790), (48794), (48795), (48796), (48797), (48798), (48799), (48800), (48801), (48802),
(48803), (48804), (48805), (48806), (48807), (48808), (48809), (48810), (48811), (48812), (48813), (48814), (48815), (48816), (48817), (48818),
(48819), (48820), (48821), (48822), (48823), (48824), (48825), (48826), (48827), (48828), (48829), (48830), (48831), (48832), (48833), (48836),
(48837), (48838), (48839), (48840), (48841), (48842), (48843), (48844), (48845), (48846), (48847), (48848), (48849), (48850), (48851), (48852),
(48853), (48854), (48855), (48860), (48861), (48862), (48863), (48864), (48865), (48866), (48867), (48868), (48869), (48870), (48871), (48872),
(48873), (48874), (48875), (48876), (48877), (48878), (48879), (48880), (48881), (48882), (48883), (48884), (48885), (48886), (48887), (48888),
(48889), (48890), (48891), (48892), (48893), (48894), (48895), (48896), (48897), (48898), (48899), (48900), (48901), (48902), (48903), (48904),
(48905), (48906), (48907), (48908), (48909), (48910), (48911), (48912), (48913), (48914), (48915), (48916), (48917), (48918), (48919), (48922),
(48923), (48924), (48925), (48926), (48927), (48928), (48929), (48930), (48931), (49301), (49312), (49313), (49314), (49852), (49853), (49854),
(49855), (49334), (49703), (49704), (49706), (48945), (49050), (48527), (49662), (49663), (49665), (49693), (49343), (49640), (49917), (48601),
(49288), (49289), (48679), (49362), (49223), (49278), (49340), (49373), (49655), (49680), (49739), (49750), (49915), (49916), (49209), (49645),
(49689), (49708), (49733), (49873), (49984), (50442), (50204), (51682), (51683), (51684), (51685), (51686), (51687), (51688), (51689), (51690),
(51691), (51692), (51693), (51694), (51695), (51696), (51697), (51698), (51699), (51700), (51701), (51702), (51703), (51704), (51705), (51706),
(51707), (51708), (51709), (51710), (51711), (51712), (51713), (51714), (51715), (51716), (51717), (51718), (51719), (51720), (51721), (51722),
(51723), (51724), (51725), (51726), (51727), (51728), (51729), (51730), (51731), (51732), (51733), (51734), (51735), (51736), (51737), (51738),
(51739), (51740), (51741), (51742), (51743), (51744), (51745), (51746), (51747), (51748), (51749), (51750), (51751), (51752), (51753), (51754),
(51755), (51756), (51757), (51758), (51759), (51760), (51761), (51762), (51763), (51764), (51765), (51766), (51767), (51768), (51769), (51770),
(51771), (51772), (51773), (51774), (51775), (51776), (53491), (53492), (53493), (53494), (53495), (53496), (53497), (53498), (53499), (53500),
(53501), (53502), (53503), (53504), (53505), (53506), (53507), (53508), (53509), (54592), (50315), (50318), (50319), (52567), (50815), (53889),
(53890), (54069), (54860), (50840), (53891), (53924), (51997), (51998), (54847), (54857), (56806), (54212), (54452), (54810), (50093), (54822),
(50289), (50301), (50307), (52189), (52202), (52272), (52275), (52276), (52345), (52562), (52563), (52565), (52729), (53510), (54218), (54455),
(54467), (50248), (50431), (52011), (52062), (54291), (54470);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,80 @@
/*
* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef AUCTION_HOUSE_BOT_H
#define AUCTION_HOUSE_BOT_H
#include "Common.h"
#include "ObjectGuid.h"
#include "AuctionHouseMgr.h"
#include "AuctionHouseBotCommon.h"
#include "AuctionHouseBotConfig.h"
struct AuctionEntry;
class Player;
class WorldSession;
#define AUCTION_HOUSE_BOT_LOOP_BREAKER 32
class AuctionHouseBot
{
private:
uint32 _account;
uint32 _id;
AHBConfig* _allianceConfig;
AHBConfig* _hordeConfig;
AHBConfig* _neutralConfig;
time_t _lastrun_a_sec;
time_t _lastrun_h_sec;
time_t _lastrun_n_sec;
//
// Main operations
//
void Sell(Player *AHBplayer, AHBConfig *config);
void Buy (Player *AHBplayer, AHBConfig *config, WorldSession *session);
//
// Utilities
//
inline uint32 minValue(uint32 a, uint32 b) { return a <= b ? a : b; };
uint32 getNofAuctions(AHBConfig* config, AuctionHouseObject* auctionHouse, ObjectGuid guid);
uint32 getStackCount(AHBConfig* config, uint32 max);
uint32 getElapsedTime(uint32 timeClass);
uint32 getElement(std::set<uint32> set, int index, uint32 botId, uint32 maxDup, AuctionHouseObject* auctionHouse);
public:
AuctionHouseBot(uint32 account, uint32 id);
~AuctionHouseBot();
void Initialize(AHBConfig* allianceConfig, AHBConfig* hordeConfig, AHBConfig* neutralConfig);
void Update();
void Commands(AHBotCommand command, uint32 ahMapID, uint32 col, char* args);
ObjectGuid::LowType GetAHBplayerGUID() { return _id; };
};
#endif // AUCTION_HOUSE_BOT_H

View File

@@ -0,0 +1,288 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
*/
#include "AuctionHouseMgr.h"
#include "GameTime.h"
#include "AuctionHouseBot.h"
#include "AuctionHouseBotCommon.h"
#include "AuctionHouseBotAuctionHouseScript.h"
AHBot_AuctionHouseScript::AHBot_AuctionHouseScript() : AuctionHouseScript("AHBot_AuctionHouseScript", {
AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_SUCCESSFUL_MAIL,
AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_EXPIRED_MAIL,
AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_SEND_AUCTION_OUTBIDDED_MAIL,
AUCTIONHOUSEHOOK_ON_AUCTION_ADD,
AUCTIONHOUSEHOOK_ON_AUCTION_REMOVE,
AUCTIONHOUSEHOOK_ON_AUCTION_SUCCESSFUL,
AUCTIONHOUSEHOOK_ON_AUCTION_EXPIRE,
AUCTIONHOUSEHOOK_ON_BEFORE_AUCTIONHOUSEMGR_UPDATE
})
{
}
void AHBot_AuctionHouseScript::OnBeforeAuctionHouseMgrSendAuctionSuccessfulMail(
AuctionHouseMgr*, /*auctionHouseMgr*/
AuctionEntry*, /*auction*/
Player* owner,
uint32&, /*owner_accId*/
uint32&, /*profit*/
bool& sendNotification,
bool& updateAchievementCriteria,
bool& /*sendMail*/)
{
if (owner && gBotsId.find(owner->GetGUID().GetCounter()) != gBotsId.end())
{
sendNotification = false;
updateAchievementCriteria = false;
}
}
void AHBot_AuctionHouseScript::OnBeforeAuctionHouseMgrSendAuctionExpiredMail(
AuctionHouseMgr*, /* auctionHouseMgr */
AuctionEntry*, /* auction */
Player* owner,
uint32&, /* owner_accId */
bool& sendNotification,
bool& /* sendMail */)
{
if (owner && gBotsId.find(owner->GetGUID().GetCounter()) != gBotsId.end())
{
sendNotification = false;
}
}
void AHBot_AuctionHouseScript::OnBeforeAuctionHouseMgrSendAuctionOutbiddedMail(
AuctionHouseMgr*, /* auctionHouseMgr */
AuctionEntry* auction,
Player* oldBidder,
uint32&, /* oldBidder_accId */
Player* newBidder,
uint32& newPrice,
bool&, /* sendNotification */
bool& /* sendMail */)
{
if (oldBidder && !newBidder)
{
if (gBotsId.size() > 0)
{
//
// Use a random bot id
//
uint32 randBot = urand(0, gBotsId.size() - 1);
std::set<uint32>::iterator it = gBotsId.begin();
std::advance(it, randBot);
oldBidder->GetSession()->SendAuctionBidderNotification(
(uint32)auction->GetHouseId(),
auction->Id,
ObjectGuid::Create<HighGuid::Player>(*it),
newPrice,
auction->GetAuctionOutBid(),
auction->item_template);
}
}
}
void AHBot_AuctionHouseScript::OnAuctionAdd(AuctionHouseObject* /*ah*/, AuctionEntry* auction)
{
//
// The the configuration for the auction house
//
AuctionHouseEntry const* ahEntry = sAuctionMgr->GetAuctionHouseEntryFromHouse(auction->GetHouseId());
AHBConfig* config = gNeutralConfig;
if (ahEntry)
{
if (AuctionHouseId(ahEntry->houseId) == AuctionHouseId::Alliance)
{
config = gAllianceConfig;
}
else if (AuctionHouseId(ahEntry->houseId) == AuctionHouseId::Horde)
{
config = gHordeConfig;
}
}
//
// Consider only those auctions handled by the bots
//
if (config->ConsiderOnlyBotAuctions)
{
if (gBotsId.find(auction->owner.GetCounter()) != gBotsId.end())
{
return;
}
}
//
// Verify if we can operate on the item
//
Item* pItem = sAuctionMgr->GetAItem(auction->item_guid);
if (!pItem)
{
if (config->DebugOut)
{
LOG_ERROR("module", "AHBot: Item {} for entryiD={} doesn't exist, perhaps bought already?", auction->item_guid.ToString(), auction->Id);
}
return;
}
//
// Keeps updated the amount of items in the auction
//
ItemTemplate const* prototype = sObjectMgr->GetItemTemplate(auction->item_template);
config->IncItemCounts(prototype->Class, prototype->Quality);
if (config->DebugOut)
{
LOG_INFO("module", "AHBot: Auction Added ah={}, auctionId={}, totalAHItems = {}", AuctionHouseId(ahEntry->houseId), auction->Id, config->TotalItemCounts());
}
}
// this is called after the auction has been removed from the DB
void AHBot_AuctionHouseScript::OnAuctionRemove(AuctionHouseObject* /*ah*/, AuctionEntry* auction)
{
//
// Get the configuration for the auction house
//
AuctionHouseEntry const* ahEntry = sAuctionMgr->GetAuctionHouseEntryFromHouse(auction->GetHouseId());
AHBConfig* config = gNeutralConfig;
if (ahEntry)
{
if (AuctionHouseId(ahEntry->houseId) == AuctionHouseId::Alliance)
{
config = gAllianceConfig;
}
else if (AuctionHouseId(ahEntry->houseId) == AuctionHouseId::Horde)
{
config = gHordeConfig;
}
}
// Consider only those auctions handled by the bots
if (config->ConsiderOnlyBotAuctions)
{
if (gBotsId.find(auction->owner.GetCounter()) != gBotsId.end())
{
return;
}
}
// only get the prototype as actual item has already been removed from server AH in this callback
ItemTemplate const* prototype = sObjectMgr->GetItemTemplate(auction->item_template);
if (prototype)
{
config->DecItemCounts(prototype->Class, prototype->Quality);
if (config->DebugOut)
{
LOG_INFO("module", "AHBot: Auction removed ah={}, auctionId={}, Bot totalAHItems={}", AuctionHouseId(ahEntry->houseId), auction->Id, config->TotalItemCounts());
}
}
else
{
// should never happen
if (config->DebugOut)
{
LOG_ERROR("module", "AHBot: Item was removed but no prototype was found");
}
}
}
void AHBot_AuctionHouseScript::OnAuctionSuccessful(AuctionHouseObject* /*ah*/, AuctionEntry* auction)
{
//
// Get the configuration for the auction house
//
AuctionHouseEntry const* ahEntry = sAuctionMgr->GetAuctionHouseEntryFromHouse(auction->GetHouseId());
AHBConfig* config = gNeutralConfig;
if (ahEntry)
{
if (AuctionHouseId(ahEntry->houseId) == AuctionHouseId::Alliance)
{
config = gAllianceConfig;
}
else if (AuctionHouseId(ahEntry->houseId) == AuctionHouseId::Horde)
{
config = gHordeConfig;
}
}
//
// If the auction has been won, it means that it has been accepted by the market.
// Use the buyout as a reference since the price for the bid is downgraded during selling.
//
if (config->DebugOut)
{
LOG_INFO("module", "AHBot: Auction successful ah={}, auctionId={}, Bot totalAHItems={}", AuctionHouseId(ahEntry->houseId), auction->Id, config->TotalItemCounts());
}
config->UpdateItemStats(auction->item_template, auction->itemCount, auction->buyout);
}
void AHBot_AuctionHouseScript::OnAuctionExpire(AuctionHouseObject* /*ah*/, AuctionEntry* auction)
{
//
// Get the configuration for the auction house
//
if (!auction)
{
LOG_ERROR("module", "AHBot: AHBot_AuctionHouseScript::OnAuctionExpire invalid AuctionEntry");
}
AuctionHouseEntry const* ahEntry = sAuctionMgr->GetAuctionHouseEntryFromHouse(auction->GetHouseId());
AHBConfig* config = gNeutralConfig;
if (ahEntry)
{
if (AuctionHouseId(ahEntry->houseId) == AuctionHouseId::Alliance)
{
config = gAllianceConfig;
}
else if (AuctionHouseId(ahEntry->houseId) == AuctionHouseId::Horde)
{
config = gHordeConfig;
}
}
//
// If the auction expired, then it means that the bid was unwanted by the market.
// Bid price is usually less or equal to the buyout, so this likely will bring the price down.
//
config->UpdateItemStats(auction->item_template, auction->itemCount, auction->bid);
if (config->DebugOut)
{
LOG_INFO("module", "AHBot: Auction Expired ah={}, auctionId={} Bot totalAHItems={}", AuctionHouseId(ahEntry->houseId), auction->Id, config->TotalItemCounts());
}
}
void AHBot_AuctionHouseScript::OnBeforeAuctionHouseMgrUpdate()
{
//
// For every registered bot, perform an update
//
for (AuctionHouseBot* bot: gBots)
{
bot->Update();
}
}

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
*/
#ifndef AUCTION_HOUSE_BOT_AUCTION_HOUSE_SCRIPT_H
#define AUCTION_HOUSE_BOT_AUCTION_HOUSE_SCRIPT_H
#include "Player.h"
#include "ScriptMgr.h"
// =============================================================================
// Interaction with the auction house core mechanisms
// =============================================================================
class AHBot_AuctionHouseScript : public AuctionHouseScript
{
public:
AHBot_AuctionHouseScript();
void OnBeforeAuctionHouseMgrSendAuctionSuccessfulMail(AuctionHouseMgr* auctionHouseMgr, AuctionEntry* auction, Player* owner, uint32& owner_accId, uint32& profit, bool& sendNotification, bool& updateAchievementCriteria, bool& sendMail) override;
void OnBeforeAuctionHouseMgrSendAuctionExpiredMail (AuctionHouseMgr* auctionHouseMgr, AuctionEntry* auction, Player* owner, uint32& owner_accId, bool& sendNotification, bool& sendMail) override;
void OnBeforeAuctionHouseMgrSendAuctionOutbiddedMail (AuctionHouseMgr* auctionHouseMgr, AuctionEntry* auction, Player* oldBidder, uint32& oldBidder_accId, Player* newBidder, uint32& newPrice, bool& sendNotification, bool& sendMail) override;
void OnAuctionAdd (AuctionHouseObject* ah, AuctionEntry* auction) override;
void OnAuctionRemove (AuctionHouseObject* ah, AuctionEntry* auction) override;
void OnAuctionSuccessful(AuctionHouseObject* ah, AuctionEntry* auction) override;
void OnAuctionExpire (AuctionHouseObject* ah, AuctionEntry* auction) override;
void OnBeforeAuctionHouseMgrUpdate() override;
};
#endif /* AUCTION_HOUSE_BOT_AUCTION_HOUSE_SCRIPT_H */

View File

@@ -0,0 +1,22 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
*/
#include "AuctionHouseBot.h"
#include "AuctionHouseBotCommon.h"
#include "AuctionHouseBotConfig.h"
//
// Configuration used globally by all the bots instances
//
AHBConfig* gAllianceConfig = new AHBConfig(2);
AHBConfig* gHordeConfig = new AHBConfig(6);
AHBConfig* gNeutralConfig = new AHBConfig(7);
//
// Active bots
//
std::set<uint32> gBotsId;
std::set<AuctionHouseBot*> gBots;

View File

@@ -0,0 +1,107 @@
/*
* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef AUCTION_HOUSE_BOT_COMMON_H
#define AUCTION_HOUSE_BOT_COMMON_H
#include <set>
#include "Common.h"
class AuctionHouseBot;
//
// Item quality
//
#define AHB_GREY ITEM_QUALITY_POOR
#define AHB_WHITE ITEM_QUALITY_NORMAL
#define AHB_GREEN ITEM_QUALITY_UNCOMMON
#define AHB_BLUE ITEM_QUALITY_RARE
#define AHB_PURPLE ITEM_QUALITY_EPIC
#define AHB_ORANGE ITEM_QUALITY_LEGENDARY
#define AHB_YELLOW ITEM_QUALITY_ARTIFACT
#define AHB_MAX_QUALITY ITEM_QUALITY_ARTIFACT
#define AHB_CLASS_WARRIOR 1
#define AHB_CLASS_PALADIN 2
#define AHB_CLASS_HUNTER 4
#define AHB_CLASS_ROGUE 8
#define AHB_CLASS_PRIEST 16
#define AHB_CLASS_DK 32
#define AHB_CLASS_SHAMAN 64
#define AHB_CLASS_MAGE 128
#define AHB_CLASS_WARLOCK 256
#define AHB_CLASS_UNUSED 512
#define AHB_CLASS_DRUID 1024
//
// Items classification
//
#define AHB_GREY_TG 0
#define AHB_WHITE_TG 1
#define AHB_GREEN_TG 2
#define AHB_BLUE_TG 3
#define AHB_PURPLE_TG 4
#define AHB_ORANGE_TG 5
#define AHB_YELLOW_TG 6
#define AHB_GREY_I 7
#define AHB_WHITE_I 8
#define AHB_GREEN_I 9
#define AHB_BLUE_I 10
#define AHB_PURPLE_I 11
#define AHB_ORANGE_I 12
#define AHB_YELLOW_I 13
#define AHB_ITEM_TYPE_OFFSET 7
//
// Chat GM commands
//
enum class AHBotCommand : uint32
{
buyer,
seller,
useMarketPrice,
ahexpire,
minitems,
maxitems,
percentages,
minprice,
maxprice,
minbidprice,
maxbidprice,
maxstack,
buyerprice,
bidinterval,
bidsperinterval
};
//
// Globals
//
extern std::set<uint32> gBotsId; // Active bots players ids
extern std::set<AuctionHouseBot*> gBots; // Active bots
#endif // AUCTION_HOUSE_BOT_COMMON_H

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,374 @@
/*
* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef AUCTION_HOUSE_BOT_CONFIG_H
#define AUCTION_HOUSE_BOT_CONFIG_H
#include <map>
#include <set>
#include <string>
#include "ObjectMgr.h"
class AHBConfig
{
private:
uint32 AHID; // Id
uint32 AHFID; // Faction id
uint32 minItems;
uint32 maxItems;
uint32 percentGreyTradeGoods;
uint32 percentWhiteTradeGoods;
uint32 percentGreenTradeGoods;
uint32 percentBlueTradeGoods;
uint32 percentPurpleTradeGoods;
uint32 percentOrangeTradeGoods;
uint32 percentYellowTradeGoods;
uint32 percentGreyItems;
uint32 percentWhiteItems;
uint32 percentGreenItems;
uint32 percentBlueItems;
uint32 percentPurpleItems;
uint32 percentOrangeItems;
uint32 percentYellowItems;
uint32 minPriceGrey;
uint32 maxPriceGrey;
uint32 minBidPriceGrey;
uint32 maxBidPriceGrey;
uint32 maxStackGrey;
uint32 minPriceWhite;
uint32 maxPriceWhite;
uint32 minBidPriceWhite;
uint32 maxBidPriceWhite;
uint32 maxStackWhite;
uint32 minPriceGreen;
uint32 maxPriceGreen;
uint32 minBidPriceGreen;
uint32 maxBidPriceGreen;
uint32 maxStackGreen;
uint32 minPriceBlue;
uint32 maxPriceBlue;
uint32 minBidPriceBlue;
uint32 maxBidPriceBlue;
uint32 maxStackBlue;
uint32 minPricePurple;
uint32 maxPricePurple;
uint32 minBidPricePurple;
uint32 maxBidPricePurple;
uint32 maxStackPurple;
uint32 minPriceOrange;
uint32 maxPriceOrange;
uint32 minBidPriceOrange;
uint32 maxBidPriceOrange;
uint32 maxStackOrange;
uint32 minPriceYellow;
uint32 maxPriceYellow;
uint32 minBidPriceYellow;
uint32 maxBidPriceYellow;
uint32 maxStackYellow;
uint32 buyerPriceGrey;
uint32 buyerPriceWhite;
uint32 buyerPriceGreen;
uint32 buyerPriceBlue;
uint32 buyerPricePurple;
uint32 buyerPriceOrange;
uint32 buyerPriceYellow;
uint32 buyerBiddingInterval;
uint32 buyerBidsPerInterval;
//
// Amount of items to be sold in absolute values
//
uint32 greytgp;
uint32 whitetgp;
uint32 greentgp;
uint32 bluetgp;
uint32 purpletgp;
uint32 orangetgp;
uint32 yellowtgp;
uint32 greyip;
uint32 whiteip;
uint32 greenip;
uint32 blueip;
uint32 purpleip;
uint32 orangeip;
uint32 yellowip;
//
// Situation of the auction house
//
uint32 greyTGoods;
uint32 whiteTGoods;
uint32 greenTGoods;
uint32 blueTGoods;
uint32 purpleTGoods;
uint32 orangeTGoods;
uint32 yellowTGoods;
uint32 greyItems;
uint32 whiteItems;
uint32 greenItems;
uint32 blueItems;
uint32 purpleItems;
uint32 orangeItems;
uint32 yellowItems;
//
// Per-item statistics
//
std::map<uint32, uint32> itemsCount;
std::map<uint32, uint64> itemsSum;
std::map<uint32, uint64> itemsPrice;
void InitializeFromFile();
void InitializeFromSql(std::set<uint32> botsIds);
std::set<uint32> getCommaSeparatedIntegers(std::string text);
void DecItemCounts(uint32 ahbotItemType);
void IncItemCounts(uint32 ahbotItemType);
public:
//
// Debugging
//
bool DebugOut;
bool DebugOutConfig;
bool DebugOutFilters;
bool DebugOutBuyer;
bool DebugOutSeller;
//
// Tracing
//
bool TraceSeller;
bool TraceBuyer;
//
// Setup
//
bool AHBSeller;
bool AHBBuyer;
bool UseBuyPriceForBuyer;
bool UseBuyPriceForSeller;
bool SellAtMarketPrice;
uint32 MarketResetThreshold;
bool ConsiderOnlyBotAuctions;
uint32 ItemsPerCycle;
//
// Filters
//
bool Vendor_Items;
bool Loot_Items;
bool Other_Items;
bool Vendor_TGs;
bool Loot_TGs;
bool Other_TGs;
bool Profession_Items;
bool No_Bind;
bool Bind_When_Picked_Up;
bool Bind_When_Equipped;
bool Bind_When_Use;
bool Bind_Quest_Item;
uint32 DuplicatesCount;
uint32 ElapsingTimeClass;
bool DivisibleStacks;
bool DisablePermEnchant;
bool DisableConjured;
bool DisableGems;
bool DisableMoney;
bool DisableMoneyLoot;
bool DisableLootable;
bool DisableKeys;
bool DisableDuration;
bool DisableBOP_Or_Quest_NoReqLevel;
bool DisableWarriorItems;
bool DisablePaladinItems;
bool DisableHunterItems;
bool DisableRogueItems;
bool DisablePriestItems;
bool DisableDKItems;
bool DisableShamanItems;
bool DisableMageItems;
bool DisableWarlockItems;
bool DisableUnusedClassItems;
bool DisableDruidItems;
uint32 DisableItemsBelowLevel;
uint32 DisableItemsAboveLevel;
uint32 DisableTGsBelowLevel;
uint32 DisableTGsAboveLevel;
uint32 DisableItemsBelowGUID;
uint32 DisableItemsAboveGUID;
uint32 DisableTGsBelowGUID;
uint32 DisableTGsAboveGUID;
uint32 DisableItemsBelowReqLevel;
uint32 DisableItemsAboveReqLevel;
uint32 DisableTGsBelowReqLevel;
uint32 DisableTGsAboveReqLevel;
uint32 DisableItemsBelowReqSkillRank;
uint32 DisableItemsAboveReqSkillRank;
uint32 DisableTGsBelowReqSkillRank;
uint32 DisableTGsAboveReqSkillRank;
//
// Items validity for selling purposes
//
std::set<uint32> NpcItems;
std::set<uint32> LootItems;
std::set<uint32> DisableItemStore;
std::set<uint32> SellerWhiteList;
//
// Bins for trade goods.
//
std::set<uint32> GreyTradeGoodsBin;
std::set<uint32> WhiteTradeGoodsBin;
std::set<uint32> GreenTradeGoodsBin;
std::set<uint32> BlueTradeGoodsBin;
std::set<uint32> PurpleTradeGoodsBin;
std::set<uint32> OrangeTradeGoodsBin;
std::set<uint32> YellowTradeGoodsBin;
//
// Bins for items
//
std::set<uint32> GreyItemsBin;
std::set<uint32> WhiteItemsBin;
std::set<uint32> GreenItemsBin;
std::set<uint32> BlueItemsBin;
std::set<uint32> PurpleItemsBin;
std::set<uint32> OrangeItemsBin;
std::set<uint32> YellowItemsBin;
//
// Constructors/destructors
//
AHBConfig(uint32 ahid, AHBConfig* conf);
AHBConfig(uint32 ahid);
AHBConfig();
~AHBConfig();
//
// Ruotines
//
void Initialize(std::set<uint32> botsIds);
void InitializeBins();
void Reset();
uint32 GetAHID();
uint32 GetAHFID();
void SetMinItems (uint32 value);
uint32 GetMinItems ();
void SetMaxItems (uint32 value);
uint32 GetMaxItems ();
void SetPercentages (uint32 greytg, uint32 whitetg, uint32 greentg, uint32 bluetg, uint32 purpletg, uint32 orangetg, uint32 yellowtg,
uint32 greyi , uint32 whitei , uint32 greeni , uint32 bluei , uint32 purplei , uint32 orangei , uint32 yellowi);
uint32 GetPercentages (uint32 color);
void SetMinPrice (uint32 color, uint32 value);
uint32 GetMinPrice (uint32 color);
void SetMaxPrice (uint32 color, uint32 value);
uint32 GetMaxPrice (uint32 color);
void SetMinBidPrice (uint32 color, uint32 value);
uint32 GetMinBidPrice (uint32 color);
void SetMaxBidPrice (uint32 color, uint32 value);
uint32 GetMaxBidPrice (uint32 color);
void SetMaxStack (uint32 color, uint32 value);
uint32 GetMaxStack (uint32 color);
void SetBuyerPrice (uint32 color, uint32 value);
uint32 GetBuyerPrice (uint32 color);
void SetBiddingInterval(uint32 value);
uint32 GetBiddingInterval();
void SetBidsPerInterval(uint32 value);
uint32 GetBidsPerInterval();
void CalculatePercents ();
// max number of items of type in AH based on maxItems
uint32 GetMaximum (uint32 ahbotItemType);
void DecItemCounts (uint32 Class, uint32 Quality);
void IncItemCounts (uint32 Class, uint32 Quality);
void ResetItemCounts ();
uint32 TotalItemCounts ();
uint32 GetItemCounts (uint32 color);
void UpdateItemStats (uint32 id, uint32 stackSize, uint64 buyout);
uint64 GetItemPrice (uint32 id);
};
//
// Globally defined configurations
//
extern AHBConfig* gAllianceConfig;
extern AHBConfig* gHordeConfig;
extern AHBConfig* gNeutralConfig;
#endif // AUCTION_HOUSE_BOT_CONFIG_H

View File

@@ -0,0 +1,39 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
*/
#include "AuctionHouseBot.h"
#include "AuctionHouseBotCommon.h"
#include "AuctionHouseBotMailScript.h"
AHBot_MailScript::AHBot_MailScript() : MailScript("AHBot_MailScript", {
MAILHOOK_ON_BEFORE_MAIL_DRAFT_SEND_MAIL_TO
})
{
}
void AHBot_MailScript::OnBeforeMailDraftSendMailTo(
MailDraft*, /* mailDraft */
MailReceiver const& receiver,
MailSender const& sender,
MailCheckMask&, /* checked */
uint32&, /* deliver_delay */
uint32&, /* custom_expiration */
bool& deleteMailItemsFromDB,
bool& sendMail)
{
//
// If the mail is for the bot, then remove it and delete the items bought
//
if (gBotsId.find(receiver.GetPlayerGUIDLow()) != gBotsId.end())
{
if (sender.GetMailMessageType() == MAIL_AUCTION)
{
deleteMailItemsFromDB = true;
}
sendMail = false;
}
}

View File

@@ -0,0 +1,23 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
*/
#ifndef AUCTION_HOUSE_BOT_MAIL_SCRIPT_H
#define AUCTION_HOUSE_BOT_MAIL_SCRIPT_H
#include "ScriptMgr.h"
#include "Mail.h"
// =============================================================================
// Interaction with the mailing systems
// =============================================================================
class AHBot_MailScript : public MailScript
{
public:
AHBot_MailScript();
void OnBeforeMailDraftSendMailTo(MailDraft* mailDraft, MailReceiver const& receiver, MailSender const& sender, MailCheckMask& checked, uint32& deliver_delay, uint32& custom_expiration, bool& deleteMailItemsFromDB, bool& sendMail) override;
};
#endif /* AUCTION_HOUSE_BOT_MAIL_SCRIPT_H */

View File

@@ -0,0 +1,19 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
*/
#include "AuctionHouseBot.h"
#include "AuctionHouseBotAuctionHouseScript.h"
#include "AuctionHouseBotMailScript.h"
#include "AuctionHouseBotWorldScript.h"
// =============================================================================
// This provides the effective startup of the module by istanciating the scripts
// =============================================================================
void AddAHBotScripts()
{
new AHBot_WorldScript();
new AHBot_AuctionHouseScript();
new AHBot_MailScript();
}

View File

@@ -0,0 +1,194 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
*/
#include "Config.h"
#include "Log.h"
#include "AuctionHouseBot.h"
#include "AuctionHouseBotCommon.h"
#include "AuctionHouseBotWorldScript.h"
// =============================================================================
// Initialization of the bot during the world startup
// =============================================================================
AHBot_WorldScript::AHBot_WorldScript() : WorldScript("AHBot_WorldScript", {
WORLDHOOK_ON_BEFORE_CONFIG_LOAD,
WORLDHOOK_ON_STARTUP
})
{
}
void AHBot_WorldScript::OnBeforeConfigLoad(bool reload)
{
//
// Retrieve how many bots shall be operating on the auction market
//
bool debug = sConfigMgr->GetOption<bool> ("AuctionHouseBot.DEBUG" , false);
uint32 account = sConfigMgr->GetOption<uint32>("AuctionHouseBot.Account", 0);
uint32 player = sConfigMgr->GetOption<uint32>("AuctionHouseBot.GUID" , 0);
//
// All the bots bound to the provided account will be used for auctioning, if GUID is zero.
// Otherwise only the specified character is used.
//
if (account == 0 && player == 0)
{
LOG_ERROR("server.loading", "AHBot: Account id and player id missing from configuration; is that the right file?");
return;
}
else
{
QueryResult result = CharacterDatabase.Query("SELECT guid FROM characters WHERE account = {}", account);
if (result)
{
gBotsId.clear();
do
{
Field* fields = result->Fetch();
uint32 botId = fields[0].Get<uint32>();
if (player == 0)
{
if (debug)
{
LOG_INFO("server.loading", "AHBot: New bot to start, account={} character={}", account, botId);
}
gBotsId.insert(botId);
}
else
{
if (player == botId)
{
if (debug)
{
LOG_INFO("server.loading", "AHBot: Starting only one bot, account={} character={}", account, botId);
}
gBotsId.insert(botId);
break;
}
}
} while (result->NextRow());
}
else
{
LOG_ERROR("server.loading", "AHBot: Could not query the database for characters of account {}", account);
return;
}
}
if (gBotsId.size() == 0)
{
LOG_ERROR("server.loading", "AHBot: no characters registered for account {}", account);
return;
}
//
// Start the bots only if the operation is a reload, otherwise let the OnStartup do the job
//
if (reload)
{
if (debug)
{
LOG_INFO("module", "AHBot: Reloading the bots");
}
//
// Clear the bots array; this way they wont be used anymore during the initialization stage.
//
DeleteBots();
//
// Reload the configuration for the auction houses
//
gAllianceConfig->Initialize(gBotsId);
gHordeConfig->Initialize (gBotsId);
gNeutralConfig->Initialize (gBotsId);
//
// Start again the bots
//
PopulateBots();
}
}
void AHBot_WorldScript::OnStartup()
{
LOG_INFO("server.loading", "Initialize AuctionHouseBot...");
//
// Initialize the configuration (done only once at startup)
//
gAllianceConfig->Initialize(gBotsId);
gHordeConfig->Initialize (gBotsId);
gNeutralConfig->Initialize (gBotsId);
//
// Starts the bots
//
PopulateBots();
}
void AHBot_WorldScript::DeleteBots()
{
//
// Save the old bots references.
//
std::set<AuctionHouseBot*> oldBots;
for (AuctionHouseBot* bot: gBots)
{
oldBots.insert(bot);
}
//
// Clear the bot list
//
gBots.clear();
//
// Free the resources used up by the old bots
//
for (AuctionHouseBot* bot: oldBots)
{
delete bot;
}
}
void AHBot_WorldScript::PopulateBots()
{
uint32 account = sConfigMgr->GetOption<uint32>("AuctionHouseBot.Account", 0);
//
// Insert the bot in the list used for auction house iterations
//
gBots.clear();
for (uint32 id: gBotsId)
{
AuctionHouseBot* bot = new AuctionHouseBot(account, id);
bot->Initialize(gAllianceConfig, gHordeConfig, gNeutralConfig);
gBots.insert(bot);
}
}

View File

@@ -0,0 +1,27 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
*/
#ifndef AUCTION_HOUSE_BOT_WORLD_SCRIPT_H
#define AUCTION_HOUSE_BOT_WORLD_SCRIPT_H
#include "ScriptMgr.h"
// =============================================================================
// Interaction with the world core mechanisms
// =============================================================================
class AHBot_WorldScript : public WorldScript
{
private:
void DeleteBots();
void PopulateBots();
public:
AHBot_WorldScript();
void OnBeforeConfigLoad(bool reload) override;
void OnStartup() override;
};
#endif /* AUCTION_HOUSE_BOT_WORLD_SCRIPT_H */

View File

@@ -0,0 +1,15 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
* Copyright (C) 2021+ WarheadCore <https://github.com/WarheadCore>
*/
// From SC
void AddAHBotCommandScripts();
void AddAHBotScripts();
// Add all
void Addmod_ah_botScripts()
{
AddAHBotCommandScripts();
AddAHBotScripts();
}

View File

@@ -0,0 +1,580 @@
/*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
Name: ah_bot_commandscript
%Complete: 100
Comment: All ah_bot related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "AuctionHouseBot.h"
#include "Config.h"
#if AC_COMPILER == AC_COMPILER_GNU
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
using namespace Acore::ChatCommands;
class ah_bot_commandscript : public CommandScript
{
private:
static ItemQualities stringToItemQualities(const char* name, int length)
{
//
// Translates a string into ItemQualities enum
//
if (strncmp(name, "grey", length) == 0)
{
return ITEM_QUALITY_POOR;
}
if (strncmp(name, "white", length) == 0)
{
return ITEM_QUALITY_NORMAL;
}
if (strncmp(name, "green", length) == 0)
{
return ITEM_QUALITY_UNCOMMON;
}
if (strncmp(name, "blue", length) == 0)
{
return ITEM_QUALITY_RARE;
}
if (strncmp(name, "purple", length) == 0)
{
return ITEM_QUALITY_EPIC;
}
if (strncmp(name, "orange", length) == 0)
{
return ITEM_QUALITY_LEGENDARY;
}
if (strncmp(name, "yellow", length) == 0)
{
return ITEM_QUALITY_ARTIFACT;
}
return static_cast<ItemQualities>(-1); // Invalid
}
public:
ah_bot_commandscript() : CommandScript("ah_bot_commandscript")
{
}
std::vector<ChatCommand> GetCommands() const override
{
static std::vector<ChatCommand> commandTable =
{
{ "ahbotoptions", HandleAHBotOptionsCommand, SEC_GAMEMASTER, Console::Yes }
};
return commandTable;
}
static bool HandleAHBotOptionsCommand(ChatHandler* handler, const char*args)
{
uint32 ahMapID = 0;
char* opt = strtok((char*)args, " ");
if (!opt)
{
handler->PSendSysMessage("Invalid syntax");
handler->PSendSysMessage("Try ahbotoptions help to see a list of options.");
return false;
}
//
// Commands which does not requires an AH
//
int l = strlen(opt);
if (strncmp(opt, "buyer", l) == 0)
{
char* param1 = strtok(NULL, " ");
if (!param1)
{
handler->PSendSysMessage("Syntax is: ahbotoptions buyer $state (0 off 1 on)");
return false;
}
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::buyer, 0, 0, param1);
}
return true;
}
else if (strncmp(opt, "seller", l) == 0)
{
char* param1 = strtok(NULL, " ");
if (!param1)
{
handler->PSendSysMessage("Syntax is: ahbotoptions seller $state (0 off 1 on)");
return false;
}
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::seller, 0, 0, param1);
}
return true;
}
else if (strncmp(opt, "usemarketprice", l) == 0)
{
char* param1 = strtok(NULL, " ");
if (!param1)
{
handler->PSendSysMessage("Syntax is: ahbotoptions useMarketPrice $state (0 off 1 on)");
return false;
}
for (AuctionHouseBot* bot : gBots)
{
bot->Commands(AHBotCommand::useMarketPrice, 0, 0, param1);
}
return true;
}
//
// Retrieve the auction house type
//
char* ahMapIdStr = strtok(NULL, " ");
if (ahMapIdStr)
{
ahMapID = uint32(strtoul(ahMapIdStr, NULL, 0));
switch (ahMapID)
{
case 2:
case 6:
case 7:
break;
default:
opt = NULL;
break;
}
}
//
// Syntax check
//
if (!opt)
{
handler->PSendSysMessage("Invalid syntax; the auction house id must be 2, 6 or 7");
return false;
}
//
// Commands that do requires an AH id to be performed
//
if (strncmp(opt, "help", l) == 0)
{
handler->PSendSysMessage("AHBot commands:");
handler->PSendSysMessage("buyer - enable/disable buyer");
handler->PSendSysMessage("seller - enable/disabler seller");
handler->PSendSysMessage("usemarketprice - enable/disabler selling at market price");
handler->PSendSysMessage("ahexpire - remove all bot auctions");
handler->PSendSysMessage("minitems - set min auctions");
handler->PSendSysMessage("maxitems - set max auctions");
handler->PSendSysMessage("percentages - set selling percentages");
handler->PSendSysMessage("minprice - set min price");
handler->PSendSysMessage("maxprice - set max price");
handler->PSendSysMessage("minbidprice - set min bid price for buyer");
handler->PSendSysMessage("maxbidprice - set max bid price for buyer");
handler->PSendSysMessage("maxstack - set max stack");
handler->PSendSysMessage("buyerprice - set the buyer price policy");
handler->PSendSysMessage("bidinterval - set the bid interval for buyer");
handler->PSendSysMessage("bidsperinterval - set the bid amount for buyer");
return true;
}
else if (strncmp(opt, "ahexpire", l) == 0)
{
if (!ahMapIdStr)
{
handler->PSendSysMessage("Syntax is: ahbotoptions ahexpire $ahMapID (2, 6 or 7)");
return false;
}
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::ahexpire, ahMapID, 0, NULL);
}
}
else if (strncmp(opt, "minitems", l) == 0)
{
char* param1 = strtok(NULL, " ");
if (!ahMapIdStr || !param1)
{
handler->PSendSysMessage("Syntax is: ahbotoptions minitems $ahMapID (2, 6 or 7) $minItems");
return false;
}
for (AuctionHouseBot* bot : gBots)
{
bot->Commands(AHBotCommand::minitems, ahMapID, 0, param1);
}
}
else if (strncmp(opt, "maxitems", l) == 0)
{
char* param1 = strtok(NULL, " ");
if (!ahMapIdStr || !param1)
{
handler->PSendSysMessage("Syntax is: ahbotoptions maxitems $ahMapID (2, 6 or 7) $maxItems");
return false;
}
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::maxitems, ahMapID, 0, param1);
}
}
else if (strncmp(opt, "percentages", l) == 0)
{
char* param1 = strtok(NULL, " ");
char* param2 = strtok(NULL, " ");
char* param3 = strtok(NULL, " ");
char* param4 = strtok(NULL, " ");
char* param5 = strtok(NULL, " ");
char* param6 = strtok(NULL, " ");
char* param7 = strtok(NULL, " ");
char* param8 = strtok(NULL, " ");
char* param9 = strtok(NULL, " ");
char* param10 = strtok(NULL, " ");
char* param11 = strtok(NULL, " ");
char* param12 = strtok(NULL, " ");
char* param13 = strtok(NULL, " ");
char* param14 = strtok(NULL, " ");
if (!ahMapIdStr || !param14)
{
handler->PSendSysMessage("Syntax is: ahbotoptions percentages $ahMapID (2, 6 or 7) $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14");
handler->PSendSysMessage("1 GreyTradeGoods 2 WhiteTradeGoods 3 GreenTradeGoods 4 BlueTradeGoods 5 PurpleTradeGoods");
handler->PSendSysMessage("6 OrangeTradeGoods 7 YellowTradeGoods 8 GreyItems 9 WhiteItems 10 GreenItems 11 BlueItems");
handler->PSendSysMessage("12 PurpleItems 13 OrangeItems 14 YellowItems");
return false;
}
uint32 greytg = uint32(strtoul(param1 , NULL, 0));
uint32 whitetg = uint32(strtoul(param2 , NULL, 0));
uint32 greentg = uint32(strtoul(param3 , NULL, 0));
uint32 bluetg = uint32(strtoul(param4 , NULL, 0));
uint32 purpletg = uint32(strtoul(param5 , NULL, 0));
uint32 orangetg = uint32(strtoul(param6 , NULL, 0));
uint32 yellowtg = uint32(strtoul(param7 , NULL, 0));
uint32 greyi = uint32(strtoul(param8 , NULL, 0));
uint32 whitei = uint32(strtoul(param9 , NULL, 0));
uint32 greeni = uint32(strtoul(param10, NULL, 0));
uint32 bluei = uint32(strtoul(param11, NULL, 0));
uint32 purplei = uint32(strtoul(param12, NULL, 0));
uint32 orangei = uint32(strtoul(param13, NULL, 0));
uint32 yellowi = uint32(strtoul(param14, NULL, 0));
uint32 totalPercent = greytg + whitetg + greentg + bluetg + purpletg + orangetg + yellowtg + greyi + whitei + greeni + bluei + purplei + orangei + yellowi;
if (totalPercent == 0 || totalPercent != 100)
{
handler->PSendSysMessage("The total must add up to 100%%");
return false;
}
char param[100] = { 0 };
strcat(param, param1);
strcat(param, " ");
strcat(param, param2);
strcat(param, " ");
strcat(param, param3);
strcat(param, " ");
strcat(param, param4);
strcat(param, " ");
strcat(param, param5);
strcat(param, " ");
strcat(param, param6);
strcat(param, " ");
strcat(param, param7);
strcat(param, " ");
strcat(param, param8);
strcat(param, " ");
strcat(param, param9);
strcat(param, " ");
strcat(param, param10);
strcat(param, " ");
strcat(param, param11);
strcat(param, " ");
strcat(param, param12);
strcat(param, " ");
strcat(param, param13);
strcat(param, " ");
strcat(param, param14);
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::percentages, ahMapID, 0, param);
}
}
else if (strncmp(opt, "minprice", l) == 0)
{
char* param1 = strtok(NULL, " ");
char* param2 = strtok(NULL, " ");
if (!ahMapIdStr || !param1 || !param2)
{
handler->PSendSysMessage("Syntax is: ahbotoptions minprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
return false;
}
auto quality = stringToItemQualities(param1, l);
if (quality != static_cast<ItemQualities>(-1))
{
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::minprice, ahMapID, quality, param2);
}
}
else
{
handler->PSendSysMessage("Syntax is: ahbotoptions minprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
return false;
}
}
else if (strncmp(opt, "maxprice", l) == 0)
{
char* param1 = strtok(NULL, " ");
char* param2 = strtok(NULL, " ");
if (!ahMapIdStr || !param1 || !param2)
{
handler->PSendSysMessage("Syntax is: ahbotoptions maxprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
return false;
}
auto quality = stringToItemQualities(param1, l);
if (quality != static_cast<ItemQualities>(-1))
{
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::maxprice, ahMapID, quality, param2);
}
}
else
{
handler->PSendSysMessage("Syntax is: ahbotoptions maxprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
return false;
}
}
else if (strncmp(opt, "minbidprice", l) == 0)
{
char* param1 = strtok(NULL, " ");
char* param2 = strtok(NULL, " ");
if (!ahMapIdStr || !param2 || !param2)
{
handler->PSendSysMessage("Syntax is: ahbotoptions minbidprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
return false;
}
uint32 minBidPrice = uint32(strtoul(param2, NULL, 0));
if (minBidPrice < 1 || minBidPrice > 100)
{
handler->PSendSysMessage("The min bid price multiplier must be between 1 and 100");
return false;
}
auto quality = stringToItemQualities(param1, l);
if (quality != static_cast<ItemQualities>(-1))
{
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::minbidprice, ahMapID, quality, param2);
}
}
else
{
handler->PSendSysMessage("Syntax is: ahbotoptions minbidprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
return false;
}
}
else if (strncmp(opt, "maxbidprice", l) == 0)
{
char* param1 = strtok(NULL, " ");
char* param2 = strtok(NULL, " ");
if (!ahMapIdStr || !param1 || !param2)
{
handler->PSendSysMessage("Syntax is: ahbotoptions maxbidprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
return false;
}
uint32 maxBidPrice = uint32(strtoul(param2, NULL, 0));
if (maxBidPrice < 1 || maxBidPrice > 100)
{
handler->PSendSysMessage("The max bid price multiplier must be between 1 and 100");
return false;
}
auto quality = stringToItemQualities(param1, l);
if (quality != static_cast<ItemQualities>(-1))
{
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::maxbidprice, ahMapID, quality, param2);
}
}
else
{
handler->PSendSysMessage("Syntax is: ahbotoptions max bidprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
return false;
}
}
else if (strncmp(opt, "maxstack",l) == 0)
{
char* param1 = strtok(NULL, " ");
char* param2 = strtok(NULL, " ");
if (!ahMapIdStr || !param1 || !param2)
{
handler->PSendSysMessage("Syntax is: ahbotoptions maxstack $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $value");
return false;
}
// uint32 maxStack = uint32(strtoul(param2, NULL, 0));
// if (maxStack < 0)
// {
// handler->PSendSysMessage("maxstack can't be a negative number.");
// return false;
// }
auto quality = stringToItemQualities(param1, l);
if (quality != static_cast<ItemQualities>(-1))
{
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::maxstack, ahMapID, quality, param2);
}
}
else
{
handler->PSendSysMessage("Syntax is: ahbotoptions maxstack $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $value");
return false;
}
}
else if (strncmp(opt, "buyerprice", l) == 0)
{
char* param1 = strtok(NULL, " ");
char* param2 = strtok(NULL, " ");
if (!ahMapIdStr || !param1 || !param2)
{
handler->PSendSysMessage("Syntax is: ahbotoptions buyerprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue or purple) $price");
return false;
}
auto quality = stringToItemQualities(param1, l);
if (quality != static_cast<ItemQualities>(-1))
{
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::buyerprice, ahMapID, quality, param2);
}
}
else
{
handler->PSendSysMessage("Syntax is: ahbotoptions buyerprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue or purple) $price");
return false;
}
}
else if (strncmp(opt, "bidinterval", l) == 0)
{
char* param1 = strtok(NULL, " ");
if (!ahMapIdStr || !param1)
{
handler->PSendSysMessage("Syntax is: ahbotoptions bidinterval $ahMapID (2, 6 or 7) $interval(in minutes)");
return false;
}
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::bidinterval, ahMapID, 0, param1);
}
}
else if (strncmp(opt, "bidsperinterval", l) == 0)
{
char* param1 = strtok(NULL, " ");
if (!ahMapIdStr || !param1)
{
handler->PSendSysMessage("Syntax is: ahbotoptions bidsperinterval $ahMapID (2, 6 or 7) $bids");
return false;
}
for (AuctionHouseBot* bot: gBots)
{
bot->Commands(AHBotCommand::bidsperinterval, ahMapID, 0, param1);
}
}
else
{
handler->PSendSysMessage("Invalid syntax");
handler->PSendSysMessage("Try ahbotoptions help to see a list of options.");
return false;
}
handler->PSendSysMessage("Done");
return true;
}
};
void AddAHBotCommandScripts()
{
new ah_bot_commandscript();
}

View File

@@ -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

View File

@@ -0,0 +1,45 @@
### TITLE
## Type(Scope/Subscope): Commit ultra short explanation
## |---- Write below the examples with a maximum of 50 characters ----|
## Example 1: fix(DB/SAI): Missing spell to NPC Hogger
## Example 2: fix(CORE/Raid): Phase 2 of Ragnaros
## Example 3: feat(CORE/Commands): New GM command to do something
### DESCRIPTION
## Explain why this change is being made, what does it fix etc...
## |---- Write below the examples with a maximum of 72 characters per lines ----|
## Example: Hogger (id: 492) was not charging player when being engaged.
## Provide links to any issue, commit, pull request or other resource
## Example 1: Closes issue #23
## Example 2: Ported from other project's commit (link)
## Example 3: References taken from wowpedia / wowhead / wowwiki / https://wowgaming.altervista.org/aowow/
## =======================================================
## EXTRA INFOS
## =======================================================
## "Type" can be:
## feat (new feature)
## fix (bug fix)
## refactor (refactoring production code)
## style (formatting, missing semi colons, etc; no code change)
## docs (changes to documentation)
## test (adding or refactoring tests; no production code change)
## chore (updating bash scripts, git files etc; no production code change)
## --------------------
## Remember to
## Capitalize the subject line
## Use the imperative mood in the subject line
## Do not end the subject line with a period
## Separate subject from body with a blank line
## Use the body to explain what and why rather than how
## Can use multiple lines with "-" for bullet points in body
## --------------------
## More info here https://www.conventionalcommits.org/en/v1.0.0-beta.2/
## =======================================================
## "Scope" can be:
## CORE (core related, c++)
## DB (database related, sql)
## =======================================================
## "Subscope" is optional and depends on the nature of the commit.
## =======================================================

View File

@@ -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

View File

@@ -0,0 +1,49 @@
name: core-build
on:
push:
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
compiler: [clang]
runs-on: ubuntu-latest
name: ${{ matrix.compiler }}
env:
COMPILER: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2
with:
repository: 'azerothcore/azerothcore-wotlk'
ref: 'master'
submodules: 'recursive'
- uses: actions/checkout@v2
with:
submodules: 'recursive'
path: 'modules/skeleton-module'
- name: Cache
uses: actions/cache@v2
with:
path: /home/runner/.ccache
key: ccache:${{ matrix.compiler }}:${{ github.ref }}:${{ github.sha }}
restore-keys: |
ccache:${{ matrix.compiler }}:${{ github.ref }}
ccache:${{ matrix.compiler }}
- name: Configure OS
run: source ./acore.sh install-deps
env:
CONTINUOUS_INTEGRATION: true
- name: Create conf/config.sh
run: source ./apps/ci/ci-conf.sh
- name: Import db
run: source ./apps/ci/ci-import-db.sh
- name: Build
run: source ./apps/ci/ci-compile.sh
- name: Dry run
run: source ./apps/ci/ci-worldserver-dry-run.sh
- name: Check startup errors
run: source ./apps/ci/ci-error-check.sh
- name: Run unit tests
run: source ./apps/ci/ci-run-unit-tests.sh

48
modules/mod-auto-resurrect/.gitignore vendored Normal file
View File

@@ -0,0 +1,48 @@
!.gitignore
#
#Generic
#
.directory
.mailmap
*.orig
*.rej
*.*~
.hg/
*.kdev*
.DS_Store
CMakeLists.txt.user
*.bak
*.patch
*.diff
*.REMOTE.*
*.BACKUP.*
*.BASE.*
*.LOCAL.*
#
# IDE & other softwares
#
/.settings/
/.externalToolBuilders/*
# exclude in all levels
nbproject/
.sync.ffs_db
*.kate-swp
#
# Eclipse
#
*.pydevproject
.metadata
.gradle
tmp/
*.tmp
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.cproject

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 AzerothCore
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,22 @@
# Auto Resurrect
## Description
This mod allows players to automatically resurrect at the start of an instance or raid when releasing their spirit.
## Requirements
- AzerothCore v4.0.0+
## Installation
```
1) Simply `git clone` the module under the `modules` directory of your AzerothCore source or copy paste it manually.
2) Re-run cmake and launch a clean build of AzerothCore.
3) Go to your server configuration directory (where your `worldserver` or `worldserver.exe` is), copy `mod-auto-resurrect.conf.dist` to `mod-auto-resurrect.conf` and edit that new file
```
## Credits
- [Elmegaard](https://github.com/Elmegaard) (author of the module)
- AzerothCore: [repository](https://github.com/azerothcore) - [website](http://azerothcore.org/) - [discord chat community](https://discord.gg/PaqQRkd)

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
## CUSTOM SQL - Important file used by the db_assembler.sh
## Keep only the required variables (base sql files or updates, depending on the DB)

View File

@@ -0,0 +1,57 @@
#
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
#
[worldserver]
########################################
# Auto Resurrect configuration
########################################
#
# AutoResurrect.Enable
# Description: Enable or Disable the Auto Resurrect mod
# Default: 0 - Disabled
# 1 - Enabled
#
AutoResurrect.Enable = 0
#
# AutoResurrect.Notification
# Description: Notify players about this module on login
# Default: 0 - Disabled
# 1 - Enabled
#
AutoResurrect.Notification = 0
#
# AutoResurrect.Dungeon
# Description: Auto resurrect in normal dungeons
# Default: 0 - Disabled
# 1 - Enabled
#
AutoResurrect.Dungeon = 0
#
# AutoResurrect.HeroicDungeon
# Description: Auto resurrect in heroic dungeons
# Default: 0 - Disabled
# 1 - Enabled
#
AutoResurrect.HeroicDungeon = 0
#
# AutoResurrect.Raid
# Description: Auto resurrect in raids
# Default: 0 - Disabled
# 1 - Enabled
#
AutoResurrect.Raid = 0
#
# AutoResurrect.HeroicRaid
# Description: Auto resurrect in heroic raids
# Default: 0 - Disabled
# 1 - Enabled
#
AutoResurrect.HeroicRaid = 0

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
MOD_AUTO_RESURRECT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/" && pwd )"
source $MOD_AUTO_RESURRECT_ROOT"/conf/conf.sh.dist"
if [ -f $MOD_AUTO_RESURRECT_ROOT"/conf/conf.sh" ]; then
source $MOD_AUTO_RESURRECT_ROOT"/conf/conf.sh"
fi

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
## Set a local git commit template
git config --local commit.template ".git_commit_template.txt" ;

View File

@@ -0,0 +1,15 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
*/
// From SC
void AddAutoResurrectScripts();
// Add all
// cf. the naming convention https://github.com/azerothcore/azerothcore-wotlk/blob/master/doc/changelog/master.md#how-to-upgrade-4
// additionally replace all '-' in the module folder name with '_' here
void Addmod_auto_resurrectScripts()
{
AddAutoResurrectScripts();
}

View File

@@ -0,0 +1,78 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
*/
#include "ScriptMgr.h"
#include "Player.h"
#include "Config.h"
#include "Chat.h"
// Add player scripts
class AutoResurrect : public PlayerScript
{
public:
AutoResurrect() : PlayerScript("AutoResurrect") { }
std::map<int, const AreaTriggerTeleport*> playerLocation = {};
void DebugLog(Player* player, std::string log) {
if (sConfigMgr->GetOption<bool>("AutoResurrect.Enable", false) && sConfigMgr->GetOption<bool>("AutoResurrect.Notification", false)) {
ChatHandler(player->GetSession()).SendSysMessage(log);
}
}
void OnPlayerLogin(Player* player) override
{
if (sConfigMgr->GetOption<bool>("AutoResurrect.Enable", false) && sConfigMgr->GetOption<bool>("AutoResurrect.Notification", false))
{
DebugLog(player, "Auto Resurrect module enabled");
}
}
void OnPlayerReleasedGhost(Player* player) override {
if (!sConfigMgr->GetOption<bool>("AutoResurrect.Enable", false)) {
return;
}
Map* map = player->GetMap();
bool dungeons = sConfigMgr->GetOption<bool>("AutoResurrect.Dungeon", false);
bool heroics = sConfigMgr->GetOption<bool>("AutoResurrect.HeroicDungeon", false);
bool raids = sConfigMgr->GetOption<bool>("AutoResurrect.Raid", false);
bool heroicRaids = sConfigMgr->GetOption<bool>("AutoResurrect.HeroicRaid", false);
if ((dungeons && !map->IsHeroic() && map->IsDungeon()) ||
(heroics && map->IsHeroic() && map->IsDungeon()) ||
(raids && !map->IsHeroic() && map->IsRaid()) ||
(heroicRaids && map->IsHeroic() && map->IsRaid())) {
AreaTriggerTeleport const* at = sObjectMgr->GetMapEntranceTrigger(player->GetMapId());
playerLocation[player->GetGUID()] = at;
}
}
virtual void OnPlayerMapChanged(Player* player) override {
if (!sConfigMgr->GetOption<bool>("AutoResurrect.Enable", false)) {
return;
}
if (!playerLocation.count(player->GetGUID())) {
return;
}
AreaTriggerTeleport const* at = playerLocation[player->GetGUID()];
if (at == NULL) {
return;
}
player->ResurrectPlayer(1.0f);
player->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, at->target_Orientation);
player->SaveToDB(false, false);
playerLocation[player->GetGUID()] = NULL;
}
};
// Add all scripts in one
void AddAutoResurrectScripts()
{
new AutoResurrect();
}

View File

@@ -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

View File

@@ -0,0 +1,49 @@
### TITLE
## Type(Scope/Subscope): Commit ultra short explanation
## |---- Write below the examples with a maximum of 50 characters ----|
## Example 1: fix(DB/SAI): Missing spell to NPC Hogger
## Example 2: fix(CORE/Raid): Phase 2 of Ragnaros
## Example 3: feat(CORE/Commands): New GM command to do something
### DESCRIPTION
## Explain why this change is being made, what does it fix etc...
## |---- Write below the examples with a maximum of 72 characters per lines ----|
## Example: Hogger (id: 492) was not charging player when being engaged.
## Provide links to any issue, commit, pull request or other resource
## Example 1: Closes issue #23
## Example 2: Ported from other project's commit (link)
## Example 3: References taken from wowpedia / wowhead / wowwiki / https://wowgaming.altervista.org/aowow/
## =======================================================
## EXTRA INFOS
## =======================================================
## "Type" can be:
## feat (new feature)
## fix (bug fix)
## refactor (refactoring production code)
## style (formatting, missing semi colons, etc; no code change)
## docs (changes to documentation)
## test (adding or refactoring tests; no production code change)
## chore (updating bash scripts, git files etc; no production code change)
## --------------------
## Remember to
## Capitalize the subject line
## Use the imperative mood in the subject line
## Do not end the subject line with a period
## Separate subject from body with a blank line
## Use the body to explain what and why rather than how
## Can use multiple lines with "-" for bullet points in body
## --------------------
## More info here https://www.conventionalcommits.org/en/v1.0.0-beta.2/
## =======================================================
## "Scope" can be:
## CORE (core related, c++)
## DB (database related, sql)
## =======================================================
## "Subscope" is optional and depends on the nature of the commit.
## =======================================================

View File

@@ -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

View File

@@ -0,0 +1,12 @@
name: core-build
on:
push:
branches:
- 'master'
pull_request:
jobs:
build:
uses: azerothcore/reusable-workflows/.github/workflows/core_build_modules.yml@main
with:
module_repo: ${{ github.event.repository.name }}

48
modules/mod-character-tools/.gitignore vendored Normal file
View File

@@ -0,0 +1,48 @@
!.gitignore
#
#Generic
#
.directory
.mailmap
*.orig
*.rej
*.*~
.hg/
*.kdev*
.DS_Store
CMakeLists.txt.user
*.bak
*.patch
*.diff
*.REMOTE.*
*.BACKUP.*
*.BASE.*
*.LOCAL.*
#
# IDE & other softwares
#
/.settings/
/.externalToolBuilders/*
# exclude in all levels
nbproject/
.sync.ffs_db
*.kate-swp
#
# Eclipse
#
*.pydevproject
.metadata
.gradle
tmp/
*.tmp
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.cproject

View File

@@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.

View File

@@ -0,0 +1,40 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
## Character Tools
- Latest build status with azerothcore: [![Build Status](https://github.com/azerothcore/mod-character-tools/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-character-tools)
This is a module for [AzerothCore](http://www.azerothcore.org)
Current features:
-**This Module is for a item with a use function to show gossip menu to allow players to change faction/race/name or customise
Upcoming features:
## Requirements
Character tools Module currently requires:
AzerothCore v1.0.1+
## How to install
###1) Simply place the module under the `modules` folder of your AzerothCore source folder.
###2) Input the SQL file to the world database.
###3) Re-run cmake and launch a clean build of AzerothCore
**That's it.**
### (Optional) Edit module configuration
If you need to change the module configuration, go to your server configuration folder (e.g. **etc**), copy `mod_charactertools.conf.dist` to `mod_charactertools.conf` and edit it as you prefer.
# Show your appreciation
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SBJFTAJKUNEXC)

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
#
# CUSTOM
#
DB_WORLD_CUSTOM_PATHS+=(
$MOD_CHARACTER_TOOLS_ROOT"/sql/world"
)

View File

@@ -0,0 +1,10 @@
[worldserver]
#####################################################################################################
# #
# CharacterTools #
# Description: Enables of disable the script for character_tools #
# Default: 1 (Enable) #
# 0 (Disable) #
# #
CharacterTools = 1 #
#####################################################################################################

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
MOD_CHARACTER_TOOLS_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/" && pwd )"
source $MOD_CHARACTER_TOOLS_ROOT"/conf/conf.sh.dist"
if [ -f $MOD_CHARACTER_TOOLS_ROOT"/conf/conf.sh" ]; then
source $MOD_CHARACTER_TOOLS_ROOT"/conf/conf.sh"
fi

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
## Set a local git commit template
git config --local commit.template ".git_commit_template.txt" ;

View File

@@ -0,0 +1,2 @@
-- Adding script to the Item 6948 ( Hearthstone )
UPDATE `item_template` SET `ScriptName`='character_tools' WHERE `entry`=6948;

View File

@@ -0,0 +1,6 @@
void AddCharacterToolsScripts();
void Addmod_character_toolsScripts()
{
AddCharacterToolsScripts();
}

View File

@@ -0,0 +1,64 @@
#include "Define.h"
#include "GossipDef.h"
#include "Item.h"
#include "Player.h"
#include "ScriptedGossip.h"
#include "ScriptMgr.h"
#include "Spell.h"
#include "Configuration/Config.h"
#include "Chat.h"
class character_tools : public ItemScript
{
public:
character_tools() : ItemScript("character_tools") {}
bool OnUse(Player* p, Item* i, SpellCastTargets const& /*targets*/) override
{
p->PlayerTalkClass->ClearMenus();
if (p->IsInCombat())
return false;
if (!sConfigMgr->GetOption<bool>("CharacterTools", true))
return false;
AddGossipItemFor(p, GOSSIP_ICON_CHAT, "|TInterface/Icons/Ability_Paladin_BeaconofLight:50:50|tChange My Race", GOSSIP_SENDER_MAIN, 1);
AddGossipItemFor(p, GOSSIP_ICON_CHAT, "|TInterface/Icons/INV_BannerPVP_01:50:50|tChange My Faction", GOSSIP_SENDER_MAIN, 2);
AddGossipItemFor(p, GOSSIP_ICON_CHAT, "|TInterface/Icons/Achievement_BG_returnXflags_def_WSG:50:50|tChange My Appearance", GOSSIP_SENDER_MAIN, 3);
AddGossipItemFor(p, GOSSIP_ICON_CHAT, "|TInterface/Icons/INV_Inscription_Scroll:50:50|tChange My Name", GOSSIP_SENDER_MAIN, 4);
SendGossipMenuFor(p, DEFAULT_GOSSIP_MESSAGE, i->GetGUID());
return false; // If item has spell cast it normal.
}
void OnGossipSelect(Player* player, Item* /*item*/, uint32 /*sender*/, uint32 action) override
{
player->PlayerTalkClass->ClearMenus();
switch (action)
{
case 1:
player->SetAtLoginFlag(AT_LOGIN_CHANGE_RACE);
ChatHandler(player->GetSession()).PSendSysMessage("CHAT OUTPUT: Please log out for race change.");
break;
case 2:
player->SetAtLoginFlag(AT_LOGIN_CHANGE_FACTION);
ChatHandler(player->GetSession()).PSendSysMessage("CHAT OUTPUT: Please log out for faction change.");
break;
case 3:
player->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE);
ChatHandler(player->GetSession()).PSendSysMessage("CHAT OUTPUT: Please log out for Character Customize.");
break;
case 4:
player->SetAtLoginFlag(AT_LOGIN_RENAME);
ChatHandler(player->GetSession()).PSendSysMessage("CHAT OUTPUT: Please log out for name change.");
break;
}
}
};
void AddCharacterToolsScripts()
{
new character_tools();
}

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,28 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
# Dynamic XP
- Latest build status with azerothcore:
[![Build Status](https://github.com/azerothcore/mod-dynamic-xp/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-dynamic-xp)
## Description
Set xp per level range e.g in dynamicxp.conf.
## Features
- Dynamic.XP.Rate.1-9 = 1.0
- Dynamic.XP.Rate.10-19 = 2.0
- Dynamic.XP.Rate.20-29 = 3.0
- Dynamic.XP.Rate.30-39 = 4.0
- Dynamic.XP.Rate.40-49 = 5.0
- Dynamic.XP.Rate.50-59 = 6.0
- Dynamic.XP.Rate.60-69 = 7.0
- Dynamic.XP.Rate.70-79 = 8.0
## Credits
- [Micrah/Milestorme: Script/Module Creator](https://github.com/milestorme).
- [Poszer: Script Support](https://github.com/poszer)
- [Conan513: Original Script from AshmaneCore](https://github.com/conan513).

View File

@@ -0,0 +1,12 @@
name: core-build
on:
push:
branches:
- 'master'
pull_request:
jobs:
build:
uses: azerothcore/reusable-workflows/.github/workflows/core_build_modules.yml@main
with:
module_repo: ${{ github.event.repository.name }}

48
modules/mod-dynamic-xp/.gitignore vendored Normal file
View File

@@ -0,0 +1,48 @@
!.gitignore
#
#Generic
#
.directory
.mailmap
*.orig
*.rej
*~
.hg/
*.kdev*
.DS_Store
CMakeLists.txt.user
*.bak
*.patch
*.diff
*.REMOTE.*
*.BACKUP.*
*.BASE.*
*.LOCAL.*
#
# IDE & other softwares
#
/.settings/
/.externalToolBuilders/*
# exclude in all levels
nbproject/
.sync.ffs_db
*.kate-swp
#
# Eclipse
#
*.pydevproject
.metadata
.gradle
tmp/
*.tmp
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.cproject

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Micrah
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,22 @@
# Dynamic XP
- Latest build status with azerothcore: [![Build Status](https://travis-ci.com/milestorme/mod-dynamic-xp.svg?branch=master)](https://travis-ci.com/milestorme/mod-dynamic-xp)
## Description
Set xp per level range e.g in dynamicxp.conf.
## Features
* Dynamic.XP.Rate.1-9 = 1.0
* Dynamic.XP.Rate.10-19 = 2.0
* Dynamic.XP.Rate.20-29 = 3.0
* Dynamic.XP.Rate.30-39 = 4.0
* Dynamic.XP.Rate.40-49 = 5.0
* Dynamic.XP.Rate.50-59 = 6.0
* Dynamic.XP.Rate.60-69 = 7.0
* Dynamic.XP.Rate.70-79 = 8.0
## Credits
* [Micrah/Milestorme: Script/Module Creator](https://github.com/milestorme).
* [Poszer: Script Support](https://github.com/poszer)
* [Conan513: Original Script from AshmaneCore](https://github.com/conan513).

View File

@@ -0,0 +1,30 @@
[worldserver]
################################################################################################################
# Dynamic.XP.Rate
# Description: You can setup the personal XP rate for different level ranges.
#
# Dynamic.XP.Rate.Announce: 1 (Enable) Default
# 0 (Disable)
#
# Dynamic.XP.Rate: 1 (Enable) Default
# 0 (Disable)
#
# Dynamic.XP.Rate.X-X: 1+ (Set a custom XP rate on that level range)
# 0 (Reset custom XP rate to default on that level range)
#
Dynamic.XP.Rate.Announce = 1
Dynamic.XP.Rate = 1
Dynamic.XP.Rate.1-9 = 1
Dynamic.XP.Rate.10-19 = 2
Dynamic.XP.Rate.20-29 = 3
Dynamic.XP.Rate.30-39 = 4
Dynamic.XP.Rate.40-49 = 5
Dynamic.XP.Rate.50-59 = 6
Dynamic.XP.Rate.60-69 = 7
Dynamic.XP.Rate.70-79 = 8
##################################################################################################################

View File

View File

@@ -0,0 +1,25 @@
<!-- First of all, THANK YOU for your contribution. -->
## Changes Proposed:
-
-
## Issues Addressed:
<!-- If your fix has a relating issue, link it below -->
- Closes
## SOURCE:
<!-- If you can, include a source that can strengthen your claim -->
## Tests Performed:
<!-- Does it build without errors? Did you test in-game? What did you test? On which OS did you test? Describe any other tests performed -->
-
-
## How to Test the Changes:
<!-- Describe in a detailed step-by-step order how to test the changes -->
1.
2.
3.

View File

@@ -0,0 +1,6 @@
void AddSC_dynamic_xp_rate();
void Addmod_dynamic_xpScripts()
{
AddSC_dynamic_xp_rate();
}

View File

@@ -0,0 +1,54 @@
/*
Credits
Script reworked by Micrah/Milestorme and Poszer (Poszer is the Best)
Module Created by Micrah/Milestorme
Original Script from AshmaneCore https://github.com/conan513 Single Player Project
*/
#include "Chat.h"
#include "Configuration/Config.h"
#include "Player.h"
#include "ScriptMgr.h"
class spp_dynamic_xp_rate : public PlayerScript
{
public:
spp_dynamic_xp_rate() : PlayerScript("spp_dynamic_xp_rate", {
PLAYERHOOK_ON_LOGIN,
PLAYERHOOK_ON_GIVE_EXP
}) { };
void OnPlayerLogin(Player* player) override
{
if (sConfigMgr->GetOption<bool>("Dynamic.XP.Rate.Announce", true))
ChatHandler(player->GetSession()).SendSysMessage("This server is running the |cff4CFF00Level Dynamic XP |rmodule.");
}
void OnPlayerGiveXP(Player* player, uint32& amount, Unit* /*victim*/, uint8 /*xpSource*/) override
{
if (sConfigMgr->GetOption<bool>("Dynamic.XP.Rate", true))
{
if (player->GetLevel() <= 9)
amount *= sConfigMgr->GetOption<uint32>("Dynamic.XP.Rate.1-9", 1);
else if (player->GetLevel() <= 19)
amount *= sConfigMgr->GetOption<uint32>("Dynamic.XP.Rate.10-19", 2);
else if (player->GetLevel() <= 29)
amount *= sConfigMgr->GetOption<uint32>("Dynamic.XP.Rate.20-29", 3);
else if (player->GetLevel() <= 39)
amount *= sConfigMgr->GetOption<uint32>("Dynamic.XP.Rate.30-39", 4);
else if (player->GetLevel() <= 49)
amount *= sConfigMgr->GetOption<uint32>("Dynamic.XP.Rate.40-49", 5);
else if (player->GetLevel() <= 59)
amount *= sConfigMgr->GetOption<uint32>("Dynamic.XP.Rate.50-59", 6);
else if (player->GetLevel() <= 69)
amount *= sConfigMgr->GetOption<uint32>("Dynamic.XP.Rate.60-69", 7);
else if (player->GetLevel() <= 79)
amount *= sConfigMgr->GetOption<uint32>("Dynamic.XP.Rate.70-79", 8);
}
}
};
void AddSC_dynamic_xp_rate()
{
new spp_dynamic_xp_rate();
}

View File

@@ -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

View File

@@ -0,0 +1,49 @@
### TITLE
## Type(Scope/Subscope): Commit ultra short explanation
## |---- Write below the examples with a maximum of 50 characters ----|
## Example 1: fix(DB/SAI): Missing spell to NPC Hogger
## Example 2: fix(CORE/Raid): Phase 2 of Ragnaros
## Example 3: feat(CORE/Commands): New GM command to do something
### DESCRIPTION
## Explain why this change is being made, what does it fix etc...
## |---- Write below the examples with a maximum of 72 characters per lines ----|
## Example: Hogger (id: 492) was not charging player when being engaged.
## Provide links to any issue, commit, pull request or other resource
## Example 1: Closes issue #23
## Example 2: Ported from other project's commit (link)
## Example 3: References taken from wowpedia / wowhead / wowwiki / https://wowgaming.altervista.org/aowow/
## =======================================================
## EXTRA INFOS
## =======================================================
## "Type" can be:
## feat (new feature)
## fix (bug fix)
## refactor (refactoring production code)
## style (formatting, missing semi colons, etc; no code change)
## docs (changes to documentation)
## test (adding or refactoring tests; no production code change)
## chore (updating bash scripts, git files etc; no production code change)
## --------------------
## Remember to
## Capitalize the subject line
## Use the imperative mood in the subject line
## Do not end the subject line with a period
## Separate subject from body with a blank line
## Use the body to explain what and why rather than how
## Can use multiple lines with "-" for bullet points in body
## --------------------
## More info here https://www.conventionalcommits.org/en/v1.0.0-beta.2/
## =======================================================
## "Scope" can be:
## CORE (core related, c++)
## DB (database related, sql)
## =======================================================
## "Subscope" is optional and depends on the nature of the commit.
## =======================================================

View File

@@ -0,0 +1,62 @@
## 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
*.conf.dist
*.txt
*.md
*.cmake
# Bash
*.sh text
# Lua if lua module?
*.lua
# SQL
*.sql
# 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
# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as an asset (binary) by default. If you want to treat it as text,
# comment-out the following line and uncomment the line after.
*.svg binary
#*.svg text
*.eps binary

View File

@@ -0,0 +1,12 @@
name: core-build
on:
push:
branches:
- 'master'
pull_request:
jobs:
build:
uses: azerothcore/reusable-workflows/.github/workflows/core_build_modules.yml@main
with:
module_repo: ${{ github.event.repository.name }}

View File

@@ -0,0 +1,50 @@
!.gitignore
#
#Generic
#
.directory
.mailmap
*.orig
*.rej
*~
.hg/
*.kdev*
.DS_Store
CMakeLists.txt.user
*.bak
*.patch
*.diff
*.REMOTE.*
*.BACKUP.*
*.BASE.*
*.LOCAL.*
#
# IDE & other softwares
#
/.settings/
/.externalToolBuilders/*
# exclude in all levels
nbproject/
.sync.ffs_db
*.kate-swp
#
# Eclipse
#
*.pydevproject
.metadata
.gradle
tmp/
*.tmp
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.cproject
\.vscode/

View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -0,0 +1,650 @@
# GNU Affero General Public License
_Version 3, 19 November 2007_
_Copyright © 2007 Free Software Foundation, Inc. [http://fsf.org](http://fsf.org)_
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
## Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: **(1)** assert copyright on the software, and **(2)** offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
## TERMS AND CONDITIONS
### 0. Definitions
“This License” refers to version 3 of the GNU Affero General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this
License. Each licensee is addressed as “you”. “Licensees” and
“recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a “modified version” of the
earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based
on the Program.
To “propagate” a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices”
to the extent that it includes a convenient and prominently visible
feature that **(1)** displays an appropriate copyright notice, and **(2)**
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
### 1. Source Code
The “source code” for a work means the preferred form of the work
for making modifications to it. “Object code” means any non-source
form of a work.
A “Standard Interface” means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other
than the work as a whole, that **(a)** is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and **(b)** serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
“Major Component”, in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
### 2. Basic Permissions
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
### 3. Protecting Users' Legal Rights From Anti-Circumvention Law
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
### 4. Conveying Verbatim Copies
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
### 5. Conveying Modified Source Versions
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
* **a)** The work must carry prominent notices stating that you modified
it, and giving a relevant date.
* **b)** The work must carry prominent notices stating that it is
released under this License and any conditions added under section 7.
This requirement modifies the requirement in section 4 to
“keep intact all notices”.
* **c)** You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
* **d)** If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
“aggregate” if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
### 6. Conveying Non-Source Forms
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
* **a)** Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
* **b)** Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either **(1)** a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or **(2)** access to copy the
Corresponding Source from a network server at no charge.
* **c)** Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
* **d)** Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
* **e)** Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A “User Product” is either **(1)** a “consumer product”, which means any
tangible personal property which is normally used for personal, family,
or household purposes, or **(2)** anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, “normally used” refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
“Installation Information” for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
### 7. Additional Terms
“Additional permissions” are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
* **a)** Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
* **b)** Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
* **c)** Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
* **d)** Limiting the use for publicity purposes of names of licensors or
authors of the material; or
* **e)** Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
* **f)** Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered “further
restrictions” within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
### 8. Termination
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated **(a)**
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and **(b)** permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
### 9. Acceptance Not Required for Having Copies
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
### 10. Automatic Licensing of Downstream Recipients
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
### 11. Patents
A “contributor” is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, “control” includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To “grant” such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either **(1)** cause the Corresponding Source to be so
available, or **(2)** arrange to deprive yourself of the benefit of the
patent license for this particular work, or **(3)** arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. “Knowingly relying” means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is “discriminatory” if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license **(a)** in connection with copies of the covered work
conveyed by you (or copies made from those copies), or **(b)** primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
### 12. No Surrender of Others' Freedom
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
### 13. Remote Network Interaction; Use with the GNU General Public License
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
### 14. Revised Versions of this License
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License “or any later version” applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
### 15. Disclaimer of Warranty
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
### 16. Limitation of Liability
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
### 17. Interpretation of Sections 15 and 16
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
_END OF TERMS AND CONDITIONS_
## How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the “copyright” line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a “Source” link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a “copyright disclaimer” for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
&lt;<http://www.gnu.org/licenses/>&gt;.

View File

@@ -0,0 +1,22 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
## mod-fireworks-on-level
### This is a module for [AzerothCore](http://www.azerothcore.org)
- Latest build status with azerothcore: [![Build Status](https://github.com/azerothcore/mod-fireworks-on-level/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-fireworks-on-level)
#### Features:
- FireWorks on level up for Azerothcore
### This module currently requires:
- AzerothCore v1.0.1+
### How to install
1. Simply place the module under the `modules` folder of your AzerothCore source folder.
2. Re-run cmake and launch a clean build of AzerothCore
3. Copy mod_customserver.conf.dist to mod_customserver.conf
4. Log in game, level up and enjoy.
## Credits
* [stygiancore]( http://stygianthebest.github.io ): (Author of the module):
* AzerothCore: [repository](https://github.com/azerothcore) - [website](http://azerothcore.org/) - [discord chat community](https://discord.gg/PaqQRkd)

View File

@@ -0,0 +1,14 @@
[worldserver]
###################################################################################################
# CUSTOM SERVER
###################################################################################################
# Announce the module when the player logs in?
CustomServer.Announce = 1
# Fireworks go off when the player levels up at specific intervals
# Intervals: 5, 10, 20, 30, 40, 50, 60, 70, 80
# Enable the module? (1: true | 0: false)
CustomServer.FireworkLevels = 1

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
## Set a local git commit template
git config --local commit.template ".git_commit_template.txt" ;

View File

@@ -0,0 +1,5 @@
void AddCustomServerScripts();
void Addmod_fireworks_on_levelScripts() {
AddCustomServerScripts();
}

View File

@@ -0,0 +1,107 @@
/*
# Custom Server Modifications #
#### A module for AzerothCore by [StygianTheBest](https://github.com/StygianTheBest/AzerothCore-Content/tree/master/Modules)
------------------------------------------------------------------------------------------------------------------
### Description ###
------------------------------------------------------------------------------------------------------------------
This module serves as a container for smaller scripts that don't need their own module. I also use it to test
ideas which is quicker and easier than writing a new module.
### Features ###
------------------------------------------------------------------------------------------------------------------
- Firework Level: Shoots fireworks in the air when a player reaches specified levels.
### Data ###
------------------------------------------------------------------------------------------------------------------
- Type: Server/Player
- Script: CustomServer
- Config: Yes
- Enable Module
- Enable Module Announce
- Enable Firework Levels
- SQL: No
### Version ###
------------------------------------------------------------------------------------------------------------------
- v2017.07.14 - Release
- v2017.07.21 - Added Firework Levels
### Credits ###
------------------------------------------------------------------------------------------------------------------
- [Blizzard Entertainment](http://blizzard.com)
- [TrinityCore](https://github.com/TrinityCore/TrinityCore/blob/3.3.5/THANKS)
- [SunwellCore](http://www.azerothcore.org/pages/sunwell.pl/)
- [AzerothCore](https://github.com/AzerothCore/azerothcore-wotlk/graphs/contributors)
- [AzerothCore Discord](https://discord.gg/gkt4y2x)
- [EMUDevs](https://youtube.com/user/EmuDevs)
- [AC-Web](http://ac-web.org/)
- [ModCraft.io](http://modcraft.io/)
- [OwnedCore](http://ownedcore.com/)
- [OregonCore](https://wiki.oregon-core.net/)
- [Wowhead.com](http://wowhead.com)
- [AoWoW](https://wotlk.evowow.com/)
### License ###
------------------------------------------------------------------------------------------------------------------
- This code and content is released under the [GNU AGPL v3](https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3).
*/
#include "Chat.h"
#include "Configuration/Config.h"
#include "Player.h"
#include "ScriptMgr.h"
class CustomServer : public PlayerScript
{
public:
CustomServer() : PlayerScript("CustomServer", {
PLAYERHOOK_ON_LOGIN,
PLAYERHOOK_ON_LEVEL_CHANGED
}) { }
void OnPlayerLogin(Player* player) override
{
// Announce Module
if (sConfigMgr->GetOption<bool>("CustomServer.Announce", true))
ChatHandler(player->GetSession()).SendSysMessage("This server is running the |cff4CFF00Custom Server |rmodule.");
}
void OnPlayerLevelChanged(Player * player, uint8 oldLevel) override
{
// Shoot fireworks into the air when hits a specific level
if (sConfigMgr->GetOption<bool>("CustomServer.FireworkLevels", true))
{
switch (oldLevel) {
case 4:
case 9:
case 14:
case 19:
case 29:
case 39:
case 49:
case 59:
case 69:
case 79:
player->CastSpell(player, 11541, true);
break;
}
}
}
};
void AddCustomServerScripts()
{
new CustomServer();
}

View File

@@ -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
modules/mod-item-upgrade/.gitattributes vendored Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,112 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
# Item upgrades for AzerothCore
## Overview
Adds the possibility to individually upgrade items. **EVERY** stat can be upgraded, provided you enable them in the .conf file and add them in database. Upgrades are rank-based, meaning you can incrementally upgrade each stat, starting with rank 1 to rank n. Players will need to purchase the previous rank in order to advance to the next. Stats that can be upgraded along with their ranks are in reloadable tables, meaning you can add stats and/or ranks, modify or even delete them without restarting the server. Player's upgrades will be updated accordingly after the data is reloaded.
## Limitations
1. Due to the nature of **WOTLK** client, the upgraded **STATS** will only be visible to the owner. Also, items with random properties (like "of the Bear", "of Intellect" etc) will always send the original stats. **This is only visual, stats will be there nonetheless!**
2. You **CAN'T** add or replace stats, you can only upgrade current item's stats.
3. Upgrades will be lost (of course) when trading, sending mail, depositing to guild bank, deposit to auction.
4. Heirlooms can't be upgraded.
## How to install
1. Clone this repository to your AzerothCore repo modules folder. You should now have mod-item-upgrade there.
2. Re-run cmake to generate the solution.
3. Re-build your project.
4. You should have mod_item_upgrade.conf.dist copied in configs/modules after building, copy this to configs/modules in your server's base directory.
5. Start the server, .sql files should automatically be imported in DB, if not, apply them manually.
WARNING: this mod requires at least this version of AzerothCore https://github.com/azerothcore/azerothcore-wotlk/commit/87fbdb7967094f19a00a3e5623115588c689cae6
## How to use
Let's say you want players to be able to upgrade **STAMINA** by 5% and 10% respectively. All you need to do is insert **two** lines in **mod_item_upgrade_stats** table:
* **id** - this is an unique identifier for this stat/rank, just choose the next available id (current maximum + 1), try to keep it consecutive
* **stat_type** - since we want stamina, put 7 for this. This column corresponds to **ItemModType** enum in **ItemTemplate.h**. Consult this enum to find each stat, the enum names should be self-explanatory. **EVERY** stat is allowed for upgrade!
* **stat_mod_pct** - percentage increase for the rank, since we want 5% and 10%, put **5** for first line and **10** for second line.
* **stat_rank** - this **MUST ALWAYS** start with 1 and be consecutive. Each rank **MUST ALWAYS** be an upgrade, meaning **stat_mod_pct** for rank **x** must be **SMALLER** that **stat_mod_pct** for rank **x+1**. So put **1** for the **5%** increase line and **2** for the **10%** increase line. If later you want to add the upgrade possibility to **20%** for stamina, just add another line with **stat_mod_pct** = 20 and **stat_rank** = 3.
Let's say you inserted the two lines and their **id** is 10 (for rank 1) and 11 (for rank 2). Now players are ready to upgrade item's stamina by 5% and 10% respectively. But now they **CAN** do it for free, since these two ranks have no requirements! If you want these ranks to have some requirements, let's use the second table **mod_item_upgrade_stats_req**:
* **id** - this is just an unique identifier with AUTO_INCREMENT, just leave it null and MySQL will generate an id for you
* **stat_id** - this corresponds to **mod_item_upgrade_stats.id**, in our case we have 10 (for rank 1) and 11 (for rank 2).
* **req_type** - type of requirement, this corresponds to **UpgradeStatReqType** enum in **item_upgrade.h**. Possible values:
* 1 - requires **money**
* 2 - requires **honor points**
* 3 - requires **arena points**
* 4 - requires **item(s)**
* 5 - requires **NOTHING**, has no effect whether added or not in this table, should not be used here, only in **mod_item_upgrade_stats_req_override** (see below)
* **req_val1** - based on **req_type**:
* when req_type = 1 (money), then this is a numeric value corresponding to the amount of required **copper** (e.g 10000000 means the rank will require 1000 gold to be bought)
* when req_type = 2 (honor), then this is a numeric value corresponding to how many honor points are required to buy the rank
* when req_type = 3 (arena), then this is a numeric value corresponding to how many arena points are required to buy the rank
* when req_type = 4 (item), then this is the **entry** (see **item_template.entry**) of the required item(s) to buy the rank
* **req_val2** - based on **req_type**:
* **UNUSED** when req_type is not 4
* when req_type = 4 (item), then this is the amount of **req_val1** item(s) required to buy the rank
So let's say you want players to upgrade stamina by 5% for **FREE**, then you don't have to insert anything in this table for **stat_id** 10. But for the 10% increase, you want the players to have 10x Badge of Justice and 1000 honor. So, we need to insert two lines: one with **stat_id** = 11, **req_type** = 2 (honor) and **req_val1** = 1000 and another line with **stat_id** = 11, **req_type** = 4 (item), **req_val1** = 29434 (entry for Badge of Justice) and **req_val2** = 10 (requires 10x badges).
There is some sample data already inserted in these tables.
### Overriding requirements on per item basis
**mod_item_upgrade_stats_req** will be used to globally define requirements for each rank. This means that **EVERY** item will have the same requirements for a certain rank. We can override this behaviour and set requirements for each item individually. For this, use **mod_item_upgrade_stats_req_override** table which has the exact same structure as **mod_item_upgrade_stats_req**, except there is one more field: **item_entry** which is the entry of the item. So simply follow the above procedure to add requirements and simply fill **item_entry** with the entry of the item that you want.
### Allowing and blacklisting items
You can allow or blacklist certain items by using two tables:
* **mod_item_upgrade_allowed_items** - if you add some entries to this table, then **ONLY** these items will be available for upgrade. This is useful when you want to exclude **ALL** items and only add a few that have the possibily to be upgraded.
* **mod_item_upgrade_blacklisted_items** - every item that is added here will no longer be available for upgrading. This is useful when you want to add upgrade possibility to **ALL** items but simply exclude a few.
These two tables have only one column **entry** which corresponds to the entry of the item (**item_template.entry**). You can have the same entry in both allowed and blacklisted tables, in which case the item will become **blacklisted**. If players already bought some upgrades for a certain item and then you decide to **blacklist** that item, then the upgrade will become **inactive** (it will show as inactive in the Upgraded items menu). The upgrade will then become **active** if you decide to remove the blacklist for the item.
### Allowing and blacklisting **ranks** for items
There is the possibility to allow or blacklist **ranks** for certain items. Just like above, two tables are involved:
* **mod_item_upgrade_allowed_stats_items** - link a certain rank (**stat_id**, this points to **mod_item_upgrade_stats.id**) with as many items as you want. If there are records for a certain **stat_id**, this means that **ONLY** these items will be able to gain/use this rank.
* **mod_item_upgrade_blacklisted_stats_items** - If there are records for a certain **stat_id**, this means that these items will no longer be able to gain/use this rank.
### Random upgrades on loot
There are configurable options to automatically upgrade items when players loot them (Titanforging-like system). Maximum possible rank gained by each stat is configurable via **ItemUpgrade.RandomUpgradeMaxRank** option. The chance for an automatic upgrade to occur is configurable via **ItemUpgrade.RandomUpgradeChance**. The maximum number of stats that can be upgraded is also configurable via **ItemUpgrade.RandomUpgradeMaxStatCount**. Stats to be upgraded are chosen **randomly**. Rewarded quest items and items looted via party (need, greed rolls) are also eligible for automatic upgrades.
## Ingame usage
Use .npc add 200003 to spawn the Master Item Upgrade NPC. The rest is self explanatory.
### Editing related tables and hot-reloading data
Everything is reloadable, meaning you can **add** stats and rank(s), **modify** current ranks, **delete** stats and ranks, add **allowed** and **blacklisted** items. The only table that you shouldn't manually modify is **character_item_upgrade**, as the data here will be validated against the main tables and orphaned records will be automatically deleted. However, modifying this table won't cause any harm, and you can actually manually delete or add character upgrades here if you want.
**WARNING**: before starting to edit database, you should **lock** the Gossip NPC so that players can't use it in the meantime. This is **NOT** required but **strongly** advised, in this way players can't buy some upgrades while you can potentially remove them in the background, etc. Locking the NPC is done via **.item_upgrade lock** command or via the **NPC itself** if the player has administrator role (GM level 3). After you locked the NPC and finished editing the database, you can use **.item_upgrade reload** command to reload everything. This will **correctly** refresh everything related to item upgrades for every connected player (stats, visuals) and will refresh the menus for the Gossip NPC.
### Removing upgrades from an item
There is a configuration option that allows players to restore items to their original stats (remove upgrades). You can also configure a **token** (and it's quantity) to be given to the player when purging an upgrade. You **can't** purge individual stats or ranks, there is no point, you can only remove **ALL** upgrades from an item at once.
## Weapon damage upgrades
This module adds the possibility to upgrade weapon damage (physical damage, dps - min/max damage). The system is toggleable via the configuration.
## Some photos
![pic1](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic1.jpg?raw=true)
![pic2](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic2.jpg?raw=true)
![pic3](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic3.jpg?raw=true)
![pic4](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic4.jpg?raw=true)
![pic4_1](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic4_1.jpg?raw=true)
![pic5](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic5.jpg?raw=true)
![pic6](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic6.jpg?raw=true)
![pic7](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic7.jpg?raw=true)
![pic8](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic8.jpg?raw=true)
![pic9](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic9.jpg?raw=true)
![pic10](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic10.jpg?raw=true)
![pic11](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic11.jpg?raw=true)
![pic12](https://github.com/silviu20092/mod-item-upgrade/blob/master/pics/pic12.jpg?raw=true)
## Credits
- silviu20092

View File

@@ -0,0 +1,11 @@
name: core-build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
uses: azerothcore/reusable-workflows/.github/workflows/core_build_modules.yml@main
with:
module_repo: ${{ github.event.repository.name }}

View File

@@ -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

48
modules/mod-item-upgrade/.gitignore vendored Normal file
View File

@@ -0,0 +1,48 @@
!.gitignore
#
#Generic
#
.directory
.mailmap
*.orig
*.rej
*.*~
.hg/
*.kdev*
.DS_Store
CMakeLists.txt.user
*.bak
*.patch
*.diff
*.REMOTE.*
*.BACKUP.*
*.BASE.*
*.LOCAL.*
#
# IDE & other softwares
#
/.settings/
/.externalToolBuilders/*
# exclude in all levels
nbproject/
.sync.ffs_db
*.kate-swp
#
# Eclipse
#
*.pydevproject
.metadata
.gradle
tmp/
*.tmp
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.cproject

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 AzerothCore
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

Some files were not shown because too many files have changed in this diff Show More