mirror of
https://github.com/araxiaonline/mod-guildhouse.git
synced 2026-06-13 02:52:21 -04:00
Upload of module
This commit is contained in:
8
.editorconfig
Normal file
8
.editorconfig
Normal 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
|
||||
49
.git_commit_template.txt
Normal file
49
.git_commit_template.txt
Normal 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.
|
||||
## =======================================================
|
||||
105
.gitattributes
vendored
Normal file
105
.gitattributes
vendored
Normal 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
|
||||
48
.gitignore
vendored
Normal file
48
.gitignore
vendored
Normal 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
|
||||
7
CMakeLists.txt
Normal file
7
CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
AC_ADD_SCRIPT("${CMAKE_CURRENT_LIST_DIR}/src/mod_guild_house_v2.cpp")
|
||||
AC_ADD_SCRIPT("${CMAKE_CURRENT_LIST_DIR}/src/mod_guild_house_npc.cpp")
|
||||
|
||||
AC_ADD_SCRIPT_LOADER("GuildHouseV2" "${CMAKE_CURRENT_LIST_DIR}/src/loader.h")
|
||||
AC_ADD_SCRIPT_LOADER("GuildHouseV2NPC" "${CMAKE_CURRENT_LIST_DIR}/src/loader.h")
|
||||
|
||||
AC_ADD_CONFIG_FILE("${CMAKE_CURRENT_LIST_DIR}/conf/mod_guild_house_v2.conf.dist")
|
||||
52
README.md
Normal file
52
README.md
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
# Guild House Module
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
This is a phased guild house system for Azerothcore, it allows players to from the same guild to visit their guild house to explore, train ect
|
||||
All guilds will get their own phasing system which then the guild master will have to purchase NPC's creatures and other stuff to complete the creation.
|
||||
|
||||
|
||||
## How to use ingame
|
||||
Once a player has brought a guild house from the NPC they can either teleport to the guildhouse by via the NPC or do .guildhouse tele
|
||||
|
||||
Once the player is in the location of the guild house the guild master has a command .guildhouse spawnnpc this will allow the guild master
|
||||
to start placing objects / npc within the guild house.
|
||||
|
||||
## Requirements
|
||||
|
||||
My new module requires:
|
||||
|
||||
- AzerothCore v1.0.1+
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
1) Simply place the module under the `modules` directory of your AzerothCore source.
|
||||
2) Import the SQL manually to the right Database (auth, world or characters)
|
||||
3) Apply the guildhouse.patch to your source
|
||||
4) Re-run cmake and launch a clean build of AzerothCore.
|
||||
```
|
||||
## Patch Information
|
||||
|
||||
The patch basicly turns the selected area from a bitmask to a uint, this fixes the issues with the phasing
|
||||
|
||||
Before Patch :
|
||||
Guild 1 Can see phase 1
|
||||
Guild 2 Can see phase 2
|
||||
Guild 3 Can See Guild 1 & 2
|
||||
|
||||
After Patch:
|
||||
All guilds will now have a seperate phase for the area 876 (GM Island)
|
||||
|
||||
## 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), copy `mod_guild_house_v2.conf.dist` to `mod_guild_house_v2.conf` and edit that new file.
|
||||
|
||||
## Credits
|
||||
|
||||
* [Me](https://github.com/talamortis) (author of the module)
|
||||
* [Rochet2](https://github.com/Rochet2/): Thanks for the help with the phasing situation & General support
|
||||
|
||||
AzerothCore: [repository](https://github.com/azerothcore) - [website](http://azerothcore.org/) - [discord chat community](https://discord.gg/PaqQRkd)
|
||||
71
conf/mod_guild_house_v2.conf.dist
Normal file
71
conf/mod_guild_house_v2.conf.dist
Normal file
@@ -0,0 +1,71 @@
|
||||
[worldserver]
|
||||
|
||||
# CostGuildHouse
|
||||
#
|
||||
# The amount of money to buy a guild house
|
||||
# default = 10000000 (1000g)
|
||||
#
|
||||
CostGuildHouse = 10000000
|
||||
|
||||
# GuildHouseMailbox
|
||||
#
|
||||
# The amount of money to buy a mail box for your guild house
|
||||
# default = 500000 (50g)
|
||||
#
|
||||
GuildHouseMailbox = 500000
|
||||
|
||||
# GuildHouseInnKeeper
|
||||
#
|
||||
# The amount of money to buy a Innkeeper for your guild house
|
||||
# default = 1000000 (100g)
|
||||
#
|
||||
GuildHouseInnKeeper = 1000000
|
||||
|
||||
# GuildHouseBank
|
||||
#
|
||||
# The amount of money to buy a bank for your guild house
|
||||
# default = 1000000 (100g)
|
||||
#
|
||||
GuildHouseBank = 1000000
|
||||
|
||||
# GuildHouseAuctioneer
|
||||
#
|
||||
# The amount of money to buy a Auctioneer for your guild house
|
||||
# default = 1000000 (100g)
|
||||
#
|
||||
GuildHouseAuctioneer = 1000000
|
||||
|
||||
# GuildHouseTrainerCost
|
||||
#
|
||||
# The amount of money to buy each class trainer for your guild house
|
||||
# default = 1000000 (100g)
|
||||
#
|
||||
GuildHouseTrainerCost = 1000000
|
||||
|
||||
# GuildHouseVendor
|
||||
#
|
||||
# The amount of money to buy vender for your guild house such as Trade supplies | Tabard Vendor
|
||||
# default = 500000 (50g)
|
||||
#
|
||||
GuildHouseVendor = 500000
|
||||
|
||||
# GuildHouseObject
|
||||
#
|
||||
# The amount of money to buy an object for your guild house such as Barber chair | guild vault
|
||||
# default = 500000 (50g)
|
||||
#
|
||||
GuildHouseObject = 500000
|
||||
|
||||
# GuildHousePortal
|
||||
#
|
||||
# The amount of money to buy an portal for your guild house
|
||||
# default = 1000000 (100g)
|
||||
#
|
||||
GuildHousePortal = 1000000
|
||||
|
||||
# GuildHouseProff
|
||||
#
|
||||
# Cost of profession vendors within the guild.
|
||||
# default = 500000 (50g)
|
||||
#
|
||||
GuildHouseProff = 500000
|
||||
0
include.sh
Normal file
0
include.sh
Normal file
4
setup_git_commit_template.sh
Normal file
4
setup_git_commit_template.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Set a local git commit template
|
||||
git config --local commit.template ".git_commit_template.txt" ;
|
||||
24
sql/README.md
Normal file
24
sql/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# BEST PRACTICES
|
||||
|
||||
## Create a new table
|
||||
|
||||
**Example:**
|
||||
```
|
||||
CREATE TABLE IF NOT EXISTS `table`(
|
||||
`id` int(11) unsigned NOT NULL,
|
||||
`active` BOOLEAN DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
```
|
||||
|
||||
**Boolean datatype in mysql:**
|
||||
Use "TinyInt(1)"" or "Boolean" (this is the same thing)
|
||||
|
||||
"bit(1)" can also work, but it may require a syntax like b'(0) and b'(1) when inserting (not sure).
|
||||
|
||||
If there are multiple booleans in the same table, bit(1) is better, otherwise it's the same result.
|
||||
|
||||
|
||||
## Resources
|
||||
|
||||
https://www.w3schools.com/sql/sql_datatypes.asp
|
||||
0
sql/auth/.gitkeep
Normal file
0
sql/auth/.gitkeep
Normal file
0
sql/characters/.gitkeep
Normal file
0
sql/characters/.gitkeep
Normal file
30
sql/characters/guild_house.sql
Normal file
30
sql/characters/guild_house.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
-- --------------------------------------------------------
|
||||
-- Host: 127.0.0.1
|
||||
-- Server version: 5.6.28 - MySQL Community Server (GPL)
|
||||
-- Server OS: Win64
|
||||
-- HeidiSQL Version: 9.4.0.5125
|
||||
-- --------------------------------------------------------
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
|
||||
-- Dumping structure for table acore_char.guild_house
|
||||
CREATE TABLE IF NOT EXISTS `guild_house` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`guild` int(11) NOT NULL DEFAULT '0',
|
||||
`phase` int(11) NOT NULL,
|
||||
`map` int(11) NOT NULL DEFAULT '0',
|
||||
`positionX` float NOT NULL DEFAULT '0',
|
||||
`positionY` float NOT NULL DEFAULT '0',
|
||||
`positionZ` float NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `guild` (`guild`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Data exporting was unselected.
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
0
sql/world/.gitkeep
Normal file
0
sql/world/.gitkeep
Normal file
5
sql/world/Creatures.sql
Normal file
5
sql/world/Creatures.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
REPLACE INTO `creature_template` VALUES (70101, 0, 0, 0, 0, 0, 25901, 0, 0, 0, 'Talamortis', 'Guild House Seller', '', 0, 35, 35, 0, 12, 1, 1, 1.14286, 1, 0, 49, 64, 0, 118, 1, 2000, 2000, 1, 33536, 2048, 0, 0, 0, 0, 0, 0, 33, 49, 11, 7, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 1, 1, 0, 0, 1, 0, 0, 'GuildHouseSeller', 12340),
|
||||
(18649, 0, 0, 0, 0, 0, 18234, 0, 0, 0, 'Innkeeper Monica', NULL, NULL, 0, 1, 2, 0, 35, 65537, 0.8, 0.28571, 1, 0, 2, 2, 0, 26, 4.6, 2000, 1900, 1, 0, 2048, 0, 0, 0, 0, 0, 0, 1, 1, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 1, 1, 0, 70, 1, 0, 2, 'npc_innkeeper', 12340),
|
||||
(33251, 0, 0, 0, 0, 0, 28516, 0, 0, 0, 'Death Knight Trainer', '', '', 9691, 80, 80, 2, 35, 51, 1, 1.14286, 1, 1, 422, 586, 0, 642, 7.5, 2000, 2000, 1, 32768, 2048, 0, 0, 0, 0, 6, 0, 345, 509, 103, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 10, 1, 1, 0, 0, 1, 8388624, 0, '', 12340),
|
||||
(70102, 0, 0, 0, 0, 0, 25901, 0, 0, 0, 'Speedfang', 'Guild House Assistant', '', 0, 35, 35, 0, 12, 1, 1, 1.14286, 1, 0, 49, 64, 0, 118, 1, 2000, 2000, 1, 33536, 2048, 0, 0, 0, 0, 0, 0, 33, 49, 11, 7, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 1, 1, 0, 0, 1, 0, 0, 'GuildHouseSpawner', 12340);
|
||||
|
||||
100
sql/world/guild_house_spawns.sql
Normal file
100
sql/world/guild_house_spawns.sql
Normal file
@@ -0,0 +1,100 @@
|
||||
-- --------------------------------------------------------
|
||||
-- Host: 127.0.0.1
|
||||
-- Server version: 5.6.28 - MySQL Community Server (GPL)
|
||||
-- Server OS: Win64
|
||||
-- HeidiSQL Version: 9.4.0.5125
|
||||
-- --------------------------------------------------------
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
|
||||
-- Dumping structure for table acore_char.guild_house
|
||||
CREATE TABLE IF NOT EXISTS `guild_house` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`guild` int(11) NOT NULL DEFAULT '0',
|
||||
`phase` int(11) NOT NULL,
|
||||
`map` int(11) NOT NULL DEFAULT '0',
|
||||
`positionX` float NOT NULL DEFAULT '0',
|
||||
`positionY` float NOT NULL DEFAULT '0',
|
||||
`positionZ` float NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `guild` (`guild`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Dumping data for table acore_char.guild_house: ~2 rows (approximately)
|
||||
/*!40000 ALTER TABLE `guild_house` DISABLE KEYS */;
|
||||
REPLACE INTO `guild_house` (`id`, `guild`, `phase`, `map`, `positionX`, `positionY`, `positionZ`) VALUES
|
||||
(19, 1, 1, 1, 16226.1, 16258, 13.2576),
|
||||
(23, 2, 2, 1, 16226.1, 16258, 13.2576);
|
||||
/*!40000 ALTER TABLE `guild_house` ENABLE KEYS */;
|
||||
|
||||
-- Dumping structure for table acore_world.guild_house_spawns
|
||||
CREATE TABLE IF NOT EXISTS `guild_house_spawns` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`entry` int(11) NOT NULL DEFAULT '0',
|
||||
`posX` float NOT NULL DEFAULT '0',
|
||||
`posY` float NOT NULL DEFAULT '0',
|
||||
`posZ` float NOT NULL DEFAULT '0',
|
||||
`orientation` float NOT NULL DEFAULT '0',
|
||||
`comment` varchar(500) DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `entry` (`entry`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Dumping data for table acore_world.guild_house_spawns: ~29 rows (approximately)
|
||||
/*!40000 ALTER TABLE `guild_house_spawns` DISABLE KEYS */;
|
||||
REPLACE INTO `guild_house_spawns` (`id`, `entry`, `posX`, `posY`, `posZ`, `orientation`, `comment`) VALUES
|
||||
(1, 26327, 16216.5, 16279.4, 20.9306, 0.552869, 'Paladin Trainer'),
|
||||
(2, 26324, 16221.3, 16275.7, 20.9285, 1.37363, 'Druid Trainer'),
|
||||
(3, 26325, 16218.6, 16277, 20.9872, 0.967188, 'Hunter Trainer'),
|
||||
(4, 26326, 16224.9, 16274.9, 20.9319, 1.58765, 'Mage Trainer'),
|
||||
(5, 26328, 16227.9, 16275.9, 20.9254, 1.9941, 'Priest Trainer'),
|
||||
(6, 26329, 16231.4, 16278.1, 20.9222, 2.20026, 'Rogue Trainer'),
|
||||
(7, 26330, 16235.5, 16280.8, 20.9257, 2.18652, 'Shaman Trainer'),
|
||||
(8, 26331, 16240.8, 16283.3, 20.9299, 1.86843, 'Warlock Trainer'),
|
||||
(9, 26332, 16246.6, 16284.5, 20.9301, 1.68975, 'Warrior Trainer'),
|
||||
(10, 18649, 16224.1, 16284.2, 13.1755, 4.65225, 'Inkeeper'),
|
||||
(11, 30605, 16238.2, 16291.8, 22.9306, 1.55386, 'Banker'),
|
||||
(12, 33251, 16252.3, 16284.9, 20.9324, 1.79537, 'Death Knight Trainer'),
|
||||
(13, 33609, 16220.5, 16302.3, 13.176, 6.14647, 'Blacksmithing Trainer'),
|
||||
(14, 33617, 16220.2, 16299.6, 13.178, 6.22894, 'Mining Trainer'),
|
||||
(15, 33611, 16219.8, 16296.9, 13.1746, 6.24465, 'Engineering Trainer'),
|
||||
(16, 33614, 16222.4, 16293, 13.1813, 1.51263, 'Jewelcrafting Trainer'),
|
||||
(17, 33610, 16227.5, 16292.3, 13.1839, 1.49691, 'Enchanting Trainer'),
|
||||
(18, 33615, 16231.6, 16301, 13.1757, 3.07372, 'Inscription Trainer'),
|
||||
(19, 33612, 16231.2, 16295, 13.1761, 3.06574, 'Leatherworking Trainer'),
|
||||
(20, 33618, 16228.9, 16304.7, 13.1819, 4.64831, 'Skinning Trainer'),
|
||||
(21, 33608, 16218.1, 16281.8, 13.1756, 6.1975, 'Alchemy Trainer'),
|
||||
(22, 33616, 16218.3, 16284.3, 13.1756, 6.1975, 'Herbalism Trainer'),
|
||||
(23, 33613, 16220.4, 16278.7, 13.1756, 1.46157, 'Tailoring Trainer'),
|
||||
(24, 33621, 16225, 16310.9, 29.262, 6.22119, 'First Aid Trainer'),
|
||||
(25, 33623, 16225.3, 16313.9, 29.262, 6.28231, 'Fishing Trainer'),
|
||||
(26, 33619, 16227, 16278, 13.1762, 1.4872, 'Cooking Trainer'),
|
||||
(27, 8719, 16242, 16291.6, 22.9311, 1.52061, 'Alliance Auctioneer'),
|
||||
(30, 9856, 16242, 16291.6, 22.9311, 1.52061, 'Horde Auctioneer'),
|
||||
(31, 184137, 16220.3, 16272, 12.9736, 4.45592, 'Mailbox (Object)'),
|
||||
(33, 1685, 16253.8, 16294.3, 13.1758, 6.11938, 'Forge (Object)'),
|
||||
(34, 4087, 16254.4, 16298.7, 13.1758, 3.36027, 'Anvil (Object)'),
|
||||
(36, 183325, 16214.8, 16218, 1.11903, 1.35357, 'Portal: Stormwind (Object)'),
|
||||
(37, 183323, 16214.8, 16218, 1.11903, 1.35357, 'Portal: Orgrimmar (Object)'),
|
||||
(38, 183322, 16222.8, 16216.9, 1.22016, 1.57937, 'Portal: Ironforge (Object)'),
|
||||
(39, 183327, 16222.8, 16216.9, 1.22016, 1.57937, 'Portal: Undercity (Object)'),
|
||||
(40, 183317, 16202.1, 16223.1, 1.03401, 0.829316, 'Portal: Darnassus (Object)'),
|
||||
(41, 183326, 16202.1, 16223.1, 1.03401, 0.829316, 'Portal: Thunder Bluff (Object)'),
|
||||
(42, 183324, 16196.8, 16227.5, 1.37206, 0.762557, 'Portal: Silvermoon (Object)'),
|
||||
(43, 183321, 16196.8, 16227.5, 1.37206, 0.762557, 'Portal: Exodar (Object)'),
|
||||
(44, 191164, 16206, 16216, 1.10669, 1.0453, 'Portal: Dalaran (Object)'),
|
||||
(45, 187293, 16230.5, 16283.5, 13.9061, 3, 'Guild Vault (Object)'),
|
||||
(46, 28692, 16230.2, 16316.4, 20.8455, 6.25643, 'Trade Supplies'),
|
||||
(48, 28776, 16236.3, 16316.1, 20.8454, 3.06771, 'Tabard Vendor'),
|
||||
(49, 29715, 16223.7, 16293.3, 20.852, 4.57958, 'Food & Drink'),
|
||||
(50, 191028, 16255.5, 16304.9, 20.9785, 2.97516, 'Barber Chair (Object)');
|
||||
|
||||
/*!40000 ALTER TABLE `guild_house_spawns` ENABLE KEYS */;
|
||||
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
2
src/loader.h
Normal file
2
src/loader.h
Normal file
@@ -0,0 +1,2 @@
|
||||
void AddGuildHouseV2Scripts();
|
||||
void AddGuildHouseV2NPCScripts();
|
||||
361
src/mod_guild_house_npc.cpp
Normal file
361
src/mod_guild_house_npc.cpp
Normal file
@@ -0,0 +1,361 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Configuration/Config.h"
|
||||
#include "Creature.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "Define.h"
|
||||
#include "GossipDef.h"
|
||||
#include "DataMap.h"
|
||||
#include "GameObject.h"
|
||||
#include "Transport.h"
|
||||
|
||||
int cost, GuildHouseInnKeeper, GuildHouseBank, GuildHouseMailBox, GuildHouseAuctioneer, GuildHouseTrainer, GuildHouseVendor, GuildHouseObject, GuildHousePortal, GuildHouseProff;
|
||||
|
||||
class GuildHouseSpawner : public CreatureScript {
|
||||
|
||||
public:
|
||||
GuildHouseSpawner() : CreatureScript("GuildHouseSpawner") { }
|
||||
|
||||
bool OnGossipHello(Player *player, Creature * creature)
|
||||
{
|
||||
|
||||
if (player->GetGuild())
|
||||
{
|
||||
if (player->GetGuild()->GetLeaderGUID() != player->GetGUID())
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("You are not the guild leader, sorry i cant do business with you");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("You are not in a guild!");
|
||||
return false;
|
||||
}
|
||||
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TALK, "Spawn Innkeeper", GOSSIP_SENDER_MAIN, 18649, "Add a Innkeeper?", GuildHouseInnKeeper, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TALK, "Spawn Mailbox", GOSSIP_SENDER_MAIN, 184137, "Spawn a mailbox?", GuildHouseMailBox, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, "Spawn Class Trainer", GOSSIP_SENDER_MAIN, 2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, "Spawn Vendor", GOSSIP_SENDER_MAIN, 3);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TALK, "Spawn City Portals / Objects", GOSSIP_SENDER_MAIN, 4);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Spawn Bank", GOSSIP_SENDER_MAIN, 30605, "Spawn banker?", GuildHouseBank, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Spawn Auctioneer", GOSSIP_SENDER_MAIN, 6, "Spawn auctioneer", GuildHouseAuctioneer, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, "Spawn Primary Profession Trainers", GOSSIP_SENDER_MAIN, 7);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, "Spawn Secondry Profession Trainers", GOSSIP_SENDER_MAIN, 8);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player *player, Creature * m_creature, uint32 sender, uint32 action)
|
||||
{
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case 2: // spawn class trainer
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Death Knight", GOSSIP_SENDER_MAIN, 33251, "Spawn Death Knight Trainer?", GuildHouseTrainer, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Druid", GOSSIP_SENDER_MAIN, 26324, "Spawn Druid Trainer?", GuildHouseTrainer, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Hunter", GOSSIP_SENDER_MAIN, 26325, "Spawn Hunter Trainer?", GuildHouseTrainer, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Mage", GOSSIP_SENDER_MAIN, 26326, "Spawn Mage Trainer?", GuildHouseTrainer, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Paladin", GOSSIP_SENDER_MAIN, 26327, "Spawn Paladin Trainer?", GuildHouseTrainer, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Priest", GOSSIP_SENDER_MAIN, 26328, "Spawn Priest Trainer?", GuildHouseTrainer, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Rogue", GOSSIP_SENDER_MAIN, 26329, "Spawn Rogue Trainer?", GuildHouseTrainer, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Shaman", GOSSIP_SENDER_MAIN, 26330, "Spawn Shaman Trainer?", GuildHouseTrainer, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Warlock", GOSSIP_SENDER_MAIN, 26331, "Spawn Warlock Trainer?", GuildHouseTrainer, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Warrior", GOSSIP_SENDER_MAIN, 26332, "Spawn Warrior Trainer?", GuildHouseTrainer, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Go Back!", GOSSIP_SENDER_MAIN, 9);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, m_creature->GetGUID());
|
||||
break;
|
||||
case 3: // Vendors
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TALK, "Trade Supplies", GOSSIP_SENDER_MAIN, 28692, "Spawn Trade Supplies?", GuildHouseVendor, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TALK, "Tabard Vendor", GOSSIP_SENDER_MAIN, 28776, "Spawn Tabard Vendor?", GuildHouseVendor, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TALK, "Food & Drink", GOSSIP_SENDER_MAIN, 29715, "Spawn Food & Drink?", GuildHouseVendor, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Go Back!", GOSSIP_SENDER_MAIN, 9);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, m_creature->GetGUID());
|
||||
break;
|
||||
case 4: //objects / portals
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TALK, "Forge", GOSSIP_SENDER_MAIN, 1685, "Add a forge?", GuildHouseObject, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TALK, "Anvil", GOSSIP_SENDER_MAIN, 4087, "Add a Anvil?", GuildHouseObject, false);
|
||||
if (player->GetTeamId() == TEAM_ALLIANCE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TAXI, "Portal: Stormwind", GOSSIP_SENDER_MAIN, 183325, "Add Stormwind Portal?", GuildHousePortal, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TAXI, "Portal: Ironforge", GOSSIP_SENDER_MAIN, 183322, "Add Ironforge Portal?", GuildHousePortal, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TAXI, "Portal: Darnassus", GOSSIP_SENDER_MAIN, 183317, "Add Darnassus Portal?", GuildHousePortal, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TAXI, "Portal: Exodar", GOSSIP_SENDER_MAIN, 183321, "Add Exodar Portal?", GuildHousePortal, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TAXI, "Portal: Orgrimmar", GOSSIP_SENDER_MAIN, 183323, "Add Orgrimmar Portal?", GuildHousePortal, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TAXI, "Portal: Undercity", GOSSIP_SENDER_MAIN, 183327, "Add Undercity Portal?", GuildHousePortal, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TAXI, "Portal: Thunderbluff", GOSSIP_SENDER_MAIN, 183326, "Add Thunderbuff Portal?", GuildHousePortal, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TAXI, "Portal: Silvermoon", GOSSIP_SENDER_MAIN, 183324, "Add Silvermoon Portal?", GuildHousePortal, false);
|
||||
}
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TAXI, "Portal: Dalaran", GOSSIP_SENDER_MAIN, 191164, "Add Dalaran Portal?", GuildHousePortal, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Guild Vault", GOSSIP_SENDER_MAIN, 187293, "Add Guild Vault?", GuildHouseObject, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_INTERACT_1, "Barber Chair", GOSSIP_SENDER_MAIN, 191028, "Add a Barber Chair?", GuildHouseObject, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Go Back!", GOSSIP_SENDER_MAIN, 9);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, m_creature->GetGUID());
|
||||
break;
|
||||
break;
|
||||
case 6: // Auctioneer
|
||||
{
|
||||
uint32 auctioneer = 0;
|
||||
auctioneer = player->GetTeamId() == TEAM_ALLIANCE ? 8719 : 9856;
|
||||
SpawnNPC(auctioneer, player);
|
||||
break;
|
||||
}
|
||||
case 7: // spawn proffession trainers
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Alchemy Trainer", GOSSIP_SENDER_MAIN, 33608, "Spawn Alchemy Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Blacksmithing Trainer", GOSSIP_SENDER_MAIN, 33609, "Spawn Blacksmithing Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Enchanting Trainer", GOSSIP_SENDER_MAIN, 33610, "Spawn Enchanting Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Engineering Trainer", GOSSIP_SENDER_MAIN, 33611, "Spawn Engineering Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Tailoring Trainer", GOSSIP_SENDER_MAIN, 33613, "Spawn Tailoring Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Leatherworking Trainer", GOSSIP_SENDER_MAIN, 33612, "Spawn Leatherworking Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Jewlelcrafing Trainer", GOSSIP_SENDER_MAIN, 33614, "Spawn Jewelcrafting Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Inscription Trainer", GOSSIP_SENDER_MAIN, 33615, "Spawn Inscription Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Skinning Trainer", GOSSIP_SENDER_MAIN, 33618, "Spawn Skinning Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Mining Trainer", GOSSIP_SENDER_MAIN, 33617, "Spawn Mining Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TRAINER, "Herbalism Trainer", GOSSIP_SENDER_MAIN, 33616, "Spawn Herbalism Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Go Back!", GOSSIP_SENDER_MAIN, 9);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, m_creature->GetGUID());
|
||||
break;
|
||||
case 8: // secondry proff trainers
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "First Aid Trainer", GOSSIP_SENDER_MAIN, 33621, "Spawn Fist Aid Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Fishing Trainer", GOSSIP_SENDER_MAIN, 33623, "Spawn Fishing Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "Cooking Trainer", GOSSIP_SENDER_MAIN, 33619, "Spawn Cooking Trainer?", GuildHouseProff, false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Go Back!", GOSSIP_SENDER_MAIN, 9);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, m_creature->GetGUID());
|
||||
break;
|
||||
case 9: // go back!
|
||||
OnGossipHello(player, m_creature);
|
||||
break;
|
||||
case 10: //PVP toggle
|
||||
break;
|
||||
case 30605: // Banker
|
||||
cost = GuildHouseBank;
|
||||
SpawnNPC(action, player);
|
||||
break;
|
||||
case 18649: // Innkeeper
|
||||
cost = GuildHouseInnKeeper;
|
||||
SpawnNPC(action, player);
|
||||
break;
|
||||
case 26327: // Paladin
|
||||
case 26324: // Druid
|
||||
case 26325: // Hunter
|
||||
case 26326: // Mage
|
||||
case 26328: // Priest.
|
||||
case 26329: // Rogue
|
||||
case 26330: // Shaman
|
||||
case 26331: // Warlock
|
||||
case 26332: // Warrior
|
||||
case 33251: // Death Knight
|
||||
cost = GuildHouseTrainer;
|
||||
SpawnNPC(action, player);
|
||||
break;
|
||||
case 33609: // Blacksmithing
|
||||
case 33617: // Mining
|
||||
case 33611: // Engineering
|
||||
case 33614: // Jewelcrafting
|
||||
case 33610: // Enchanting
|
||||
case 33615: // Inscription
|
||||
case 33612: // Leatherworking
|
||||
case 33618: // Skinning
|
||||
case 33608: // Alchemy
|
||||
case 33616: // Herbalism
|
||||
case 33613: // Tailoring
|
||||
case 33619: // Cooking
|
||||
case 33623: // Fishing
|
||||
case 33621: // First Aid
|
||||
cost = GuildHouseProff;
|
||||
SpawnNPC(action, player);
|
||||
break;
|
||||
case 28692: // Trade supplies
|
||||
case 28776: // Tabard Vendor
|
||||
case 29715: // Food & Drink
|
||||
cost = GuildHouseProff;
|
||||
SpawnNPC(action, player);
|
||||
break;
|
||||
//
|
||||
// Objects
|
||||
//
|
||||
case 184137: // mailbox
|
||||
cost = GuildHouseMailBox;
|
||||
SpawnObject(action, player);
|
||||
break;
|
||||
case 1685: // forge
|
||||
case 4087: // Anvil
|
||||
case 187293: // Guild Vault
|
||||
case 191028: // Barber Chair
|
||||
cost = GuildHouseObject;
|
||||
SpawnObject(action, player);
|
||||
break;
|
||||
case 183325: // Stormwind Portal
|
||||
case 183323: // Orgrimmar Portal
|
||||
case 183322: // Ironforge Portal
|
||||
case 183327: // Undercity Portal
|
||||
case 183317: // Darnassus Portal
|
||||
case 183326: // Thunder bluff portal
|
||||
case 183324: // Silvermoon Portal
|
||||
case 183321: // Exodar Portal
|
||||
case 191164: // Dalaran Portal
|
||||
cost = GuildHousePortal;
|
||||
SpawnObject(action, player);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void SpawnNPC(uint32 entry, Player* player)
|
||||
{
|
||||
if (player->FindNearestCreature(entry, VISIBILITY_RANGE, true))
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("You already have this creature!");
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
return;
|
||||
}
|
||||
|
||||
float posX;
|
||||
float posY;
|
||||
float posZ;
|
||||
float ori;
|
||||
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT `posX`, `posY`, `posZ`, `orientation` FROM `guild_house_spawns` WHERE `entry` = %u", entry);
|
||||
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
posX = fields[0].GetFloat();
|
||||
posY = fields[1].GetFloat();
|
||||
posZ = fields[2].GetFloat();
|
||||
ori = fields[3].GetFloat();
|
||||
|
||||
} while (result->NextRow());
|
||||
|
||||
Creature* creature = new Creature();
|
||||
|
||||
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), player->GetMap(), player->GetPhaseMask(), entry, 0, posX,posY, posZ, ori))
|
||||
{
|
||||
delete creature;
|
||||
return;
|
||||
}
|
||||
creature->SaveToDB(player->GetMapId(), (1 << player->GetMap()->GetSpawnMode()), player->GetPhaseMask());
|
||||
uint32 db_guid = creature->GetDBTableGUIDLow();
|
||||
|
||||
creature->CleanupsBeforeDelete();
|
||||
delete creature;
|
||||
creature = new Creature();
|
||||
if (!creature->LoadCreatureFromDB(db_guid, player->GetMap()))
|
||||
{
|
||||
delete creature;
|
||||
return;
|
||||
}
|
||||
|
||||
sObjectMgr->AddCreatureToGrid(db_guid, sObjectMgr->GetCreatureData(db_guid));
|
||||
player->ModifyMoney(-cost);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
}
|
||||
|
||||
void SpawnObject(uint32 entry, Player* player)
|
||||
{
|
||||
float posX;
|
||||
float posY;
|
||||
float posZ;
|
||||
float ori;
|
||||
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT `posX`, `posY`, `posZ`, `orientation` FROM `guild_house_spawns` WHERE `entry` = %u", entry);
|
||||
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
posX = fields[0].GetFloat();
|
||||
posY = fields[1].GetFloat();
|
||||
posZ = fields[2].GetFloat();
|
||||
ori = fields[3].GetFloat();
|
||||
|
||||
} while (result->NextRow());
|
||||
|
||||
if (player->FindNearestGameObject(entry, VISIBLE_RANGE))
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("You already have this object!");
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 objectId = entry;
|
||||
if (!objectId)
|
||||
return;
|
||||
|
||||
const GameObjectTemplate* objectInfo = sObjectMgr->GetGameObjectTemplate(objectId);
|
||||
|
||||
if (!objectInfo)
|
||||
return;
|
||||
|
||||
if (objectInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(objectInfo->displayId))
|
||||
return ;
|
||||
|
||||
GameObject* object = sObjectMgr->IsGameObjectStaticTransport(objectInfo->entry) ? new StaticTransport() : new GameObject();
|
||||
uint32 guidLow = sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT);
|
||||
|
||||
if (!object->Create(guidLow, objectInfo->entry, player->GetMap(), player->GetPhaseMask(), posX, posY, posZ, ori, G3D::Quat(), 0, GO_STATE_READY))
|
||||
{
|
||||
delete object;
|
||||
return;
|
||||
}
|
||||
|
||||
// fill the gameobject data and save to the db
|
||||
object->SaveToDB(player->GetMapId(), (1 << player->GetMap()->GetSpawnMode()), player->GetPhaseMask());
|
||||
// delete the old object and do a clean load from DB with a fresh new GameObject instance.
|
||||
// this is required to avoid weird behavior and memory leaks
|
||||
delete object;
|
||||
|
||||
object = sObjectMgr->IsGameObjectStaticTransport(objectInfo->entry) ? new StaticTransport() : new GameObject();
|
||||
// this will generate a new guid if the object is in an instance
|
||||
if (!object->LoadGameObjectFromDB(guidLow, player->GetMap()))
|
||||
{
|
||||
delete object;
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: is it really necessary to add both the real and DB table guid here ?
|
||||
sObjectMgr->AddGameobjectToGrid(guidLow, sObjectMgr->GetGOData(guidLow));
|
||||
player->ModifyMoney(-cost);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
}
|
||||
};
|
||||
|
||||
class GuildHouseNPCConf : public WorldScript
|
||||
{
|
||||
public:
|
||||
GuildHouseNPCConf() : WorldScript("GuildHouseNPCConf") {}
|
||||
|
||||
void OnBeforeConfigLoad(bool reload) override
|
||||
{
|
||||
GuildHouseInnKeeper = sConfigMgr->GetIntDefault("GuildHouseInnKeeper", 1000000);
|
||||
GuildHouseBank = sConfigMgr->GetIntDefault("GuildHouseBank", 1000000);
|
||||
GuildHouseMailBox = sConfigMgr->GetIntDefault("GuildHouseMailbox", 500000);
|
||||
GuildHouseAuctioneer = sConfigMgr->GetIntDefault("GuildHouseAuctioneer", 500000);
|
||||
GuildHouseTrainer = sConfigMgr->GetIntDefault("GuildHouseTrainerCost", 1000000);
|
||||
GuildHouseVendor = sConfigMgr->GetIntDefault("GuildHouseVendor", 500000);
|
||||
GuildHouseObject = sConfigMgr->GetIntDefault("GuildHouseObject", 500000);
|
||||
GuildHousePortal = sConfigMgr->GetIntDefault("GuildHousePortal", 500000);
|
||||
GuildHouseProff = sConfigMgr->GetIntDefault("GuildHouseProff", 500000);
|
||||
}
|
||||
};
|
||||
|
||||
void AddGuildHouseV2NPCScripts()
|
||||
{
|
||||
new GuildHouseSpawner();
|
||||
new GuildHouseNPCConf();
|
||||
}
|
||||
385
src/mod_guild_house_v2.cpp
Normal file
385
src/mod_guild_house_v2.cpp
Normal file
@@ -0,0 +1,385 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Configuration/Config.h"
|
||||
#include "Creature.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "Define.h"
|
||||
#include "GossipDef.h"
|
||||
#include "DataMap.h"
|
||||
#include "GameObject.h"
|
||||
#include "Transport.h"
|
||||
|
||||
class GuildData : public DataMap::Base
|
||||
{
|
||||
public:
|
||||
GuildData() {}
|
||||
GuildData(uint32 phase, float posX, float posY, float posZ) : phase(phase), posX(posX), posY(posY), posZ(posZ) {}
|
||||
uint32 phase;
|
||||
float posX;
|
||||
float posY;
|
||||
float posZ;
|
||||
};
|
||||
|
||||
class GuildHelper : public GuildScript{
|
||||
|
||||
public:
|
||||
|
||||
GuildHelper() : GuildScript("GuildHelper") { }
|
||||
|
||||
void OnCreate(Guild* guild, Player* leader, const std::string& name)
|
||||
{
|
||||
ChatHandler(leader->GetSession()).PSendSysMessage("You now own a guild. You can purchase a guild house!");
|
||||
}
|
||||
|
||||
void OnGuildDisband(Guild* guild)
|
||||
{
|
||||
if (guild->GetId() != 1)
|
||||
{
|
||||
WorldDatabase.PQuery("DELETE FROM `creature` WHERE map = 1 AND phaseMask = %u", guild->GetId());
|
||||
WorldDatabase.PQuery("DELETE FROM `gameobject WHERE map = 1 and phaseMask = %u", guild->GetId());
|
||||
}
|
||||
|
||||
CharacterDatabase.PQuery("DELETE FROM `guild_house` WHERE guild = %u", guild->GetId());
|
||||
}
|
||||
};
|
||||
|
||||
class GuildHouseSeller : public CreatureScript {
|
||||
|
||||
public:
|
||||
GuildHouseSeller() : CreatureScript("GuildHouseSeller") {}
|
||||
|
||||
bool OnGossipHello(Player *player, Creature * creature)
|
||||
{
|
||||
if (!player->GetGuild())
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("You are not in a guild");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player->GetGuild()->GetLeaderGUID() == player->GetGUID())
|
||||
{
|
||||
// Only leader of the guild can buy / sell guild house
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TABARD, "Buy Guild House!", GOSSIP_SENDER_MAIN, 2);
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_TABARD, "Sell Guild House!", GOSSIP_SENDER_MAIN, 3, "Are you sure you want to sell your Guild house?", NULL, false);
|
||||
}
|
||||
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TABARD, "Teleport to Guild House", GOSSIP_SENDER_MAIN, 1);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Close", GOSSIP_SENDER_MAIN, 5);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player *player, Creature * m_creature, uint32 sender, uint32 action)
|
||||
{
|
||||
uint32 map;
|
||||
float posX;
|
||||
float posY;
|
||||
float posZ;
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case 100: // gmsiland
|
||||
map = 1;
|
||||
posX = 16226.117f;
|
||||
posY = 16258.046f;
|
||||
posZ = 13.257628f;
|
||||
break;
|
||||
case 5: // close
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
case 3: // Sell back guild house
|
||||
{
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT id, `guild` FROM `guild_house` WHERE guild = %u", player->GetGuildId());
|
||||
|
||||
if (!result)
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("You do not have a active Guild house!");
|
||||
return false;
|
||||
}
|
||||
|
||||
CharacterDatabase.PQuery("DELETE FROM `guild_house` WHERE guild = %u", player->GetGuildId());
|
||||
|
||||
if (player->GetGuildId() != 1)
|
||||
{
|
||||
WorldDatabase.PQuery("DELETE FROM `creature` WHERE `map` = 1 AND phaseMask = %u", player->GetGuildId());
|
||||
WorldDatabase.PQuery("DELETE FROM `gameobject` WHERE `map` = 1 and phaseMask = %u", player->GetGuildId());
|
||||
}
|
||||
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("You have successfully sold your guild house");
|
||||
player->ModifyMoney(+(sConfigMgr->GetIntDefault("CostGuildHouse", 10000000) / 2));
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: // buy guild house
|
||||
BuyGuildHouse(player->GetGuild(), player, m_creature);
|
||||
break;
|
||||
case 1: // teleport to guild house
|
||||
TeleportGuildHouse(player->GetGuild(), player);
|
||||
break;
|
||||
}
|
||||
|
||||
if (action >= 100)
|
||||
{
|
||||
CharacterDatabase.PQuery("INSERT INTO `guild_house` (guild, phase, map, positionX, positionY, positionZ) VALUES (%u, %u, %u, %f, %f, %f)", player->GetGuildId(), player->GetGuildId(), map, posX, posY, posZ);
|
||||
player->ModifyMoney(-(sConfigMgr->GetIntDefault("CostGuildHouse", 10000000)));
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("You have successfully purchased a guild house");
|
||||
player->GetGuild()->BroadcastToGuild(player->GetSession(), false, "We have now got a guild house", LANG_UNIVERSAL);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BuyGuildHouse(Guild* guild, Player* player, Creature* creature)
|
||||
{
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT `id`, `guild` FROM guild_house WHERE `guild` = %u", guild->GetId());
|
||||
|
||||
if (result)
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("You cant buy any more guilds houses!");
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
return false;
|
||||
}
|
||||
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_MONEY_BAG, "GM Island", GOSSIP_SENDER_MAIN, 100, "Buy GM island Guildhouse?", sConfigMgr->GetIntDefault("CostGuildHouse", 10000000), false);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, " ----- More to Come ----", GOSSIP_SENDER_MAIN, 4);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
void TeleportGuildHouse(Guild* guild, Player* player)
|
||||
{
|
||||
GuildData* guildData = player->CustomData.GetDefault<GuildData>("phase");
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT `id`, `guild`, `phase`, `map`,`positionX`, `positionY`, `positionZ` FROM guild_house WHERE `guild` = %u", guild->GetId());
|
||||
|
||||
if (!result)
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("Your Guild does not own a guild house");
|
||||
return;
|
||||
}
|
||||
|
||||
do {
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
uint32 id = fields[0].GetUInt32();
|
||||
uint32 guild = fields[1].GetUInt32();
|
||||
guildData->phase = fields[2].GetUInt32();
|
||||
uint32 map = fields[3].GetUInt32();
|
||||
guildData->posX = fields[4].GetFloat();
|
||||
guildData->posY = fields[5].GetFloat();
|
||||
guildData->posZ = fields[6].GetFloat();
|
||||
|
||||
player->TeleportTo(map, guildData->posX, guildData->posY, guildData->posZ, player->GetOrientation());
|
||||
player->SetPhaseMask(guildData->phase, true);
|
||||
|
||||
} while (result->NextRow());
|
||||
}
|
||||
};
|
||||
|
||||
class GuildHouseV2PlayerScript : public PlayerScript
|
||||
{
|
||||
public:
|
||||
GuildHouseV2PlayerScript() : PlayerScript("GuildHouseV2PlayerScript") { }
|
||||
|
||||
void OnLogin(Player* player)
|
||||
{
|
||||
CheckPlayer(player);
|
||||
}
|
||||
|
||||
void OnUpdateZone(Player* player, uint32 newZone, uint32 newArea)
|
||||
{
|
||||
if (newZone = 876)
|
||||
CheckPlayer(player);
|
||||
}
|
||||
|
||||
uint32 GetNormalPhase(Player* player) const
|
||||
{
|
||||
if (player->IsGameMaster())
|
||||
return uint32(PHASEMASK_ANYWHERE);
|
||||
|
||||
uint32 phase = PHASEMASK_NORMAL;
|
||||
Player::AuraEffectList const& phases = player->GetAuraEffectsByType(SPELL_AURA_PHASE);
|
||||
if (!phases.empty())
|
||||
phase = phases.front()->GetMiscValue();
|
||||
if (uint32 n_phase = phase & ~PHASEMASK_NORMAL)
|
||||
return n_phase;
|
||||
|
||||
return PHASEMASK_NORMAL;
|
||||
}
|
||||
|
||||
void CheckPlayer(Player* player)
|
||||
{
|
||||
GuildData* guildData = player->CustomData.GetDefault<GuildData>("phase");
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT `id`, `guild`, `phase`, `map`,`positionX`, `positionY`, `positionZ` FROM guild_house WHERE `guild` = %u", player->GetGuildId());
|
||||
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
do {
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
uint32 id = fields[0].GetUInt32();
|
||||
uint32 guild = fields[1].GetUInt32();
|
||||
guildData->phase = fields[2].GetUInt32();
|
||||
uint32 map = fields[3].GetUInt32();
|
||||
guildData->posX = fields[4].GetFloat();
|
||||
guildData->posY = fields[5].GetFloat();
|
||||
guildData->posZ = fields[6].GetFloat();
|
||||
|
||||
} while (result->NextRow());
|
||||
|
||||
if (player->GetZoneId() == 876 && player->GetAreaId() == 876) // GM Island
|
||||
{
|
||||
// If player is not in a guild he doesnt have a guild house teleport away
|
||||
|
||||
if (!result || !player->GetGuild())
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("Your Guild does not own a guild house");
|
||||
teleport(player);
|
||||
return;
|
||||
}
|
||||
player->SetPhaseMask(guildData->phase, true);
|
||||
}
|
||||
else
|
||||
player->SetPhaseMask(GetNormalPhase(player), false);
|
||||
}
|
||||
|
||||
void teleport(Player* player)
|
||||
{
|
||||
if (player->GetTeamId() == TEAM_ALLIANCE)
|
||||
player->TeleportTo(0, -8833.379883f, 628.627991f, 94.006599f, 1.0f);
|
||||
else
|
||||
player->TeleportTo(1, 1486.048340f, -4415.140625f, 24.187496f, 0.13f);
|
||||
}
|
||||
};
|
||||
|
||||
class GuildHouseCommand : public CommandScript
|
||||
{
|
||||
public:
|
||||
GuildHouseCommand() : CommandScript("GuildHouseCommand") { }
|
||||
|
||||
std::vector<ChatCommand> GetCommands() const override
|
||||
{
|
||||
static std::vector<ChatCommand> GuildHouseCommandTable =
|
||||
{
|
||||
// View Command
|
||||
{ "Teleport", SEC_PLAYER, false, &HandleGuildHouseTeleCommand, "" },
|
||||
// Set Command
|
||||
{ "SpawnNpc", SEC_PLAYER, false, &HandleSpawnNPCCommand, "" },
|
||||
};
|
||||
|
||||
static std::vector<ChatCommand> GuildHouseCommandBaseTable =
|
||||
{
|
||||
{ "Guildhouse", SEC_PLAYER, false, nullptr, "", GuildHouseCommandTable }
|
||||
};
|
||||
|
||||
return GuildHouseCommandBaseTable;
|
||||
}
|
||||
|
||||
static bool HandleSpawnNPCCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
|
||||
if (player->GetAreaId() != 876)
|
||||
return false;
|
||||
|
||||
if (player->GetGuild()->GetLeaderGUID() != player->GetGUID())
|
||||
return false;
|
||||
|
||||
if (player->FindNearestCreature(70102, VISIBLE_RANGE, true))
|
||||
return false;
|
||||
|
||||
float posX = 16202.185547f;
|
||||
float posY = 16255.916992f;
|
||||
float posZ = 21.160221f;
|
||||
float ori = 6.195375f;
|
||||
|
||||
Creature* creature = new Creature();
|
||||
|
||||
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), player->GetMap(), player->GetPhaseMask(), 70102, 0, posX, posY, posZ, ori))
|
||||
{
|
||||
delete creature;
|
||||
return false;
|
||||
}
|
||||
creature->SaveToDB(player->GetMapId(), (1 << player->GetMap()->GetSpawnMode()), player->GetPhaseMask());
|
||||
uint32 db_guid = creature->GetDBTableGUIDLow();
|
||||
|
||||
creature->CleanupsBeforeDelete();
|
||||
delete creature;
|
||||
creature = new Creature();
|
||||
if (!creature->LoadCreatureFromDB(db_guid, player->GetMap()))
|
||||
{
|
||||
delete creature;
|
||||
return false;
|
||||
}
|
||||
|
||||
sObjectMgr->AddCreatureToGrid(db_guid, sObjectMgr->GetCreatureData(db_guid));
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGuildHouseTeleCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
|
||||
if (!player || player->IsInCombat())
|
||||
return false;
|
||||
|
||||
GuildData* guildData = player->CustomData.GetDefault<GuildData>("phase");
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT `id`, `guild`, `phase`, `map`,`positionX`, `positionY`, `positionZ` FROM guild_house WHERE `guild` = %u", player->GetGuildId());
|
||||
|
||||
if (!result)
|
||||
{
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("Your Guild does not own a guild house");
|
||||
return false;
|
||||
}
|
||||
|
||||
do {
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
uint32 id = fields[0].GetUInt32();
|
||||
uint32 guild = fields[1].GetUInt32();
|
||||
guildData->phase = fields[2].GetUInt32();
|
||||
uint32 map = fields[3].GetUInt32();
|
||||
guildData->posX = fields[4].GetFloat();
|
||||
guildData->posY = fields[5].GetFloat();
|
||||
guildData->posZ = fields[6].GetFloat();
|
||||
|
||||
player->TeleportTo(map, guildData->posX, guildData->posY, guildData->posZ, player->GetOrientation());
|
||||
player->SetPhaseMask(guildData->phase, true);
|
||||
|
||||
} while (result->NextRow());
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class GuildHouseConf : public WorldScript
|
||||
{
|
||||
public:
|
||||
GuildHouseConf() : WorldScript("GuildHouseConf") {}
|
||||
|
||||
void OnBeforeConfigLoad(bool reload) override
|
||||
{
|
||||
if (!reload) {
|
||||
std::string conf_path = _CONF_DIR;
|
||||
std::string cfg_file = conf_path + "/mod_guild_house_v2.conf";
|
||||
|
||||
#ifdef WIN32
|
||||
cfg_file = "mod_guild_house_v2.conf";
|
||||
#endif
|
||||
|
||||
std::string cfg_def_file = cfg_file + ".dist";
|
||||
sConfigMgr->LoadMore(cfg_def_file.c_str());
|
||||
sConfigMgr->LoadMore(cfg_file.c_str());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void AddGuildHouseV2Scripts() {
|
||||
new GuildHelper();
|
||||
new GuildHouseSeller();
|
||||
new GuildHouseV2PlayerScript();
|
||||
new GuildHouseCommand();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user