mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-28 18:05:45 +00:00
Compare commits
135 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa6421afdf | |||
| 6a7eaae122 | |||
| 714b474d2c | |||
| e24d82f0fe | |||
| 33a375677e | |||
| 8fce86c396 | |||
| 68b40f0239 | |||
| 2dc2bac456 | |||
| 00a8a0cf88 | |||
| 5a466da96c | |||
| de4f5ae491 | |||
| fb20d92166 | |||
| 6cff433d23 | |||
| 2da7ddad57 | |||
| 55161e18c8 | |||
| 063d4fbd1a | |||
| c25cb0cc23 | |||
| ddac326239 | |||
| 14fe396510 | |||
| c968a0acdc | |||
| 8c4cd34e01 | |||
| 0dbcf83a11 | |||
| a75648f73f | |||
| 6c2886a71d | |||
| 1d96ddb60d | |||
| c30074be66 | |||
| b5652e6010 | |||
| 202d2ed496 | |||
| 81cee49ea1 | |||
| 2d61cd2b9a | |||
| b06505b80a | |||
| 4c2f9a4423 | |||
| fb3159b657 | |||
| 8ebf5bbb78 | |||
| d2aae4d79c | |||
| f9dc9da42b | |||
| 3f3bbe98b5 | |||
| 59537ae977 | |||
| ee45a28efe | |||
| 70ce81fb0a | |||
| e06d28ad20 | |||
| d57489781c | |||
| 21d65c73b7 | |||
| 8f6d606f53 | |||
| f25e37d0c5 | |||
| e55f9b9d27 | |||
| b01486d767 | |||
| 50ce99ce3e | |||
| 4854201b2a | |||
| c81d05940a | |||
| 47be17e2af | |||
| 809b3b6099 | |||
| f06c7e8834 | |||
| 096448d23c | |||
| e55fb1cafd | |||
| d4962bb2ab | |||
| 98e56bdfe9 | |||
| 5c1be3643e | |||
| c2fa61b3a2 | |||
| 01a1186e63 | |||
| 7427318213 | |||
| d3c3d7b384 | |||
| e9e8143778 | |||
| bc71997518 | |||
| 4a9a9fa197 | |||
| ee14aed8de | |||
| 2717fcc339 | |||
| dc28c8d485 | |||
| a633784f78 | |||
| 5519c3e781 | |||
| 9401323708 | |||
| 251993c61b | |||
| 728ce0c519 | |||
| 6a80bcecc7 | |||
| 6324e3687a | |||
| d16ac99033 | |||
| e12368f002 | |||
| a13fa07e68 | |||
| 7873ad3771 | |||
| dfadc237e5 | |||
| a1f2764978 | |||
| 927d379e75 | |||
| a1f154749c | |||
| 42a2e19e73 | |||
| c56b2e3e03 | |||
| b05f1d3218 | |||
| a004924112 | |||
| 8d986c95cd | |||
| ef7a3cae17 | |||
| 050aba65b6 | |||
| 9154c90418 | |||
| d558f9ece2 | |||
| 327dacdbe1 | |||
| f2ff4245c0 | |||
| 3ceb743195 | |||
| 021f04c17d | |||
| f7e2dbdce6 | |||
| 2a679f1002 | |||
| 8c9849ec73 | |||
| 10086ce97c | |||
| 223ae22f73 | |||
| 4330494f57 | |||
| 64ae7e4529 | |||
| 58c3e267e1 | |||
| 598483a1a4 | |||
| c1122022b9 | |||
| f2c4babd8d | |||
| 5249b065d3 | |||
| 9312261444 | |||
| 85054fedf8 | |||
| 6d7beb1796 | |||
| 66e377fd4a | |||
| 67c4c26f70 | |||
| b1c8e3890a | |||
| d6e06a19a7 | |||
| 4092b3a2cb | |||
| f4f0619618 | |||
| 71ca7f9b39 | |||
| 5fcc83b4b6 | |||
| 1f25639dd3 | |||
| 2a176835b1 | |||
| fff3e77a6e | |||
| 6efb9ec228 | |||
| a663c822e8 | |||
| cf49b2fe49 | |||
| b45e0e80b5 | |||
| 3200145d01 | |||
| 53563b9720 | |||
| 1e22baf267 | |||
| d99c3145ad | |||
| 57243c6799 | |||
| 1100668f21 | |||
| 0cf454dc29 | |||
| 75391d96f4 | |||
| 81b07a5aa0 |
+377
@@ -1,3 +1,380 @@
|
||||
## [22.24.0] - 08/05/2023
|
||||
|
||||
### Character
|
||||
|
||||
* Record character stats to `character_stats_record` table ([#3522](https://github.com/EQEmu/Server/pull/3522)) @Akkadius 2023-08-05
|
||||
|
||||
### Code
|
||||
|
||||
* Cleanup #view zone_loot Command ([#3523](https://github.com/EQEmu/Server/pull/3523)) @Kinglykrab 2023-08-02
|
||||
* Remove Strings::Commify from all identifier values ([#3528](https://github.com/EQEmu/Server/pull/3528)) @Kinglykrab 2023-08-02
|
||||
|
||||
### Feature
|
||||
|
||||
* Add Support for Drakkin Heritage Illusions ([#3521](https://github.com/EQEmu/Server/pull/3521)) @Kinglykrab 2023-08-01
|
||||
|
||||
### Fixes
|
||||
|
||||
* Bug fix for raid mark NPC across zones ([#3525](https://github.com/EQEmu/Server/pull/3525)) @neckkola 2023-08-05
|
||||
* Bugs table should not target content database ([#3535](https://github.com/EQEmu/Server/pull/3535)) @Akkadius 2023-08-05
|
||||
* Fix +/- 0.1 XYZ Door Manipulation ([#3527](https://github.com/EQEmu/Server/pull/3527)) @Kinglykrab 2023-08-02
|
||||
* Fix issue with mob scanning when trying to use EVENT_SPAWN ([#3529](https://github.com/EQEmu/Server/pull/3529)) @Akkadius 2023-08-04
|
||||
|
||||
### Quest API
|
||||
|
||||
* Adjust GetCloseMobList calls internally ([#3530](https://github.com/EQEmu/Server/pull/3530)) @Akkadius 2023-08-04
|
||||
|
||||
## [22.23.0] - 07/31/2023
|
||||
|
||||
### Databuckets
|
||||
|
||||
* Improvements to distributed cache, reload commands ([#3519](https://github.com/EQEmu/Server/pull/3519)) @Akkadius 2023-08-01
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix #gm top level alias for #set gm ([#3517](https://github.com/EQEmu/Server/pull/3517)) @Kinglykrab 2023-07-30
|
||||
* Fix Appearance Issues ([#3520](https://github.com/EQEmu/Server/pull/3520)) @Kinglykrab 2023-08-01
|
||||
* Fix NPC Cast Events not parsing properly. ([#3518](https://github.com/EQEmu/Server/pull/3518)) @Kinglykrab 2023-08-01
|
||||
|
||||
### Scaling/Bug Fix
|
||||
|
||||
* Scaling where min and max damage was bugged ([#3514](https://github.com/EQEmu/Server/pull/3514)) @noudess 2023-08-01
|
||||
|
||||
## [22.22.1] - 07/30/2023
|
||||
|
||||
### Database
|
||||
|
||||
* Hotfix: Add command_subsettings to server tables @Akkadius 2023-07-29
|
||||
|
||||
### Doors
|
||||
|
||||
* Add door blacklist ([#3516](https://github.com/EQEmu/Server/pull/3516)) @Akkadius 2023-07-30
|
||||
|
||||
## [22.22.0] - 07/27/2023
|
||||
|
||||
### Code
|
||||
|
||||
* Fix casing in corpse money and decay time. ([#3511](https://github.com/EQEmu/Server/pull/3511)) @Kinglykrab 2023-07-23
|
||||
|
||||
### Crash Fix
|
||||
|
||||
* Guard against Spells:MaxTotalSlotsPET being set above client allowed maximum. ([#3507](https://github.com/EQEmu/Server/pull/3507)) @Valorith 2023-07-22
|
||||
|
||||
### Data Buckets
|
||||
|
||||
* Distributed Databucket Caching ([#3500](https://github.com/EQEmu/Server/pull/3500)) @Kinglykrab 2023-07-24
|
||||
|
||||
### Database
|
||||
|
||||
* Fix console output in database:dump --dump-output-to-console @Akkadius 2023-07-25
|
||||
|
||||
### Fixes
|
||||
|
||||
* Escape search string in #find item ([#3510](https://github.com/EQEmu/Server/pull/3510)) @Kinglykrab 2023-07-22
|
||||
|
||||
### Quest API
|
||||
|
||||
* Add GetMobTypeIdentifier() to Perl/Lua ([#3512](https://github.com/EQEmu/Server/pull/3512)) @Kinglykrab 2023-07-28
|
||||
|
||||
### Saylink
|
||||
|
||||
* Fix cases where saylinks were not being cached ([#3508](https://github.com/EQEmu/Server/pull/3508)) @Akkadius 2023-07-20
|
||||
|
||||
## [22.21.2] - 07/19/2023
|
||||
|
||||
### Databuckets
|
||||
|
||||
* Fix rarer same bucket name scoping overlap issue ([#3509](https://github.com/EQEmu/Server/pull/3509)) @Akkadius 2023-07-20
|
||||
|
||||
## [22.21.1] - 07/18/2023
|
||||
|
||||
### Bug
|
||||
|
||||
* Show Petition and Show Petition_Info fix ([#3503](https://github.com/EQEmu/Server/pull/3503)) @fryguy503 2023-07-18
|
||||
|
||||
### Code
|
||||
|
||||
* Remove arbitrary teleport blocking in Tutorial and Load zones ([#3506](https://github.com/EQEmu/Server/pull/3506)) @Valorith 2023-07-19
|
||||
|
||||
### Databuckets
|
||||
|
||||
* Fix issue with expired databuckets not being expired and returned properly ([#3504](https://github.com/EQEmu/Server/pull/3504)) @Akkadius 2023-07-18
|
||||
|
||||
### Fixes
|
||||
|
||||
* #set title_suffix Argument Position ([#3505](https://github.com/EQEmu/Server/pull/3505)) @Kinglykrab 2023-07-18
|
||||
|
||||
## [22.21.0] - 07/18/2023
|
||||
|
||||
### Data Buckets
|
||||
|
||||
* Implement scoped data buckets ([#3498](https://github.com/EQEmu/Server/pull/3498)) @Akkadius 2023-07-16
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix rule check and add rule for pickpocket command ([#3492](https://github.com/EQEmu/Server/pull/3492)) @tuday2 2023-07-16
|
||||
|
||||
### Pathing
|
||||
|
||||
* Improvements to roambox logic, pathing ([#3502](https://github.com/EQEmu/Server/pull/3502)) @Akkadius 2023-07-18
|
||||
|
||||
### Quest API
|
||||
|
||||
* Add SetLDoNPoints() to Perl/Lua ([#3496](https://github.com/EQEmu/Server/pull/3496)) @Kinglykrab 2023-07-16
|
||||
|
||||
### Z Clipping
|
||||
|
||||
* Don't issue zclip adjustments when NPC is not moving ([#3499](https://github.com/EQEmu/Server/pull/3499)) @Akkadius 2023-07-16
|
||||
|
||||
## [22.20.1] - 07/15/2023
|
||||
|
||||
### Database
|
||||
|
||||
* Fix database manifest entry for #3443 @neckkola 2023-07-15
|
||||
|
||||
## [22.20.0] - 07/15/2023
|
||||
|
||||
### Bots
|
||||
|
||||
* Remove orphaned commands related to botgroup ([#3489](https://github.com/EQEmu/Server/pull/3489)) @tuday2 2023-07-09
|
||||
|
||||
### Commands
|
||||
|
||||
* Consolidate #set-like commands into a singular #set command ([#3486](https://github.com/EQEmu/Server/pull/3486)) @Kinglykrab 2023-07-15
|
||||
|
||||
### Feature
|
||||
|
||||
* Add Support for item textures higher than 65,535 ([#3494](https://github.com/EQEmu/Server/pull/3494)) @Kinglykrab 2023-07-14
|
||||
* Update raid features ([#3443](https://github.com/EQEmu/Server/pull/3443)) @neckkola 2023-07-13
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix Tradeskill Combines with augmented items ([#3490](https://github.com/EQEmu/Server/pull/3490)) @Kinglykrab 2023-07-15
|
||||
* Fix charmed pets to follow when charmed. ([#3488](https://github.com/EQEmu/Server/pull/3488)) @noudess 2023-07-08
|
||||
* Update bot naming check and add more explanation ([#3491](https://github.com/EQEmu/Server/pull/3491)) @tuday2 2023-07-13
|
||||
|
||||
### Quest API
|
||||
|
||||
* Add Mob/Entity type check methods to Perl/Lua ([#3493](https://github.com/EQEmu/Server/pull/3493)) @Kinglykrab 2023-07-13
|
||||
|
||||
## [22.19.0] - 07/08/2023
|
||||
|
||||
### Bots
|
||||
|
||||
* Add Pickpocket Command ([#3484](https://github.com/EQEmu/Server/pull/3484)) @tuday2 2023-07-08
|
||||
|
||||
### Code
|
||||
|
||||
* Move #find item summon links to front ([#3483](https://github.com/EQEmu/Server/pull/3483)) @Kinglykrab 2023-07-05
|
||||
* Remove LoadItemDBFieldNames() from common/misc.cpp and common/misc.h ([#3473](https://github.com/EQEmu/Server/pull/3473)) @Kinglykrab 2023-07-04
|
||||
|
||||
### Commands
|
||||
|
||||
* Add #itemsearch alias to #find aliases ([#3485](https://github.com/EQEmu/Server/pull/3485)) @Kinglykrab 2023-07-08
|
||||
* Consolidate #show commands into a singular #show command ([#3478](https://github.com/EQEmu/Server/pull/3478)) @Kinglykrab 2023-07-08
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix _PutItem having a slot_id of -1 on mobs with no items ([#3474](https://github.com/EQEmu/Server/pull/3474)) @Kinglykrab 2023-07-04
|
||||
|
||||
### Rules
|
||||
|
||||
* Add Skills:TrivialTradeskillCombinesNoFail Rule ([#3481](https://github.com/EQEmu/Server/pull/3481)) @JasXSL 2023-07-05
|
||||
|
||||
## [22.18.0] - 07/04/2023
|
||||
|
||||
### Commands
|
||||
|
||||
* Add #emotesearch to #find command ([#3480](https://github.com/EQEmu/Server/pull/3480)) @Kinglykrab 2023-07-04
|
||||
* Cleanup #copycharacter Command ([#3479](https://github.com/EQEmu/Server/pull/3479)) @Kinglykrab 2023-07-04
|
||||
|
||||
### Fixes
|
||||
|
||||
* Add chatchannel_reserved_names to a new manifest ([#3482](https://github.com/EQEmu/Server/pull/3482)) @Kinglykrab 2023-07-04
|
||||
* Fix issue in zone store of returning reference to local variable ([#3477](https://github.com/EQEmu/Server/pull/3477)) @Kinglykrab 2023-07-04
|
||||
|
||||
## [22.17.0] - 07/03/2023
|
||||
|
||||
### Cleanup/Feature
|
||||
|
||||
* Add support for bots to #showstats/#mystats ([#3427](https://github.com/EQEmu/Server/pull/3427)) @Kinglykrab 2023-07-01
|
||||
|
||||
### Code
|
||||
|
||||
* Remove LoadItemDBFieldNames() from common/misc.cpp and common/misc.h ([#3473](https://github.com/EQEmu/Server/pull/3473)) @Kinglykrab 2023-07-04
|
||||
* Remove handle_npc_single_npc from zone/lua_parser_events.cpp and zone/lua_parser_events.h ([#3467](https://github.com/EQEmu/Server/pull/3467)) @Kinglykrab 2023-07-03
|
||||
|
||||
### Database
|
||||
|
||||
* Set multi statements off when returning early ([#3462](https://github.com/EQEmu/Server/pull/3462)) @Akkadius 2023-07-01
|
||||
|
||||
### Feature
|
||||
|
||||
* Add Strings::BeginsWith() and Strings::EndsWith() ([#3471](https://github.com/EQEmu/Server/pull/3471)) @Kinglykrab 2023-07-03
|
||||
|
||||
### Fixes
|
||||
|
||||
* Add check for underscores in botcreate command ([#3458](https://github.com/EQEmu/Server/pull/3458)) @tuday2 2023-06-29
|
||||
* EVENT_LANGUAGE_SKILL_UP in Lua was using EVENT_SKILL_UP logic ([#3466](https://github.com/EQEmu/Server/pull/3466)) @Kinglykrab 2023-07-03
|
||||
* Fix _PutItem having a slot_id of -1 on mobs with no items ([#3474](https://github.com/EQEmu/Server/pull/3474)) @Kinglykrab 2023-07-04
|
||||
* Fix data type of GetAggroCount() ([#3470](https://github.com/EQEmu/Server/pull/3470)) @Kinglykrab 2023-07-03
|
||||
|
||||
### Logging
|
||||
|
||||
* Fix logging crash when % are sent through query logs ([#3461](https://github.com/EQEmu/Server/pull/3461)) @Akkadius 2023-07-01
|
||||
|
||||
### Quest API
|
||||
|
||||
* Add ClearAccountFlag() and GetAccountFlags() to Perl/Lua ([#3469](https://github.com/EQEmu/Server/pull/3469)) @Kinglykrab 2023-07-03
|
||||
* Add GetClassAbbreviation() and GetRaceAbbreviation() to Perl/Lua ([#3463](https://github.com/EQEmu/Server/pull/3463)) @Kinglykrab 2023-07-02
|
||||
* Add GetClassPlural() and GetRacePlural() to Perl/Lua ([#3468](https://github.com/EQEmu/Server/pull/3468)) @Kinglykrab 2023-07-03
|
||||
* Add GetCloseMobList() and CalculateDistance() overload to Perl/Lua ([#3455](https://github.com/EQEmu/Server/pull/3455)) @Kinglykrab 2023-07-02
|
||||
* Add Hate Entry Methods to Perl ([#3459](https://github.com/EQEmu/Server/pull/3459)) @Kinglykrab 2023-07-02
|
||||
* Add ItemData Class to Perl ([#3465](https://github.com/EQEmu/Server/pull/3465)) @Kinglykrab 2023-07-02
|
||||
* Add Spawn2 Class to Perl ([#3456](https://github.com/EQEmu/Server/pull/3456)) @Kinglykrab 2023-07-02
|
||||
* Add StatBonuses Class to Perl ([#3460](https://github.com/EQEmu/Server/pull/3460)) @Kinglykrab 2023-07-02
|
||||
* Add missing Item Methods to Perl/Lua. ([#3464](https://github.com/EQEmu/Server/pull/3464)) @Kinglykrab 2023-07-02
|
||||
|
||||
## [22.16.0] - 06/27/2023
|
||||
|
||||
### Code
|
||||
|
||||
* Default skill type to Hand to Hand in #npcedit meleetype ([#3422](https://github.com/EQEmu/Server/pull/3422)) @Kinglykrab 2023-06-19
|
||||
* Delete common/worldconn.cpp ([#3436](https://github.com/EQEmu/Server/pull/3436)) @Kinglykrab 2023-06-24
|
||||
* Remove DatabaseCastAccepted() from zone/npc.cpp and zone/npc.h ([#3449](https://github.com/EQEmu/Server/pull/3449)) @Kinglykrab 2023-06-24
|
||||
* Remove GetACAvoid() from zone/merc.h ([#3447](https://github.com/EQEmu/Server/pull/3447)) @Kinglykrab 2023-06-25
|
||||
* Remove GetACMit() from zone/merc.h ([#3446](https://github.com/EQEmu/Server/pull/3446)) @Kinglykrab 2023-06-24
|
||||
* Remove _ClearWaypints() from zone/npc.h ([#3445](https://github.com/EQEmu/Server/pull/3445)) @Kinglykrab 2023-06-24
|
||||
* Remove acmod() from zone/merc.h ([#3448](https://github.com/EQEmu/Server/pull/3448)) @Kinglykrab 2023-06-24
|
||||
* Remove command_packetprofile from zone/command.h ([#3432](https://github.com/EQEmu/Server/pull/3432)) @Kinglykrab 2023-06-24
|
||||
* Remove command_showpetspell in zone/command.h ([#3430](https://github.com/EQEmu/Server/pull/3430)) @Kinglykrab 2023-06-24
|
||||
* Remove command_unlock from zone/command.h ([#3431](https://github.com/EQEmu/Server/pull/3431)) @Kinglykrab 2023-06-24
|
||||
|
||||
### Commands
|
||||
|
||||
* Add #finddeity Command ([#3435](https://github.com/EQEmu/Server/pull/3435)) @Kinglykrab 2023-06-26
|
||||
* Add #findlanguage Command ([#3434](https://github.com/EQEmu/Server/pull/3434)) @Kinglykrab 2023-06-25
|
||||
* Add #showspells Command ([#3429](https://github.com/EQEmu/Server/pull/3429)) @Kinglykrab 2023-06-24
|
||||
* Add missing subcommands to #npcedit ([#3423](https://github.com/EQEmu/Server/pull/3423)) @Kinglykrab 2023-06-19
|
||||
* Cleanup #showbuffs Command ([#3439](https://github.com/EQEmu/Server/pull/3439)) @Kinglykrab 2023-06-26
|
||||
* Cleanup #shownpcgloballoot and #showzonegloballoot Commands ([#3440](https://github.com/EQEmu/Server/pull/3440)) @Kinglykrab 2023-06-24
|
||||
* Cleanup #viewcurrencies Command ([#3441](https://github.com/EQEmu/Server/pull/3441)) @Kinglykrab 2023-06-25
|
||||
* Consolidate #findX commands to a singular #find Command ([#3452](https://github.com/EQEmu/Server/pull/3452)) @Kinglykrab 2023-06-28
|
||||
* Consolidate #merchant_close_shop and #merchant_open_shop to #merchantshop ([#3433](https://github.com/EQEmu/Server/pull/3433)) @Kinglykrab 2023-06-24
|
||||
* Delete #showbonusstats Command ([#3437](https://github.com/EQEmu/Server/pull/3437)) @Kinglykrab 2023-06-24
|
||||
* Delete #spellinfo Command ([#3438](https://github.com/EQEmu/Server/pull/3438)) @Kinglykrab 2023-06-24
|
||||
|
||||
### Database
|
||||
|
||||
* Fix database version checking edge case issue ([#3428](https://github.com/EQEmu/Server/pull/3428)) @Akkadius 2023-06-22
|
||||
* Fix multi-statement error reporting ([#3425](https://github.com/EQEmu/Server/pull/3425)) @Akkadius 2023-06-19
|
||||
* Implement native database migrations in server ([#2857](https://github.com/EQEmu/Server/pull/2857)) @Akkadius 2023-06-19
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix NPC Item Stat Bonuses ([#3444](https://github.com/EQEmu/Server/pull/3444)) @Kinglykrab 2023-06-26
|
||||
* Fix error in 023_01_21_bots_raid_members.sql ([#3453](https://github.com/EQEmu/Server/pull/3453)) @mibastian 2023-06-28
|
||||
* Fix possible crash with #npcedit weapon ([#3421](https://github.com/EQEmu/Server/pull/3421)) @Kinglykrab 2023-06-19
|
||||
* Merchant Open Flag set only for regular Merchants ([#3454](https://github.com/EQEmu/Server/pull/3454)) @Kinglykrab 2023-06-27
|
||||
|
||||
### Readme
|
||||
|
||||
* Update new location of database updates ([#3424](https://github.com/EQEmu/Server/pull/3424)) @joligario 2023-06-19
|
||||
|
||||
### Rules
|
||||
|
||||
* Add ClientPetsUserOwnerNameInLastName rule ([#3442](https://github.com/EQEmu/Server/pull/3442)) @Kinglykrab 2023-06-25
|
||||
|
||||
## [22.15.3] - 06/19/2023
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix improper condition in Water LOS checks ([#3426](https://github.com/EQEmu/Server/pull/3426)) @Kinglykrab 2023-06-19
|
||||
|
||||
## [22.15.2] - 06/19/2023
|
||||
|
||||
### Database
|
||||
|
||||
* Fix multi-statement error reporting ([#3425](https://github.com/EQEmu/Server/pull/3425)) @Akkadius 2023-06-19
|
||||
|
||||
## [22.15.1] - 06/19/2023
|
||||
|
||||
### Schema
|
||||
|
||||
* Add `chatchannel_reserved_names` table to `database_schema.h`
|
||||
|
||||
## [22.15.0] - 06/19/2023
|
||||
|
||||
### Code
|
||||
|
||||
* Default skill type to Hand to Hand in #npcedit meleetype ([#3422](https://github.com/EQEmu/Server/pull/3422)) @Kinglykrab 2023-06-19
|
||||
|
||||
### Commands
|
||||
|
||||
* Add missing subcommands to #npcedit ([#3423](https://github.com/EQEmu/Server/pull/3423)) @Kinglykrab 2023-06-19
|
||||
|
||||
### Database
|
||||
|
||||
* Implement native database migrations in server ([#2857](https://github.com/EQEmu/Server/pull/2857)) @Akkadius 2023-06-19
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix possible crash with #npcedit weapon ([#3421](https://github.com/EQEmu/Server/pull/3421)) @Kinglykrab 2023-06-19
|
||||
|
||||
## [22.14.1] - 06/18/2023
|
||||
|
||||
### Backups
|
||||
|
||||
* Move world database:dump to use MySQL credentials file ([#3410](https://github.com/EQEmu/Server/pull/3410)) @Akkadius 2023-06-17
|
||||
|
||||
### Binaries
|
||||
|
||||
* Add support for static linking (portable) binaries ([#3417](https://github.com/EQEmu/Server/pull/3417)) @Akkadius 2023-06-18
|
||||
|
||||
### CI
|
||||
|
||||
* Build static linux binaries ([#3419](https://github.com/EQEmu/Server/pull/3419)) @Akkadius 2023-06-18
|
||||
|
||||
### CLI
|
||||
|
||||
* Add `bots:enable` and `bots:disable` commands ([#3415](https://github.com/EQEmu/Server/pull/3415)) @Akkadius 2023-06-17
|
||||
* Add `mercs:enable` and `mercs:disable` commands ([#3416](https://github.com/EQEmu/Server/pull/3416)) @Akkadius 2023-06-18
|
||||
* Console menu validation fixes ([#3413](https://github.com/EQEmu/Server/pull/3413)) @Akkadius 2023-06-17
|
||||
|
||||
### Database
|
||||
|
||||
* Add query multi statement execution support ([#3414](https://github.com/EQEmu/Server/pull/3414)) @Akkadius 2023-06-17
|
||||
|
||||
### Feature
|
||||
|
||||
* Add Water Line of Sight Checks ([#3408](https://github.com/EQEmu/Server/pull/3408)) @nytmyr 2023-06-17
|
||||
|
||||
### Logging
|
||||
|
||||
* Logging improvements, console silencing, terminal coloring ([#3412](https://github.com/EQEmu/Server/pull/3412)) @Akkadius 2023-06-17
|
||||
|
||||
### Quest API
|
||||
|
||||
* Add convert_money_to_string() to Perl/Lua ([#3418](https://github.com/EQEmu/Server/pull/3418)) @Kinglykrab 2023-06-18
|
||||
|
||||
### Strings
|
||||
|
||||
* Add more test cases for string utils ([#3411](https://github.com/EQEmu/Server/pull/3411)) @Akkadius 2023-06-17
|
||||
|
||||
### Targeting
|
||||
|
||||
* Fix bug when using /tar on invalid target ([#3407](https://github.com/EQEmu/Server/pull/3407)) @noudess 2023-06-17
|
||||
|
||||
### Telnet
|
||||
|
||||
* Add cross zone/world wide cast and move functionality to Telnet ([#3409](https://github.com/EQEmu/Server/pull/3409)) @Kinglykrab 2023-06-17
|
||||
|
||||
## [22.13.1] - 06/13/2023
|
||||
|
||||
### Targeting
|
||||
|
||||
* Revert #3383 ([#3405](https://github.com/EQEmu/Server/pull/3405)) @noudess 2023-06-13
|
||||
|
||||
## [22.13.0] - 06/12/2023
|
||||
|
||||
### Code
|
||||
|
||||
@@ -16,6 +16,15 @@ SET(CMAKE_CXX_STANDARD 20)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
SET(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
OPTION(EQEMU_BUILD_STATIC "Build with static linking" OFF)
|
||||
|
||||
IF (EQEMU_BUILD_STATIC)
|
||||
SET(BUILD_SHARED_LIBS OFF)
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a")
|
||||
MESSAGE(STATUS "Building with static linking")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
|
||||
ENDIF(EQEMU_BUILD_STATIC)
|
||||
|
||||
IF(MSVC)
|
||||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
|
||||
ADD_DEFINITIONS(-DNOMINMAX)
|
||||
@@ -307,6 +316,10 @@ ELSE()
|
||||
SET(ZLIB_LIBRARY_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/libs/zlibng")
|
||||
ENDIF()
|
||||
|
||||
IF (EQEMU_BUILD_STATIC)
|
||||
SET(ZLIB_LIBRARY_LIBS libz.a)
|
||||
ENDIF(EQEMU_BUILD_STATIC)
|
||||
|
||||
MESSAGE(STATUS "")
|
||||
MESSAGE(STATUS "**************************************************")
|
||||
MESSAGE(STATUS "* Library Usage *")
|
||||
|
||||
@@ -15,6 +15,9 @@ SET(common_sources
|
||||
database.cpp
|
||||
database_conversions.cpp
|
||||
database_instances.cpp
|
||||
database/database_update_manifest.cpp
|
||||
database/database_update_manifest_bots.cpp
|
||||
database/database_update.cpp
|
||||
dbcore.cpp
|
||||
deity.cpp
|
||||
dynamic_zone_base.cpp
|
||||
@@ -506,6 +509,7 @@ SET(common_headers
|
||||
data_verification.h
|
||||
database.h
|
||||
database_schema.h
|
||||
database/database_update.h
|
||||
dbcore.h
|
||||
deity.h
|
||||
discord/discord.h
|
||||
@@ -666,7 +670,8 @@ SET(common_headers
|
||||
StackWalker/StackWalker.h
|
||||
util/memory_stream.h
|
||||
util/directory.h
|
||||
util/uuid.h)
|
||||
util/uuid.h
|
||||
)
|
||||
|
||||
SOURCE_GROUP(Event FILES
|
||||
event/event_loop.h
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/classes.h"
|
||||
#include "data_verification.h"
|
||||
|
||||
const char *GetClassIDName(uint8 class_id, uint8 level)
|
||||
{
|
||||
@@ -750,3 +751,51 @@ uint8 ClassArmorType(uint8 class_id)
|
||||
return ARMOR_TYPE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
const std::string GetPlayerClassAbbreviation(uint8 class_id)
|
||||
{
|
||||
if (!EQ::ValueWithin(class_id, WARRIOR, BERSERKER)) {
|
||||
return std::string("UNK");
|
||||
}
|
||||
|
||||
switch (class_id) {
|
||||
case WARRIOR:
|
||||
return "WAR";
|
||||
case CLERIC:
|
||||
return "CLR";
|
||||
case PALADIN:
|
||||
return "PAL";
|
||||
case RANGER:
|
||||
return "RNG";
|
||||
case SHADOWKNIGHT:
|
||||
return "SHD";
|
||||
case DRUID:
|
||||
return "DRU";
|
||||
case MONK:
|
||||
return "MNK";
|
||||
case BARD:
|
||||
return "BRD";
|
||||
case ROGUE:
|
||||
return "ROG";
|
||||
case SHAMAN:
|
||||
return "SHM";
|
||||
case NECROMANCER:
|
||||
return "NEC";
|
||||
case WIZARD:
|
||||
return "WIZ";
|
||||
case MAGICIAN:
|
||||
return "MAG";
|
||||
case ENCHANTER:
|
||||
return "ENC";
|
||||
case BEASTLORD:
|
||||
return "BST";
|
||||
case BERSERKER:
|
||||
return "BER";
|
||||
}
|
||||
|
||||
return std::string("UNK");
|
||||
}
|
||||
|
||||
bool IsPlayerClass(uint8 class_id) {
|
||||
return EQ::ValueWithin(class_id, WARRIOR, BERSERKER);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define CLASSES_CH
|
||||
|
||||
#include "../common/types.h"
|
||||
#include <string>
|
||||
|
||||
#define NO_CLASS 0
|
||||
#define WARRIOR 1
|
||||
@@ -127,6 +128,9 @@
|
||||
const char* GetClassIDName(uint8 class_id, uint8 level = 0);
|
||||
const char* GetPlayerClassName(uint32 player_class_value, uint8 level = 0);
|
||||
|
||||
bool IsPlayerClass(uint8 class_id);
|
||||
const std::string GetPlayerClassAbbreviation(uint8 class_id);
|
||||
|
||||
uint32 GetPlayerClassValue(uint8 class_id);
|
||||
uint32 GetPlayerClassBit(uint8 class_id);
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace EQEmuCommand {
|
||||
index++;
|
||||
}
|
||||
|
||||
if (!arguments_filled || argc == 2 || cmd[{"-h", "--help"}]) {
|
||||
if (!arguments_filled || (argc == 2 && !cmd[{"-h", "--help"}]) || (argc == 3 && cmd[{"-h", "--help"}])) {
|
||||
std::string arguments_string;
|
||||
for (auto &arg : arguments) {
|
||||
arguments_string += " " + arg;
|
||||
|
||||
+54
-2
@@ -2347,7 +2347,7 @@ void Database::SourceDatabaseTableFromUrl(std::string table_name, std::string ur
|
||||
);
|
||||
|
||||
if (!DoesTableExist(table_name)) {
|
||||
LogMySQLQuery("Table [{}] does not exist. Downloading from Github and installing...", table_name);
|
||||
LogMySQLQuery("Table [{}] does not exist. Downloading and installing...", table_name);
|
||||
|
||||
// http get request
|
||||
httplib::Client cli(
|
||||
@@ -2355,7 +2355,7 @@ void Database::SourceDatabaseTableFromUrl(std::string table_name, std::string ur
|
||||
"{}://{}",
|
||||
request_uri.get_scheme(),
|
||||
request_uri.get_host()
|
||||
).c_str()
|
||||
)
|
||||
);
|
||||
|
||||
cli.set_connection_timeout(0, 60000000); // 60 sec
|
||||
@@ -2408,3 +2408,55 @@ uint8 Database::GetMinStatus(uint32 zone_id, uint32 instance_version)
|
||||
|
||||
return !zones.empty() ? zones[0].min_status : 0;
|
||||
}
|
||||
|
||||
void Database::SourceSqlFromUrl(std::string url)
|
||||
{
|
||||
try {
|
||||
uri request_uri(url);
|
||||
|
||||
LogHTTPDetail(
|
||||
"parsing url [{}] path [{}] host [{}] query_string [{}] protocol [{}] port [{}]",
|
||||
url,
|
||||
request_uri.get_path(),
|
||||
request_uri.get_host(),
|
||||
request_uri.get_query(),
|
||||
request_uri.get_scheme(),
|
||||
request_uri.get_port()
|
||||
);
|
||||
|
||||
LogInfo("Downloading and installing from [{}]", url);
|
||||
|
||||
// http get request
|
||||
httplib::Client cli(
|
||||
fmt::format(
|
||||
"{}://{}",
|
||||
request_uri.get_scheme(),
|
||||
request_uri.get_host()
|
||||
)
|
||||
);
|
||||
|
||||
cli.set_connection_timeout(0, 60000000); // 60 sec
|
||||
cli.set_read_timeout(60, 0); // 60 seconds
|
||||
cli.set_write_timeout(60, 0); // 60 seconds
|
||||
|
||||
if (auto res = cli.Get(request_uri.get_path())) {
|
||||
if (res->status == 200) {
|
||||
auto results = QueryDatabaseMulti(res->body);
|
||||
if (!results.ErrorMessage().empty()) {
|
||||
LogError("Error sourcing SQL [{}]", results.ErrorMessage());
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (res->status == 404) {
|
||||
LogError("Error retrieving URL [{}]", url);
|
||||
}
|
||||
}
|
||||
else {
|
||||
LogError("Error retrieving URL [{}]", url);
|
||||
}
|
||||
|
||||
}
|
||||
catch (std::invalid_argument iae) {
|
||||
LogError("URI parser error [{}]", iae.what());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -263,7 +263,7 @@ public:
|
||||
void ClearInvSnapshots(bool from_now = false);
|
||||
|
||||
void SourceDatabaseTableFromUrl(std::string table_name, std::string url);
|
||||
|
||||
void SourceSqlFromUrl(std::string url);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -93,6 +93,8 @@ std::string DatabaseDumpService::GetMySQLVersion()
|
||||
return Strings::Trim(version_output);
|
||||
}
|
||||
|
||||
const std::string CREDENTIALS_FILE = "login.my.cnf";
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
@@ -101,21 +103,15 @@ std::string DatabaseDumpService::GetBaseMySQLDumpCommand()
|
||||
auto config = EQEmuConfig::get();
|
||||
if (IsDumpContentTables() && !config->ContentDbHost.empty()) {
|
||||
return fmt::format(
|
||||
"mysqldump -u {} -p{} -h {} --port={} {}",
|
||||
config->ContentDbUsername,
|
||||
config->ContentDbPassword,
|
||||
config->ContentDbHost,
|
||||
config->ContentDbPort,
|
||||
"mysqldump --defaults-extra-file={} {}",
|
||||
CREDENTIALS_FILE,
|
||||
config->ContentDbName
|
||||
);
|
||||
};
|
||||
|
||||
return fmt::format(
|
||||
"mysqldump -u {} -p{} -h {} --port={} {}",
|
||||
config->DatabaseUsername,
|
||||
config->DatabasePassword,
|
||||
config->DatabaseHost,
|
||||
config->DatabasePort,
|
||||
"mysqldump --defaults-extra-file={} {}",
|
||||
CREDENTIALS_FILE,
|
||||
config->DatabaseDB
|
||||
);
|
||||
}
|
||||
@@ -309,6 +305,8 @@ void DatabaseDumpService::DatabaseDump()
|
||||
if (tables_to_dump.empty()) {
|
||||
std::cerr << "No tables were specified" << std::endl;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else {
|
||||
const auto execute_command = fmt::format(
|
||||
@@ -319,13 +317,16 @@ void DatabaseDumpService::DatabaseDump()
|
||||
pipe_file
|
||||
);
|
||||
|
||||
BuildCredentialsFile();
|
||||
std::string execution_result = Process::execute(execute_command);
|
||||
if (!execution_result.empty() && IsDumpOutputToConsole()) {
|
||||
std::cout << execution_result;
|
||||
}
|
||||
}
|
||||
|
||||
LogSys.EnableConsoleLogging();
|
||||
if (!IsDumpOutputToConsole()) {
|
||||
LogSys.LoadLogSettingsDefaults();
|
||||
}
|
||||
|
||||
if (!pipe_file.empty()) {
|
||||
std::string file = fmt::format("{}.sql", GetDumpFileNameWithPath());
|
||||
@@ -350,10 +351,9 @@ void DatabaseDumpService::DatabaseDump()
|
||||
}
|
||||
|
||||
LogInfo("Database dump created at [{}.sql]", GetDumpFileNameWithPath());
|
||||
|
||||
if (IsDumpWithCompression() && !IsDumpOutputToConsole()) {
|
||||
if (HasCompressionBinary()) {
|
||||
LogInfo("Compression requested... Compressing dump [{}.sql]", GetDumpFileNameWithPath());
|
||||
LogInfo("Compression requested. Compressing dump [{}.sql]", GetDumpFileNameWithPath());
|
||||
|
||||
if (IsTarAvailable()) {
|
||||
Process::execute(
|
||||
@@ -387,6 +387,8 @@ void DatabaseDumpService::DatabaseDump()
|
||||
}
|
||||
}
|
||||
|
||||
RemoveCredentialsFile();
|
||||
|
||||
// LogDebug("[{}] dump-to-console", IsDumpOutputToConsole());
|
||||
// LogDebug("[{}] dump-path", GetSetDumpPath());
|
||||
// LogDebug("[{}] compression", (IsDumpWithCompression() ? "true" : "false"));
|
||||
@@ -566,4 +568,41 @@ void DatabaseDumpService::RemoveSqlBackup()
|
||||
if (File::Exists(file)) {
|
||||
std::filesystem::remove(file);
|
||||
}
|
||||
|
||||
RemoveCredentialsFile();
|
||||
}
|
||||
|
||||
void DatabaseDumpService::BuildCredentialsFile()
|
||||
{
|
||||
auto config = EQEmuConfig::get();
|
||||
std::ofstream out(CREDENTIALS_FILE);
|
||||
if (out.is_open()) {
|
||||
if (IsDumpContentTables() && !config->ContentDbHost.empty()) {
|
||||
out << "[mysqldump]" << std::endl;
|
||||
out << "user=" << config->ContentDbUsername << std::endl;
|
||||
out << "password=" << config->ContentDbPassword << std::endl;
|
||||
out << "host=" << config->ContentDbHost << std::endl;
|
||||
out << "port=" << config->ContentDbPort << std::endl;
|
||||
out << "default-character-set=utf8" << std::endl;
|
||||
}
|
||||
else {
|
||||
out << "[mysqldump]" << std::endl;
|
||||
out << "user=" << config->DatabaseUsername << std::endl;
|
||||
out << "password=" << config->DatabasePassword << std::endl;
|
||||
out << "host=" << config->DatabaseHost << std::endl;
|
||||
out << "port=" << config->DatabasePort << std::endl;
|
||||
out << "default-character-set=utf8" << std::endl;
|
||||
}
|
||||
out.close();
|
||||
}
|
||||
else {
|
||||
LogError("Failed to open credentials file for writing");
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseDumpService::RemoveCredentialsFile()
|
||||
{
|
||||
if (File::Exists(CREDENTIALS_FILE)) {
|
||||
std::filesystem::remove(CREDENTIALS_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,8 @@ private:
|
||||
std::string GetSetDumpPath();
|
||||
std::string GetQueryServTables();
|
||||
void RemoveSqlBackup();
|
||||
void BuildCredentialsFile();
|
||||
void RemoveCredentialsFile();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
#include <filesystem>
|
||||
#include "database_update.h"
|
||||
#include "../eqemu_logsys.h"
|
||||
#include "../database.h"
|
||||
#include "../strings.h"
|
||||
#include "../rulesys.h"
|
||||
#include "../http/httplib.h"
|
||||
|
||||
#include "database_update_manifest.cpp"
|
||||
#include "database_update_manifest_bots.cpp"
|
||||
#include "database_dump_service.h"
|
||||
|
||||
constexpr int BREAK_LENGTH = 70;
|
||||
|
||||
DatabaseVersion DatabaseUpdate::GetDatabaseVersions()
|
||||
{
|
||||
auto results = m_database->QueryDatabase("SELECT `version`, `bots_version` FROM `db_version` LIMIT 1");
|
||||
if (!results.Success() || !results.RowCount()) {
|
||||
LogError("Failed to read from [db_version] table!");
|
||||
return DatabaseVersion{};
|
||||
}
|
||||
|
||||
auto r = results.begin();
|
||||
|
||||
return DatabaseVersion{
|
||||
.server_database_version = Strings::ToInt(r[0]),
|
||||
.bots_database_version = Strings::ToInt(r[1]),
|
||||
};
|
||||
}
|
||||
|
||||
DatabaseVersion DatabaseUpdate::GetBinaryDatabaseVersions()
|
||||
{
|
||||
return DatabaseVersion{
|
||||
.server_database_version = CURRENT_BINARY_DATABASE_VERSION,
|
||||
.bots_database_version = (RuleB(Bots, Enabled) ? CURRENT_BINARY_BOTS_DATABASE_VERSION : 0),
|
||||
};
|
||||
}
|
||||
|
||||
// the amount of versions we look-back to ensure we have all migrations
|
||||
// we may not want to force these, but just warn about the look-backs
|
||||
constexpr int LOOK_BACK_AMOUNT = 10;
|
||||
|
||||
// this check will take action
|
||||
void DatabaseUpdate::CheckDbUpdates()
|
||||
{
|
||||
InjectBotsVersionColumn();
|
||||
auto v = GetDatabaseVersions();
|
||||
auto b = GetBinaryDatabaseVersions();
|
||||
if (CheckVersionsUpToDate(v, b)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (UpdateManifest(manifest_entries, v.server_database_version, b.server_database_version)) {
|
||||
LogInfo(
|
||||
"Updates ran successfully, setting database version to [{}] from [{}]",
|
||||
b.server_database_version,
|
||||
v.server_database_version
|
||||
);
|
||||
m_database->QueryDatabase(fmt::format("UPDATE `db_version` SET `version` = {}", b.server_database_version));
|
||||
}
|
||||
|
||||
if (b.bots_database_version > 0) {
|
||||
if (UpdateManifest(bot_manifest_entries, v.bots_database_version, b.bots_database_version)) {
|
||||
LogInfo(
|
||||
"Updates ran successfully, setting database version to [{}] from [{}]",
|
||||
b.bots_database_version,
|
||||
v.bots_database_version
|
||||
);
|
||||
m_database->QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE `db_version` SET `bots_version` = {}",
|
||||
b.bots_database_version
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string DatabaseUpdate::GetQueryResult(std::string query)
|
||||
{
|
||||
auto results = m_database->QueryDatabase(query);
|
||||
|
||||
std::vector<std::string> result_lines = {};
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
std::vector<std::string> cols;
|
||||
|
||||
int field_count = results.ColumnCount();
|
||||
cols.reserve(field_count);
|
||||
for (int i = 0; i < field_count; ++i) {
|
||||
if (row[i] != nullptr) {
|
||||
cols.emplace_back(row[i]);
|
||||
}
|
||||
}
|
||||
|
||||
result_lines.emplace_back(Strings::Join(cols, " "));
|
||||
}
|
||||
|
||||
return Strings::Join(result_lines, "\n");
|
||||
}
|
||||
|
||||
bool DatabaseUpdate::ShouldRunMigration(ManifestEntry &e, std::string query_result)
|
||||
{
|
||||
std::string r = Strings::Trim(query_result);
|
||||
if (e.condition == "contains") {
|
||||
return Strings::Contains(r, e.match);
|
||||
}
|
||||
else if (e.condition == "match") {
|
||||
return r == e.match;
|
||||
}
|
||||
else if (e.condition == "missing") {
|
||||
return !Strings::Contains(r, e.match);
|
||||
}
|
||||
else if (e.condition == "empty") {
|
||||
return r.empty();
|
||||
}
|
||||
else if (e.condition == "not_empty") {
|
||||
return !r.empty();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// return true if we ran updates
|
||||
bool DatabaseUpdate::UpdateManifest(
|
||||
std::vector<ManifestEntry> entries,
|
||||
int version_low,
|
||||
int version_high
|
||||
)
|
||||
{
|
||||
std::vector<int> missing_migrations = {};
|
||||
if (version_low != version_high) {
|
||||
|
||||
LogSys.DisableMySQLErrorLogs();
|
||||
for (int version = version_low + 1; version <= version_high; ++version) {
|
||||
for (auto &e: entries) {
|
||||
if (e.version == version) {
|
||||
bool has_migration = true;
|
||||
std::string r = GetQueryResult(e.check);
|
||||
if (ShouldRunMigration(e, r)) {
|
||||
has_migration = false;
|
||||
missing_migrations.emplace_back(e.version);
|
||||
}
|
||||
|
||||
std::string prefix = fmt::format(
|
||||
"[{}]",
|
||||
has_migration ? "ok" : "missing"
|
||||
);
|
||||
|
||||
LogInfo(
|
||||
"[{}] {:>10} | [{}]",
|
||||
e.version,
|
||||
prefix,
|
||||
e.description
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
LogSys.EnableMySQLErrorLogs();
|
||||
LogInfo("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
|
||||
if (!missing_migrations.empty()) {
|
||||
LogInfo("Automatically backing up database before applying updates");
|
||||
LogInfo("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
auto s = DatabaseDumpService();
|
||||
s.SetDumpAllTables(true);
|
||||
s.SetDumpWithCompression(true);
|
||||
s.DatabaseDump();
|
||||
LogInfo("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
}
|
||||
|
||||
if (!missing_migrations.empty()) {
|
||||
LogInfo("Running database migrations. Please wait...");
|
||||
LogInfo("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
}
|
||||
|
||||
for (auto &m: missing_migrations) {
|
||||
for (auto &e: entries) {
|
||||
if (e.version == m) {
|
||||
bool errored_migration = false;
|
||||
|
||||
auto r = m_database->QueryDatabaseMulti(e.sql);
|
||||
|
||||
// ignore empty query result "errors"
|
||||
if (r.ErrorNumber() != 1065 && !r.ErrorMessage().empty()) {
|
||||
LogError("(#{}) [{}]", r.ErrorNumber(), r.ErrorMessage());
|
||||
errored_migration = true;
|
||||
|
||||
LogInfo("Required database update failed. This could be a problem");
|
||||
LogInfo("Would you like to skip this update? [y/n] (Timeout 60s)");
|
||||
|
||||
// user input
|
||||
std::string input;
|
||||
bool gave_input = false;
|
||||
time_t start_time = time(nullptr);
|
||||
time_t wait_time_seconds = 60;
|
||||
|
||||
// spawn a concurrent thread that waits for input from std::cin
|
||||
std::thread t1(
|
||||
[&]() {
|
||||
std::cin >> input;
|
||||
gave_input = true;
|
||||
}
|
||||
);
|
||||
t1.detach();
|
||||
|
||||
// check the inputReceived flag once every 50ms for 10 seconds
|
||||
while (time(nullptr) < start_time + wait_time_seconds && !gave_input) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
}
|
||||
|
||||
// prompt for user skip
|
||||
if (Strings::Trim(input) == "y") {
|
||||
errored_migration = false;
|
||||
LogInfo("Skipping update [{}] [{}]", e.version, e.description);
|
||||
}
|
||||
}
|
||||
|
||||
LogInfo(
|
||||
"[{}] [{}] [{}]",
|
||||
e.version,
|
||||
e.description,
|
||||
(errored_migration ? "error" : "ok")
|
||||
);
|
||||
|
||||
if (errored_migration) {
|
||||
LogError("Fatal | Database migration [{}] failed to run", e.description);
|
||||
LogError("Fatal | Shutting down");
|
||||
std::exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LogInfo("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
DatabaseUpdate *DatabaseUpdate::SetDatabase(Database *db)
|
||||
{
|
||||
m_database = db;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
bool DatabaseUpdate::CheckVersionsUpToDate(DatabaseVersion v, DatabaseVersion b)
|
||||
{
|
||||
LogInfo("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
|
||||
LogInfo(
|
||||
"{:>8} | database [{}] binary [{}] {}",
|
||||
"Server",
|
||||
v.server_database_version,
|
||||
b.server_database_version,
|
||||
(v.server_database_version == b.server_database_version) ? "up to date" : "checking updates"
|
||||
);
|
||||
|
||||
if (RuleB(Bots, Enabled) && b.bots_database_version > 0) {
|
||||
LogInfo(
|
||||
"{:>8} | database [{}] binary [{}] {}",
|
||||
"Bots",
|
||||
v.bots_database_version,
|
||||
b.bots_database_version,
|
||||
(v.bots_database_version == b.bots_database_version) ? "up to date" : "checking updates"
|
||||
);
|
||||
}
|
||||
|
||||
LogInfo("{:>8} | [server.auto_database_updates] [<green>true]", "Config");
|
||||
|
||||
LogInfo("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
|
||||
// server database version is required
|
||||
bool server_up_to_date = v.server_database_version == b.server_database_version;
|
||||
// bots database version is optional, if not enabled then it is always up-to-date
|
||||
bool bots_up_to_date = RuleB(Bots, Enabled) ? v.bots_database_version == b.bots_database_version : true;
|
||||
|
||||
return server_up_to_date && bots_up_to_date;
|
||||
}
|
||||
|
||||
// checks to see if there are pending updates
|
||||
// used by zone to prevent launch or boot loop until updates are applied
|
||||
bool DatabaseUpdate::HasPendingUpdates()
|
||||
{
|
||||
auto v = GetDatabaseVersions();
|
||||
auto b = GetBinaryDatabaseVersions();
|
||||
|
||||
return !CheckVersionsUpToDate(v, b);
|
||||
}
|
||||
|
||||
void DatabaseUpdate::InjectBotsVersionColumn()
|
||||
{
|
||||
auto r = m_database->QueryDatabase("show columns from db_version where Field like '%bots_version%'");
|
||||
if (r.RowCount() == 0) {
|
||||
m_database->QueryDatabase("ALTER TABLE db_version ADD bots_version int(11) DEFAULT '0' AFTER version");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#ifndef EQEMU_DATABASE_UPDATE_H
|
||||
#define EQEMU_DATABASE_UPDATE_H
|
||||
|
||||
#include "../database.h"
|
||||
|
||||
struct ManifestEntry {
|
||||
int version{}; // database version of the migration
|
||||
std::string description{}; // description of the migration ex: "add_new_table" or "add_index_to_table"
|
||||
std::string check{}; // query that checks against the condition
|
||||
std::string condition{}; // condition or "match_type" - Possible values [contains|match|missing|empty|not_empty]
|
||||
std::string match{}; // match field that is not always used, but works in conjunction with "condition" values [missing|match|contains]
|
||||
std::string sql{}; // the SQL DDL that gets ran when the condition is true
|
||||
};
|
||||
|
||||
struct DatabaseVersion {
|
||||
int server_database_version;
|
||||
int bots_database_version;
|
||||
};
|
||||
|
||||
class DatabaseUpdate {
|
||||
public:
|
||||
DatabaseVersion GetDatabaseVersions();
|
||||
DatabaseVersion GetBinaryDatabaseVersions();
|
||||
void CheckDbUpdates();
|
||||
std::string GetQueryResult(std::string query);
|
||||
static bool ShouldRunMigration(ManifestEntry &e, std::string query_result);
|
||||
bool UpdateManifest(std::vector<ManifestEntry> entries, int version_low, int version_high);
|
||||
|
||||
DatabaseUpdate *SetDatabase(Database *db);
|
||||
bool HasPendingUpdates();
|
||||
private:
|
||||
Database *m_database;
|
||||
static bool CheckVersionsUpToDate(DatabaseVersion v, DatabaseVersion b);
|
||||
void InjectBotsVersionColumn();
|
||||
};
|
||||
|
||||
#endif //EQEMU_DATABASE_UPDATE_H
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,84 @@
|
||||
#include "database_update.h"
|
||||
|
||||
std::vector<ManifestEntry> bot_manifest_entries = {
|
||||
ManifestEntry{
|
||||
.version = 9035,
|
||||
.description = "2022_12_04_bot_archery.sql",
|
||||
.check = "SHOW COLUMNS FROM `bot_data` LIKE 'archery_setting'",
|
||||
.condition = "empty",
|
||||
.match = "",
|
||||
.sql = R"(
|
||||
ALTER TABLE `bot_data`
|
||||
ADD COLUMN `archery_setting` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0' AFTER `enforce_spell_settings`;
|
||||
)",
|
||||
},
|
||||
ManifestEntry{
|
||||
.version = 9036,
|
||||
.description = "2023_01_19_drop_bot_views.sql",
|
||||
.check = "SHOW TABLES LIKE 'vw_groups'",
|
||||
.condition = "not_empty",
|
||||
.match = "",
|
||||
.sql = R"(
|
||||
DROP VIEW vw_bot_groups;
|
||||
DROP VIEW vw_bot_character_mobs;
|
||||
DROP VIEW vw_groups;
|
||||
DROP VIEW vw_guild_members;
|
||||
DROP TABLE bot_guild_members;
|
||||
|
||||
)",
|
||||
},
|
||||
ManifestEntry{
|
||||
.version = 9037,
|
||||
.description = "2023_01_22_add_name_index.sql",
|
||||
.check = "show index from bot_data WHERE key_name = 'name`",
|
||||
.condition = "",
|
||||
.match = "empty",
|
||||
.sql = R"(
|
||||
create index `name` on bot_data(`name`);
|
||||
)",
|
||||
},
|
||||
ManifestEntry{
|
||||
.version = 9038,
|
||||
.description = "2023_02_16_add_caster_range.sql",
|
||||
.check = "SHOW COLUMNS FROM `bot_data` LIKE 'caster_range'",
|
||||
.condition = "",
|
||||
.match = "empty",
|
||||
.sql = R"(
|
||||
ALTER TABLE `bot_data`
|
||||
ADD COLUMN `caster_range` INT(11) UNSIGNED NOT NULL DEFAULT '300' AFTER `archery_setting`;
|
||||
)",
|
||||
},
|
||||
ManifestEntry{
|
||||
.version = 9039,
|
||||
.description = "2023_03_31_remove_bot_groups.sql",
|
||||
.check = "SHOW TABLES LIKE 'bot_groups'",
|
||||
.condition = "",
|
||||
.match = "not_empty",
|
||||
.sql = R"(
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
DROP TABLE IF EXISTS `bot_groups`;
|
||||
DROP TABLE IF EXISTS `bot_group_members`;
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
)",
|
||||
},
|
||||
// -- template; copy/paste this when you need to create a new entry
|
||||
// ManifestEntry{
|
||||
// .version = 9228,
|
||||
// .description = "some_new_migration.sql",
|
||||
// .check = "SHOW COLUMNS FROM `table_name` LIKE 'column_name'",
|
||||
// .condition = "empty",
|
||||
// .match = "",
|
||||
// .sql = R"(
|
||||
//
|
||||
//)"
|
||||
};
|
||||
|
||||
// see struct definitions for what each field does
|
||||
// struct ManifestEntry {
|
||||
// int version{}; // database version of the migration
|
||||
// std::string description{}; // description of the migration ex: "add_new_table" or "add_index_to_table"
|
||||
// std::string check{}; // query that checks against the condition
|
||||
// std::string condition{}; // condition or "match_type" - Possible values [contains|match|missing|empty|not_empty]
|
||||
// std::string match{}; // match field that is not always used, but works in conjunction with "condition" values [missing|match|contains]
|
||||
// std::string sql{}; // the SQL DDL that gets ran when the condition is true
|
||||
// };
|
||||
+7
-1799
File diff suppressed because it is too large
Load Diff
@@ -66,6 +66,7 @@ namespace DatabaseSchema {
|
||||
{"character_potionbelt", "id"},
|
||||
{"character_skills", "id"},
|
||||
{"character_spells", "id"},
|
||||
{"character_stats_record", "character_id"},
|
||||
{"character_task_timers", "character_id"},
|
||||
{"character_tasks", "charid"},
|
||||
{"character_tribute", "character_id"},
|
||||
@@ -256,7 +257,9 @@ namespace DatabaseSchema {
|
||||
{
|
||||
return {
|
||||
"chatchannels",
|
||||
"chatchannel_reserved_names",
|
||||
"command_settings",
|
||||
"command_subsettings",
|
||||
"content_flags",
|
||||
"db_str",
|
||||
"eqtime",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <iostream>
|
||||
#include <mysqld_error.h>
|
||||
#include <string.h>
|
||||
#include "strings.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define snprintf _snprintf
|
||||
@@ -305,3 +306,134 @@ void DBcore::SetMutex(Mutex *mutex)
|
||||
|
||||
DBcore::m_mutex = mutex;
|
||||
}
|
||||
|
||||
// executes multiple statements in one query
|
||||
// do not use this in application logic
|
||||
// this was built and maintained for database migrations only
|
||||
MySQLRequestResult DBcore::QueryDatabaseMulti(const std::string &query)
|
||||
{
|
||||
SetMultiStatementsOn();
|
||||
|
||||
BenchTimer timer;
|
||||
timer.reset();
|
||||
|
||||
LockMutex lock(m_mutex);
|
||||
|
||||
// Reconnect if we are not connected before hand.
|
||||
if (pStatus != Connected) {
|
||||
Open();
|
||||
}
|
||||
auto r = MySQLRequestResult{};
|
||||
|
||||
int status = mysql_real_query(mysql, query.c_str(), query.length());
|
||||
|
||||
// process single result
|
||||
if (status != 0) {
|
||||
unsigned int error_number = mysql_errno(mysql);
|
||||
|
||||
if (error_number == CR_SERVER_GONE_ERROR) {
|
||||
pStatus = Error;
|
||||
}
|
||||
|
||||
// error logging
|
||||
if (mysql_errno(mysql) > 0 && query.length() > 0 && mysql_errno(mysql) != 1065) {
|
||||
std::string error_raw = fmt::format("{}", mysql_error(mysql));
|
||||
std::string mysql_err = Strings::Trim(error_raw);
|
||||
std::string clean_query = Strings::Replace(query, "\n", "");
|
||||
LogMySQLError("[{}] ({}) query [{}]", mysql_err, mysql_errno(mysql), clean_query);
|
||||
|
||||
MYSQL_RES *res = mysql_store_result(mysql);
|
||||
|
||||
uint32 row_count = 0;
|
||||
if (res) {
|
||||
row_count = (uint32) mysql_num_rows(res);
|
||||
}
|
||||
|
||||
r = MySQLRequestResult(
|
||||
res,
|
||||
(uint32) mysql_affected_rows(mysql),
|
||||
row_count,
|
||||
(uint32) mysql_field_count(mysql),
|
||||
(uint32) mysql_insert_id(mysql)
|
||||
);
|
||||
|
||||
std::string error_message = mysql_error(mysql);
|
||||
r.SetErrorMessage(error_message);
|
||||
r.SetErrorNumber(mysql_errno(mysql));
|
||||
|
||||
if (res) {
|
||||
mysql_free_result(res);
|
||||
}
|
||||
|
||||
SetMultiStatementsOff();
|
||||
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int index = 0;
|
||||
|
||||
// there could be a query with a semicolon in the actual data, this is best effort for
|
||||
// logging / display purposes
|
||||
// rare that we see this when this is only used in DDL statements
|
||||
auto pieces = Strings::Split(query, ";");
|
||||
|
||||
// process each statement result
|
||||
do {
|
||||
uint32 row_count = 0;
|
||||
MYSQL_RES *res = mysql_store_result(mysql);
|
||||
|
||||
r = MySQLRequestResult(
|
||||
res,
|
||||
(uint32) mysql_affected_rows(mysql),
|
||||
row_count,
|
||||
(uint32) mysql_field_count(mysql),
|
||||
(uint32) mysql_insert_id(mysql)
|
||||
);
|
||||
|
||||
if (pieces.size() >= index) {
|
||||
auto piece = pieces[index];
|
||||
LogMySQLQuery(
|
||||
"{} -- ({} row{} affected) ({}s)",
|
||||
piece,
|
||||
r.RowsAffected(),
|
||||
r.RowsAffected() == 1 ? "" : "s",
|
||||
std::to_string(timer.elapsed())
|
||||
);
|
||||
}
|
||||
|
||||
if (res) {
|
||||
row_count = (uint32) mysql_num_rows(res);
|
||||
}
|
||||
|
||||
// more results? -1 = no, >0 = error, 0 = yes (keep looping)
|
||||
if ((status = mysql_next_result(mysql)) > 0) {
|
||||
if (mysql_errno(mysql) > 0) {
|
||||
LogMySQLError("[{}] [{}]", mysql_errno(mysql), mysql_error(mysql));
|
||||
}
|
||||
|
||||
mysql_free_result(res);
|
||||
|
||||
// error logging
|
||||
std::string error_message = mysql_error(mysql);
|
||||
r.SetErrorMessage(error_message);
|
||||
r.SetErrorNumber(mysql_errno(mysql));
|
||||
|
||||
SetMultiStatementsOff();
|
||||
|
||||
// we handle errors elsewhere
|
||||
return r;
|
||||
}
|
||||
|
||||
if (res) {
|
||||
mysql_free_result(res);
|
||||
}
|
||||
|
||||
index++;
|
||||
} while (status == 0);
|
||||
|
||||
SetMultiStatementsOff();
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
+14
-1
@@ -25,6 +25,7 @@ public:
|
||||
eStatus GetStatus() { return pStatus; }
|
||||
MySQLRequestResult QueryDatabase(const char *query, uint32 querylen, bool retryOnFailureOnce = true);
|
||||
MySQLRequestResult QueryDatabase(const std::string& query, bool retryOnFailureOnce = true);
|
||||
MySQLRequestResult QueryDatabaseMulti(const std::string &query);
|
||||
void TransactionBegin();
|
||||
void TransactionCommit();
|
||||
void TransactionRollback();
|
||||
@@ -77,8 +78,20 @@ private:
|
||||
uint32 pPort;
|
||||
bool pSSL;
|
||||
|
||||
// allows multiple queries to be executed within the same query
|
||||
// do not use this under normal operation
|
||||
// we use this during database migrations only currently
|
||||
void SetMultiStatementsOn()
|
||||
{
|
||||
mysql_set_server_option(mysql, MYSQL_OPTION_MULTI_STATEMENTS_ON);
|
||||
}
|
||||
|
||||
// disables multiple statements to be executed in one query
|
||||
void SetMultiStatementsOff()
|
||||
{
|
||||
mysql_set_server_option(mysql, MYSQL_OPTION_MULTI_STATEMENTS_OFF);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+69
-119
@@ -11,7 +11,7 @@
|
||||
are required to give you total support for your newly bought product;
|
||||
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
|
||||
@@ -19,131 +19,81 @@
|
||||
|
||||
#include "deity.h"
|
||||
|
||||
|
||||
EQ::deity::DeityTypeBit EQ::deity::ConvertDeityTypeToDeityTypeBit(DeityType deity_type)
|
||||
EQ::deity::DeityTypeBit EQ::deity::GetDeityBitmask(DeityType deity_type)
|
||||
{
|
||||
switch (deity_type) {
|
||||
case DeityBertoxxulous:
|
||||
return bit_DeityBertoxxulous;
|
||||
case DeityBrellSirilis:
|
||||
return bit_DeityBrellSirilis;
|
||||
case DeityCazicThule:
|
||||
return bit_DeityCazicThule;
|
||||
case DeityErollisiMarr:
|
||||
return bit_DeityErollisiMarr;
|
||||
case DeityBristlebane:
|
||||
return bit_DeityBristlebane;
|
||||
case DeityInnoruuk:
|
||||
return bit_DeityInnoruuk;
|
||||
case DeityKarana:
|
||||
return bit_DeityKarana;
|
||||
case DeityMithanielMarr:
|
||||
return bit_DeityMithanielMarr;
|
||||
case DeityPrexus:
|
||||
return bit_DeityPrexus;
|
||||
case DeityQuellious:
|
||||
return bit_DeityQuellious;
|
||||
case DeityRallosZek:
|
||||
return bit_DeityRallosZek;
|
||||
case DeityRodcetNife:
|
||||
return bit_DeityRodcetNife;
|
||||
case DeitySolusekRo:
|
||||
return bit_DeitySolusekRo;
|
||||
case DeityTheTribunal:
|
||||
return bit_DeityTheTribunal;
|
||||
case DeityTunare:
|
||||
return bit_DeityTunare;
|
||||
case DeityVeeshan:
|
||||
return bit_DeityVeeshan;
|
||||
case DeityAgnostic_LB:
|
||||
case DeityAgnostic:
|
||||
return bit_DeityAgnostic;
|
||||
default:
|
||||
return bit_DeityAll;
|
||||
};
|
||||
case DeityBertoxxulous:
|
||||
return bit_DeityBertoxxulous;
|
||||
case DeityBrellSirilis:
|
||||
return bit_DeityBrellSirilis;
|
||||
case DeityCazicThule:
|
||||
return bit_DeityCazicThule;
|
||||
case DeityErollisiMarr:
|
||||
return bit_DeityErollisiMarr;
|
||||
case DeityBristlebane:
|
||||
return bit_DeityBristlebane;
|
||||
case DeityInnoruuk:
|
||||
return bit_DeityInnoruuk;
|
||||
case DeityKarana:
|
||||
return bit_DeityKarana;
|
||||
case DeityMithanielMarr:
|
||||
return bit_DeityMithanielMarr;
|
||||
case DeityPrexus:
|
||||
return bit_DeityPrexus;
|
||||
case DeityQuellious:
|
||||
return bit_DeityQuellious;
|
||||
case DeityRallosZek:
|
||||
return bit_DeityRallosZek;
|
||||
case DeityRodcetNife:
|
||||
return bit_DeityRodcetNife;
|
||||
case DeitySolusekRo:
|
||||
return bit_DeitySolusekRo;
|
||||
case DeityTheTribunal:
|
||||
return bit_DeityTheTribunal;
|
||||
case DeityTunare:
|
||||
return bit_DeityTunare;
|
||||
case DeityVeeshan:
|
||||
return bit_DeityVeeshan;
|
||||
case DeityAgnostic_LB:
|
||||
case DeityAgnostic:
|
||||
return bit_DeityAgnostic;
|
||||
default:
|
||||
return bit_DeityAll;
|
||||
}
|
||||
}
|
||||
|
||||
EQ::deity::DeityType EQ::deity::ConvertDeityTypeBitToDeityType(DeityTypeBit deity_type_bit)
|
||||
const std::map<EQ::deity::DeityType, std::string>& EQ::deity::GetDeityMap()
|
||||
{
|
||||
switch (deity_type_bit) {
|
||||
case bit_DeityAgnostic:
|
||||
return DeityAgnostic;
|
||||
case bit_DeityBertoxxulous:
|
||||
return DeityBertoxxulous;
|
||||
case bit_DeityBrellSirilis:
|
||||
return DeityBrellSirilis;
|
||||
case bit_DeityCazicThule:
|
||||
return DeityCazicThule;
|
||||
case bit_DeityErollisiMarr:
|
||||
return DeityErollisiMarr;
|
||||
case bit_DeityBristlebane:
|
||||
return DeityBristlebane;
|
||||
case bit_DeityInnoruuk:
|
||||
return DeityInnoruuk;
|
||||
case bit_DeityKarana:
|
||||
return DeityKarana;
|
||||
case bit_DeityMithanielMarr:
|
||||
return DeityMithanielMarr;
|
||||
case bit_DeityPrexus:
|
||||
return DeityPrexus;
|
||||
case bit_DeityQuellious:
|
||||
return DeityQuellious;
|
||||
case bit_DeityRallosZek:
|
||||
return DeityRallosZek;
|
||||
case bit_DeityRodcetNife:
|
||||
return DeityRodcetNife;
|
||||
case bit_DeitySolusekRo:
|
||||
return DeitySolusekRo;
|
||||
case bit_DeityTheTribunal:
|
||||
return DeityTheTribunal;
|
||||
case bit_DeityTunare:
|
||||
return DeityTunare;
|
||||
case bit_DeityVeeshan:
|
||||
return DeityVeeshan;
|
||||
default:
|
||||
return DeityUnknown;
|
||||
static const std::map<EQ::deity::DeityType, std::string> deity_map = {
|
||||
{ DeityAgnostic, "Agnostic" },
|
||||
{ DeityAgnostic_LB, "Agnostic" },
|
||||
{ DeityBertoxxulous, "Bertoxxulous" },
|
||||
{ DeityBrellSirilis, "Brell Serilis" },
|
||||
{ DeityBristlebane, "Bristlebane" },
|
||||
{ DeityCazicThule, "Cazic-Thule" },
|
||||
{ DeityErollisiMarr, "Erollisi Marr" },
|
||||
{ DeityInnoruuk, "Innoruuk" },
|
||||
{ DeityKarana, "Karana" },
|
||||
{ DeityMithanielMarr, "Mithaniel Marr" },
|
||||
{ DeityPrexus, "Prexus" },
|
||||
{ DeityQuellious, "Quellious" },
|
||||
{ DeityRallosZek, "Rallos Zek" },
|
||||
{ DeityRodcetNife, "Rodcet Nife" },
|
||||
{ DeitySolusekRo, "Solusek Ro" },
|
||||
{ DeityTheTribunal, "The Tribunal" },
|
||||
{ DeityTunare, "Tunare" },
|
||||
{ DeityVeeshan, "Veeshan" }
|
||||
};
|
||||
|
||||
return deity_map;
|
||||
}
|
||||
|
||||
const char* EQ::deity::DeityName(DeityType deity_type)
|
||||
std::string EQ::deity::GetDeityName(DeityType deity_type)
|
||||
{
|
||||
switch (deity_type) {
|
||||
case DeityBertoxxulous:
|
||||
return "Bertoxxulous";
|
||||
case DeityBrellSirilis:
|
||||
return "Brell Serilis";
|
||||
case DeityCazicThule:
|
||||
return "Cazic-Thule";
|
||||
case DeityErollisiMarr:
|
||||
return "Erollisi Marr";
|
||||
case DeityBristlebane:
|
||||
return "Bristlebane";
|
||||
case DeityInnoruuk:
|
||||
return "Innoruuk";
|
||||
case DeityKarana:
|
||||
return "Karana";
|
||||
case DeityMithanielMarr:
|
||||
return "Mithaniel Marr";
|
||||
case DeityPrexus:
|
||||
return "Prexus";
|
||||
case DeityQuellious:
|
||||
return "Quellious";
|
||||
case DeityRallosZek:
|
||||
return "Rallos Zek";
|
||||
case DeityRodcetNife:
|
||||
return "Rodcet Nife";
|
||||
case DeitySolusekRo:
|
||||
return "Solusek Ro";
|
||||
case DeityTheTribunal:
|
||||
return "The Tribunal";
|
||||
case DeityTunare:
|
||||
return "Tunare";
|
||||
case DeityVeeshan:
|
||||
return "Veeshan";
|
||||
case DeityAgnostic_LB:
|
||||
case DeityAgnostic:
|
||||
return "Agnostic";
|
||||
default:
|
||||
return "Unknown";
|
||||
};
|
||||
|
||||
if (EQ::deity::GetDeityMap().find(deity_type) != EQ::deity::GetDeityMap().end()) {
|
||||
return EQ::deity::GetDeityMap().find(deity_type)->second;
|
||||
}
|
||||
|
||||
return std::string();
|
||||
}
|
||||
|
||||
+22
-21
@@ -21,6 +21,8 @@
|
||||
#define COMMON_DEITY_H
|
||||
|
||||
#include "types.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace EQ
|
||||
@@ -49,30 +51,29 @@ namespace EQ
|
||||
};
|
||||
|
||||
enum DeityTypeBit : uint32 {
|
||||
bit_DeityNone = 0x00000000,
|
||||
bit_DeityAgnostic = 0x00000001,
|
||||
bit_DeityBertoxxulous = 0x00000002,
|
||||
bit_DeityBrellSirilis = 0x00000004,
|
||||
bit_DeityCazicThule = 0x00000008,
|
||||
bit_DeityErollisiMarr = 0x00000010,
|
||||
bit_DeityBristlebane = 0x00000020,
|
||||
bit_DeityInnoruuk = 0x00000040,
|
||||
bit_DeityKarana = 0x00000080,
|
||||
bit_DeityAgnostic = 0x00000001,
|
||||
bit_DeityBertoxxulous = 0x00000002,
|
||||
bit_DeityBrellSirilis = 0x00000004,
|
||||
bit_DeityCazicThule = 0x00000008,
|
||||
bit_DeityErollisiMarr = 0x00000010,
|
||||
bit_DeityBristlebane = 0x00000020,
|
||||
bit_DeityInnoruuk = 0x00000040,
|
||||
bit_DeityKarana = 0x00000080,
|
||||
bit_DeityMithanielMarr = 0x00000100,
|
||||
bit_DeityPrexus = 0x00000200,
|
||||
bit_DeityQuellious = 0x00000400,
|
||||
bit_DeityRallosZek = 0x00000800,
|
||||
bit_DeityRodcetNife = 0x00001000,
|
||||
bit_DeitySolusekRo = 0x00002000,
|
||||
bit_DeityTheTribunal = 0x00004000,
|
||||
bit_DeityTunare = 0x00008000,
|
||||
bit_DeityVeeshan = 0x00010000,
|
||||
bit_DeityAll = 0xFFFFFFFF
|
||||
bit_DeityPrexus = 0x00000200,
|
||||
bit_DeityQuellious = 0x00000400,
|
||||
bit_DeityRallosZek = 0x00000800,
|
||||
bit_DeityRodcetNife = 0x00001000,
|
||||
bit_DeitySolusekRo = 0x00002000,
|
||||
bit_DeityTheTribunal = 0x00004000,
|
||||
bit_DeityTunare = 0x00008000,
|
||||
bit_DeityVeeshan = 0x00010000,
|
||||
bit_DeityAll = UINT32_MAX
|
||||
};
|
||||
|
||||
extern DeityTypeBit ConvertDeityTypeToDeityTypeBit(DeityType deity_type);
|
||||
extern DeityType ConvertDeityTypeBitToDeityType(DeityTypeBit deity_type_bit);
|
||||
extern const char* DeityName(DeityType deity_type);
|
||||
extern DeityTypeBit GetDeityBitmask(DeityType deity_type);
|
||||
extern std::string GetDeityName(DeityType deity_type);
|
||||
extern const std::map<DeityType, std::string>& GetDeityMap();
|
||||
|
||||
} /*deity*/
|
||||
|
||||
|
||||
@@ -316,6 +316,7 @@ N(OP_LootRequest),
|
||||
N(OP_ManaChange),
|
||||
N(OP_ManaUpdate),
|
||||
N(OP_MarkNPC),
|
||||
N(OP_MarkRaidNPC),
|
||||
N(OP_Marquee),
|
||||
N(OP_MemorizeSpell),
|
||||
N(OP_Mend),
|
||||
@@ -398,6 +399,8 @@ N(OP_PVPLeaderBoardRequest),
|
||||
N(OP_PVPStats),
|
||||
N(OP_QueryResponseThing),
|
||||
N(OP_QueryUCSServerStatus),
|
||||
N(OP_RaidDelegateAbility),
|
||||
N(OP_RaidClearNPCMarks),
|
||||
N(OP_RaidInvite),
|
||||
N(OP_RaidJoin),
|
||||
N(OP_RaidUpdate),
|
||||
|
||||
@@ -4105,7 +4105,9 @@ struct UpdateLeadershipAA_Struct {
|
||||
|
||||
enum
|
||||
{
|
||||
GroupLeadershipAbility_MarkNPC = 0
|
||||
GroupLeadershipAbility_MarkNPC = 0,
|
||||
RaidLeadershipAbility_MarkNPC = 16,
|
||||
RaidLeadershipAbility_MainAssist = 19
|
||||
};
|
||||
|
||||
struct DoGroupLeadershipAbility_Struct
|
||||
@@ -4149,8 +4151,10 @@ struct InspectBuffs_Struct {
|
||||
struct RaidGeneral_Struct {
|
||||
/*00*/ uint32 action; //=10
|
||||
/*04*/ char player_name[64]; //should both be the player's name
|
||||
/*64*/ char leader_name[64];
|
||||
/*132*/ uint32 parameter;
|
||||
/*68*/ uint32 unknown1;
|
||||
/*72*/ char leader_name[64];
|
||||
/*136*/ uint32 parameter;
|
||||
/*200*/ char note[64];
|
||||
};
|
||||
|
||||
struct RaidAddMember_Struct {
|
||||
|
||||
@@ -85,6 +85,12 @@ void EQEmuConfig::parse_config()
|
||||
//The only way to enable locked is by switching to true, meaning this value is always false until manually set true
|
||||
Locked = false;
|
||||
if (_root["server"]["world"].get("locked", "false").asString() == "true") { Locked = true; }
|
||||
|
||||
auto_database_updates = false;
|
||||
if (_root["server"].get("auto_database_updates", "true").asString() == "true") {
|
||||
auto_database_updates = true;
|
||||
}
|
||||
|
||||
WorldIP = _root["server"]["world"]["tcp"].get("host", "127.0.0.1").asString();
|
||||
WorldTCPPort = Strings::ToUnsignedInt(_root["server"]["world"]["tcp"].get("port", "9000").asString());
|
||||
|
||||
|
||||
@@ -120,6 +120,8 @@ class EQEmuConfig
|
||||
uint16 ZonePortHigh;
|
||||
uint8 DefaultStatus;
|
||||
|
||||
bool auto_database_updates;
|
||||
|
||||
// uint16 DynamicCount;
|
||||
|
||||
// map<string,uint16> StaticZones;
|
||||
|
||||
+92
-21
@@ -104,9 +104,9 @@ EQEmuLogSys *EQEmuLogSys::LoadLogSettingsDefaults()
|
||||
/**
|
||||
* RFC 5424
|
||||
*/
|
||||
log_settings[Logs::Error].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Warning].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Info].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Error].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Warning].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Info].log_to_console = static_cast<uint8>(Logs::General);
|
||||
|
||||
/**
|
||||
* Set Category enabled status on defaults
|
||||
@@ -219,7 +219,7 @@ void EQEmuLogSys::ProcessConsoleMessage(
|
||||
int line
|
||||
)
|
||||
{
|
||||
bool is_error = (
|
||||
bool is_error = (
|
||||
log_category == Logs::LogCategory::Error ||
|
||||
log_category == Logs::LogCategory::MySQLError ||
|
||||
log_category == Logs::LogCategory::Crash ||
|
||||
@@ -261,7 +261,7 @@ void EQEmuLogSys::ProcessConsoleMessage(
|
||||
}
|
||||
|
||||
if (log_category == Logs::LogCategory::MySQLQuery) {
|
||||
auto s = Strings::Split(message, "--");
|
||||
auto s = Strings::Split(message, "--");
|
||||
if (s.size() > 1) {
|
||||
std::string query = Strings::Trim(s[0]);
|
||||
std::string meta = Strings::Trim(s[1]);
|
||||
@@ -297,19 +297,76 @@ void EQEmuLogSys::ProcessConsoleMessage(
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_upper) {
|
||||
(!is_error ? std::cout : std::cerr)
|
||||
<< rang::fgB::gray
|
||||
<< "["
|
||||
<< rang::style::bold
|
||||
<< rang::fgB::yellow
|
||||
<< e
|
||||
<< rang::fgB::gray
|
||||
<< "] "
|
||||
;
|
||||
// color matching in []
|
||||
// ex: [<red>variable] would produce [variable] with red inside brackets
|
||||
std::map<std::string, rang::fgB> colors = {
|
||||
{"<black>", rang::fgB::black},
|
||||
{"<green>", rang::fgB::green},
|
||||
{"<yellow>", rang::fgB::yellow},
|
||||
{"<blue>", rang::fgB::blue},
|
||||
{"<magenta>", rang::fgB::magenta},
|
||||
{"<cyan>", rang::fgB::cyan},
|
||||
{"<gray>", rang::fgB::gray},
|
||||
{"<red>", rang::fgB::red},
|
||||
};
|
||||
|
||||
bool match_color = false;
|
||||
for (auto &c: colors) {
|
||||
if (Strings::Contains(e, c.first)) {
|
||||
e = Strings::Replace(e, c.first, "");
|
||||
(!is_error ? std::cout : std::cerr)
|
||||
<< rang::fgB::gray
|
||||
<< "["
|
||||
<< rang::style::bold
|
||||
<< c.second
|
||||
<< e
|
||||
<< rang::style::reset
|
||||
<< rang::fgB::gray
|
||||
<< "] ";
|
||||
match_color = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
(!is_error ? std::cout : std::cerr) << rang::fgB::gray << "[" << e << "] ";
|
||||
|
||||
// string match to colors
|
||||
std::map<std::string, rang::fgB> matches = {
|
||||
{"missing", rang::fgB::red},
|
||||
{"error", rang::fgB::red},
|
||||
{"ok", rang::fgB::green},
|
||||
};
|
||||
|
||||
for (auto &c: matches) {
|
||||
if (Strings::Contains(e, c.first)) {
|
||||
(!is_error ? std::cout : std::cerr)
|
||||
<< rang::fgB::gray
|
||||
<< "["
|
||||
<< rang::style::bold
|
||||
<< c.second
|
||||
<< e
|
||||
<< rang::style::reset
|
||||
<< rang::fgB::gray
|
||||
<< "] ";
|
||||
match_color = true;
|
||||
}
|
||||
}
|
||||
|
||||
// if we don't match a color in either the string matching or
|
||||
// the color tag matching, we default to yellow inside brackets
|
||||
// if uppercase, does not get colored
|
||||
if (!match_color) {
|
||||
if (!is_upper) {
|
||||
(!is_error ? std::cout : std::cerr)
|
||||
<< rang::fgB::gray
|
||||
<< "["
|
||||
<< rang::style::bold
|
||||
<< rang::fgB::yellow
|
||||
<< e
|
||||
<< rang::style::reset
|
||||
<< rang::fgB::gray
|
||||
<< "] ";
|
||||
}
|
||||
else {
|
||||
(!is_error ? std::cout : std::cerr) << rang::fgB::gray << "[" << e << "] ";
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -389,6 +446,8 @@ void EQEmuLogSys::Out(
|
||||
// remove this when we remove all legacy logs
|
||||
bool ignore_log_legacy_format = (
|
||||
log_category == Logs::Netcode ||
|
||||
log_category == Logs::MySQLQuery ||
|
||||
log_category == Logs::MySQLError ||
|
||||
log_category == Logs::PacketServerClient ||
|
||||
log_category == Logs::PacketClientServer ||
|
||||
log_category == Logs::PacketServerToServer
|
||||
@@ -523,6 +582,8 @@ void EQEmuLogSys::StartFileLogs(const std::string &log_name)
|
||||
*/
|
||||
void EQEmuLogSys::SilenceConsoleLogging()
|
||||
{
|
||||
std::copy(std::begin(log_settings), std::end(log_settings), std::begin(pre_silence_settings));
|
||||
|
||||
for (int log_index = Logs::AA; log_index != Logs::MaxCategoryID; log_index++) {
|
||||
log_settings[log_index].log_to_console = 0;
|
||||
log_settings[log_index].is_category_enabled = 0;
|
||||
@@ -536,10 +597,7 @@ void EQEmuLogSys::SilenceConsoleLogging()
|
||||
*/
|
||||
void EQEmuLogSys::EnableConsoleLogging()
|
||||
{
|
||||
for (int log_index = Logs::AA; log_index != Logs::MaxCategoryID; log_index++) {
|
||||
log_settings[log_index].log_to_console = Logs::General;
|
||||
log_settings[log_index].is_category_enabled = 1;
|
||||
}
|
||||
std::copy(std::begin(pre_silence_settings), std::end(pre_silence_settings), std::begin(log_settings));
|
||||
}
|
||||
|
||||
EQEmuLogSys *EQEmuLogSys::LoadLogDatabaseSettings()
|
||||
@@ -741,3 +799,16 @@ EQEmuLogSys *EQEmuLogSys::SetLogPath(const std::string &log_path)
|
||||
return this;
|
||||
}
|
||||
|
||||
void EQEmuLogSys::DisableMySQLErrorLogs()
|
||||
{
|
||||
log_settings[Logs::MySQLError].log_to_file = 0;
|
||||
log_settings[Logs::MySQLError].log_to_console = 0;
|
||||
log_settings[Logs::MySQLError].log_to_gmsay = 0;
|
||||
}
|
||||
|
||||
void EQEmuLogSys::EnableMySQLErrorLogs()
|
||||
{
|
||||
log_settings[Logs::MySQLError].log_to_file = 1;
|
||||
log_settings[Logs::MySQLError].log_to_console = 1;
|
||||
log_settings[Logs::MySQLError].log_to_gmsay = 1;
|
||||
}
|
||||
|
||||
@@ -137,6 +137,7 @@ namespace Logs {
|
||||
Bugs,
|
||||
QuestErrors,
|
||||
PlayerEvents,
|
||||
DataBuckets,
|
||||
MaxCategoryID /* Don't Remove this */
|
||||
};
|
||||
|
||||
@@ -233,6 +234,7 @@ namespace Logs {
|
||||
"Bugs",
|
||||
"QuestErrors",
|
||||
"PlayerEvents",
|
||||
"DataBuckets",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -324,6 +326,9 @@ public:
|
||||
*/
|
||||
LogSettings log_settings[Logs::LogCategory::MaxCategoryID]{};
|
||||
|
||||
// temporary bucket to re-load after silencing
|
||||
LogSettings pre_silence_settings[Logs::LogCategory::MaxCategoryID]{};
|
||||
|
||||
struct LogEnabled {
|
||||
bool log_to_file_enabled;
|
||||
bool log_to_console_enabled;
|
||||
@@ -374,6 +379,9 @@ public:
|
||||
[[nodiscard]] const std::string &GetLogPath() const;
|
||||
EQEmuLogSys * SetLogPath(const std::string &log_path);
|
||||
|
||||
void DisableMySQLErrorLogs();
|
||||
void EnableMySQLErrorLogs();
|
||||
|
||||
private:
|
||||
|
||||
// reference to database
|
||||
|
||||
@@ -794,6 +794,16 @@
|
||||
OutF(LogSys, Logs::Detail, Logs::PlayerEvents, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogDataBuckets(message, ...) do {\
|
||||
if (LogSys.IsLogEnabled(Logs::General, Logs::DataBuckets))\
|
||||
OutF(LogSys, Logs::General, Logs::DataBuckets, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogDataBucketsDetail(message, ...) do {\
|
||||
if (LogSys.IsLogEnabled(Logs::Detail, Logs::DataBuckets))\
|
||||
OutF(LogSys, Logs::Detail, Logs::DataBuckets, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define Log(debug_level, log_category, message, ...) do {\
|
||||
if (LogSys.IsLogEnabled(debug_level, log_category))\
|
||||
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
|
||||
+15
-29
@@ -240,36 +240,22 @@ enum { //some random constants
|
||||
|
||||
//Some hard coded statuses from commands and other places:
|
||||
enum {
|
||||
minStatusToBeGM = 40,
|
||||
minStatusToUseGMCommands = 80,
|
||||
minStatusToKick = 150,
|
||||
minStatusToAvoidFalling = 100,
|
||||
minStatusToHaveInvalidSpells = 80,
|
||||
minStatusToHaveInvalidSkills = 80,
|
||||
minStatusToIgnoreZoneFlags = 80,
|
||||
minStatusToBeGM = 40,
|
||||
minStatusToUseGMCommands = 80,
|
||||
minStatusToKick = 150,
|
||||
minStatusToAvoidFalling = 100,
|
||||
minStatusToIgnoreZoneFlags = 80,
|
||||
minStatusToSeeOthersZoneFlags = 80,
|
||||
minStatusToEditOtherGuilds = 80,
|
||||
commandMovecharSelfOnly = 80, //below this == only self move allowed
|
||||
commandMovecharToSpecials = 200, //ability to send people to cshom/load zones
|
||||
commandZoneToSpecials = 80, //zone to cshome, out of load zones
|
||||
commandToggleAI = 250, //can turn NPC AI on and off
|
||||
commandCastSpecials = 100, //can cast special spells
|
||||
commandInstacast = 100, //insta-cast all #casted spells
|
||||
commandLevelAboveCap = 100, //can #level players above level cap
|
||||
commandLevelNPCAboveCap = 100, //can #level NPCs above level cap
|
||||
commandSetSkillsOther = 100, //ability to setskills on others
|
||||
commandRaceOthers = 100, //ability to #race on others
|
||||
commandGenderOthers = 100, //ability to #gender on others
|
||||
commandTextureOthers = 100, //ability to #texture on others
|
||||
commandDoAnimOthers = 100, //can #doanim on others
|
||||
commandLockZones = 101, //can lock or unlock zones
|
||||
commandEditPlayerCorpses = 150, //can Edit Player Corpses
|
||||
commandChangeFlags = 200, //ability to set/refresh flags
|
||||
commandBanPlayers = 100, //can set bans on players
|
||||
commandChangeDatarate = 201, //edit client's data rate
|
||||
commandZoneToCoords = 0, //can #zone with coords
|
||||
commandInterrogateInv = 100, //below this == only log on error state and self-only target dump
|
||||
commandInvSnapshot = 150 //ability to clear/restore snapshots
|
||||
minStatusToEditOtherGuilds = 80,
|
||||
commandMovecharSelfOnly = 80, //below this == only self move allowed
|
||||
commandMovecharToSpecials = 200, //ability to send people to cshom/load zones
|
||||
commandCastSpecials = 100, //can cast special spells
|
||||
commandInstacast = 100, //insta-cast all #casted spells
|
||||
commandDoAnimOthers = 100, //can #doanim on others
|
||||
commandLockZones = 101, //can lock or unlock zones
|
||||
commandEditPlayerCorpses = 150, //can Edit Player Corpses
|
||||
commandInterrogateInv = 100, //below this == only log on error state and self-only target dump
|
||||
commandInvSnapshot = 150 //ability to clear/restore snapshots
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@ bool EQ::InventoryProfile::SwapItem(
|
||||
fail_state = swapRaceClass;
|
||||
return false;
|
||||
}
|
||||
if (deity_id && source_item->Deity && !(deity::ConvertDeityTypeToDeityTypeBit((deity::DeityType)deity_id) & source_item->Deity)) {
|
||||
if (deity_id && source_item->Deity && !(deity::GetDeityBitmask((deity::DeityType)deity_id) & source_item->Deity)) {
|
||||
fail_state = swapDeity;
|
||||
return false;
|
||||
}
|
||||
@@ -379,7 +379,7 @@ bool EQ::InventoryProfile::SwapItem(
|
||||
fail_state = swapRaceClass;
|
||||
return false;
|
||||
}
|
||||
if (deity_id && destination_item->Deity && !(deity::ConvertDeityTypeToDeityTypeBit((deity::DeityType)deity_id) & destination_item->Deity)) {
|
||||
if (deity_id && destination_item->Deity && !(deity::GetDeityBitmask((deity::DeityType)deity_id) & destination_item->Deity)) {
|
||||
fail_state = swapDeity;
|
||||
return false;
|
||||
}
|
||||
@@ -1444,7 +1444,7 @@ int16 EQ::InventoryProfile::_PutItem(int16 slot_id, ItemInstance* inst)
|
||||
}
|
||||
|
||||
if (result == INVALID_INDEX) {
|
||||
LogError("InventoryProfile::_PutItem: Invalid slot_id specified ({}) with parent slot id ({})", slot_id, parentSlot);
|
||||
LogError("Invalid slot_id specified ({}) with parent slot id ({})", slot_id, parentSlot);
|
||||
InventoryProfile::MarkDirty(inst); // Slot not found, clean up
|
||||
}
|
||||
|
||||
|
||||
@@ -720,12 +720,14 @@ EQ::ItemInstance* EQ::ItemInstance::RemoveAugment(uint8 index)
|
||||
|
||||
bool EQ::ItemInstance::IsAugmented()
|
||||
{
|
||||
if (!m_item || !m_item->IsClassCommon())
|
||||
if (!m_item || !m_item->IsClassCommon()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int index = invaug::SOCKET_BEGIN; index <= invaug::SOCKET_END; ++index) {
|
||||
if (GetAugmentItemID(index))
|
||||
for (uint8 slot_id = invaug::SOCKET_BEGIN; slot_id <= invaug::SOCKET_END; ++slot_id) {
|
||||
if (GetAugmentItemID(slot_id)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -48,5 +48,7 @@
|
||||
#define LANG_HADAL 26
|
||||
#define LANG_UNKNOWN 27
|
||||
|
||||
#define MAX_LANGUAGE_SKILL 100
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
-117
@@ -214,123 +214,6 @@ std::string x;
|
||||
return i;
|
||||
}
|
||||
|
||||
void LoadItemDBFieldNames() {
|
||||
DBFieldNames[0]="N/A"; // Charges
|
||||
DBFieldNames[1]="unknown002"; // ?
|
||||
DBFieldNames[2]="N/A"; // Current Equip Slot
|
||||
DBFieldNames[3]="unknown004";
|
||||
DBFieldNames[4]="unknown005"; // ?
|
||||
DBFieldNames[5]="itemclass"; // "Item Type (0=common, 1=container, 2=book)"
|
||||
DBFieldNames[6]="name"; // Name
|
||||
DBFieldNames[7]="lore"; // "Lore Name (*=lore, &=summoned, #=artifact)"
|
||||
DBFieldNames[8]="idfile"; // IDFile
|
||||
DBFieldNames[9]="id"; // ItemNumber
|
||||
DBFieldNames[10]="weight"; // Weight
|
||||
DBFieldNames[11]="norent"; // "NoRent (0=norent, 255=not norent)"
|
||||
DBFieldNames[12]="nodrop"; // "NoDrop (0=nodrop, 255=not nodrop)"
|
||||
DBFieldNames[13]="size"; // "Size (0=tiny, 1=small, 2=medium, 3=large, 4=giant)"
|
||||
DBFieldNames[14]="slots"; // EquipSlots
|
||||
DBFieldNames[15]="cost"; // Cost
|
||||
DBFieldNames[16]="icon"; // IconNumber
|
||||
DBFieldNames[17]="unknown018";
|
||||
DBFieldNames[18]="unknown019";
|
||||
DBFieldNames[19]="unknown020"; // ?
|
||||
DBFieldNames[20]="tradeskills"; // "Tradeskill Item (1=is a tradeskill item, 0=not)"
|
||||
DBFieldNames[21]="cr"; // SvCold
|
||||
DBFieldNames[22]="dr"; // SvDisease
|
||||
DBFieldNames[23]="pr"; // SvPoison
|
||||
DBFieldNames[24]="mr"; // SvMagic
|
||||
DBFieldNames[25]="fr"; // SvFire
|
||||
DBFieldNames[26]="astr"; // STR
|
||||
DBFieldNames[27]="asta"; // STA
|
||||
DBFieldNames[28]="aagi"; // AGI
|
||||
DBFieldNames[29]="adex"; // DEX
|
||||
DBFieldNames[30]="acha"; // CHA
|
||||
DBFieldNames[31]="aint"; // INT
|
||||
DBFieldNames[32]="awis"; // WIS
|
||||
DBFieldNames[33]="hp"; // HP
|
||||
DBFieldNames[34]="mana"; // Mana
|
||||
DBFieldNames[35]="ac"; // AC
|
||||
DBFieldNames[36]="deity"; // Deity
|
||||
DBFieldNames[37]="skillmodvalue"; // Skill Mod Value
|
||||
DBFieldNames[38]="skillmodtype"; // Skill Mod Type
|
||||
DBFieldNames[39]="banedmgrace"; // Bane Dmg Race
|
||||
DBFieldNames[40]="banedmgamt"; // Band Dmg
|
||||
DBFieldNames[41]="banedmgbody"; // Band Dmg Body
|
||||
DBFieldNames[42]="magic"; // "Magic (0=not magic, 1=magic)"
|
||||
DBFieldNames[43]="casttime2"; // Casttime appears twice
|
||||
DBFieldNames[44]="hasteproclvl"; // "Level (Haste value, rather)"
|
||||
DBFieldNames[45]="reqlevel"; // Required Level
|
||||
DBFieldNames[46]="bardtype"; // Bard Type
|
||||
DBFieldNames[47]="bardvalue"; // Bard Type Amount
|
||||
DBFieldNames[48]="light"; // Light
|
||||
DBFieldNames[49]="delay"; // Attack Delay
|
||||
DBFieldNames[50]="reclevel"; // Recommended Level
|
||||
DBFieldNames[51]="recskill"; // Recommended Skill
|
||||
DBFieldNames[52]="elemdmgamt"; // "Elemental Dmg Type (1=magic, 2=fire, 3=cold, 4=poison, 5=disease)"
|
||||
DBFieldNames[53]="elemdmgtype"; // Elemental Dmg
|
||||
DBFieldNames[54]="effecttype"; // "Effect Type (0=combat, 1=clicky, 2=Worn, 3=Expendable charges, 4=Must Equip Clicky, 5=clicky)"
|
||||
DBFieldNames[55]="range"; // Range
|
||||
DBFieldNames[56]="damage"; // Damage
|
||||
DBFieldNames[57]="color"; // Color
|
||||
DBFieldNames[58]="classes"; // Classes
|
||||
DBFieldNames[59]="races"; // Races
|
||||
DBFieldNames[60]="unknown061";
|
||||
DBFieldNames[61]="spellid"; // SpellId
|
||||
DBFieldNames[62]="maxcharges"; // MaxCharges
|
||||
DBFieldNames[63]="itemtype"; // "Skill (ItemType: 1hs, etc)"
|
||||
DBFieldNames[64]="material"; // Material
|
||||
DBFieldNames[65]="sellrate"; // ** Sell Rate
|
||||
DBFieldNames[66]="unknown067";
|
||||
DBFieldNames[67]="casttime"; // CastTime (milliseconds)
|
||||
DBFieldNames[68]="unknown069";
|
||||
DBFieldNames[69]="unknown070"; // ?
|
||||
DBFieldNames[70]="focusid"; // Focus Effect Spell Id
|
||||
DBFieldNames[71]="combateffects"; // CombatEffects
|
||||
DBFieldNames[72]="shielding"; // Shielding
|
||||
DBFieldNames[73]="stunresist"; // StunResist
|
||||
DBFieldNames[74]="strikethrough"; // StrikeThrough
|
||||
DBFieldNames[75]="unknown076";
|
||||
DBFieldNames[76]="unknown077"; // ?
|
||||
DBFieldNames[77]="spellshield"; // Spell Shield
|
||||
DBFieldNames[78]="avoidance"; // Avoidance
|
||||
DBFieldNames[79]="accuracy"; // Accuracy
|
||||
DBFieldNames[80]="factionmod1"; // Faction Mod Index 1
|
||||
DBFieldNames[81]="factionmod2"; // Faction Mod Index 2
|
||||
DBFieldNames[82]="factionmod3"; // Faction Mod Index 3
|
||||
DBFieldNames[83]="factionmod4"; // Faction Mod Index 4
|
||||
DBFieldNames[84]="factionamt1"; // Faction Mod Value 1
|
||||
DBFieldNames[85]="factionamt2"; // Faction Mod Value 2
|
||||
DBFieldNames[86]="factionamt3"; // Faction Mod Value 3
|
||||
DBFieldNames[87]="factionamt4"; // Faction Mod Value 4
|
||||
DBFieldNames[88]="unknown089";
|
||||
DBFieldNames[89]="charmfile"; // ** Charm File
|
||||
DBFieldNames[90]="unknown091";
|
||||
DBFieldNames[91]="augslot1type"; // Slot1Type
|
||||
DBFieldNames[92]="augslot2type"; // Slot2Type
|
||||
DBFieldNames[93]="augslot3type"; // Slot3Type
|
||||
DBFieldNames[94]="augslot4type"; // Slot4Type
|
||||
DBFieldNames[95]="augslot5type"; // Slot5Type
|
||||
DBFieldNames[96]="ldonpointtheme";
|
||||
DBFieldNames[97]="ldonpointcost"; // ?
|
||||
DBFieldNames[98]="unknown099";
|
||||
DBFieldNames[99]="bagtype"; // bag type
|
||||
DBFieldNames[100]="bagslots"; // bag slots
|
||||
DBFieldNames[101]="bagsize"; // bag size capacity
|
||||
DBFieldNames[102]="bagwr"; // bag weight reduction
|
||||
DBFieldNames[103]="booktype"; // "book type (0=rolled up note, 1=book)"
|
||||
DBFieldNames[104]="unknown105";
|
||||
DBFieldNames[105]="filename"; // Book Filename
|
||||
DBFieldNames[106]="unknown107";
|
||||
DBFieldNames[107]="unknown108";
|
||||
DBFieldNames[108]="loreflag";
|
||||
DBFieldNames[109]="unknown111";
|
||||
DBFieldNames[110]="unknown112";
|
||||
DBFieldNames[111]="unknown113";
|
||||
DBFieldNames[112]="unknown114";
|
||||
DBFieldNames[113]="unknown115"; // ? (end quote)
|
||||
}
|
||||
|
||||
void dump_message_column(unsigned char *buffer, unsigned long length, std::string leader, FILE *to)
|
||||
{
|
||||
unsigned long i,j;
|
||||
|
||||
@@ -15,8 +15,6 @@ bool ItemParse(const char *data, int length, std::map<int,std::map<int,std::stri
|
||||
|
||||
int Tokenize(std::string s, std::map<int,std::string> & tokens, char delim='|');
|
||||
|
||||
void LoadItemDBFieldNames();
|
||||
|
||||
#ifndef WIN32
|
||||
int print_stacktrace();
|
||||
#endif
|
||||
|
||||
@@ -51,6 +51,7 @@ void MySQLRequestResult::ZeroOut()
|
||||
m_RowCount = 0;
|
||||
m_RowsAffected = 0;
|
||||
m_LastInsertedID = 0;
|
||||
m_error_message = "";
|
||||
}
|
||||
|
||||
MySQLRequestResult::~MySQLRequestResult()
|
||||
@@ -137,3 +138,23 @@ MySQLRequestResult& MySQLRequestResult::operator=(MySQLRequestResult&& other)
|
||||
other.ZeroOut();
|
||||
return *this;
|
||||
}
|
||||
|
||||
uint32 MySQLRequestResult::GetErrorNumber() const
|
||||
{
|
||||
return m_ErrorNumber;
|
||||
}
|
||||
|
||||
void MySQLRequestResult::SetErrorNumber(uint32 m_error_number)
|
||||
{
|
||||
m_ErrorNumber = m_error_number;
|
||||
}
|
||||
|
||||
const std::string &MySQLRequestResult::GetErrorMessage() const
|
||||
{
|
||||
return m_error_message;
|
||||
}
|
||||
|
||||
void MySQLRequestResult::SetErrorMessage(const std::string &m_error_message)
|
||||
{
|
||||
MySQLRequestResult::m_error_message = m_error_message;
|
||||
}
|
||||
|
||||
@@ -33,30 +33,42 @@ private:
|
||||
uint32 m_LastInsertedID;
|
||||
uint32 m_ErrorNumber;
|
||||
|
||||
std::string m_error_message;
|
||||
|
||||
public:
|
||||
|
||||
MySQLRequestResult(MYSQL_RES* result, uint32 rowsAffected = 0, uint32 rowCount = 0, uint32 columnCount = 0, uint32 lastInsertedID = 0, uint32 errorNumber = 0, char *errorBuffer = nullptr);
|
||||
MySQLRequestResult();
|
||||
MySQLRequestResult();
|
||||
MySQLRequestResult(MySQLRequestResult&& moveItem);
|
||||
~MySQLRequestResult();
|
||||
|
||||
MySQLRequestResult& operator=(MySQLRequestResult&& other);
|
||||
|
||||
bool Success() const { return m_Success;}
|
||||
std::string ErrorMessage() const {return m_ErrorBuffer ? std::string(m_ErrorBuffer) : std::string("");}
|
||||
std::string ErrorMessage() const {
|
||||
if (!m_error_message.empty()) {
|
||||
return m_error_message;
|
||||
}
|
||||
|
||||
return m_ErrorBuffer ? std::string(m_ErrorBuffer) : std::string("");
|
||||
}
|
||||
uint32 ErrorNumber() const {return m_ErrorNumber;}
|
||||
uint32 RowsAffected() const {return m_RowsAffected;}
|
||||
uint32 RowCount() const {return m_RowCount;}
|
||||
uint32 ColumnCount() const {return m_ColumnCount;}
|
||||
uint32 LastInsertedID() const {return m_LastInsertedID;}
|
||||
// default to 0 index since we mostly use it that way anyways.
|
||||
uint32 LengthOfColumn(int columnIndex = 0);
|
||||
uint32 LengthOfColumn(int columnIndex = 0);
|
||||
const std::string FieldName(int columnIndex);
|
||||
|
||||
MySQLRequestRow& begin() { return m_CurrentRow; }
|
||||
MySQLRequestRow& end() { return m_OneBeyondRow; }
|
||||
|
||||
uint32 GetErrorNumber() const;
|
||||
void SetErrorNumber(uint32 m_error_number);
|
||||
const std::string &GetErrorMessage() const;
|
||||
void SetErrorMessage(const std::string &m_error_message);
|
||||
|
||||
private:
|
||||
void FreeInternals();
|
||||
void ZeroOut();
|
||||
|
||||
+14
-1
@@ -35,6 +35,7 @@
|
||||
#include "../path_manager.h"
|
||||
#include "../classes.h"
|
||||
#include "../races.h"
|
||||
#include "../../zone/raids.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
@@ -2737,7 +2738,7 @@ namespace RoF2
|
||||
{
|
||||
RaidLeadershipUpdate_Struct *inlaa = (RaidLeadershipUpdate_Struct *)__emu_buffer;
|
||||
auto outapp =
|
||||
new EQApplicationPacket(OP_RaidUpdate, sizeof(structs::RaidLeadershipUpdate_Struct));
|
||||
new EQApplicationPacket(OP_RaidUpdate, sizeof(structs::RaidLeadershipUpdate_Struct));
|
||||
structs::RaidLeadershipUpdate_Struct *outlaa = (structs::RaidLeadershipUpdate_Struct *)outapp->pBuffer;
|
||||
|
||||
outlaa->action = inlaa->action;
|
||||
@@ -2746,6 +2747,18 @@ namespace RoF2
|
||||
memcpy(&outlaa->raid, &inlaa->raid, sizeof(RaidLeadershipAA_Struct));
|
||||
dest->FastQueuePacket(&outapp);
|
||||
}
|
||||
else if (raid_gen->action == raidSetNote)
|
||||
{
|
||||
auto in_note = (RaidGeneral_Struct*)__emu_buffer;
|
||||
auto outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(RaidGeneral_Struct));
|
||||
auto note = (RaidGeneral_Struct*)outapp->pBuffer;
|
||||
note->action = raidSetNote;
|
||||
strn0cpy(note->leader_name, in_note->leader_name, sizeof(note->leader_name));
|
||||
strn0cpy(note->player_name, in_note->player_name, sizeof(note->leader_name));
|
||||
strn0cpy(note->note, in_note->note, sizeof(note->note));
|
||||
dest->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
else
|
||||
{
|
||||
RaidGeneral_Struct* in_raid_general = (RaidGeneral_Struct*)__emu_buffer;
|
||||
|
||||
+64
-7
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "../common/races.h"
|
||||
#include "data_verification.h"
|
||||
|
||||
const char* GetRaceIDName(uint16 race_id)
|
||||
{
|
||||
@@ -67,7 +68,7 @@ const char* GetRaceIDName(uint16 race_id)
|
||||
// return "Froglok";
|
||||
//case DRAKKIN:
|
||||
// return "Drakkin";
|
||||
|
||||
|
||||
// RoF2 Race Labels
|
||||
case RT_ABHORRENT:
|
||||
return "Abhorrent";
|
||||
@@ -1593,11 +1594,13 @@ float GetRaceGenderDefaultHeight(int race, int gender)
|
||||
|
||||
const auto size = sizeof(male_height) / sizeof(male_height[0]);
|
||||
|
||||
if (race >= size)
|
||||
if (race >= size) {
|
||||
return 6.0f;
|
||||
}
|
||||
|
||||
if (gender == 1)
|
||||
if (gender == FEMALE) {
|
||||
return female_height[race];
|
||||
}
|
||||
|
||||
return male_height[race];
|
||||
}
|
||||
@@ -1696,7 +1699,7 @@ bool PlayerAppearance::IsValidBeardColor(uint16 race_id, uint8 gender_id, uint8
|
||||
{
|
||||
if (beard_color_value == 0xFF)
|
||||
return true;
|
||||
|
||||
|
||||
switch (BINDRG(race_id, gender_id)) {
|
||||
case GNOME_MALE:
|
||||
if (beard_color_value <= 24)
|
||||
@@ -1783,7 +1786,7 @@ bool PlayerAppearance::IsValidEyeColor(uint16 race_id, uint8 gender_id, uint8 ey
|
||||
case VAHSHIR_FEMALE:
|
||||
if (eye_color_value <= 9)
|
||||
return true;
|
||||
break;
|
||||
break;
|
||||
case TROLL_MALE:
|
||||
case TROLL_FEMALE:
|
||||
if (eye_color_value <= 10)
|
||||
@@ -2109,7 +2112,7 @@ bool PlayerAppearance::IsValidTexture(uint16 race_id, uint8 gender_id, uint8 tex
|
||||
{
|
||||
if (texture_value == 0xFF)
|
||||
return true;
|
||||
|
||||
|
||||
if (use_luclin) {
|
||||
switch (BINDRG(race_id, gender_id)) {
|
||||
case HUMAN_MALE:
|
||||
@@ -2243,4 +2246,58 @@ const char* GetGenderName(uint32 gender_id) {
|
||||
gender_name = "Neuter";
|
||||
}
|
||||
return gender_name;
|
||||
}
|
||||
}
|
||||
|
||||
const std::string GetPlayerRaceAbbreviation(uint16 race_id)
|
||||
{
|
||||
if (!IsPlayerRace(race_id)) {
|
||||
return std::string("UNK");
|
||||
}
|
||||
|
||||
switch (race_id) {
|
||||
case RACE_HUMAN_1:
|
||||
return "HUM";
|
||||
case RACE_BARBARIAN_2:
|
||||
return "BAR";
|
||||
case RACE_ERUDITE_3:
|
||||
return "ERU";
|
||||
case RACE_WOOD_ELF_4:
|
||||
return "ELF";
|
||||
case RACE_HIGH_ELF_5:
|
||||
return "HIE";
|
||||
case RACE_DARK_ELF_6:
|
||||
return "DEF";
|
||||
case RACE_HALF_ELF_7:
|
||||
return "HEF";
|
||||
case RACE_DWARF_8:
|
||||
return "DWF";
|
||||
case RACE_TROLL_9:
|
||||
return "TRL";
|
||||
case RACE_OGRE_10:
|
||||
return "OGR";
|
||||
case RACE_HALFLING_11:
|
||||
return "HFL";
|
||||
case RACE_GNOME_12:
|
||||
return "GNM";
|
||||
case RACE_IKSAR_128:
|
||||
return "IKS";
|
||||
case RACE_VAH_SHIR_130:
|
||||
return "VAH";
|
||||
case RACE_FROGLOK_330:
|
||||
return "FRG";
|
||||
case RACE_DRAKKIN_522:
|
||||
return "DRK";
|
||||
}
|
||||
|
||||
return std::string("UNK");
|
||||
}
|
||||
|
||||
bool IsPlayerRace(uint16 race_id) {
|
||||
return (
|
||||
EQ::ValueWithin(race_id, RACE_HUMAN_1, RACE_GNOME_12) ||
|
||||
race_id == RACE_IKSAR_128 ||
|
||||
race_id == RACE_VAH_SHIR_130 ||
|
||||
race_id == RACE_FROGLOK_330 ||
|
||||
race_id == RACE_DRAKKIN_522
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#ifndef RACES_H
|
||||
#define RACES_H
|
||||
#include "../common/types.h"
|
||||
#include <string>
|
||||
|
||||
#define MALE 0
|
||||
#define FEMALE 1
|
||||
@@ -853,6 +854,9 @@ const char* GetRaceIDName(uint16 race_id);
|
||||
const char* GetPlayerRaceName(uint32 player_race_value);
|
||||
const char* GetGenderName(uint32 gender_id);
|
||||
|
||||
bool IsPlayerRace(uint16 race_id);
|
||||
const std::string GetPlayerRaceAbbreviation(uint16 race_id);
|
||||
|
||||
uint32 GetPlayerRaceValue(uint16 race_id);
|
||||
uint32 GetPlayerRaceBit(uint16 race_id);
|
||||
|
||||
|
||||
@@ -44,7 +44,35 @@ public:
|
||||
*/
|
||||
|
||||
// Custom extended repository methods here
|
||||
static void ClearFlag(
|
||||
Database& db,
|
||||
AccountFlagsRepository::AccountFlags e
|
||||
) {
|
||||
AccountFlagsRepository::DeleteWhere(
|
||||
database,
|
||||
fmt::format(
|
||||
"p_accid = {} AND p_flag = '{}'",
|
||||
e.p_accid,
|
||||
Strings::Escape(e.p_flag)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
static void ReplaceFlag(
|
||||
Database& db,
|
||||
AccountFlagsRepository::AccountFlags e
|
||||
) {
|
||||
db.QueryDatabase(
|
||||
fmt::format(
|
||||
"REPLACE INTO {} ({}) VALUES ({}, '{}', '{}')",
|
||||
TableName(),
|
||||
ColumnsRaw(),
|
||||
e.p_accid,
|
||||
Strings::Escape(e.p_flag),
|
||||
Strings::Escape(e.p_value)
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
#endif //EQEMU_ACCOUNT_FLAGS_REPOSITORY_H
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,364 @@
|
||||
/**
|
||||
* DO NOT MODIFY THIS FILE
|
||||
*
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
#ifndef EQEMU_BASE_COMMAND_SUBSETTINGS_REPOSITORY_H
|
||||
#define EQEMU_BASE_COMMAND_SUBSETTINGS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseCommandSubsettingsRepository {
|
||||
public:
|
||||
struct CommandSubsettings {
|
||||
uint32_t id;
|
||||
std::string parent_command;
|
||||
std::string sub_command;
|
||||
uint32_t access_level;
|
||||
std::string top_level_aliases;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
{
|
||||
return std::string("id");
|
||||
}
|
||||
|
||||
static std::vector<std::string> Columns()
|
||||
{
|
||||
return {
|
||||
"id",
|
||||
"parent_command",
|
||||
"sub_command",
|
||||
"access_level",
|
||||
"top_level_aliases",
|
||||
};
|
||||
}
|
||||
|
||||
static std::vector<std::string> SelectColumns()
|
||||
{
|
||||
return {
|
||||
"id",
|
||||
"parent_command",
|
||||
"sub_command",
|
||||
"access_level",
|
||||
"top_level_aliases",
|
||||
};
|
||||
}
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
{
|
||||
return std::string("command_subsettings");
|
||||
}
|
||||
|
||||
static std::string BaseSelect()
|
||||
{
|
||||
return fmt::format(
|
||||
"SELECT {} FROM {}",
|
||||
SelectColumnsRaw(),
|
||||
TableName()
|
||||
);
|
||||
}
|
||||
|
||||
static std::string BaseInsert()
|
||||
{
|
||||
return fmt::format(
|
||||
"INSERT INTO {} ({}) ",
|
||||
TableName(),
|
||||
ColumnsRaw()
|
||||
);
|
||||
}
|
||||
|
||||
static CommandSubsettings NewEntity()
|
||||
{
|
||||
CommandSubsettings e{};
|
||||
|
||||
e.id = 0;
|
||||
e.parent_command = "";
|
||||
e.sub_command = "";
|
||||
e.access_level = 0;
|
||||
e.top_level_aliases = "";
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
static CommandSubsettings GetCommandSubsettings(
|
||||
const std::vector<CommandSubsettings> &command_subsettingss,
|
||||
int command_subsettings_id
|
||||
)
|
||||
{
|
||||
for (auto &command_subsettings : command_subsettingss) {
|
||||
if (command_subsettings.id == command_subsettings_id) {
|
||||
return command_subsettings;
|
||||
}
|
||||
}
|
||||
|
||||
return NewEntity();
|
||||
}
|
||||
|
||||
static CommandSubsettings FindOne(
|
||||
Database& db,
|
||||
int command_subsettings_id
|
||||
)
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} WHERE {} = {} LIMIT 1",
|
||||
BaseSelect(),
|
||||
PrimaryKey(),
|
||||
command_subsettings_id
|
||||
)
|
||||
);
|
||||
|
||||
auto row = results.begin();
|
||||
if (results.RowCount() == 1) {
|
||||
CommandSubsettings e{};
|
||||
|
||||
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||
e.parent_command = row[1] ? row[1] : "";
|
||||
e.sub_command = row[2] ? row[2] : "";
|
||||
e.access_level = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.top_level_aliases = row[4] ? row[4] : "";
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
return NewEntity();
|
||||
}
|
||||
|
||||
static int DeleteOne(
|
||||
Database& db,
|
||||
int command_subsettings_id
|
||||
)
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"DELETE FROM {} WHERE {} = {}",
|
||||
TableName(),
|
||||
PrimaryKey(),
|
||||
command_subsettings_id
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() ? results.RowsAffected() : 0);
|
||||
}
|
||||
|
||||
static int UpdateOne(
|
||||
Database& db,
|
||||
const CommandSubsettings &e
|
||||
)
|
||||
{
|
||||
std::vector<std::string> v;
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
v.push_back(columns[1] + " = '" + Strings::Escape(e.parent_command) + "'");
|
||||
v.push_back(columns[2] + " = '" + Strings::Escape(e.sub_command) + "'");
|
||||
v.push_back(columns[3] + " = " + std::to_string(e.access_level));
|
||||
v.push_back(columns[4] + " = '" + Strings::Escape(e.top_level_aliases) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
Strings::Implode(", ", v),
|
||||
PrimaryKey(),
|
||||
e.id
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() ? results.RowsAffected() : 0);
|
||||
}
|
||||
|
||||
static CommandSubsettings InsertOne(
|
||||
Database& db,
|
||||
CommandSubsettings e
|
||||
)
|
||||
{
|
||||
std::vector<std::string> v;
|
||||
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back("'" + Strings::Escape(e.parent_command) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.sub_command) + "'");
|
||||
v.push_back(std::to_string(e.access_level));
|
||||
v.push_back("'" + Strings::Escape(e.top_level_aliases) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
Strings::Implode(",", v)
|
||||
)
|
||||
);
|
||||
|
||||
if (results.Success()) {
|
||||
e.id = results.LastInsertedID();
|
||||
return e;
|
||||
}
|
||||
|
||||
e = NewEntity();
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
static int InsertMany(
|
||||
Database& db,
|
||||
const std::vector<CommandSubsettings> &entries
|
||||
)
|
||||
{
|
||||
std::vector<std::string> insert_chunks;
|
||||
|
||||
for (auto &e: entries) {
|
||||
std::vector<std::string> v;
|
||||
|
||||
v.push_back(std::to_string(e.id));
|
||||
v.push_back("'" + Strings::Escape(e.parent_command) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.sub_command) + "'");
|
||||
v.push_back(std::to_string(e.access_level));
|
||||
v.push_back("'" + Strings::Escape(e.top_level_aliases) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> v;
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() ? results.RowsAffected() : 0);
|
||||
}
|
||||
|
||||
static std::vector<CommandSubsettings> All(Database& db)
|
||||
{
|
||||
std::vector<CommandSubsettings> all_entries;
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{}",
|
||||
BaseSelect()
|
||||
)
|
||||
);
|
||||
|
||||
all_entries.reserve(results.RowCount());
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CommandSubsettings e{};
|
||||
|
||||
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||
e.parent_command = row[1] ? row[1] : "";
|
||||
e.sub_command = row[2] ? row[2] : "";
|
||||
e.access_level = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.top_level_aliases = row[4] ? row[4] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
return all_entries;
|
||||
}
|
||||
|
||||
static std::vector<CommandSubsettings> GetWhere(Database& db, const std::string &where_filter)
|
||||
{
|
||||
std::vector<CommandSubsettings> all_entries;
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} WHERE {}",
|
||||
BaseSelect(),
|
||||
where_filter
|
||||
)
|
||||
);
|
||||
|
||||
all_entries.reserve(results.RowCount());
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CommandSubsettings e{};
|
||||
|
||||
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
|
||||
e.parent_command = row[1] ? row[1] : "";
|
||||
e.sub_command = row[2] ? row[2] : "";
|
||||
e.access_level = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.top_level_aliases = row[4] ? row[4] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
return all_entries;
|
||||
}
|
||||
|
||||
static int DeleteWhere(Database& db, const std::string &where_filter)
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"DELETE FROM {} WHERE {}",
|
||||
TableName(),
|
||||
where_filter
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() ? results.RowsAffected() : 0);
|
||||
}
|
||||
|
||||
static int Truncate(Database& db)
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"TRUNCATE TABLE {}",
|
||||
TableName()
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() ? results.RowsAffected() : 0);
|
||||
}
|
||||
|
||||
static int64 GetMaxId(Database& db)
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"SELECT COALESCE(MAX({}), 0) FROM {}",
|
||||
PrimaryKey(),
|
||||
TableName()
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() && results.begin()[0] ? strtoll(results.begin()[0], nullptr, 10) : 0);
|
||||
}
|
||||
|
||||
static int64 Count(Database& db, const std::string &where_filter = "")
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"SELECT COUNT(*) FROM {} {}",
|
||||
TableName(),
|
||||
(where_filter.empty() ? "" : "WHERE " + where_filter)
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() && results.begin()[0] ? strtoll(results.begin()[0], nullptr, 10) : 0);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif //EQEMU_BASE_COMMAND_SUBSETTINGS_REPOSITORY_H
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "../../database.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
#include <cereal/cereal.hpp>
|
||||
|
||||
class BaseDataBucketsRepository {
|
||||
public:
|
||||
@@ -24,6 +24,24 @@ public:
|
||||
std::string key_;
|
||||
std::string value;
|
||||
uint32_t expires;
|
||||
int64_t character_id;
|
||||
int64_t npc_id;
|
||||
int64_t bot_id;
|
||||
|
||||
// cereal
|
||||
template<class Archive>
|
||||
void serialize(Archive &ar)
|
||||
{
|
||||
ar(
|
||||
CEREAL_NVP(id),
|
||||
CEREAL_NVP(key_),
|
||||
CEREAL_NVP(value),
|
||||
CEREAL_NVP(expires),
|
||||
CEREAL_NVP(character_id),
|
||||
CEREAL_NVP(npc_id),
|
||||
CEREAL_NVP(bot_id)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@@ -38,6 +56,9 @@ public:
|
||||
"`key`",
|
||||
"value",
|
||||
"expires",
|
||||
"character_id",
|
||||
"npc_id",
|
||||
"bot_id",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -48,6 +69,9 @@ public:
|
||||
"`key`",
|
||||
"value",
|
||||
"expires",
|
||||
"character_id",
|
||||
"npc_id",
|
||||
"bot_id",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -88,10 +112,13 @@ public:
|
||||
{
|
||||
DataBuckets e{};
|
||||
|
||||
e.id = 0;
|
||||
e.key_ = "";
|
||||
e.value = "";
|
||||
e.expires = 0;
|
||||
e.id = 0;
|
||||
e.key_ = "";
|
||||
e.value = "";
|
||||
e.expires = 0;
|
||||
e.character_id = 0;
|
||||
e.npc_id = 0;
|
||||
e.bot_id = 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -128,10 +155,13 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
DataBuckets e{};
|
||||
|
||||
e.id = strtoull(row[0], nullptr, 10);
|
||||
e.key_ = row[1] ? row[1] : "";
|
||||
e.value = row[2] ? row[2] : "";
|
||||
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.id = strtoull(row[0], nullptr, 10);
|
||||
e.key_ = row[1] ? row[1] : "";
|
||||
e.value = row[2] ? row[2] : "";
|
||||
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.character_id = strtoll(row[4], nullptr, 10);
|
||||
e.npc_id = strtoll(row[5], nullptr, 10);
|
||||
e.bot_id = strtoll(row[6], nullptr, 10);
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -168,6 +198,9 @@ public:
|
||||
v.push_back(columns[1] + " = '" + Strings::Escape(e.key_) + "'");
|
||||
v.push_back(columns[2] + " = '" + Strings::Escape(e.value) + "'");
|
||||
v.push_back(columns[3] + " = " + std::to_string(e.expires));
|
||||
v.push_back(columns[4] + " = " + std::to_string(e.character_id));
|
||||
v.push_back(columns[5] + " = " + std::to_string(e.npc_id));
|
||||
v.push_back(columns[6] + " = " + std::to_string(e.bot_id));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -193,6 +226,9 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.key_) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.value) + "'");
|
||||
v.push_back(std::to_string(e.expires));
|
||||
v.push_back(std::to_string(e.character_id));
|
||||
v.push_back(std::to_string(e.npc_id));
|
||||
v.push_back(std::to_string(e.bot_id));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -226,6 +262,9 @@ public:
|
||||
v.push_back("'" + Strings::Escape(e.key_) + "'");
|
||||
v.push_back("'" + Strings::Escape(e.value) + "'");
|
||||
v.push_back(std::to_string(e.expires));
|
||||
v.push_back(std::to_string(e.character_id));
|
||||
v.push_back(std::to_string(e.npc_id));
|
||||
v.push_back(std::to_string(e.bot_id));
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@@ -259,10 +298,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
DataBuckets e{};
|
||||
|
||||
e.id = strtoull(row[0], nullptr, 10);
|
||||
e.key_ = row[1] ? row[1] : "";
|
||||
e.value = row[2] ? row[2] : "";
|
||||
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.id = strtoull(row[0], nullptr, 10);
|
||||
e.key_ = row[1] ? row[1] : "";
|
||||
e.value = row[2] ? row[2] : "";
|
||||
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.character_id = strtoll(row[4], nullptr, 10);
|
||||
e.npc_id = strtoll(row[5], nullptr, 10);
|
||||
e.bot_id = strtoll(row[6], nullptr, 10);
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -287,10 +329,13 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
DataBuckets e{};
|
||||
|
||||
e.id = strtoull(row[0], nullptr, 10);
|
||||
e.key_ = row[1] ? row[1] : "";
|
||||
e.value = row[2] ? row[2] : "";
|
||||
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.id = strtoull(row[0], nullptr, 10);
|
||||
e.key_ = row[1] ? row[1] : "";
|
||||
e.value = row[2] ? row[2] : "";
|
||||
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||
e.character_id = strtoll(row[4], nullptr, 10);
|
||||
e.npc_id = strtoll(row[5], nullptr, 10);
|
||||
e.bot_id = strtoll(row[6], nullptr, 10);
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseItemsRepository {
|
||||
public:
|
||||
struct Items {
|
||||
@@ -122,7 +123,7 @@ public:
|
||||
int32_t pr;
|
||||
int32_t procrate;
|
||||
int32_t races;
|
||||
int32_t range;
|
||||
int32_t range_;
|
||||
int32_t reclevel;
|
||||
int32_t recskill;
|
||||
int32_t reqlevel;
|
||||
@@ -417,7 +418,7 @@ public:
|
||||
"pr",
|
||||
"procrate",
|
||||
"races",
|
||||
"range",
|
||||
"`range`",
|
||||
"reclevel",
|
||||
"recskill",
|
||||
"reqlevel",
|
||||
@@ -708,7 +709,7 @@ public:
|
||||
"pr",
|
||||
"procrate",
|
||||
"races",
|
||||
"range",
|
||||
"`range`",
|
||||
"reclevel",
|
||||
"recskill",
|
||||
"reqlevel",
|
||||
@@ -1033,7 +1034,7 @@ public:
|
||||
e.pr = 0;
|
||||
e.procrate = 0;
|
||||
e.races = 0;
|
||||
e.range = 0;
|
||||
e.range_ = 0;
|
||||
e.reclevel = 0;
|
||||
e.recskill = 0;
|
||||
e.reqlevel = 0;
|
||||
@@ -1240,8 +1241,9 @@ public:
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} WHERE id = {} LIMIT 1",
|
||||
"{} WHERE {} = {} LIMIT 1",
|
||||
BaseSelect(),
|
||||
PrimaryKey(),
|
||||
items_id
|
||||
)
|
||||
);
|
||||
@@ -1353,7 +1355,7 @@ public:
|
||||
e.pr = static_cast<int32_t>(atoi(row[100]));
|
||||
e.procrate = static_cast<int32_t>(atoi(row[101]));
|
||||
e.races = static_cast<int32_t>(atoi(row[102]));
|
||||
e.range = static_cast<int32_t>(atoi(row[103]));
|
||||
e.range_ = static_cast<int32_t>(atoi(row[103]));
|
||||
e.reclevel = static_cast<int32_t>(atoi(row[104]));
|
||||
e.recskill = static_cast<int32_t>(atoi(row[105]));
|
||||
e.reqlevel = static_cast<int32_t>(atoi(row[106]));
|
||||
@@ -1671,7 +1673,7 @@ public:
|
||||
v.push_back(columns[100] + " = " + std::to_string(e.pr));
|
||||
v.push_back(columns[101] + " = " + std::to_string(e.procrate));
|
||||
v.push_back(columns[102] + " = " + std::to_string(e.races));
|
||||
v.push_back(columns[103] + " = " + std::to_string(e.range));
|
||||
v.push_back(columns[103] + " = " + std::to_string(e.range_));
|
||||
v.push_back(columns[104] + " = " + std::to_string(e.reclevel));
|
||||
v.push_back(columns[105] + " = " + std::to_string(e.recskill));
|
||||
v.push_back(columns[106] + " = " + std::to_string(e.reqlevel));
|
||||
@@ -1977,7 +1979,7 @@ public:
|
||||
v.push_back(std::to_string(e.pr));
|
||||
v.push_back(std::to_string(e.procrate));
|
||||
v.push_back(std::to_string(e.races));
|
||||
v.push_back(std::to_string(e.range));
|
||||
v.push_back(std::to_string(e.range_));
|
||||
v.push_back(std::to_string(e.reclevel));
|
||||
v.push_back(std::to_string(e.recskill));
|
||||
v.push_back(std::to_string(e.reqlevel));
|
||||
@@ -2291,7 +2293,7 @@ public:
|
||||
v.push_back(std::to_string(e.pr));
|
||||
v.push_back(std::to_string(e.procrate));
|
||||
v.push_back(std::to_string(e.races));
|
||||
v.push_back(std::to_string(e.range));
|
||||
v.push_back(std::to_string(e.range_));
|
||||
v.push_back(std::to_string(e.reclevel));
|
||||
v.push_back(std::to_string(e.recskill));
|
||||
v.push_back(std::to_string(e.reqlevel));
|
||||
@@ -2609,7 +2611,7 @@ public:
|
||||
e.pr = static_cast<int32_t>(atoi(row[100]));
|
||||
e.procrate = static_cast<int32_t>(atoi(row[101]));
|
||||
e.races = static_cast<int32_t>(atoi(row[102]));
|
||||
e.range = static_cast<int32_t>(atoi(row[103]));
|
||||
e.range_ = static_cast<int32_t>(atoi(row[103]));
|
||||
e.reclevel = static_cast<int32_t>(atoi(row[104]));
|
||||
e.recskill = static_cast<int32_t>(atoi(row[105]));
|
||||
e.reqlevel = static_cast<int32_t>(atoi(row[106]));
|
||||
@@ -2918,7 +2920,7 @@ public:
|
||||
e.pr = static_cast<int32_t>(atoi(row[100]));
|
||||
e.procrate = static_cast<int32_t>(atoi(row[101]));
|
||||
e.races = static_cast<int32_t>(atoi(row[102]));
|
||||
e.range = static_cast<int32_t>(atoi(row[103]));
|
||||
e.range_ = static_cast<int32_t>(atoi(row[103]));
|
||||
e.reclevel = static_cast<int32_t>(atoi(row[104]));
|
||||
e.recskill = static_cast<int32_t>(atoi(row[105]));
|
||||
e.reqlevel = static_cast<int32_t>(atoi(row[106]));
|
||||
|
||||
@@ -66,8 +66,8 @@ public:
|
||||
uint8_t armortint_red;
|
||||
uint8_t armortint_green;
|
||||
uint8_t armortint_blue;
|
||||
int32_t d_melee_texture1;
|
||||
int32_t d_melee_texture2;
|
||||
uint32_t d_melee_texture1;
|
||||
uint32_t d_melee_texture2;
|
||||
std::string ammo_idfile;
|
||||
uint8_t prim_melee_type;
|
||||
uint8_t sec_melee_type;
|
||||
@@ -583,7 +583,7 @@ public:
|
||||
e.exp_mod = 100;
|
||||
e.heroic_strikethrough = 0;
|
||||
e.faction_amount = 0;
|
||||
e.keeps_sold_items = 0;
|
||||
e.keeps_sold_items = 1;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -666,8 +666,8 @@ public:
|
||||
e.armortint_red = static_cast<uint8_t>(strtoul(row[43], nullptr, 10));
|
||||
e.armortint_green = static_cast<uint8_t>(strtoul(row[44], nullptr, 10));
|
||||
e.armortint_blue = static_cast<uint8_t>(strtoul(row[45], nullptr, 10));
|
||||
e.d_melee_texture1 = static_cast<int32_t>(atoi(row[46]));
|
||||
e.d_melee_texture2 = static_cast<int32_t>(atoi(row[47]));
|
||||
e.d_melee_texture1 = static_cast<uint32_t>(strtoul(row[46], nullptr, 10));
|
||||
e.d_melee_texture2 = static_cast<uint32_t>(strtoul(row[47], nullptr, 10));
|
||||
e.ammo_idfile = row[48] ? row[48] : "";
|
||||
e.prim_melee_type = static_cast<uint8_t>(strtoul(row[49], nullptr, 10));
|
||||
e.sec_melee_type = static_cast<uint8_t>(strtoul(row[50], nullptr, 10));
|
||||
@@ -1289,8 +1289,8 @@ public:
|
||||
e.armortint_red = static_cast<uint8_t>(strtoul(row[43], nullptr, 10));
|
||||
e.armortint_green = static_cast<uint8_t>(strtoul(row[44], nullptr, 10));
|
||||
e.armortint_blue = static_cast<uint8_t>(strtoul(row[45], nullptr, 10));
|
||||
e.d_melee_texture1 = static_cast<int32_t>(atoi(row[46]));
|
||||
e.d_melee_texture2 = static_cast<int32_t>(atoi(row[47]));
|
||||
e.d_melee_texture1 = static_cast<uint32_t>(strtoul(row[46], nullptr, 10));
|
||||
e.d_melee_texture2 = static_cast<uint32_t>(strtoul(row[47], nullptr, 10));
|
||||
e.ammo_idfile = row[48] ? row[48] : "";
|
||||
e.prim_melee_type = static_cast<uint8_t>(strtoul(row[49], nullptr, 10));
|
||||
e.sec_melee_type = static_cast<uint8_t>(strtoul(row[50], nullptr, 10));
|
||||
@@ -1440,8 +1440,8 @@ public:
|
||||
e.armortint_red = static_cast<uint8_t>(strtoul(row[43], nullptr, 10));
|
||||
e.armortint_green = static_cast<uint8_t>(strtoul(row[44], nullptr, 10));
|
||||
e.armortint_blue = static_cast<uint8_t>(strtoul(row[45], nullptr, 10));
|
||||
e.d_melee_texture1 = static_cast<int32_t>(atoi(row[46]));
|
||||
e.d_melee_texture2 = static_cast<int32_t>(atoi(row[47]));
|
||||
e.d_melee_texture1 = static_cast<uint32_t>(strtoul(row[46], nullptr, 10));
|
||||
e.d_melee_texture2 = static_cast<uint32_t>(strtoul(row[47], nullptr, 10));
|
||||
e.ammo_idfile = row[48] ? row[48] : "";
|
||||
e.prim_melee_type = static_cast<uint8_t>(strtoul(row[49], nullptr, 10));
|
||||
e.sec_melee_type = static_cast<uint8_t>(strtoul(row[50], nullptr, 10));
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
class BaseRaidDetailsRepository {
|
||||
public:
|
||||
struct RaidDetails {
|
||||
@@ -23,6 +24,15 @@ public:
|
||||
int32_t loottype;
|
||||
int8_t locked;
|
||||
std::string motd;
|
||||
uint32_t marked_npc_1_entity_id;
|
||||
uint32_t marked_npc_1_zone_id;
|
||||
uint32_t marked_npc_1_instance_id;
|
||||
uint32_t marked_npc_2_entity_id;
|
||||
uint32_t marked_npc_2_zone_id;
|
||||
uint32_t marked_npc_2_instance_id;
|
||||
uint32_t marked_npc_3_entity_id;
|
||||
uint32_t marked_npc_3_zone_id;
|
||||
uint32_t marked_npc_3_instance_id;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@@ -37,6 +47,15 @@ public:
|
||||
"loottype",
|
||||
"locked",
|
||||
"motd",
|
||||
"marked_npc_1_entity_id",
|
||||
"marked_npc_1_zone_id",
|
||||
"marked_npc_1_instance_id",
|
||||
"marked_npc_2_entity_id",
|
||||
"marked_npc_2_zone_id",
|
||||
"marked_npc_2_instance_id",
|
||||
"marked_npc_3_entity_id",
|
||||
"marked_npc_3_zone_id",
|
||||
"marked_npc_3_instance_id",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -47,6 +66,15 @@ public:
|
||||
"loottype",
|
||||
"locked",
|
||||
"motd",
|
||||
"marked_npc_1_entity_id",
|
||||
"marked_npc_1_zone_id",
|
||||
"marked_npc_1_instance_id",
|
||||
"marked_npc_2_entity_id",
|
||||
"marked_npc_2_zone_id",
|
||||
"marked_npc_2_instance_id",
|
||||
"marked_npc_3_entity_id",
|
||||
"marked_npc_3_zone_id",
|
||||
"marked_npc_3_instance_id",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -87,10 +115,19 @@ public:
|
||||
{
|
||||
RaidDetails e{};
|
||||
|
||||
e.raidid = 0;
|
||||
e.loottype = 0;
|
||||
e.locked = 0;
|
||||
e.motd = "";
|
||||
e.raidid = 0;
|
||||
e.loottype = 0;
|
||||
e.locked = 0;
|
||||
e.motd = "";
|
||||
e.marked_npc_1_entity_id = 0;
|
||||
e.marked_npc_1_zone_id = 0;
|
||||
e.marked_npc_1_instance_id = 0;
|
||||
e.marked_npc_2_entity_id = 0;
|
||||
e.marked_npc_2_zone_id = 0;
|
||||
e.marked_npc_2_instance_id = 0;
|
||||
e.marked_npc_3_entity_id = 0;
|
||||
e.marked_npc_3_zone_id = 0;
|
||||
e.marked_npc_3_instance_id = 0;
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -116,8 +153,9 @@ public:
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} WHERE id = {} LIMIT 1",
|
||||
"{} WHERE {} = {} LIMIT 1",
|
||||
BaseSelect(),
|
||||
PrimaryKey(),
|
||||
raid_details_id
|
||||
)
|
||||
);
|
||||
@@ -126,10 +164,19 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
RaidDetails e{};
|
||||
|
||||
e.raidid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.loottype = static_cast<int32_t>(atoi(row[1]));
|
||||
e.locked = static_cast<int8_t>(atoi(row[2]));
|
||||
e.motd = row[3] ? row[3] : "";
|
||||
e.raidid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.loottype = static_cast<int32_t>(atoi(row[1]));
|
||||
e.locked = static_cast<int8_t>(atoi(row[2]));
|
||||
e.motd = row[3] ? row[3] : "";
|
||||
e.marked_npc_1_entity_id = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||
e.marked_npc_1_zone_id = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||
e.marked_npc_1_instance_id = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||
e.marked_npc_2_entity_id = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||
e.marked_npc_2_zone_id = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||
e.marked_npc_2_instance_id = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||
e.marked_npc_3_entity_id = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||
e.marked_npc_3_zone_id = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||
e.marked_npc_3_instance_id = static_cast<uint32_t>(strtoul(row[12], nullptr, 10));
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -167,6 +214,15 @@ public:
|
||||
v.push_back(columns[1] + " = " + std::to_string(e.loottype));
|
||||
v.push_back(columns[2] + " = " + std::to_string(e.locked));
|
||||
v.push_back(columns[3] + " = '" + Strings::Escape(e.motd) + "'");
|
||||
v.push_back(columns[4] + " = " + std::to_string(e.marked_npc_1_entity_id));
|
||||
v.push_back(columns[5] + " = " + std::to_string(e.marked_npc_1_zone_id));
|
||||
v.push_back(columns[6] + " = " + std::to_string(e.marked_npc_1_instance_id));
|
||||
v.push_back(columns[7] + " = " + std::to_string(e.marked_npc_2_entity_id));
|
||||
v.push_back(columns[8] + " = " + std::to_string(e.marked_npc_2_zone_id));
|
||||
v.push_back(columns[9] + " = " + std::to_string(e.marked_npc_2_instance_id));
|
||||
v.push_back(columns[10] + " = " + std::to_string(e.marked_npc_3_entity_id));
|
||||
v.push_back(columns[11] + " = " + std::to_string(e.marked_npc_3_zone_id));
|
||||
v.push_back(columns[12] + " = " + std::to_string(e.marked_npc_3_instance_id));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -192,6 +248,15 @@ public:
|
||||
v.push_back(std::to_string(e.loottype));
|
||||
v.push_back(std::to_string(e.locked));
|
||||
v.push_back("'" + Strings::Escape(e.motd) + "'");
|
||||
v.push_back(std::to_string(e.marked_npc_1_entity_id));
|
||||
v.push_back(std::to_string(e.marked_npc_1_zone_id));
|
||||
v.push_back(std::to_string(e.marked_npc_1_instance_id));
|
||||
v.push_back(std::to_string(e.marked_npc_2_entity_id));
|
||||
v.push_back(std::to_string(e.marked_npc_2_zone_id));
|
||||
v.push_back(std::to_string(e.marked_npc_2_instance_id));
|
||||
v.push_back(std::to_string(e.marked_npc_3_entity_id));
|
||||
v.push_back(std::to_string(e.marked_npc_3_zone_id));
|
||||
v.push_back(std::to_string(e.marked_npc_3_instance_id));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -225,6 +290,15 @@ public:
|
||||
v.push_back(std::to_string(e.loottype));
|
||||
v.push_back(std::to_string(e.locked));
|
||||
v.push_back("'" + Strings::Escape(e.motd) + "'");
|
||||
v.push_back(std::to_string(e.marked_npc_1_entity_id));
|
||||
v.push_back(std::to_string(e.marked_npc_1_zone_id));
|
||||
v.push_back(std::to_string(e.marked_npc_1_instance_id));
|
||||
v.push_back(std::to_string(e.marked_npc_2_entity_id));
|
||||
v.push_back(std::to_string(e.marked_npc_2_zone_id));
|
||||
v.push_back(std::to_string(e.marked_npc_2_instance_id));
|
||||
v.push_back(std::to_string(e.marked_npc_3_entity_id));
|
||||
v.push_back(std::to_string(e.marked_npc_3_zone_id));
|
||||
v.push_back(std::to_string(e.marked_npc_3_instance_id));
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@@ -258,10 +332,19 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
RaidDetails e{};
|
||||
|
||||
e.raidid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.loottype = static_cast<int32_t>(atoi(row[1]));
|
||||
e.locked = static_cast<int8_t>(atoi(row[2]));
|
||||
e.motd = row[3] ? row[3] : "";
|
||||
e.raidid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.loottype = static_cast<int32_t>(atoi(row[1]));
|
||||
e.locked = static_cast<int8_t>(atoi(row[2]));
|
||||
e.motd = row[3] ? row[3] : "";
|
||||
e.marked_npc_1_entity_id = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||
e.marked_npc_1_zone_id = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||
e.marked_npc_1_instance_id = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||
e.marked_npc_2_entity_id = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||
e.marked_npc_2_zone_id = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||
e.marked_npc_2_instance_id = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||
e.marked_npc_3_entity_id = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||
e.marked_npc_3_zone_id = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||
e.marked_npc_3_instance_id = static_cast<uint32_t>(strtoul(row[12], nullptr, 10));
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -286,10 +369,19 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
RaidDetails e{};
|
||||
|
||||
e.raidid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.loottype = static_cast<int32_t>(atoi(row[1]));
|
||||
e.locked = static_cast<int8_t>(atoi(row[2]));
|
||||
e.motd = row[3] ? row[3] : "";
|
||||
e.raidid = static_cast<int32_t>(atoi(row[0]));
|
||||
e.loottype = static_cast<int32_t>(atoi(row[1]));
|
||||
e.locked = static_cast<int8_t>(atoi(row[2]));
|
||||
e.motd = row[3] ? row[3] : "";
|
||||
e.marked_npc_1_entity_id = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||
e.marked_npc_1_zone_id = static_cast<uint32_t>(strtoul(row[5], nullptr, 10));
|
||||
e.marked_npc_1_instance_id = static_cast<uint32_t>(strtoul(row[6], nullptr, 10));
|
||||
e.marked_npc_2_entity_id = static_cast<uint32_t>(strtoul(row[7], nullptr, 10));
|
||||
e.marked_npc_2_zone_id = static_cast<uint32_t>(strtoul(row[8], nullptr, 10));
|
||||
e.marked_npc_2_instance_id = static_cast<uint32_t>(strtoul(row[9], nullptr, 10));
|
||||
e.marked_npc_3_entity_id = static_cast<uint32_t>(strtoul(row[10], nullptr, 10));
|
||||
e.marked_npc_3_zone_id = static_cast<uint32_t>(strtoul(row[11], nullptr, 10));
|
||||
e.marked_npc_3_instance_id = static_cast<uint32_t>(strtoul(row[12], nullptr, 10));
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@ public:
|
||||
int8_t isgroupleader;
|
||||
int8_t israidleader;
|
||||
int8_t islooter;
|
||||
uint8_t is_marker;
|
||||
uint8_t is_assister;
|
||||
std::string note;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@@ -52,6 +55,9 @@ public:
|
||||
"isgroupleader",
|
||||
"israidleader",
|
||||
"islooter",
|
||||
"is_marker",
|
||||
"is_assister",
|
||||
"note",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -69,6 +75,9 @@ public:
|
||||
"isgroupleader",
|
||||
"israidleader",
|
||||
"islooter",
|
||||
"is_marker",
|
||||
"is_assister",
|
||||
"note",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -120,6 +129,9 @@ public:
|
||||
e.isgroupleader = 0;
|
||||
e.israidleader = 0;
|
||||
e.islooter = 0;
|
||||
e.is_marker = 0;
|
||||
e.is_assister = 0;
|
||||
e.note = "";
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -167,6 +179,9 @@ public:
|
||||
e.isgroupleader = static_cast<int8_t>(atoi(row[8]));
|
||||
e.israidleader = static_cast<int8_t>(atoi(row[9]));
|
||||
e.islooter = static_cast<int8_t>(atoi(row[10]));
|
||||
e.is_marker = static_cast<uint8_t>(strtoul(row[11], nullptr, 10));
|
||||
e.is_assister = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||
e.note = row[13] ? row[13] : "";
|
||||
|
||||
return e;
|
||||
}
|
||||
@@ -210,6 +225,9 @@ public:
|
||||
v.push_back(columns[8] + " = " + std::to_string(e.isgroupleader));
|
||||
v.push_back(columns[9] + " = " + std::to_string(e.israidleader));
|
||||
v.push_back(columns[10] + " = " + std::to_string(e.islooter));
|
||||
v.push_back(columns[11] + " = " + std::to_string(e.is_marker));
|
||||
v.push_back(columns[12] + " = " + std::to_string(e.is_assister));
|
||||
v.push_back(columns[13] + " = '" + Strings::Escape(e.note) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -242,6 +260,9 @@ public:
|
||||
v.push_back(std::to_string(e.isgroupleader));
|
||||
v.push_back(std::to_string(e.israidleader));
|
||||
v.push_back(std::to_string(e.islooter));
|
||||
v.push_back(std::to_string(e.is_marker));
|
||||
v.push_back(std::to_string(e.is_assister));
|
||||
v.push_back("'" + Strings::Escape(e.note) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -282,6 +303,9 @@ public:
|
||||
v.push_back(std::to_string(e.isgroupleader));
|
||||
v.push_back(std::to_string(e.israidleader));
|
||||
v.push_back(std::to_string(e.islooter));
|
||||
v.push_back(std::to_string(e.is_marker));
|
||||
v.push_back(std::to_string(e.is_assister));
|
||||
v.push_back("'" + Strings::Escape(e.note) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||
}
|
||||
@@ -326,6 +350,9 @@ public:
|
||||
e.isgroupleader = static_cast<int8_t>(atoi(row[8]));
|
||||
e.israidleader = static_cast<int8_t>(atoi(row[9]));
|
||||
e.islooter = static_cast<int8_t>(atoi(row[10]));
|
||||
e.is_marker = static_cast<uint8_t>(strtoul(row[11], nullptr, 10));
|
||||
e.is_assister = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||
e.note = row[13] ? row[13] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
@@ -361,6 +388,9 @@ public:
|
||||
e.isgroupleader = static_cast<int8_t>(atoi(row[8]));
|
||||
e.israidleader = static_cast<int8_t>(atoi(row[9]));
|
||||
e.islooter = static_cast<int8_t>(atoi(row[10]));
|
||||
e.is_marker = static_cast<uint8_t>(strtoul(row[11], nullptr, 10));
|
||||
e.is_assister = static_cast<uint8_t>(strtoul(row[12], nullptr, 10));
|
||||
e.note = row[13] ? row[13] : "";
|
||||
|
||||
all_entries.push_back(e);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
#ifndef EQEMU_CHARACTER_STATS_RECORD_REPOSITORY_H
|
||||
#define EQEMU_CHARACTER_STATS_RECORD_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_character_stats_record_repository.h"
|
||||
|
||||
class CharacterStatsRecordRepository: public BaseCharacterStatsRecordRepository {
|
||||
public:
|
||||
|
||||
/**
|
||||
* This file was auto generated and can be modified and extended upon
|
||||
*
|
||||
* Base repository methods are automatically
|
||||
* generated in the "base" version of this repository. The base repository
|
||||
* is immutable and to be left untouched, while methods in this class
|
||||
* are used as extension methods for more specific persistence-layer
|
||||
* accessors or mutators.
|
||||
*
|
||||
* Base Methods (Subject to be expanded upon in time)
|
||||
*
|
||||
* Note: Not all tables are designed appropriately to fit functionality with all base methods
|
||||
*
|
||||
* InsertOne
|
||||
* UpdateOne
|
||||
* DeleteOne
|
||||
* FindOne
|
||||
* GetWhere(std::string where_filter)
|
||||
* DeleteWhere(std::string where_filter)
|
||||
* InsertMany
|
||||
* All
|
||||
*
|
||||
* Example custom methods in a repository
|
||||
*
|
||||
* CharacterStatsRecordRepository::GetByZoneAndVersion(int zone_id, int zone_version)
|
||||
* CharacterStatsRecordRepository::GetWhereNeverExpires()
|
||||
* CharacterStatsRecordRepository::GetWhereXAndY()
|
||||
* CharacterStatsRecordRepository::DeleteWhereXAndY()
|
||||
*
|
||||
* Most of the above could be covered by base methods, but if you as a developer
|
||||
* find yourself re-using logic for other parts of the code, its best to just make a
|
||||
* method that can be re-used easily elsewhere especially if it can use a base repository
|
||||
* method and encapsulate filters there
|
||||
*/
|
||||
|
||||
// Custom extended repository methods here
|
||||
|
||||
};
|
||||
|
||||
#endif //EQEMU_CHARACTER_STATS_RECORD_REPOSITORY_H
|
||||
@@ -0,0 +1,221 @@
|
||||
#ifndef EQEMU_COMMAND_SUBSETTINGS_REPOSITORY_H
|
||||
#define EQEMU_COMMAND_SUBSETTINGS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_command_subsettings_repository.h"
|
||||
|
||||
class CommandSubsettingsRepository: public BaseCommandSubsettingsRepository {
|
||||
public:
|
||||
|
||||
/**
|
||||
* This file was auto generated and can be modified and extended upon
|
||||
*
|
||||
* Base repository methods are automatically
|
||||
* generated in the "base" version of this repository. The base repository
|
||||
* is immutable and to be left untouched, while methods in this class
|
||||
* are used as extension methods for more specific persistence-layer
|
||||
* accessors or mutators.
|
||||
*
|
||||
* Base Methods (Subject to be expanded upon in time)
|
||||
*
|
||||
* Note: Not all tables are designed appropriately to fit functionality with all base methods
|
||||
*
|
||||
* InsertOne
|
||||
* UpdateOne
|
||||
* DeleteOne
|
||||
* FindOne
|
||||
* GetWhere(std::string where_filter)
|
||||
* DeleteWhere(std::string where_filter)
|
||||
* InsertMany
|
||||
* All
|
||||
*
|
||||
* Example custom methods in a repository
|
||||
*
|
||||
* CommandSubsettingsRepository::GetByZoneAndVersion(int zone_id, int zone_version)
|
||||
* CommandSubsettingsRepository::GetWhereNeverExpires()
|
||||
* CommandSubsettingsRepository::GetWhereXAndY()
|
||||
* CommandSubsettingsRepository::DeleteWhereXAndY()
|
||||
*
|
||||
* Most of the above could be covered by base methods, but if you as a developer
|
||||
* find yourself re-using logic for other parts of the code, its best to just make a
|
||||
* method that can be re-used easily elsewhere especially if it can use a base repository
|
||||
* method and encapsulate filters there
|
||||
*/
|
||||
|
||||
// Custom extended repository methods here
|
||||
static std::vector<CommandSubsettingsRepository::CommandSubsettings> GetAll(Database& db)
|
||||
{
|
||||
// these are the base definitions for command_subsettings and can be over-ridden by the database
|
||||
std::vector<CommandSubsettingsRepository::CommandSubsettings> static_records = {
|
||||
{.parent_command = "find", .sub_command = "aa", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findaa"},
|
||||
{.parent_command = "find", .sub_command = "character", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findcharacter"},
|
||||
{.parent_command = "find", .sub_command = "class", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findclass"},
|
||||
{.parent_command = "find", .sub_command = "currency", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findcurrency"},
|
||||
{.parent_command = "find", .sub_command = "deity", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "finddeity"},
|
||||
{.parent_command = "find", .sub_command = "emote", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findemote"},
|
||||
{.parent_command = "find", .sub_command = "faction", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findfaction"},
|
||||
{.parent_command = "find", .sub_command = "item", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "fi|finditem|itemsearch"},
|
||||
{.parent_command = "find", .sub_command = "language", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findlanguage"},
|
||||
{.parent_command = "find", .sub_command = "npc_type", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "fn|findnpc|findnpctype"},
|
||||
{.parent_command = "find", .sub_command = "race", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findrace"},
|
||||
{.parent_command = "find", .sub_command = "recipe", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findrecipe"},
|
||||
{.parent_command = "find", .sub_command = "skill", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findskill"},
|
||||
{.parent_command = "find", .sub_command = "spell", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "fs|findspell"},
|
||||
{.parent_command = "find", .sub_command = "task", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "findtask"},
|
||||
{.parent_command = "find", .sub_command = "zone", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "fz|findzone"},
|
||||
{.parent_command = "set", .sub_command = "aa_exp", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setaaxp|setaaexp"},
|
||||
{.parent_command = "set", .sub_command = "aa_points", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setaapts|setaapoints"},
|
||||
{.parent_command = "set", .sub_command = "adventure_points", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setadventurepoints"},
|
||||
{.parent_command = "set", .sub_command = "alternate_currency", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setaltcurrency"},
|
||||
{.parent_command = "set", .sub_command = "animation", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setanim"},
|
||||
{.parent_command = "set", .sub_command = "anon", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setanon"},
|
||||
{.parent_command = "set", .sub_command = "bind", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "bind"},
|
||||
{.parent_command = "set", .sub_command = "checksum", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "updatechecksum"},
|
||||
{.parent_command = "set", .sub_command = "class_permanent", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "permaclass"},
|
||||
{.parent_command = "set", .sub_command = "crystals", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setcrystals"},
|
||||
{.parent_command = "set", .sub_command = "date", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "date"},
|
||||
{.parent_command = "set", .sub_command = "endurance", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setendurance"},
|
||||
{.parent_command = "set", .sub_command = "endurance_full", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "endurance"},
|
||||
{.parent_command = "set", .sub_command = "exp", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setxp|setexp"},
|
||||
{.parent_command = "set", .sub_command = "faction", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setfaction"},
|
||||
{.parent_command = "set", .sub_command = "flymode", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "flymode"},
|
||||
{.parent_command = "set", .sub_command = "freeze", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "freeze|unfreeze"},
|
||||
{.parent_command = "set", .sub_command = "gender", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "gender"},
|
||||
{.parent_command = "set", .sub_command = "gender_permanent", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "permagender"},
|
||||
{.parent_command = "set", .sub_command = "gm", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "gm"},
|
||||
{.parent_command = "set", .sub_command = "gm_speed", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "gmspeed"},
|
||||
{.parent_command = "set", .sub_command = "gm_status", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "flag"},
|
||||
{.parent_command = "set", .sub_command = "god_mode", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "godmode"},
|
||||
{.parent_command = "set", .sub_command = "haste", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "haste"},
|
||||
{.parent_command = "set", .sub_command = "hero_model", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "heromodel"},
|
||||
{.parent_command = "set", .sub_command = "hide_me", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "hideme"},
|
||||
{.parent_command = "set", .sub_command = "hp", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "sethp"},
|
||||
{.parent_command = "set", .sub_command = "hp_full", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "heal"},
|
||||
{.parent_command = "set", .sub_command = "invulnerable", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "invul|invulnerable"},
|
||||
{.parent_command = "set", .sub_command = "language", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setlanguage"},
|
||||
{.parent_command = "set", .sub_command = "last_name", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "lastname"},
|
||||
{.parent_command = "set", .sub_command = "level", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "level"},
|
||||
{.parent_command = "set", .sub_command = "loginserver_info", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setlsinfo"},
|
||||
{.parent_command = "set", .sub_command = "mana", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setmana"},
|
||||
{.parent_command = "set", .sub_command = "mana_full", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "mana"},
|
||||
{.parent_command = "set", .sub_command = "motd", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "motd"},
|
||||
{.parent_command = "set", .sub_command = "name", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "name"},
|
||||
{.parent_command = "set", .sub_command = "ooc_mute", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "oocmute"},
|
||||
{.parent_command = "set", .sub_command = "password", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setpass"},
|
||||
{.parent_command = "set", .sub_command = "pvp", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "pvp"},
|
||||
{.parent_command = "set", .sub_command = "pvp_points", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setpvppoints"},
|
||||
{.parent_command = "set", .sub_command = "race", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "race"},
|
||||
{.parent_command = "set", .sub_command = "race_permanent", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "permarace"},
|
||||
{.parent_command = "set", .sub_command = "server_locked", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "lock|serverlock|serverunlock|unlock"},
|
||||
{.parent_command = "set", .sub_command = "skill", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setskill"},
|
||||
{.parent_command = "set", .sub_command = "skill_all", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setallskill|setallskills|setskillall"},
|
||||
{.parent_command = "set", .sub_command = "skill_all_max", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "maxskills"},
|
||||
{.parent_command = "set", .sub_command = "start_zone", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "setstartzone"},
|
||||
{.parent_command = "set", .sub_command = "temporary_name", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "tempname"},
|
||||
{.parent_command = "set", .sub_command = "texture", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "texture"},
|
||||
{.parent_command = "set", .sub_command = "time", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "time"},
|
||||
{.parent_command = "set", .sub_command = "time_zone", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "timezone"},
|
||||
{.parent_command = "set", .sub_command = "title", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "title"},
|
||||
{.parent_command = "set", .sub_command = "title_suffix", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "titlesuffix"},
|
||||
{.parent_command = "set", .sub_command = "weather", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "weather"},
|
||||
{.parent_command = "set", .sub_command = "zone", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "zclip|zcolor|zheader|zonelock|zsafecoords|zsky|zunderworld"},
|
||||
{.parent_command = "show", .sub_command = "aggro", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "aggro"},
|
||||
{.parent_command = "show", .sub_command = "buffs", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showbuffs"},
|
||||
{.parent_command = "show", .sub_command = "buried_corpse_count", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "getplayerburiedcorpsecount"},
|
||||
{.parent_command = "show", .sub_command = "client_version_summary", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "cvs"},
|
||||
{.parent_command = "show", .sub_command = "currencies", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "viewcurrencies"},
|
||||
{.parent_command = "show", .sub_command = "distance", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "distance"},
|
||||
{.parent_command = "show", .sub_command = "emote", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "emoteview"},
|
||||
{.parent_command = "show", .sub_command = "field_of_view", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "fov"},
|
||||
{.parent_command = "show", .sub_command = "flags", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "flags"},
|
||||
{.parent_command = "show", .sub_command = "group_info", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "ginfo"},
|
||||
{.parent_command = "show", .sub_command = "hatelist", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "hatelist"},
|
||||
{.parent_command = "show", .sub_command = "inventory", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "peekinv"},
|
||||
{.parent_command = "show", .sub_command = "ip_lookup", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "iplookup"},
|
||||
{.parent_command = "show", .sub_command = "line_of_sight", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "checklos"},
|
||||
{.parent_command = "show", .sub_command = "network", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "network"},
|
||||
{.parent_command = "show", .sub_command = "network_stats", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "netstats"},
|
||||
{.parent_command = "show", .sub_command = "npc_global_loot", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "shownpcgloballoot"},
|
||||
{.parent_command = "show", .sub_command = "npc_stats", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "npcstats"},
|
||||
{.parent_command = "show", .sub_command = "npc_type", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "viewnpctype"},
|
||||
{.parent_command = "show", .sub_command = "peqzone_flags", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "peqzone_flags"},
|
||||
{.parent_command = "show", .sub_command = "petition", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "listpetition|viewpetition"},
|
||||
{.parent_command = "show", .sub_command = "petition_info", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "petitioninfo"},
|
||||
{.parent_command = "show", .sub_command = "proximity", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "proximity"},
|
||||
{.parent_command = "show", .sub_command = "quest_errors", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "questerrors"},
|
||||
{.parent_command = "show", .sub_command = "quest_globals", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "globalview"},
|
||||
{.parent_command = "show", .sub_command = "recipe", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "viewrecipe"},
|
||||
{.parent_command = "show", .sub_command = "server_info", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "serverinfo"},
|
||||
{.parent_command = "show", .sub_command = "skills", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showskills"},
|
||||
{.parent_command = "show", .sub_command = "spawn_status", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "spawnstatus"},
|
||||
{.parent_command = "show", .sub_command = "spells", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showspells"},
|
||||
{.parent_command = "show", .sub_command = "spells_list", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showspellslist"},
|
||||
{.parent_command = "show", .sub_command = "stats", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showstats"},
|
||||
{.parent_command = "show", .sub_command = "timers", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "timers"},
|
||||
{.parent_command = "show", .sub_command = "traps", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "trapinfo"},
|
||||
{.parent_command = "show", .sub_command = "uptime", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "uptime"},
|
||||
{.parent_command = "show", .sub_command = "variable", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "getvariable"},
|
||||
{.parent_command = "show", .sub_command = "version", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "version"},
|
||||
{.parent_command = "show", .sub_command = "waypoints", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "wpinfo"},
|
||||
{.parent_command = "show", .sub_command = "who", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "who"},
|
||||
{.parent_command = "show", .sub_command = "xtargets", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "xtargets"},
|
||||
{.parent_command = "show", .sub_command = "zone_global_loot", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showzonegloballoot"},
|
||||
{.parent_command = "show", .sub_command = "zone_loot", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "viewzoneloot"},
|
||||
{.parent_command = "show", .sub_command = "zone_points", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "showzonepoints"},
|
||||
{.parent_command = "show", .sub_command = "zone_stats", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "zstats"},
|
||||
{.parent_command = "show", .sub_command = "zone_status", .access_level = AccountStatus::QuestTroupe, .top_level_aliases = "zonestatus"},
|
||||
};
|
||||
|
||||
auto db_sub_settings = All(db);
|
||||
|
||||
// inject commands in the database that are not already there
|
||||
std::vector<CommandSubsettingsRepository::CommandSubsettings> new_records = {};
|
||||
for (const auto &r: static_records) {
|
||||
bool found = false;
|
||||
for (const auto &db_r: db_sub_settings) {
|
||||
if (r.parent_command == db_r.parent_command && r.sub_command == db_r.sub_command) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
LogInfo("New command [{}] sub-command [{}] added to database table [{}] !", r.parent_command, r.sub_command, TableName());
|
||||
new_records.emplace_back(r);
|
||||
}
|
||||
}
|
||||
|
||||
if (!new_records.empty()) {
|
||||
InsertMany(db, new_records);
|
||||
// if any were added, we need to reload the list
|
||||
db_sub_settings = All(db);
|
||||
}
|
||||
|
||||
// remove commands from the database that are not in the static list
|
||||
bool any_deleted = false;
|
||||
for (const auto &db_r: db_sub_settings) {
|
||||
bool found = false;
|
||||
for (const auto &r: static_records) {
|
||||
if (r.parent_command == db_r.parent_command && r.sub_command == db_r.sub_command) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
LogInfo("Command [{}] sub-command [{}] removed from database table [{}] !", db_r.parent_command, db_r.sub_command, TableName());
|
||||
DeleteWhere(db, fmt::format("parent_command = '{}' AND sub_command = '{}'", db_r.parent_command, db_r.sub_command));
|
||||
any_deleted = true;
|
||||
}
|
||||
}
|
||||
|
||||
// if any were deleted, re-read the database
|
||||
if (any_deleted) {
|
||||
db_sub_settings = All(db);
|
||||
}
|
||||
|
||||
// return the final list of what's in the database
|
||||
return db_sub_settings;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //EQEMU_COMMAND_SUBSETTINGS_REPOSITORY_H
|
||||
@@ -44,7 +44,35 @@ public:
|
||||
*/
|
||||
|
||||
// Custom extended repository methods here
|
||||
static std::vector<int32> GetItemIDsBySearchCriteria(
|
||||
Database& db,
|
||||
std::string search_string,
|
||||
int query_limit = 0
|
||||
)
|
||||
{
|
||||
auto query = fmt::format(
|
||||
"SELECT `id` FROM {} WHERE LOWER(`name`) LIKE '%%{}%%' ORDER BY id ASC",
|
||||
TableName(),
|
||||
Strings::Escape(search_string)
|
||||
);
|
||||
|
||||
if (query_limit >= 1) {
|
||||
query += fmt::format(" LIMIT {}", query_limit);
|
||||
}
|
||||
|
||||
std::vector<int32> item_id_list;
|
||||
|
||||
auto results = db.QueryDatabase(query);
|
||||
if (!results.Success() || !results.RowCount()) {
|
||||
return item_id_list;
|
||||
}
|
||||
|
||||
for (auto row : results) {
|
||||
item_id_list.emplace_back(Strings::ToInt(row[0]));
|
||||
}
|
||||
|
||||
return item_id_list;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //EQEMU_ITEMS_REPOSITORY_H
|
||||
|
||||
@@ -44,7 +44,28 @@ public:
|
||||
*/
|
||||
|
||||
// Custom extended repository methods here
|
||||
static int UpdateRaidMarkedNPC(
|
||||
Database& db,
|
||||
int32_t raid_id,
|
||||
uint32_t marked_npc_entity_id,
|
||||
uint32_t marked_npc_zone_id,
|
||||
uint32_t marked_npc_instance_id,
|
||||
uint32_t slot_number
|
||||
) {
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE `{0}` SET `marked_npc_{4}_entity_id` = '{1}',`marked_npc_{4}_zone_id` = '{2}',`marked_npc_{4}_instance_id` = '{3}' WHERE raidid = '{5}';",
|
||||
TableName(),
|
||||
marked_npc_entity_id,
|
||||
marked_npc_zone_id,
|
||||
marked_npc_instance_id,
|
||||
slot_number,
|
||||
raid_id
|
||||
)
|
||||
);
|
||||
|
||||
return results.Success() ? results.RowsAffected() : 0;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //EQEMU_RAID_DETAILS_REPOSITORY_H
|
||||
|
||||
@@ -44,7 +44,59 @@ public:
|
||||
*/
|
||||
|
||||
// Custom extended repository methods here
|
||||
static int UpdateRaidNote(
|
||||
Database& db,
|
||||
int32_t raid_id,
|
||||
const std::string& note,
|
||||
const std::string& character_name
|
||||
) {
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format("UPDATE `{}` SET `note` = '{}' WHERE raidid = '{}' AND name = '{}';",
|
||||
TableName(),
|
||||
Strings::Escape(note),
|
||||
raid_id,
|
||||
Strings::Escape(character_name)
|
||||
)
|
||||
);
|
||||
return results.Success() ? results.RowsAffected() : 0;
|
||||
}
|
||||
|
||||
static int UpdateRaidAssister(
|
||||
Database& db,
|
||||
int32_t raid_id,
|
||||
const std::string& character_name,
|
||||
uint8_t value
|
||||
) {
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE `{}` SET `is_assister` = '{}' WHERE raidid = '{}' AND `name` = '{}';",
|
||||
TableName(),
|
||||
value,
|
||||
raid_id,
|
||||
Strings::Escape(character_name)
|
||||
)
|
||||
);
|
||||
|
||||
return results.Success() ? results.RowsAffected() : 0;
|
||||
}
|
||||
|
||||
static int UpdateRaidMarker(
|
||||
Database& db,
|
||||
int32_t raid_id,
|
||||
const std::string& character_name,
|
||||
uint8_t value
|
||||
) {
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE `{}` SET `is_marker` = '{}' WHERE raidid = '{}' AND `name` = '{}';",
|
||||
TableName(),
|
||||
value,
|
||||
raid_id,
|
||||
Strings::Escape(character_name)
|
||||
)
|
||||
);
|
||||
|
||||
return results.Success() ? results.RowsAffected() : 0;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //EQEMU_RAID_MEMBERS_REPOSITORY_H
|
||||
|
||||
@@ -241,6 +241,7 @@ RULE_CATEGORY_END()
|
||||
RULE_CATEGORY(Skills)
|
||||
RULE_INT(Skills, MaxTrainTradeskills, 21, "Highest level for trading skills that can be learnt by the trainer")
|
||||
RULE_BOOL(Skills, UseLimitTradeskillSearchSkillDiff, true, "Enables the limit for the maximum difference between trivial and skill for recipe searches and favorites")
|
||||
RULE_BOOL(Skills, TrivialTradeskillCombinesNoFail, false, "Enable to make all trivial tradeskill combines unable to fail")
|
||||
RULE_INT(Skills, MaxTradeskillSearchSkillDiff, 50, "The maximum difference in skill between the trivial of an item and the skill of the player if the trivial is higher than the skill. Recipes that have not been learnt or made at least once via the Experiment mode will be removed from searches based on this criteria.")
|
||||
RULE_INT(Skills, MaxTrainSpecializations, 50, "Maximum level a GM trainer will train casting specializations")
|
||||
RULE_INT(Skills, SwimmingStartValue, 100, "Start value of swimming skill")
|
||||
@@ -256,6 +257,7 @@ RULE_BOOL(Pets, UnTargetableSwarmPet, false, "Setting whether swarm pets should
|
||||
RULE_REAL(Pets, PetPowerLevelCap, 10, "Maximum number of levels a player pet can go up with pet power")
|
||||
RULE_BOOL(Pets, CanTakeNoDrop, false, "Setting whether anyone can give no-drop items to pets")
|
||||
RULE_BOOL(Pets, LivelikeBreakCharmOnInvis, true, "Default: true will break charm on any type of invis (hide/ivu/iva/etc) false will only break if the pet can not see you (ex. you have an undead pet and cast IVU")
|
||||
RULE_BOOL(Pets, ClientPetsUseOwnerNameInLastName, true, "Disable this to keep client pet's last names from being owner_name's pet")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(GM)
|
||||
@@ -446,6 +448,7 @@ RULE_BOOL(Spells, UseItemCastMessage, false, "Enable to use the \"item begins to
|
||||
RULE_BOOL(Spells, TargetsTargetRequiresCombatRange, true, "Disable to remove combat range requirement from Target's Target Spell Target Type")
|
||||
RULE_BOOL(Spells, NPCBuffLevelRestrictions, false, "Impose BuffLevelRestrictions on NPCs if true")
|
||||
RULE_INT(Spells, ResurrectionEffectBlock, 2, "0 = allow overwrites/rule disabled. If set to 1 = Block all buffs that would overwrite Resurrection Effects. If set to 2 = Will not overwrite Resurrection Effects, instead moves new buff to an empty slot if available. Default is 2.")
|
||||
RULE_BOOL(Spells, WaterMatchRequiredForLoS, true, "Enable/Disable the requirement of both the attacker/victim being both in or out of water for spells LoS to pass.")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Combat)
|
||||
@@ -519,6 +522,7 @@ RULE_BOOL(Combat, EnableWarriorShielding, true, "Enable or disable Warrior Shiel
|
||||
RULE_BOOL(Combat, BackstabIgnoresElemental, false, "Enable or disable Elemental weapon damage affecting backstab damage, false by default.")
|
||||
RULE_BOOL(Combat, BackstabIgnoresBane, false, "Enable or disable Bane weapon damage affecting backstab damage, false by default.")
|
||||
RULE_BOOL(Combat, SummonMeleeRange, true, "Enable or disable summoning of a player when already in melee range of the summoner.")
|
||||
RULE_BOOL(Combat, WaterMatchRequiredForAutoFireLoS, true, "Enable/Disable the requirement of both the attacker/victim being both in or out of water for AutoFire LoS to pass.")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(NPC)
|
||||
@@ -633,6 +637,7 @@ RULE_BOOL(Bots, OldRaceRezEffects, false, "Older clients had ID 757 for races wi
|
||||
RULE_BOOL(Bots, ResurrectionSickness, true, "Use Resurrection Sickness based on Resurrection spell cast, set to false to disable Resurrection Sickness.")
|
||||
RULE_INT(Bots, OldResurrectionSicknessSpell, 757, "757 is Default Old Resurrection Sickness Spell")
|
||||
RULE_INT(Bots, ResurrectionSicknessSpell, 756, "756 is Default Resurrection Sickness Spell")
|
||||
RULE_BOOL(Bots, AllowPickpocketCommand, true, "Allows the use of the bot command 'pickpocket'")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Chat)
|
||||
|
||||
+2
-1
@@ -376,7 +376,7 @@ std::string EQ::SayLinkEngine::InjectSaylinksIfNotExist(const char *message)
|
||||
|
||||
void EQ::SayLinkEngine::LoadCachedSaylinks()
|
||||
{
|
||||
auto saylinks = SaylinkRepository::GetWhere(database, "phrase not like '%#%'");
|
||||
auto saylinks = SaylinkRepository::GetWhere(database, "phrase not REGEXP BINARY '[A-Z]' and phrase not REGEXP '[0-9]'");
|
||||
LogSaylink("Loaded [{}] saylinks into cache", saylinks.size());
|
||||
g_cached_saylinks = saylinks;
|
||||
}
|
||||
@@ -399,6 +399,7 @@ SaylinkRepository::Saylink EQ::SayLinkEngine::GetOrSaveSaylink(std::string sayli
|
||||
|
||||
// return if found from the database
|
||||
if (!saylinks.empty()) {
|
||||
g_cached_saylinks.emplace_back(saylinks[0]);
|
||||
return saylinks[0];
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
#define ServerOP_GroupFollowAck 0x0111
|
||||
#define ServerOP_GroupCancelInvite 0x0112
|
||||
#define ServerOP_RaidMOTD 0x0113
|
||||
#define ServerOP_RaidNote 0x0114
|
||||
|
||||
#define ServerOP_InstanceUpdateTime 0x014F
|
||||
#define ServerOP_AdventureRequest 0x0150
|
||||
@@ -248,6 +249,7 @@
|
||||
#define ServerOP_ReloadZonePoints 0x4122
|
||||
#define ServerOP_ReloadDzTemplates 0x4123
|
||||
#define ServerOP_ReloadZoneData 0x4124
|
||||
#define ServerOP_ReloadDataBucketsCache 0x4125
|
||||
|
||||
#define ServerOP_CZDialogueWindow 0x4500
|
||||
#define ServerOP_CZLDoNUpdate 0x4501
|
||||
@@ -285,6 +287,8 @@
|
||||
// player events
|
||||
#define ServerOP_PlayerEvent 0x5100
|
||||
|
||||
#define ServerOP_DataBucketCacheUpdate 0x5200
|
||||
|
||||
enum {
|
||||
CZUpdateType_Character,
|
||||
CZUpdateType_Group,
|
||||
@@ -1075,6 +1079,10 @@ struct ServerRaidMOTD_Struct {
|
||||
char motd[0];
|
||||
};
|
||||
|
||||
struct ServerRaidNote_Struct {
|
||||
uint32 rid;
|
||||
};
|
||||
|
||||
struct ServerLFGMatchesRequest_Struct {
|
||||
uint32 FromID;
|
||||
uint8 QuerierLevel;
|
||||
@@ -1815,6 +1823,11 @@ struct ServerSendPlayerEvent_Struct {
|
||||
char cereal_data[0];
|
||||
};
|
||||
|
||||
struct ServerDataBucketCacheUpdate_Struct {
|
||||
uint32_t cereal_size;
|
||||
char cereal_data[0];
|
||||
};
|
||||
|
||||
struct ServerFlagUpdate_Struct {
|
||||
uint32 account_id;
|
||||
int16 admin;
|
||||
@@ -1824,6 +1837,11 @@ struct ServerOOCMute_Struct {
|
||||
bool is_muted;
|
||||
};
|
||||
|
||||
struct ServerZoneStatus_Struct {
|
||||
char name[64];
|
||||
int16 admin;
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
+54
-15
@@ -1635,25 +1635,29 @@ bool SharedDatabase::GetCommandSettings(std::map<std::string, std::pair<uint8, s
|
||||
{
|
||||
command_settings.clear();
|
||||
|
||||
const std::string query = "SELECT `command`, `access`, `aliases` FROM `command_settings`";
|
||||
const std::string& query = "SELECT `command`, `access`, `aliases` FROM `command_settings`";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
if (!results.Success() || !results.RowCount()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto& row = results.begin(); row != results.end(); ++row) {
|
||||
for (auto row : results) {
|
||||
command_settings[row[0]].first = Strings::ToUnsignedInt(row[1]);
|
||||
if (row[2][0] == 0)
|
||||
if (row[2][0] == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::vector<std::string> aliases = Strings::Split(row[2], '|');
|
||||
for (auto iter = aliases.begin(); iter != aliases.end(); ++iter) {
|
||||
if (iter->empty())
|
||||
for (const auto& e : aliases) {
|
||||
if (e.empty()) {
|
||||
continue;
|
||||
command_settings[row[0]].second.push_back(*iter);
|
||||
}
|
||||
|
||||
command_settings[row[0]].second.push_back(e);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SharedDatabase::UpdateInjectedCommandSettings(const std::vector<std::pair<std::string, uint8>> &injected)
|
||||
@@ -1668,13 +1672,15 @@ bool SharedDatabase::UpdateInjectedCommandSettings(const std::vector<std::pair<s
|
||||
)
|
||||
);
|
||||
|
||||
if (!QueryDatabase(query).Success()) {
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LogInfo(
|
||||
"[{0}] New Command(s) Added",
|
||||
injected.size()
|
||||
"[{}] New Command{} Added",
|
||||
injected.size(),
|
||||
injected.size() != 1 ? "s" : ""
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1684,25 +1690,58 @@ bool SharedDatabase::UpdateInjectedCommandSettings(const std::vector<std::pair<s
|
||||
bool SharedDatabase::UpdateOrphanedCommandSettings(const std::vector<std::string> &orphaned)
|
||||
{
|
||||
if (orphaned.size()) {
|
||||
const std::string query = fmt::format(
|
||||
std::string query = fmt::format(
|
||||
"DELETE FROM `command_settings` WHERE `command` IN ({})",
|
||||
Strings::ImplodePair(",", std::pair<char, char>('\'', '\''), orphaned)
|
||||
);
|
||||
|
||||
if (!QueryDatabase(query).Success()) {
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
query = fmt::format(
|
||||
"DELETE FROM `command_subsettings` WHERE `parent_command` IN ({})",
|
||||
Strings::ImplodePair(",", std::pair<char, char>('\'', '\''), orphaned)
|
||||
);
|
||||
|
||||
auto results_two = QueryDatabase(query);
|
||||
if (!results_two.Success()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LogInfo(
|
||||
"{} Orphaned Command{} Deleted",
|
||||
"{} Orphaned Command{} Deleted | {} Orphaned Subcommand{} Deleted",
|
||||
orphaned.size(),
|
||||
(orphaned.size() == 1 ? "" : "s")
|
||||
orphaned.size() != 1 ? "s" : "",
|
||||
results_two.RowsAffected(),
|
||||
results_two.RowsAffected() != 1 ? "s" : ""
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SharedDatabase::GetCommandSubSettings(std::vector<CommandSubsettingsRepository::CommandSubsettings> &command_subsettings)
|
||||
{
|
||||
command_subsettings.clear();
|
||||
|
||||
const auto& l = CommandSubsettingsRepository::GetAll(*this);
|
||||
|
||||
if (l.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
command_subsettings.reserve(l.size());
|
||||
|
||||
for (const auto& e : l) {
|
||||
command_subsettings.emplace_back(e);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool SharedDatabase::LoadSkillCaps(const std::string &prefix) {
|
||||
skill_caps_mmf.reset(nullptr);
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "fixed_memory_hash_set.h"
|
||||
#include "fixed_memory_variable_hash_set.h"
|
||||
#include "say_link.h"
|
||||
#include "repositories/command_subsettings_repository.h"
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
@@ -77,6 +78,7 @@ public:
|
||||
bool GetCommandSettings(std::map<std::string, std::pair<uint8, std::vector<std::string>>> &command_settings);
|
||||
bool UpdateInjectedCommandSettings(const std::vector<std::pair<std::string, uint8>> &injected);
|
||||
bool UpdateOrphanedCommandSettings(const std::vector<std::string> &orphaned);
|
||||
bool GetCommandSubSettings(std::vector<CommandSubsettingsRepository::CommandSubsettings> &command_subsettings);
|
||||
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
|
||||
bool SetGMInvul(uint32 account_id, bool gminvul);
|
||||
bool SetGMFlymode(uint32 account_id, uint8 flymode);
|
||||
|
||||
+39
-1
@@ -370,7 +370,8 @@ std::string Strings::NumberToWords(unsigned long long int n)
|
||||
|
||||
return res;
|
||||
}
|
||||
std::string Strings::Money(uint32 platinum, uint32 gold, uint32 silver, uint32 copper)
|
||||
|
||||
std::string Strings::Money(uint64 platinum, uint64 gold, uint64 silver, uint64 copper)
|
||||
{
|
||||
std::string money_string = "Unknown";
|
||||
if (copper && silver && gold && platinum) { // CSGP
|
||||
@@ -694,8 +695,31 @@ std::string Strings::ConvertToDigit(int n, const std::string& suffix)
|
||||
return NUM_TO_ENGLISH_X[n] + suffix;
|
||||
}
|
||||
}
|
||||
|
||||
bool Strings::BeginsWith(const std::string& subject, const std::string& search)
|
||||
{
|
||||
if (subject.length() < search.length()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return subject.starts_with(search);
|
||||
}
|
||||
|
||||
bool Strings::EndsWith(const std::string& subject, const std::string& search)
|
||||
{
|
||||
if (subject.length() < search.length()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return subject.ends_with(search);
|
||||
}
|
||||
|
||||
bool Strings::Contains(const std::string& subject, const std::string& search)
|
||||
{
|
||||
if (subject.length() < search.length()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return subject.find(search) != std::string::npos;
|
||||
}
|
||||
|
||||
@@ -858,3 +882,17 @@ std::string Strings::RemoveNumbers(std::string s)
|
||||
|
||||
return s.substr(0, current);
|
||||
}
|
||||
|
||||
std::string Strings::ZoneTime(const uint8 hours, const uint8 minutes)
|
||||
{
|
||||
return fmt::format(
|
||||
"{:02}:{:02} {}",
|
||||
(
|
||||
(hours % 12) == 0 ?
|
||||
12 :
|
||||
(hours % 12)
|
||||
),
|
||||
minutes,
|
||||
hours >= 13 ? "PM" : "AM"
|
||||
);
|
||||
}
|
||||
|
||||
+4
-1
@@ -114,7 +114,7 @@ public:
|
||||
static std::string Join(const std::vector<std::string> &ar, const std::string &delim);
|
||||
static std::string Join(const std::vector<uint32_t> &ar, const std::string &delim);
|
||||
static std::string MillisecondsToTime(int duration);
|
||||
static std::string Money(uint32 platinum, uint32 gold = 0, uint32 silver = 0, uint32 copper = 0);
|
||||
static std::string Money(uint64 platinum, uint64 gold = 0, uint64 silver = 0, uint64 copper = 0);
|
||||
static std::string NumberToWords(unsigned long long int n);
|
||||
static std::string Repeat(std::string s, int n);
|
||||
static std::string Replace(std::string subject, const std::string &search, const std::string &replace);
|
||||
@@ -128,6 +128,9 @@ public:
|
||||
static bool ToBool(const std::string& bool_string);
|
||||
static inline bool EqualFold(const std::string &string_one, const std::string &string_two) { return strcasecmp(string_one.c_str(), string_two.c_str()) == 0; }
|
||||
static std::string Random(size_t length);
|
||||
static bool BeginsWith(const std::string& subject, const std::string& search);
|
||||
static bool EndsWith(const std::string& subject, const std::string& search);
|
||||
static std::string ZoneTime(const uint8 hours, const uint8 minutes);
|
||||
|
||||
template<typename T>
|
||||
static std::string
|
||||
|
||||
@@ -220,6 +220,8 @@ inline bool isMsysPty(int fd) noexcept
|
||||
|
||||
#endif
|
||||
|
||||
inline bool g_is_forced_tty = std::getenv("IS_TTY");
|
||||
|
||||
inline bool isTerminal(const std::streambuf *osbuf) noexcept
|
||||
{
|
||||
if (g_is_forced_tty) {
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@
|
||||
|
||||
// Build variables
|
||||
// these get injected during the build pipeline
|
||||
#define CURRENT_VERSION "22.13.0-dev" // always append -dev to the current version for custom-builds
|
||||
#define CURRENT_VERSION "22.24.0-dev" // always append -dev to the current version for custom-builds
|
||||
#define LOGIN_VERSION "0.8.0"
|
||||
#define COMPILE_DATE __DATE__
|
||||
#define COMPILE_TIME __TIME__
|
||||
@@ -42,7 +42,7 @@
|
||||
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9228
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9235
|
||||
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9039
|
||||
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
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
|
||||
*/
|
||||
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/eqemu_logsys.h"
|
||||
#include <iomanip>
|
||||
|
||||
#include "worldconn.h"
|
||||
#include "eqemu_config.h"
|
||||
#include "md5.h"
|
||||
#include "servertalk.h"
|
||||
|
||||
WorldConnection::WorldConnection(EmuTCPConnection::ePacketMode mode, const char *password)
|
||||
: m_password(password)
|
||||
{
|
||||
tcpc.SetPacketMode(mode);
|
||||
pTryReconnect = true;
|
||||
pConnected = false;
|
||||
}
|
||||
|
||||
WorldConnection::~WorldConnection() {
|
||||
}
|
||||
|
||||
bool WorldConnection::SendPacket(ServerPacket* pack) {
|
||||
if (!Connected())
|
||||
return false;
|
||||
return tcpc.SendPacket(pack);
|
||||
}
|
||||
|
||||
void WorldConnection::OnConnected() {
|
||||
const EQEmuConfig *Config=EQEmuConfig::get();
|
||||
LogNetcode("[WORLD] Connected to World: [{}]:[{}]", Config->WorldIP.c_str(), Config->WorldTCPPort);
|
||||
|
||||
auto pack = new ServerPacket(ServerOP_ZAAuth, 16);
|
||||
MD5::Generate((const uchar*) m_password.c_str(), m_password.length(), pack->pBuffer);
|
||||
SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
|
||||
void WorldConnection::Process() {
|
||||
//persistent connection....
|
||||
if (!Connected()) {
|
||||
pConnected = tcpc.Connected();
|
||||
if (pConnected) {
|
||||
OnConnected();
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void WorldConnection::AsyncConnect() {
|
||||
const EQEmuConfig *Config=EQEmuConfig::get();
|
||||
tcpc.AsyncConnect(Config->WorldIP.c_str(), Config->WorldTCPPort);
|
||||
}
|
||||
|
||||
bool WorldConnection::Connect() {
|
||||
const EQEmuConfig *Config=EQEmuConfig::get();
|
||||
char errbuf[TCPConnection_ErrorBufferSize];
|
||||
if (tcpc.Connect(Config->WorldIP.c_str(), Config->WorldTCPPort, errbuf)) {
|
||||
return true;
|
||||
} else {
|
||||
LogNetcode("[WORLD] WorldConnection connect: Connecting to the server [{}]:[{}] failed: [{}]", Config->WorldIP.c_str(), Config->WorldTCPPort, errbuf);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void WorldConnection::Disconnect() {
|
||||
tcpc.Disconnect();
|
||||
}
|
||||
|
||||
+9
-13
@@ -370,7 +370,7 @@ uint32 ZoneStore::GetZoneRuleSet(uint32 zone_id, int version)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const std::string& ZoneStore::GetZoneNote(uint32 zone_id, int version)
|
||||
const std::string ZoneStore::GetZoneNote(uint32 zone_id, int version)
|
||||
{
|
||||
for (auto &z: m_zones) {
|
||||
if (z.zoneidnumber == zone_id && z.version == version) {
|
||||
@@ -384,8 +384,7 @@ const std::string& ZoneStore::GetZoneNote(uint32 zone_id, int version)
|
||||
}
|
||||
}
|
||||
|
||||
const auto& note = std::string();
|
||||
return note;
|
||||
return "";
|
||||
}
|
||||
|
||||
float ZoneStore::GetZoneUnderworld(uint32 zone_id, int version)
|
||||
@@ -736,7 +735,7 @@ float ZoneStore::GetZoneFogDensity(uint32 zone_id, int version)
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
const std::string& ZoneStore::GetZoneFlagNeeded(uint32 zone_id, int version)
|
||||
const std::string ZoneStore::GetZoneFlagNeeded(uint32 zone_id, int version)
|
||||
{
|
||||
for (auto &z: m_zones) {
|
||||
if (z.zoneidnumber == zone_id && z.version == version) {
|
||||
@@ -750,8 +749,7 @@ const std::string& ZoneStore::GetZoneFlagNeeded(uint32 zone_id, int version)
|
||||
}
|
||||
}
|
||||
|
||||
const auto& flag_needed = std::string();
|
||||
return flag_needed;
|
||||
return "";
|
||||
}
|
||||
|
||||
int8 ZoneStore::GetZoneCanBind(uint32 zone_id, int version)
|
||||
@@ -1259,7 +1257,7 @@ int8 ZoneStore::GetZoneMaximumExpansion(uint32 zone_id, int version)
|
||||
return DEFAULT_ZONE_MIN_MAX_EXPANSION;
|
||||
}
|
||||
|
||||
const std::string& ZoneStore::GetZoneContentFlags(uint32 zone_id, int version)
|
||||
const std::string ZoneStore::GetZoneContentFlags(uint32 zone_id, int version)
|
||||
{
|
||||
for (auto &z: m_zones) {
|
||||
if (z.zoneidnumber == zone_id && z.version == version) {
|
||||
@@ -1271,13 +1269,12 @@ const std::string& ZoneStore::GetZoneContentFlags(uint32 zone_id, int version)
|
||||
if (z.zoneidnumber == zone_id && z.version == 0) {
|
||||
return z.content_flags;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const auto& content_flags = std::string();
|
||||
return content_flags;
|
||||
return "";
|
||||
}
|
||||
|
||||
const std::string& ZoneStore::GetZoneContentFlagsDisabled(uint32 zone_id, int version)
|
||||
const std::string ZoneStore::GetZoneContentFlagsDisabled(uint32 zone_id, int version)
|
||||
{
|
||||
for (auto &z: m_zones) {
|
||||
if (z.zoneidnumber == zone_id && z.version == version) {
|
||||
@@ -1291,8 +1288,7 @@ const std::string& ZoneStore::GetZoneContentFlagsDisabled(uint32 zone_id, int ve
|
||||
}
|
||||
}
|
||||
|
||||
const auto& content_flags_disabled = std::string();
|
||||
return content_flags_disabled;
|
||||
return "";
|
||||
}
|
||||
|
||||
int ZoneStore::GetZoneUnderworldTeleportIndex(uint32 zone_id, int version)
|
||||
|
||||
+4
-4
@@ -54,7 +54,7 @@ public:
|
||||
int GetZoneTimeZone(uint32 zone_id, int version = 0);
|
||||
int GetZoneMaximumPlayers(uint32 zone_id, int version = 0);
|
||||
uint32 GetZoneRuleSet(uint32 zone_id, int version = 0);
|
||||
const std::string& GetZoneNote(uint32 zone_id, int version = 0);
|
||||
const std::string GetZoneNote(uint32 zone_id, int version = 0);
|
||||
float GetZoneUnderworld(uint32 zone_id, int version = 0);
|
||||
float GetZoneMinimumClip(uint32 zone_id, int version = 0);
|
||||
float GetZoneMaximumClip(uint32 zone_id, int version = 0);
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
float GetZoneWalkSpeed(uint32 zone_id, int version = 0);
|
||||
uint8 GetZoneTimeType(uint32 zone_id, int version = 0);
|
||||
float GetZoneFogDensity(uint32 zone_id, int version = 0);
|
||||
const std::string& GetZoneFlagNeeded(uint32 zone_id, int version = 0);
|
||||
const std::string GetZoneFlagNeeded(uint32 zone_id, int version = 0);
|
||||
int8 GetZoneCanBind(uint32 zone_id, int version = 0);
|
||||
int8 GetZoneCanCombat(uint32 zone_id, int version = 0);
|
||||
int8 GetZoneCanLevitate(uint32 zone_id, int version = 0);
|
||||
@@ -95,8 +95,8 @@ public:
|
||||
uint32 GetZoneMaximumMovementUpdateRange(uint32 zone_id, int version = 0);
|
||||
int8 GetZoneMinimumExpansion(uint32 zone_id, int version = 0);
|
||||
int8 GetZoneMaximumExpansion(uint32 zone_id, int version = 0);
|
||||
const std::string& GetZoneContentFlags(uint32 zone_id, int version = 0);
|
||||
const std::string& GetZoneContentFlagsDisabled(uint32 zone_id, int version = 0);
|
||||
const std::string GetZoneContentFlags(uint32 zone_id, int version = 0);
|
||||
const std::string GetZoneContentFlagsDisabled(uint32 zone_id, int version = 0);
|
||||
int GetZoneUnderworldTeleportIndex(uint32 zone_id, int version = 0);
|
||||
int GetZoneLavaDamage(uint32 zone_id, int version = 0);
|
||||
int GetZoneMinimumLavaDamage(uint32 zone_id, int version = 0);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eqemu-server",
|
||||
"version": "22.13.0",
|
||||
"version": "22.24.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/EQEmu/Server.git"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef EQEMU_CONFIG_H
|
||||
#define EQEMU_CONFIG_H
|
||||
|
||||
// no-op
|
||||
|
||||
#endif //EQEMU_CONFIG_H
|
||||
@@ -93,6 +93,10 @@ public:
|
||||
TEST_ASSERT(Strings::SearchDelim(h, "air") == std::string::npos);
|
||||
TEST_ASSERT(Strings::SearchDelim(h, "bef") == std::string::npos);
|
||||
TEST_ASSERT(Strings::SearchDelim(h, "wwi") == std::string::npos);
|
||||
TEST_ASSERT(Strings::SearchDelim(h, "bothunder,") == std::string::npos);
|
||||
TEST_ASSERT(Strings::SearchDelim(h, "poair,") == std::string::npos);
|
||||
TEST_ASSERT(Strings::SearchDelim(h, "befallen,") == std::string::npos);
|
||||
TEST_ASSERT(Strings::SearchDelim(h, "wwi,") == std::string::npos);
|
||||
}
|
||||
|
||||
void SplitStringTest() {
|
||||
@@ -126,6 +130,11 @@ public:
|
||||
TEST_ASSERT_EQUALS(Strings::IsFloat(".234234"), true);
|
||||
TEST_ASSERT_EQUALS(Strings::IsFloat(".234234f"), false);
|
||||
TEST_ASSERT_EQUALS(Strings::IsFloat("Johnson"), false);
|
||||
TEST_ASSERT_EQUALS(Strings::IsFloat("12312312313f"), false); // character at end
|
||||
TEST_ASSERT_EQUALS(Strings::IsFloat("18446744073709551616"), true);
|
||||
TEST_ASSERT_EQUALS(Strings::IsFloat("-18"), true);
|
||||
TEST_ASSERT_EQUALS(Strings::IsFloat("-f18"), false);
|
||||
TEST_ASSERT_EQUALS(Strings::IsFloat("-18446744073709551616"), true);
|
||||
}
|
||||
|
||||
void TestIsNumber() {
|
||||
@@ -137,6 +146,9 @@ public:
|
||||
TEST_ASSERT_EQUALS(Strings::IsNumber("-18"), true);
|
||||
TEST_ASSERT_EQUALS(Strings::IsNumber("-f18"), false);
|
||||
TEST_ASSERT_EQUALS(Strings::IsNumber("-18446744073709551616"), true); // 64
|
||||
TEST_ASSERT_EQUALS(Strings::IsNumber("18446744073709551616f"), false); // 64
|
||||
TEST_ASSERT_EQUALS(Strings::IsNumber("18446744073709551616.0"), false); // 64
|
||||
TEST_ASSERT_EQUALS(Strings::IsNumber("18446744073709551616.0f"), false); // 64
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -301,9 +301,7 @@ OP_LeadershipExpUpdate=0x2797
|
||||
OP_PurchaseLeadershipAA=0x6c55
|
||||
OP_UpdateLeadershipAA=0x0026
|
||||
OP_MarkNPC=0x1fb5
|
||||
OP_MarkRaidNPC=0x5a58 #unimplemented
|
||||
OP_ClearNPCMarks=0x2003
|
||||
OP_ClearRaidNPCMarks=0x20d3 #unimplemented
|
||||
OP_DelegateAbility=0x76b8
|
||||
OP_SetGroupTarget=0x2814
|
||||
OP_Charm=0x5d92
|
||||
@@ -544,6 +542,9 @@ OP_LFGResponse=0x0000
|
||||
OP_RaidInvite=0x55ac
|
||||
OP_RaidUpdate=0x3973
|
||||
OP_RaidJoin=0x0000
|
||||
OP_RaidDelegateAbility=0x2b33
|
||||
OP_MarkRaidNPC=0x5a58
|
||||
OP_RaidClearNPCMarks=0x20d3
|
||||
|
||||
# Button-push commands
|
||||
OP_Taunt=0x2703
|
||||
|
||||
@@ -9,11 +9,13 @@ git submodule init && git submodule update
|
||||
|
||||
perl utils/scripts/build/tag-version.pl
|
||||
|
||||
mkdir -p build && cd build && cmake -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-Os" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G 'Unix Makefiles' .. && make -j$((`nproc`-4))
|
||||
mkdir -p build && cd build && cmake -DEQEMU_BUILD_TESTS=ON -DEQEMU_BUILD_STATIC=ON -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-Os" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G 'Unix Makefiles' .. && make -j$((`nproc`-4))
|
||||
|
||||
curl https://raw.githubusercontent.com/Akkadius/eqemu-install-v2/master/eqemu_config.json --output eqemu_config.json
|
||||
./bin/tests
|
||||
|
||||
ldd ./bin/zone
|
||||
|
||||
# shellcheck disable=SC2164
|
||||
cd /drone/src/
|
||||
|
||||
|
||||
+15
-1011
File diff suppressed because it is too large
Load Diff
@@ -112,6 +112,7 @@ if ($requested_table_to_generate ne "all") {
|
||||
}
|
||||
|
||||
my @cereal_enabled_tables = (
|
||||
"data_buckets",
|
||||
"player_event_logs"
|
||||
);
|
||||
|
||||
@@ -586,7 +587,8 @@ sub get_reserved_cpp_variable_names {
|
||||
return (
|
||||
"class",
|
||||
"int",
|
||||
"key"
|
||||
"key",
|
||||
"range"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,503 +0,0 @@
|
||||
5001|1_task_system.sql|SHOW TABLES LIKE 'tasks'|empty|
|
||||
# 5002|2_optional_maxclients.sql
|
||||
# 5003|14_optional_merchantlist.sql
|
||||
5004|35_task_stepped.sql|SHOW COLUMNS FROM `tasks` LIKE 'stepped'|not_empty|
|
||||
5005|42_task_min_maxlevel.sql|SHOW COLUMNS FROM `tasks` LIKE 'minlevel'|empty|
|
||||
5006|55_zone_shutdowndeleay.sql|SHOW COLUMNS FROM `zone` LIKE 'shutdowndelay'|empty|
|
||||
# 5007|68_optional_character_maxexplevel.sql
|
||||
# 5008|103_optional_chat_rules.sql
|
||||
5009|104_traps.sql|SHOW COLUMNS FROM `traps` LIKE 'respawn_time'|empty|
|
||||
# 5010|106_optional_proc_rules.sql
|
||||
5011|120_damageshieldtypes.sql|SHOW TABLES LIKE 'damageshieldtypes'|empty|
|
||||
# 5012|125_aggrozone.sql
|
||||
# 5013|127_optional_spell_rules.sql
|
||||
# 5014|129_optional_shared_plat_rule.sql
|
||||
# 5015|131_optional_combat_rules.sql
|
||||
5016|133_task_repeatable.sql|SHOW COLUMNS FROM `tasks` LIKE 'repeatable'|empty|
|
||||
5017|142_deathpeace_and_lifetap_aas.sql|SELECT * FROM db_version WHERE version > 5016|empty|
|
||||
# 5018|158_optional_death_exp_loss.sql
|
||||
# 5019|176_melody.sql
|
||||
5020|189_character_.sql|SELECT * FROM db_version WHERE version >= 5020|empty|
|
||||
5021|196_trader.sql|SHOW TABLES LIKE 'trader'|empty|
|
||||
# 5022|210_undyeme.sql
|
||||
5023|222_buyer.sql|SHOW TABLES LIKE 'buyer'|empty|
|
||||
# 5024|226_account_limiting.sql
|
||||
5025|230_spells_table.sql|SHOW TABLES LIKE 'spells_new'|empty|
|
||||
5026|235_horses_table.sql|SHOW TABLES LIKE 'horses'|empty|
|
||||
5027|243_spawn_timers.sql|SHOW TABLES LIKE 'respawn_times'|empty|
|
||||
5028|247_mail.sql|SHOW TABLES LIKE 'mail'|empty|
|
||||
5029|249_chatchannels.sql|SHOW TABLES LIKE 'chatchannels'|empty|
|
||||
# 5030|250_bot_spell_update.sql
|
||||
# 5031|250_optional_bot_spell_update.sql
|
||||
# 5032|285_optional_bot_spell_update.sql
|
||||
# 5033|292_augslots.sql|SELECT * FROM db_version WHERE version >= 5033|empty|
|
||||
5034|294_merchant_logging.sql|SHOW COLUMNS FROM `eventlog` LIKE 'event_nid'|empty|
|
||||
5035|304_faction_list.sql|SELECT * FROM db_version WHERE version >= 5035|empty|
|
||||
5036|326_aas.sql|SELECT * FROM db_version WHERE version > 5035|empty|
|
||||
# 5037|328_bot_management.sql
|
||||
# 5038|328_optional_bot_management.sql
|
||||
5039|340_gm_ips.sql|SHOW TABLES LIKE 'gm_ips'|empty|
|
||||
# 5040|356_combat.sql
|
||||
# 5041|360_peqzone.sql
|
||||
# 5042|364_ranged_dist_rule.sql
|
||||
# 5043|386_bot_save_raid.sql
|
||||
# 5044|434_optional_rest_state_rules.sql
|
||||
# 5045|447_sof_startzone_rule.sql
|
||||
# 5046|463_altadv_vars.sql
|
||||
# 5047|475_aa_actions.sql
|
||||
5048|500_spawn2_optimization.sql|SELECT * FROM db_version WHERE version >= 5048|empty|
|
||||
5049|503_bugs.sql|SHOW TABLES LIKE 'bugs'|empty|
|
||||
5050|518_drakkin_npc_type_features.sql|SHOW TABLES LIKE 'bugs'|empty|
|
||||
5051|524_rule_values_notes.sql|SELECT * FROM db_version WHERE version >= 5051|empty|
|
||||
5052|527_npc_armor_tint.sql|SELECT * FROM db_version WHERE version >= 5052|empty|
|
||||
5053|553_saylink_table.sql|SHOW TABLES LIKE 'saylink'|empty|
|
||||
5054|564_nokeyring.sql|SHOW COLUMNS FROM `doors` LIKE 'nokeyring'|empty|
|
||||
5055|600_group_leadership.sql|SELECT * FROM db_version WHERE version >= 5055|empty|
|
||||
5056|612_instance_changes.sql|SELECT * FROM db_version WHERE version >= 5056|empty|
|
||||
5057|615_adventure_assassination.sql|SELECT * FROM db_version WHERE version >= 5057|empty|
|
||||
5058|619_Adventure_Recruiter_Flavor.sql|SELECT * FROM db_version WHERE version >= 5058|empty|
|
||||
5059|621_LDoNTraps.sql|SHOW TABLES LIKE 'ldon_trap_templates'|empty|
|
||||
5060|633_ucs.sql|SHOW TABLES LIKE 'friends'|empty|
|
||||
5061|634_TrapTemplateDefaultValue.sql|SHOW COLUMNS FROM `npc_types` LIKE 'trap_template'|empty|
|
||||
# 5062|643_BotsTable.sql
|
||||
# 5063|646_archery_penalty_rule.sql
|
||||
5064|665_heroic_resists.sql|SELECT * FROM db_version WHERE version >= 5064|empty|
|
||||
5065|667_titles.sql|SHOW TABLES LIKE 'titles'|empty|
|
||||
5066|687_aa_table_changes.sql|SELECT * FROM db_version WHERE version >= 5066|empty|
|
||||
# 5067|699_peqzone_rule.sql
|
||||
5068|702_aashieldblock_tint_table.sql|SHOW TABLES LIKE 'npc_types_tint'|empty|
|
||||
# 5069|703_peqzone_rule.sql
|
||||
# 5070|704_rules.sql
|
||||
5071|710_tint_set_naming.sql|SELECT * FROM db_version WHERE version >= 5071|empty|
|
||||
5072|721_pathing_rules.sql|SELECT * FROM db_version WHERE version >= 5072|empty|
|
||||
# 5073|730_smart_delay_moving.sql
|
||||
# 5074|731_rule_assist_notarget_self.sql
|
||||
# 5075|732_sacrifice_rules.sql
|
||||
5076|745_slow_mitigation.sql|SELECT * FROM db_version WHERE version >= 5076|empty|
|
||||
# 5077|754_archery_base_damage_rule.sql
|
||||
5078|755_sof_altadv_vars_updates.sql|SELECT * FROM db_version WHERE version >= 5078|empty|
|
||||
# 5079|773_monk_rules.sql
|
||||
# 5080|853_optional_rule_aaexp.sql
|
||||
# 5081|858_optional_rule_ip_limit_by_status.sql
|
||||
# 5082|892_optional_bots_table_mod.sql
|
||||
# 5083|893_optional_bots_table_mod.sql
|
||||
5084|898_npc_maxlevel_scalerate.sql|SHOW COLUMNS FROM `npc_types` LIKE 'maxlevel'|empty|
|
||||
# 5085|902_optional_rule_snareflee.sql
|
||||
5086|923_spawn2_enabled.sql|SHOW COLUMNS FROM `spawn2` LIKE 'enabled'|empty|
|
||||
5087|962_hot_zone.sql|SHOW COLUMNS FROM `zone` LIKE 'hotzone'|empty|
|
||||
5088|964_reports.sql|SHOW TABLES LIKE 'reports'|empty|
|
||||
5089|971_veteran_rewards.sql|SHOW TABLES LIKE 'veteran_reward_templates'|empty|
|
||||
5090|977_raid_npc_private_corpses.sql|SELECT * FROM db_version WHERE version >= 5090|empty|
|
||||
5091|979_unique_spawn_by_name.sql|SHOW COLUMNS FROM `npc_types` LIKE 'unique_spawn_by_name'|empty|
|
||||
5092|980_account_ip.sql|SHOW TABLES LIKE 'account_ip'|empty|
|
||||
# 5093|1022_botadventuring.sql
|
||||
# 5094|1027_botactives.sql
|
||||
# 5095|1030_botzoningsupport.sql
|
||||
# 5096|1036_botbuffs.sql
|
||||
# 5097|1038_botpetstatepersists.sql
|
||||
5098|1038_grouptablesuniquecolumndefinitions.sql|SELECT * FROM db_version WHERE version >= 5098|empty|
|
||||
# 5099|1039_botguilds.sql
|
||||
# 5100|1040_DeprecatedBotRaidsSystems.sql
|
||||
5101|1057_titles.sql|SHOW TABLES LIKE 'player_titlesets'|empty|
|
||||
# 5102|1077_botgroups.sql
|
||||
5103|1136_spell_globals.sql|SHOW TABLES LIKE 'spell_globals'|empty|
|
||||
# 5104|1144_optional_rule_return_nodrop.sql
|
||||
5105|1195_account_suspendeduntil.sql|SELECT * FROM db_version WHERE version >= 5105|empty|
|
||||
5106|1259_npc_skill_types.sql|SHOW COLUMNS FROM `npc_types` LIKE 'prim_melee_type'|empty|
|
||||
# 5107|1280_bot_augs.sql
|
||||
# 5108|1290_optional_exp_loss_rule.sql
|
||||
5109|1293_guild_bank.sql|SHOW TABLES LIKE 'guild_bank'|empty|
|
||||
# 5110|1379_loginserver_trusted_server.sql
|
||||
5111|1392_recipe_learning.sql|SELECT * FROM db_version WHERE version >= 5111|empty|
|
||||
# 5112|1394_optional_rule_sod_hp_mana_end.sql
|
||||
5113|1404_faction_list.sql|SELECT * FROM db_version WHERE version >= 5113|empty|
|
||||
# 5114|1410_optional_sod_aas_ht_and_loh.sql
|
||||
# 5115|1436_login_server_table_fix.sql
|
||||
# 5116|1446_allowrest_optional.sql
|
||||
5117|1446_allowrest_required.sql|SELECT * FROM db_version WHERE version >= 5117|empty|
|
||||
# 5118|1450_cvs.sql
|
||||
5119|1451_guilds.sql|SELECT * FROM db_version WHERE version >= 5119|empty|
|
||||
5120|1498_instance_adventure.sql|SELECT * FROM db_version WHERE version >= 5120|empty|
|
||||
5121|1510_global_instances.sql|SELECT * FROM db_version WHERE version >= 5121|empty|
|
||||
5122|1511_map_path_loading.sql|SHOW COLUMNS FROM `zone` LIKE 'map_file_name'|empty|
|
||||
5123|1513_zone_points.sql|SELECT * FROM db_version WHERE version >= 5123|empty|
|
||||
5124|1519_zone_primary_key_id.sql|SELECT * FROM db_version WHERE version >= 5124|empty|
|
||||
5125|1542_items_table_cleanup.sql|SELECT * FROM db_version WHERE version >= 5125|empty|
|
||||
5126|1548_nimbuseffect_required.sql|SELECT * FROM db_version WHERE version >= 5126|empty|
|
||||
5127|1562_instanced_spawnconditions.sql|SHOW TABLES LIKE 'spawn_condition_values'|empty|
|
||||
# 5128|1586_waypoints_optional.sql
|
||||
5129|1610_tradeskill_required.sql|SELECT * FROM db_version WHERE version >= 5129|empty|
|
||||
5130|1618_zone.sql|SELECT * FROM db_version WHERE version >= 5130|empty|
|
||||
# 5131|1625_optional_rule_class_race_exp_bonus.sql
|
||||
# 5132|1672_optional_rules_respawn_window.sql
|
||||
# 5133|1679_optional_rules_blocked_buffs.sql
|
||||
5134|1696_modify_zone_and_object_tables.sql|SELECT * FROM db_version WHERE version >= 5134|empty|
|
||||
5135|1711_account_restricted_aa.sql|SHOW COLUMNS FROM `account` LIKE 'time_creation'|empty|
|
||||
# 5136|1717_optional_rule_bash_stun_chance.sql
|
||||
# 5137|1718_optional_rules_mod3s.sql
|
||||
# 5138|1719_optional_triggerOnCastAAs.sql
|
||||
# 5139|1720_optional_sql_AAs.sql
|
||||
# 5140|1720_required_sql_AA_effects_update.sql
|
||||
# 5141|1721_optional_sql_drakkin_breath_update.sql
|
||||
# 5142|1721_required_sql_altadv_vars_update.sql
|
||||
# 5143|1723_optional_sql_new_stats_window_rule.sql
|
||||
5144|1723_required_sql_corruption.sql|SELECT * FROM db_version WHERE version >= 5144|empty|
|
||||
# 5145|1736_optional_sql_feral_swipe.sql
|
||||
# 5146|1737_required_sql_rule_and_aa_update.sql
|
||||
# 5147|1746_optional_sql_bot_manaregen.sql
|
||||
# 5148|1747_optional_HoT_zone_and_zonepoints.sql
|
||||
# 5149|1750_optional_sql_reflect_rule.sql
|
||||
# 5150|1753_optional_haste_cap_rule.sql
|
||||
# 5151|1753_required_sql_healing_adept_aa.sql
|
||||
# 5152|1754_required_sql_healing_adept_aa_fix.sql
|
||||
# 5153|1755_required_sql_fear_resist_aas.sql
|
||||
# 5154|1784_optional_corpsedrag_rules.sql
|
||||
# 5155|1786_required_update_to_aas.sql
|
||||
# 5156|1790_required_aa_required_level_cost.sql
|
||||
5157|1793_resist_adjust.sql|SHOW COLUMNS FROM `npc_spells_entries` LIKE 'resist_adjust'|empty|
|
||||
# 5158|1799_optional_rest_regen_endurance_rule.sql
|
||||
5159|1802_required_doppelganger.sql|SELECT * FROM db_version WHERE version >= 5159|empty|
|
||||
5160|1803_required_tasks_xpreward_signed.sql|SELECT * FROM db_version WHERE version >= 5160|empty|
|
||||
5161|1804_required_ae_melee_updates.sql|SELECT * FROM db_version WHERE version >= 5161|empty|
|
||||
# 5162|1809_optional_rules.sql
|
||||
5163|1813_required_doppelganger_npcid_change.sql|SELECT * FROM db_version WHERE version >= 5163|empty|
|
||||
# 5164|1817_optional_npc_archery_bonus_rule.sql
|
||||
# 5165|1823_optional_delay_death.sql
|
||||
5166|1847_required_doors_dest_zone_size_32.sql|SELECT * FROM db_version WHERE version >= 5166|empty|
|
||||
# 5167|1859_optional_item_casts_use_focus_rule.sql
|
||||
# 5168|1884_optional_bot_spells_update.sql
|
||||
# 5169|1885_optional_rules_fv_pvp_expansions.sql
|
||||
# 5170|1889_optional_skill_cap_rule.sql
|
||||
5171|1908_required_npc_types_definitions.sql|SHOW COLUMNS FROM `npc_types` LIKE 'attack_count'|empty|
|
||||
# 5172|1926_optional_stat_cap.sql
|
||||
5173|1944_spawn2.sql|SHOW COLUMNS FROM `spawn2` LIKE 'animation'|empty|
|
||||
5174|1946_doors.sql|SELECT * FROM db_version WHERE version >= 5166|empty|
|
||||
# 5175|1960_optional_console_timeout_rule.sql
|
||||
# 5176|1962_optional_guild_creation_window_rules.sql
|
||||
# 5177|1963_optional_rule_live_like_focuses.sql
|
||||
# 5178|1968_optional_enrage_rules.sql
|
||||
# 5179|1972_optional_extradmg_item_cap.sql
|
||||
# 5180|1974_required_bot_spells_update.sql
|
||||
5181|1977_underwater.sql|SHOW COLUMNS FROM `npc_types` LIKE 'underwater'|empty|
|
||||
# 5182|1998_optional_intoxication_and_looting_rules.sql
|
||||
5183|2004_charges_alt_currency.sql|SHOW TABLES LIKE 'alternate_currency'|empty|
|
||||
# 5184|2015_optional_specialization_training_rule.sql
|
||||
# 5185|2016_optional_rule_bot_aa_expansion.sql
|
||||
# 5186|2023_optional_mysqlcli.sql
|
||||
# 5187|2024_optional_update_crystals.sql
|
||||
5188|2024_required_update.sql|SHOW TABLES LIKE 'char_create_combinations'|empty|
|
||||
5189|2057_required_discovered_items.sql|SHOW TABLES LIKE 'discovered_items'|empty|
|
||||
# 5190|2058_optional_rule_discovered_items.sql
|
||||
5191|2062_required_version_changes.sql|SELECT * FROM db_version WHERE version >= 5191|empty|
|
||||
5192|2069_required_pets.sql|SHOW TABLES LIKE 'pets_equipmentset'|empty|
|
||||
# 5193|2079_player_speech.sql
|
||||
# 5194|2087_required_bots_hp_and_mana_and_spell_updates.sql
|
||||
5195|2098_required_zonepoint_version_changes.sql|SELECT * FROM db_version WHERE version >= 5195|empty|
|
||||
5196|2099_required_discovered_items_account_status.sql|SELECT * FROM db_version WHERE version >= 5196|empty|
|
||||
5197|2104_required_group_roles.sql|SELECT * FROM db_version WHERE version >= 5197|empty|
|
||||
# 5198|2107_required_bot_stances.sql
|
||||
5199|2129_required_lfguild.sql|SHOW TABLES LIKE 'lfguild'|empty|
|
||||
5200|2133_required_faction_loot_despawn.sql|SELECT * FROM db_version WHERE version >= 5200|empty|
|
||||
5201|2136_extended_targets.sql|SELECT * FROM db_version WHERE version >= 5201|empty|
|
||||
5202|2142_emotes.sql|SELECT * FROM db_version WHERE version >= 5202|empty|
|
||||
# 5203|2154_optional_rule_spell_procs_resists_falloff.sql
|
||||
# 5204|2156_optional_charm_break_rule.sql
|
||||
# 5205|2159_optional_defensiveproc_rules.sql
|
||||
# 5206|2164_require_bots_bottimers.sql
|
||||
# 5207|2171_optional_SpecialAttackACBonus_rule.sql
|
||||
# 5208|2176_optional_aa_expansion_SOF_fix.sql
|
||||
# 5209|2176_optional_FrenzyBonus_rule.sql
|
||||
5210|2176_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5210|empty|
|
||||
5211|2178_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5211|empty|
|
||||
# 5212|2183_optional_bot_xp_rule.sql
|
||||
# 5213|2185_optional_NPCFlurryChacne_rule
|
||||
# 5214|2185_optional_NPCFlurryChacne_rule.sql
|
||||
# 5215|2185_optional_NPCFlurryChance_rule.sql
|
||||
5216|2185_required_aa_updates|SELECT * FROM db_version WHERE version >= 5216|empty|
|
||||
5217|2185_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5217|empty|
|
||||
# 5218|2188_optional_miscspelleffect_rules
|
||||
# 5219|2188_optional_miscspelleffect_rules.sql
|
||||
# 5220|2188_required_aa_updates
|
||||
5221|2188_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5221|empty|
|
||||
# 5222|2189_optional_taunt_rules
|
||||
# 5223|2189_optional_taunt_rules.sql
|
||||
5224|2195_required_sharedplatupdates.sql|SELECT * FROM db_version WHERE version >= 5224|empty|
|
||||
# 5225|2208_optional_aa_stacking_rule.sql
|
||||
# 5226|2208_optional_EnableSoulAbrasionAA.sql
|
||||
5227|2208_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5227|empty|
|
||||
# 5228|2209_optional_additive_bonus_rule.sql
|
||||
5229|2213_loot_changes.sql|SELECT * FROM db_version WHERE version >= 5229|empty|
|
||||
5230|2214_faction_list_mod.sql|SHOW TABLES LIKE 'faction_list_mod'|empty|
|
||||
5231|2215_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5231|empty|
|
||||
# 5232|2243_optional_char_max_level_rule.sql
|
||||
# 5233|2260_probability.sql
|
||||
5234|2262_required_pet_discipline_update.sql|SELECT * FROM db_version WHERE version >= 5234|empty|
|
||||
5235|2264_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5235|empty|
|
||||
# 5236|2268_QueryServ.sql
|
||||
5237|2268_required_updates.sql|SELECT * FROM db_version WHERE version >= 5237|empty|
|
||||
# 5238|2274_optional_rule_iplimitdisconnectall.sql
|
||||
# 5239|2278_optional_rule_targetableswarmpet.sql
|
||||
# 5240|2280_optional_rule_targetableswarmpet-rename.sql
|
||||
5241|2283_required_npc_changes.sql|SHOW COLUMNS FROM `npc_types` LIKE 'spellscale'|empty|
|
||||
5242|2299_required_inspectmessage_fields.sql|SELECT * FROM db_version WHERE version >= 5242|empty|
|
||||
# 5243|2300_optional_loot_changes.sql
|
||||
# 5244|2304_QueryServ.sql
|
||||
# 5245|2340_required_maxbuffslotspet.sql
|
||||
# 5246|2361_QueryServ.sql
|
||||
# 5247|2361_required_qs_rule_values.sql
|
||||
5248|2370_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5248|empty|
|
||||
5249|2376_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5249|empty|
|
||||
5250|2380_optional_merc_data.sql|SELECT * FROM db_version WHERE version >= 5250|empty|
|
||||
5251|2380_optional_merc_merchant_npctypes_update.sql|SELECT * FROM db_version WHERE version >= 5251|empty|
|
||||
5252|2380_optional_merc_rules.sql|SELECT * FROM db_version WHERE version >= 5252|empty|
|
||||
5253|2383_required_group_ismerc.sql|SELECT * FROM db_version WHERE version >= 5253|empty|
|
||||
# 5254|2428_optional_levelbasedexpmods.sql
|
||||
# 5255|2448_optional_stun_proc_aggro_rule.sql
|
||||
5256|2471_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5256|empty|
|
||||
5257|2482_required_start_zones.sql|SELECT * FROM db_version WHERE version >= 5257|empty|
|
||||
5258|2504_required_aa_updates.sql|SELECT * FROM db_version WHERE version >= 5258|empty|
|
||||
8000|mercs.sql|SHOW TABLES LIKE 'merc_stats'|empty|
|
||||
9000|2013_02_18_Merc_Rules_and_Tables.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE '%Mercs:ResurrectRadius%'|empty|
|
||||
9001|2013_02_25_Impr_HT_LT.sql|SHOW TABLES LIKE 'merc_inventory'|empty|
|
||||
9002|2013_03_1_Merc_Rules_and_Equipment.sql|SHOW TABLES LIKE 'merc_inventory'|empty|
|
||||
# 9003|2013_03_23_Escape_FadingMemories.sql
|
||||
# 9004|2013_04_04_NaturesBounty.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '1230' AND `slot` = '1' AND `effectid` = '313' AND `base1` = '15' AND `base2` = '0'|empty|
|
||||
9005|2013_04_08_Salvage.sql|SHOW COLUMNS FROM `tradeskill_recipe_entries` LIKE 'salvagecount'|empty|
|
||||
9006|2013_05_05_Account_Flags.sql|SHOW TABLES LIKE 'account_flags'|empty|
|
||||
9007|2013_05_05_Item_Tick.sql|SHOW TABLES LIKE 'item_tick'|empty|
|
||||
9008|2013_07_11_NPC_Special_Abilities.sql|SHOW COLUMNS FROM `npc_types` LIKE 'special_abilities'|empty|
|
||||
9009|2013_10_12_Merc_Special_Abilities.sql|SHOW COLUMNS FROM `merc_stats` LIKE 'special_abilities'|empty|
|
||||
# 9010|2013_10_12_Merc_vwMercNpcTypes.sql
|
||||
9011|2013_10_31_Recipe_disabling.sql|SHOW COLUMNS FROM `tradeskill_recipe` LIKE 'enabled'|empty|
|
||||
9012|2013_11_07_BaseData.sql|SHOW TABLES LIKE 'base_data'|empty|
|
||||
# 9013|2013_11_13_Instrument_Singing_Mastery.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '213' AND `slot` = '1' AND `effectid` = '260' AND `base1` = '2' AND `base2` = '23'|empty|
|
||||
9014|2013_11_18_AssistRadius.sql|SHOW COLUMNS FROM `npc_types` LIKE 'assistradius'|empty|
|
||||
9015|2013_12_26_MerchantList_Class_Required.sql|SHOW COLUMNS FROM `merchantlist` LIKE 'classes_required'|empty|
|
||||
# 9016|2014_01_04_SongModCapAAs.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '571' AND `slot` = '1' AND `effectid` = '261'|empty|
|
||||
9017|2014_01_08_SpellsNewAdditions.sql|SHOW COLUMNS FROM `spells_new` LIKE 'persistdeath'|empty|
|
||||
9018|2014_01_09_PreservePetSize.sql|SHOW COLUMNS FROM `character_pet_info` LIKE 'size'|empty|
|
||||
# 9019|2014_01_20_MezMastery.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '781' AND `slot` = '1' AND `effectid` = '287'|empty|
|
||||
9020|2014_01_20_Not_Extendable.sql|SHOW COLUMNS FROM `spells_new` LIKE 'not_extendable'|empty|
|
||||
# 9021|2014_01_20_SpellCastingReinforcement.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '86' AND `slot` = '1' AND `effectid` = '128'|empty|
|
||||
9022|2014_01_20_Weather.sql|SHOW COLUMNS FROM `zone` LIKE 'rain_chance1'|empty|
|
||||
# 9023|2014_01_27_CritcalMendAA.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '230' AND `slot` = '1' AND `effectid` = '275'|empty
|
||||
# 9024|2014_02_02_SpellCriticalsAA.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '4755' AND `slot` = '1' AND `effectid` = '294'|empty
|
||||
9025|2014_02_13_Rename_instance_lockout_tables.sql|SHOW TABLES LIKE 'instance_list'|empty|
|
||||
9026|2014_02_13_spells_new_update.sql|SHOW COLUMNS FROM `spells_new` LIKE 'ConeStartAngle'|empty|
|
||||
9027|2014_02_20_buff_update.sql|SHOW COLUMNS FROM `character_buffs` LIKE 'caston_y'|empty|
|
||||
9028|2014_02_26_roambox_update.sql|SHOW COLUMNS FROM `spawngroup` LIKE 'mindelay'|empty|
|
||||
# 9029|2014_02_26_virulentvenomAA.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '888' AND `slot` = '1' AND `effectid` = '250'|empty|
|
||||
9030|2014_04_04_PhysicalResist.sql|SHOW COLUMNS FROM `npc_types` LIKE 'PhR'|empty|
|
||||
9031|2014_04_10_No_Target_With_Hotkey.sql|SHOW COLUMNS FROM `npc_types` LIKE 'no_target_hotkey'|empty|
|
||||
9032|2014_04_12_SlowMitigation.sql|SHOW COLUMNS FROM `npc_types` LIKE 'slow_mitigation'|contains|float
|
||||
9034|2014_04_25_spawn_events.sql|SHOW COLUMNS FROM `spawn_events` LIKE 'strict'|empty|
|
||||
9035|2014_04_27_AISpellEffects.sql|SHOW COLUMNS FROM `npc_types` LIKE 'npc_spells_effects_id'|empty|
|
||||
9036|2014_05_04_SlowMitigationFix.sql|SHOW COLUMNS FROM `npc_types` LIKE 'slow_mitigation'|contains|float
|
||||
# 9038|2014_06_25_AA_Updates.sql|SELECT * FROM `altadv_vars` WHERE `skill_id` = '1604'|empty
|
||||
# 9039|2014_07_04_AA_Updates.sql|SELECT * FROM `aa_effects` WHERE `aaid` = '158' AND `slot` = '1' AND `effectid` = '238'|empty
|
||||
9040|2014_07_10_npc_spells.sql|SHOW COLUMNS FROM `npc_spells` LIKE 'engaged_no_sp_recast_min'|empty|
|
||||
9041|2014_08_02_spells_new.sql|SHOW COLUMNS FROM `spells_new` LIKE 'viral_range'|empty|
|
||||
9042|2014_08_12_NPC_raid_targets.sql|SHOW COLUMNS FROM `npc_types` LIKE 'raid_target'|empty|
|
||||
9043|2014_08_18_spells_new_update.sql|SHOW COLUMNS FROM `spells_new` LIKE 'viral_targets'|empty|
|
||||
9044|2014_08_20_merchantlist_probability.sql|SHOW COLUMNS FROM `merchantlist` LIKE 'probability'|empty|
|
||||
9045|2014_08_23_Complete_QueryServ_Table_Structures.sql|SHOW TABLES LIKE 'qs_player_aa_rate_hourly'|empty|
|
||||
9046|2014_08_23_player_events_and_player_aa_rate_hourly.sql|SHOW TABLES LIKE 'qs_player_events'|empty|
|
||||
9048|2014_09_09_attack_delay.sql|SHOW COLUMNS FROM `npc_types` LIKE 'attack_delay'|empty|
|
||||
9050|2014_09_20_ban_messages.sql|SHOW COLUMNS FROM `account` LIKE 'ban_reason'|empty|
|
||||
9051|2014_10_11_RaidMOTD.sql|SHOW COLUMNS FROM `raid_details` LIKE 'motd'|empty|
|
||||
9052|2014_10_13_RaidLeadership.sql|SHOW TABLES LIKE 'raid_leaders'|empty|
|
||||
9053|2014_10_18_group_mentor.sql|SHOW COLUMNS FROM `group_leaders` LIKE 'mentoree'|empty|
|
||||
9054|2014_10_19_raid_group_mentor.sql|SHOW COLUMNS FROM `raid_leaders` LIKE 'mentoree'|empty|
|
||||
9055|2014_10_30_special_abilities_null.sql|SHOW COLUMNS FROM `npc_types` LIKE 'special_abilities'|contains|NO
|
||||
9056|2014_11_08_RaidMembers.sql|SHOW COLUMNS FROM `raid_members` LIKE 'groupid'|missing|unsigned
|
||||
9057|2014_11_13_spells_new_updates.sql|SHOW COLUMNS FROM `spells_new` LIKE 'disallow_sit'|empty|
|
||||
9058|2014_11_26_InventoryTableUpdate.sql|SHOW COLUMNS FROM `inventory` LIKE 'ornamenticon'|empty|
|
||||
9059|2014_12_01_mercs_table_update.sql|SHOW COLUMNS FROM `mercs` LIKE 'MercSize'|empty|
|
||||
9060|2014_12_09_items_table_update.sql|SHOW COLUMNS FROM `items` LIKE 'herosforgemodel'|empty|
|
||||
9061|2014_12_13_inventory_table_update.sql|SHOW COLUMNS FROM `inventory` LIKE 'ornament_hero_model'|empty|
|
||||
9062|2014_12_15_multiple_table_updates.sql|SHOW COLUMNS FROM `items` LIKE 'augslot6type'|empty|
|
||||
9063|2014_12_24_npc_types_update.sql|SHOW COLUMNS FROM `npc_types` LIKE 'd_melee_texture1'|empty|
|
||||
9064|2014_12_24_npc_types_table_update.sql|SHOW COLUMNS FROM `npc_types` LIKE 'herosforgemodel'|empty|
|
||||
9065|2014_12_26_merc_weaponinfo_table_update.sql|SHOW COLUMNS FROM `vwMercNpcTypes` LIKE 'd_melee_texture1'|empty|
|
||||
9066|2014_12_31_npc_types_default_values_update.sql|SHOW COLUMNS FROM `npc_types` LIKE 'bodytype'|contains|YES
|
||||
9067|2015_01_21_npc_types_update.sql|SHOW COLUMNS FROM `npc_types` LIKE 'light'|empty|
|
||||
9068|2015_01_15_logsys_categories_table.sql|SHOW TABLES LIKE 'logsys_categories'|empty|
|
||||
9069|2015_01_25_logsys_Mercenaries_category.sql|SELECT * FROM `logsys_categories` WHERE `log_category_description` LIKE 'Mercenaries'|empty|
|
||||
9070|2015_01_28_quest_debug_log_category.sql|SELECT * FROM `logsys_categories` WHERE `log_category_description` LIKE 'Quest Debug'|empty|
|
||||
9071|2015_01_29_merc_stats_table_update.sql|SHOW COLUMNS FROM `merc_stats` LIKE 'statscale'|empty|
|
||||
9072|2015_01_30_merc_attack_delay.sql|SHOW COLUMNS FROM `merc_stats` LIKE 'attack_delay'|empty|
|
||||
9073|2015_01_31_character_item_recast.sql|SHOW TABLES LIKE 'character_item_recast'|empty|
|
||||
9074|2015_02_01_logsys_packet_logs.sql|SELECT * FROM `logsys_categories` WHERE `log_category_description` LIKE 'Packet: Server -> Client'|empty|
|
||||
9075|2015_02_02_logsys_packet_logs_with_dump.sql|SELECT * FROM `logsys_categories` WHERE `log_category_description` LIKE 'Packet: Server -> Client With Dump'|empty|
|
||||
9076|2015_02_04_average_coin.sql|SHOW COLUMNS FROM `loottable` WHERE Field = 'avgcoin'|contains|smallint
|
||||
9077|2015_02_12_zone_gravity.sql|SHOW COLUMNS FROM `zone` LIKE 'gravity'|empty|
|
||||
9078|2015_05_20_BuffInstrumentMod.sql|SHOW COLUMNS FROM `character_buffs` LIKE 'instrument_mod'|empty|
|
||||
9079|2015_05_23_BuffDurations.sql|SHOW COLUMNS FROM `character_buffs` LIKE 'ticsremaining'|contains|unsigned|
|
||||
9080|2015_05_23_PetBuffInstrumentMod.sql|SHOW COLUMNS FROM `character_pet_buffs` LIKE 'instrument_mod'|empty|
|
||||
9081|2015_05_23_dbstr_us.sql|SHOW TABLES LIKE 'db_str'|empty|
|
||||
9082|2015_05_25_npc_types_texture_fields.sql|SHOW COLUMNS FROM `npc_types` LIKE 'armtexture'|empty|
|
||||
9083|2015_06_07_aa_update.sql|SHOW COLUMNS FROM `character_alternate_abilities` LIKE 'charges'|empty|
|
||||
9084|2015_06_30_runspeed_adjustments.sql|SELECT `runspeed` FROM `npc_types` WHERE `runspeed` > 3|not_empty|
|
||||
9085|2015_07_01_Marquee_Rule.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE '%Character:MarqueeHPUpdates%'|empty|
|
||||
9086|2015_07_02_aa_rework.sql|SHOW TABLES LIKE 'aa_ranks'|empty|
|
||||
9087|2015_09_25_inventory_snapshots.sql|SHOW TABLES LIKE 'inventory_snapshots'|empty|
|
||||
9088|2015_11_01_perl_event_export_settings.sql|SHOW TABLES LIKE 'perl_event_export_settings'|empty|
|
||||
9089|2015_11_02_ai_idle_no_spell_recast_default_changes.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE '%Spells:AI_IdleNoSpellMinRecast%' AND `rule_value` = '500'|not_empty|
|
||||
9090|2015_12_01_spell_scribe_restriction_rule.sql|SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Character:RestrictSpellScribing'|empty|
|
||||
9091|2015_12_07_command_settings.sql|SHOW TABLES LIKE 'command_settings'|empty|
|
||||
9092|2015_12_17_eqtime.sql|SHOW TABLES LIKE 'eqtime'|empty|
|
||||
9093|2015_12_21_items_updates_evoitem.sql|SHOW COLUMNS FROM `items` LIKE 'evoitem'|empty|
|
||||
9094|2015_12_29_quest_zone_events.sql|SELECT * FROM perl_event_export_settings WHERE event_description = 'EVENT_SPAWN_ZONE'|empty|
|
||||
9095|2016_01_08_command_find_aliases.sql|SELECT * FROM `command_settings` WHERE `command` LIKE 'findaliases'|empty|
|
||||
9096|2016_03_05_secondary_recall.sql|SHOW COLUMNS FROM `character_bind` LIKE 'slot'|empty|
|
||||
9097|2016_07_03_npc_class_as_last_name.sql|SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'NPC:UseClassAsLastName'|empty|
|
||||
9098|2016_08_26_object_size_tilt.sql|SHOW COLUMNS FROM `object` LIKE 'size'|empty|
|
||||
9099|2016_08_27_ip_exemptions.sql|SHOW TABLES LIKE 'ip_exemptions'|empty|
|
||||
9100|2016_08_27_object_display_name.sql|SHOW COLUMNS FROM `object` LIKE 'display_name'|empty|
|
||||
9101|2016_12_01_pcnpc_only.sql|SHOW COLUMNS FROM `spells_new` LIKE 'pcnpc_only_flag'|empty|
|
||||
9102|2017_01_10_book_languages.sql|SHOW COLUMNS FROM `books` LIKE 'language'|empty|
|
||||
9103|2017_01_30_book_languages_fix.sql|SELECT `language` from `books` WHERE `language` IS NULL|not_empty|
|
||||
9104|2017_02_09_npc_spells_entries_type_update.sql|SHOW COLUMNS IN `npc_spells_entries` LIKE 'type'|contains|smallint(5) unsigned
|
||||
9105|2017_02_15_bot_spells_entries.sql|SELECT `id` FROM `npc_spells_entries` WHERE `npc_spells_id` >= 701 AND `npc_spells_id` <= 712|not_empty|
|
||||
9106|2017_02_26_npc_spells_update_for_bots.sql|SELECT * FROM `npc_spells` WHERE `id` = '701' AND `name` = 'Cleric Bot'|not_empty|
|
||||
9107|2017_03_09_inventory_version.sql|SHOW TABLES LIKE 'inventory_version'|empty|
|
||||
9108|2017_04_07_ignore_despawn.sql|SHOW COLUMNS FROM `npc_types` LIKE 'ignore_despawn'|empty|
|
||||
9109|2017_04_08_doors_disable_timer.sql|SHOW COLUMNS FROM `doors` LIKE 'disable_timer'|empty|
|
||||
9110|2017_04_10_graveyard.sql|show index from graveyard WHERE key_name = 'zone_id_nonunique'|empty|
|
||||
9111|2017_06_24_saylink_index.sql|SHOW INDEX FROM `saylink` WHERE `key_name` = 'phrase_index'|empty|
|
||||
9112|2017_06_24_rule_values_expand.sql|SHOW COLUMNS FROM rule_values WHERE Field = 'rule_value' and Type = 'varchar(30)'|empty|
|
||||
9113|2017_07_19_show_name.sql|SHOW COLUMNS FROM `npc_types` LIKE 'show_name'|empty|
|
||||
9114|2017_07_22_aura.sql|SHOW TABLES LIKE 'auras'|empty|
|
||||
9115|2017_10_28_traps.sql|SHOW COLUMNS FROM `traps` LIKE 'triggered_number'|empty|
|
||||
9116|2017_12_16_GroundSpawn_Respawn_Timer.sql|SHOW COLUMNS FROM `ground_spawns` WHERE Field = 'respawn_timer' AND Type = 'int(11) unsigned'|empty|
|
||||
9117|2018_02_01_NPC_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `npc_spells_entries` LIKE 'min_hp'|empty|
|
||||
9118|2018_02_04_Charm_Stats.sql|SHOW COLUMNS FROM `npc_types` LIKE 'charm_ac'|empty|
|
||||
9119|2018_02_10_GlobalLoot.sql|SHOW TABLES LIKE 'global_loot'|empty|
|
||||
9120|2018_02_13_Heading.sql|SELECT value FROM variables WHERE varname = 'fixed_heading'|empty|
|
||||
9121|2018_02_18_bug_reports.sql|SHOW TABLES LIKE 'bug_reports'|empty|
|
||||
9122|2018_03_07_ucs_command.sql|SELECT * FROM `command_settings` WHERE `command` LIKE 'ucs'|empty|
|
||||
9123|2018_07_07_data_buckets.sql|SHOW TABLES LIKE 'data_buckets'|empty|
|
||||
9124|2018_07_09_tasks.sql|SHOW COLUMNS FROM `tasks` LIKE 'type'|empty|
|
||||
9125|2018_07_20_task_emote.sql|SHOW COLUMNS FROM `tasks` LIKE 'completion_emote'|empty|
|
||||
9126|2018_09_07_FastRegen.sql|SHOW COLUMNS FROM `zone` LIKE 'fast_regen_hp'|empty|
|
||||
9127|2018_09_07_NPCMaxAggroDist.sql|SHOW COLUMNS FROM `zone` LIKE 'npc_max_aggro_dist'|empty|
|
||||
9128|2018_08_13_inventory_version_update.sql|SHOW TABLES LIKE 'inventory_version'|not_empty|
|
||||
9129|2018_08_13_inventory_update.sql|SHOW TABLES LIKE 'inventory_versions'|empty|
|
||||
9130|2018_11_25_name_filter_update.sql|SHOW COLUMNS FROM `name_filter` LIKE 'id'|empty|
|
||||
9131|2018_12_13_spell_buckets.sql|SHOW TABLES LIKE 'spell_buckets'|empty|
|
||||
9132|2018_12_16_global_base_scaling.sql|SHOW TABLES LIKE 'npc_scale_global_base'|empty|
|
||||
9133|2018_11_25_StuckBehavior.sql|SHOW COLUMNS FROM `npc_types` LIKE 'stuck_behavior'|empty|
|
||||
9134|2019_01_04_update_global_base_scaling.sql|SELECT * FROM db_version WHERE version >= 9134|empty|
|
||||
9135|2019_01_10_multi_version_spawns.sql|SHOW COLUMNS FROM `spawn2` LIKE 'version'|contains|unsigned|
|
||||
9136|2019_02_04_profanity_command.sql|SHOW TABLES LIKE 'profanity_list'|empty|
|
||||
9137|2018_12_12_client_faction_tables.sql|SHOW TABLES LIKE 'faction_base_data'|empty|
|
||||
9138|2018_12_12_convert_to_client_functions.sql|SELECT `id` FROM `faction_list` WHERE `id` > 4999|empty|
|
||||
9139|2019_03_25_optional_npc_model.sql|SHOW COLUMNS FROM `npc_types` LIKE 'model'|empty|
|
||||
9140|2019_07_03_update_range.sql|SHOW COLUMNS FROM `zone` LIKE 'max_movement_update_range'|empty|
|
||||
9141|2019_07_10_npc_flymode.sql|SHOW COLUMNS FROM `npc_types` LIKE 'flymode'|empty|
|
||||
9142|2019_09_02_required_spawn_filter.sql|SHOW COLUMNS FROM `spawnentry` LIKE 'condition_value_filter'|empty|
|
||||
9143|2019_09_16_account_table_changes.sql|SHOW COLUMNS FROM `account` LIKE 'ls_id'|empty|
|
||||
9144|2019_11_09_logsys_description_update.sql|SELECT * FROM db_version WHERE version >= 9143|empty|
|
||||
9145|2019_12_24_banned_ips_update.sql|SHOW TABLES LIKE 'Banned_IPs'|not_empty|
|
||||
9146|2020_01_10_character_soft_deletes.sql|SHOW COLUMNS FROM `character_data` LIKE 'deleted_at'|empty|
|
||||
9147|2020_01_24_grid_centerpoint_wp.sql|SHOW COLUMNS FROM `grid_entries` LIKE 'centerpoint'|empty|
|
||||
9148|2020_01_28_corpse_guild_consent_id.sql|SHOW COLUMNS FROM `character_corpses` LIKE 'guild_consent_id'|empty|
|
||||
9149|2020_02_06_globalloot.sql|SHOW COLUMNS FROM `global_loot` LIKE 'hot_zone'|empty|
|
||||
9150|2020_02_06_aa_reset_on_death.sql|SHOW COLUMNS FROM `aa_ability` LIKE 'reset_on_death'|empty|
|
||||
9151|2020_03_05_npc_always_aggro.sql|SHOW COLUMNS FROM `npc_types` LIKE 'always_aggro'|empty|
|
||||
9152|2020_03_09_convert_myisam_to_innodb.sql|SELECT * FROM db_version WHERE version >= 9152|empty|
|
||||
9153|2020_05_09_items_subtype.sql|SHOW COLUMNS from `items` LIKE 'UNK219'|not_empty|
|
||||
9154|2020_04_11_expansions_content_filters.sql|SHOW COLUMNS from `zone` LIKE 'min_expansion'|empty|
|
||||
9155|2020_08_15_lootdrop_level_filtering.sql|SHOW COLUMNS from `lootdrop_entries` LIKE 'trivial_min_level'|empty|
|
||||
9156|2020_08_16_virtual_zonepoints.sql|SHOW COLUMNS from `zone_points` LIKE 'is_virtual'|empty|
|
||||
9157|2020_09_02_pet_taunting.sql|SHOW COLUMNS from `character_pet_info` LIKE 'taunting'|empty|
|
||||
9158|2020_12_09_underworld.sql|SHOW COLUMNS from `zone` LIKE 'underworld_teleport_index'|empty|
|
||||
9159|2020_12_22_expedition_system.sql|SELECT * FROM db_version WHERE version >= 9159|empty|
|
||||
9160|2021_02_14_npc_exp_mod.sql|SHOW COLUMNS from `npc_types` LIKE 'exp_mod'|empty|
|
||||
9161|2021_02_15_npc_spell_entries_unsigned.sql|SELECT * FROM db_version WHERE version >= 9161|empty|
|
||||
9162|2021_02_17_server_scheduled_events.sql|SELECT * FROM db_version WHERE version >= 9162|empty|
|
||||
9163|2021_04_17_zone_safe_heading_changes.sql|SHOW COLUMNS FROM `zone` LIKE 'safe_heading'|empty|
|
||||
9164|2021_04_23_character_exp_modifiers.sql|SHOW TABLES LIKE 'character_exp_modifiers'|empty|
|
||||
9165|2021_04_28_idle_pathing.sql|SHOW COLUMNS FROM `spawn2` LIKE 'path_when_zone_idle'|empty|
|
||||
9166|2021_02_12_dynamic_zone_members.sql|SHOW TABLES LIKE 'dynamic_zone_members'|empty|
|
||||
9167|2021_06_06_beastlord_pets.sql|SHOW TABLES LIKE 'pets_beastlord_data'|empty|
|
||||
9168|2021_08_31_pvp_duration.sql|SHOW COLUMNS FROM `spells_new` LIKE 'pvp_duration'|empty|
|
||||
9169|2021_06_06_dynamic_zone_moved_columns.sql|SELECT * FROM db_version WHERE version >= 9169|empty|
|
||||
9170|2021_03_03_instance_safereturns.sql|SHOW TABLES LIKE 'character_instance_safereturns'|empty|
|
||||
9171|2021_03_30_remove_dz_is_current_member.sql|SHOW COLUMNS FROM `dynamic_zone_members` LIKE 'is_current_member'|not_empty|
|
||||
9172|2021_05_21_shared_tasks.sql|SHOW TABLES LIKE 'shared_tasks'|empty|
|
||||
9173|2021_09_14_zone_lava_damage.sql|SHOW COLUMNS FROM `zone` LIKE 'lava_damage'|empty|
|
||||
9174|2021_10_09_not_null_door_columns.sql|SELECT * FROM db_version WHERE version >= 9174|empty|
|
||||
9175|2022_01_02_expansion_default_value_all.sql|SHOW COLUMNS FROM `forage` LIKE 'min_expansion'|contains|unsigned
|
||||
9176|2022_01_10_checksum_verification.sql|SHOW COLUMNS FROM `account` LIKE 'crc_eqgame'|empty|
|
||||
9177|2022_03_06_table_structure_changes.sql|SHOW COLUMNS FROM `pets` LIKE 'id'|empty|
|
||||
9178|2022_03_07_saylink_collation.sql|SELECT * FROM db_version WHERE version >= 9178|empty|
|
||||
9179|2022_04_30_hp_regen_per_second.sql|SHOW COLUMNS FROM `npc_types` LIKE 'hp_regen_per_second'|empty|
|
||||
9180|2022_05_01_character_peqzone_flags.sql|SHOW TABLES LIKE 'character_peqzone_flags'|empty|
|
||||
9181|2022_05_03_task_activity_goal_match_list.sql|SHOW COLUMNS FROM `task_activities` LIKE 'goal_match_list'|empty|
|
||||
9182|2022_05_02_npc_types_int64.sql|SHOW COLUMNS FROM `npc_types` LIKE 'hp'|missing|bigint
|
||||
9183|2022_05_07_merchant_data_buckets.sql|SHOW COLUMNS FROM `merchantlist` LIKE 'bucket_comparison'|empty
|
||||
9184|2022_05_21_schema_consistency.sql|SELECT * FROM db_version WHERE version >= 9184|empty|
|
||||
9185|2022_05_07_discord_webhooks.sql|SHOW TABLES LIKE 'discord_webhooks'|empty|
|
||||
9186|2022_07_09_zone_expansion_deprecate.sql|SHOW COLUMNS FROM `zone` LIKE 'expansion'|not_empty|
|
||||
9187|2022_07_09_task_zone_version_matching.sql|SHOW COLUMNS FROM `task_activities` LIKE 'zone_version'|empty|
|
||||
9188|2022_07_14_zone_expansion_revert.sql|SHOW COLUMNS FROM `zone` LIKE 'expansion'|empty|
|
||||
9189|2022_07_10_character_task_rewarded.sql|SHOW COLUMNS FROM `character_tasks` LIKE 'was_rewarded'|empty|
|
||||
9190|2022_07_13_task_reward_points.sql|SHOW COLUMNS FROM `tasks` LIKE 'reward_points'|empty|
|
||||
9191|2022_07_28_gm_state_changes.sql|SHOW COLUMNS FROM `account` LIKE 'invulnerable'|empty|
|
||||
9192|2022_07_13_task_lock_activity.sql|SHOW COLUMNS FROM `tasks` LIKE 'lock_activity_id'|empty|
|
||||
9193|2022_07_16_task_timer_groups.sql|SHOW COLUMNS FROM `tasks` LIKE 'replay_timer_group'|empty|
|
||||
9194|2022_07_23_dz_switch_id.sql|SHOW COLUMNS FROM `doors` LIKE 'dz_switch_id'|empty|
|
||||
9195|2022_07_23_dz_templates.sql|SHOW TABLES like 'dynamic_zone_templates'|empty|
|
||||
9196|2022_07_30_merchantlist_temp.sql|SHOW COLUMNS FROM `merchantlist_temp` LIKE 'zone_id'|empty|
|
||||
9197|2022_08_01_drop_expansion_account.sql|SHOW COLUMNS FROM `account` LIKE 'expansion'|not_empty|
|
||||
9198|2022_08_14_exp_modifier_instance_versions.sql|SHOW COLUMNS FROM `character_exp_modifiers` LIKE 'instance_version'|empty|
|
||||
9199|2022_08_08_task_req_activity_id.sql|SHOW COLUMNS FROM `task_activities` LIKE 'req_activity_id'|empty|
|
||||
9200|2022_08_19_zone_expansion_consistency.sql|SELECT * FROM db_version WHERE version >= 9200|empty|
|
||||
9201|2022_08_22_npc_types_heroic_strikethrough.sql|SHOW COLUMNS FROM `npc_types` LIKE 'heroic_strikethrough'|empty|
|
||||
9202|2022_08_24_task_activities_step.sql|SHOW COLUMNS FROM `task_activities` LIKE 'step'|contains|unsigned
|
||||
9203|2022_08_07_replace_task_goals.sql|SHOW COLUMNS FROM `task_activities` LIKE 'item_id'|empty|
|
||||
9204|2022_09_02_faction_association.sql|SHOW TABLES LIKE 'faction_association'|empty|
|
||||
9205|2022_09_03_fix_starting_point_heading.sql|SELECT * FROM db_version WHERE version >= 9205|empty|
|
||||
9206|2022_09_03_fix_door_destination_headings.sql|SELECT * FROM db_version WHERE version >= 9206|empty|
|
||||
9207|2022_09_03_fix_zone_point_heading_data.sql|SELECT * FROM db_version WHERE version >= 9207|empty|
|
||||
9208|2022_09_25_task_concat_matchlists.sql|SHOW COLUMNS FROM `task_activities` LIKE 'npc_id'|not_empty|
|
||||
9209|2022_09_28_discord_webhooks.sql|SHOW COLUMNS FROM `logsys_categories` LIKE 'log_to_discord'|empty|
|
||||
9210|2022_10_11_fix_misty_pok_stone.sql|select * from doors where id = 2040 and `name` = 'POKRVPORT500' and client_version_mask = 4294967232|empty|
|
||||
9211|2022_10_14_fix_neriak_pok_stone.sql|select * from doors where id = 2057 and `name` = 'POKNRKPORT500' and client_version_mask = 4294967232|empty|
|
||||
9212|2022_10_14_fix_misty_pok_stone.sql|select * from doors where id = 2040 and `name` = 'POKRVPORT500' and dest_zone = 'misty'|empty|
|
||||
9213|2022_12_24_npc_keeps_sold_items.sql|SHOW COLUMNS FROM `npc_types` LIKE 'keeps_sold_items'|empty|
|
||||
9214|2022_12_24_character_exp_toggle.sql|SHOW COLUMNS FROM `character_data` LIKE 'exp_enabled'|empty|
|
||||
9215|2023_01_08_zone_max_level.sql|SHOW COLUMNS FROM `zone` LIKE 'max_level'|empty|
|
||||
9216|2023_01_15_merc_data.sql|SHOW TABLES LIKE 'mercs'|empty|
|
||||
9217|2023_01_15_chatchannel_reserved_names.sql|SHOW TABLES LIKE 'chatchannel_reserved_names'|empty|
|
||||
9218|2023_01_24_item_recast.sql|show columns from character_item_recast like '%recast_type%'|contains|smallint
|
||||
9219|2023_01_29_merchant_status_requirements.sql|SHOW COLUMNS FROM merchantlist LIKE 'min_status'|empty|
|
||||
9220|2022_12_19_player_events_tables.sql|SHOW TABLES LIKE 'player_event_logs'|empty|
|
||||
9221|2023_02_24_npc_scaling_zone_id_instance_version.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'zone_id'|empty|
|
||||
9222|2023_02_28_npc_scaling_zone_list_version_list.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'zone_id_list'|empty|
|
||||
9223|2023_03_04_npc_scale_global_base_heroic_strikethrough.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'heroic_strikethrough'|empty|
|
||||
9224|2023_03_08_npc_scale_global_base_avoidance.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'hp_regen_per_second'|empty|
|
||||
9225|2023_01_21_bots_raid_members.sql|SHOW COLUMNS FROM `raid_members` LIKE 'bot_id'|empty|
|
||||
9226|2023_03_17_corpse_fields.sql|SHOW COLUMNS FROM `character_corpse_items` LIKE 'custom_data'|empty|
|
||||
9227|2023_03_24_npc_scale_global_base_verify.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'heroic_strikethrough'|not_empty|
|
||||
9228|2023_05_08_character_tribute_primary_key.sql|SHOW COLUMNS FROM `character_tribute` LIKE 'character_id'|empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
# yet using the versioning system to figure out where the database is schema wise to determine
|
||||
# which updates are necessary to run
|
||||
#
|
||||
# Example: Version|Filename.sql|Query_to_Check_Condition_For_Needed_Update|match type|text to match
|
||||
# 0 = Database Version
|
||||
# 1 = Filename.sql
|
||||
# 2 = Query_to_Check_Condition_For_Needed_Update
|
||||
# 3 = Match Type - If condition from match type to Value 4 is true, update will flag for needing to be ran
|
||||
# contains = If query results contains text from 4th value
|
||||
# match = If query results matches text from 4th value
|
||||
# missing = If query result is missing text from 4th value
|
||||
# empty = If the query results in no results
|
||||
# not_empty = If the query is not empty
|
||||
# 4 = Text to match
|
||||
#
|
||||
#
|
||||
+3
-14
@@ -1,15 +1,4 @@
|
||||
On the move from svn -> git we lost the ability to track revision numbers on the repo.
|
||||
Database updates have been migrated into native code as of #2857.
|
||||
|
||||
No big deal!
|
||||
|
||||
What we'll do instead as follows:
|
||||
|
||||
-Optional SQL updates go in optional/
|
||||
-Required SQL updates go in required/
|
||||
All updates will follow a specific format of YYYY_MM_DD_Desc.sql, this is so it's easy to sort.
|
||||
|
||||
So the following is a good example of what I expect to see
|
||||
2013_02_16_GitConversion.sql
|
||||
|
||||
|
||||
The new bots/ folder contains two sub-folders named optional/ and required/ for updates.
|
||||
Main updates: https://github.com/EQEmu/Server/tree/master/common/database/database_update_manifest.cpp
|
||||
Bot updates: https://github.com/EQEmu/Server/tree/master/common/database/database_update_manifest_bots.cpp
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
9000|2015_09_30_bots.sql|SHOW TABLES LIKE 'bot_data'|empty|
|
||||
9001|2016_03_24_bots_command_settings.sql|SHOW TABLES LIKE 'bot_command_settings'|empty|
|
||||
9002|2016_03_24_bots_command_rules.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE 'Bots:CommandSpellRank'|empty|
|
||||
9003|2016_04_05_bots_pet_spell_id_field.sql|SHOW COLUMNS FROM `bot_pets` LIKE 'pet_id'|not_empty|
|
||||
9004|2016_04_07_bots_heal_override_target.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'healrotationclearhot'|empty|
|
||||
9005|2016_04_08_bots_heal_rotations.sql|SHOW TABLES LIKE 'bot_heal_rotations'|empty|
|
||||
9006|2016_04_12_bots_inventory_window.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'inventorywindow'|empty|
|
||||
9007|2016_06_23_bots_camel_case_name_rule.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE 'Bots:AllowCamelCaseNames'|empty|
|
||||
9008|2016_06_28_bots_inventory_charges_update.sql|SELECT * FROM `information_schema`.`COLUMNS` isc WHERE isc.`TABLE_SCHEMA` = DATABASE() AND isc.`TABLE_NAME` = 'bot_inventories' AND isc.`COLUMN_NAME` = 'inst_charges' AND isc.`DATA_TYPE` = 'tinyint'|not_empty|
|
||||
9009|2017_02_15_bots_bot_spells_entries.sql|SELECT `id` FROM `npc_spells_entries` WHERE `npc_spells_id` >= 701 AND `npc_spells_id` <= 712|not_empty|
|
||||
9010|2017_02_20_bots_bard_spell_update.sql|SELECT * FROM `bot_spells_entries` WHERE (`npc_spells_id` = 711 OR `npc_spells_id` = 3008) AND `type` >= 0xFFFF0000|empty|
|
||||
9011|2017_02_23_bots_spell_casting_chances.sql|SHOW TABLES LIKE 'bot_spell_casting_chances'|empty|
|
||||
9012|2017_02_26_bots_npc_spells_update_for_bots.sql|SELECT * FROM `npc_spells` WHERE `id` = '701' AND `name` = 'Cleric Bot'|not_empty|
|
||||
9013|2017_02_26_bots_spells_id_update_for_saved_bots.sql|SELECT * FROM `bot_data` WHERE `spells_id` >= '701' AND `spells_id` <= '712'|not_empty|
|
||||
9014|2017_02_26_bots_spells_id_update_for_bot_spells_entries.sql|SELECT * FROM `bot_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712'|not_empty|
|
||||
9015|2017_02_26_bots_spell_casting_chances_update.sql|SHOW COLUMNS FROM `bot_spell_casting_chances` LIKE 'value'|not_empty|
|
||||
9016|2017_02_26_bots_spell_casting_chances_update.sql|SHOW TABLES LIKE 'bot_spell_casting_chances'|empty|
|
||||
9017|2017_03_26_bots_spells_id_fix_for_saved_shadowknight_bots.sql|SELECT * FROM `bot_data` WHERE `class` = '5' AND `spells_id` = '3004'|not_empty|
|
||||
9018|2018_02_02_Bot_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `bot_spells_entries` LIKE 'min_hp'|empty|
|
||||
9019|2018_04_12_bots_stop_melee_level.sql|SHOW COLUMNS FROM `bot_data` LIKE 'stop_melee_level'|empty|
|
||||
9020|2018_08_13_bots_inventory_update.sql|SELECT * FROM `inventory_versions` WHERE `version` = 2 and `bot_step` = 0|not_empty|
|
||||
9021|2018_10_09_bots_owner_options.sql|SHOW TABLES LIKE 'bot_owner_options'|empty|
|
||||
9022|2019_02_07_bots_stance_type_update.sql|SELECT * FROM `bot_spell_casting_chances` WHERE `spell_type_index` = '255' AND `class_id` = '255' AND `stance_index` = '0'|not_empty|
|
||||
9023|2019_06_22_bots_owner_option_stats_update.sql|SELECT * FROM db_version WHERE bots_version >= 9023|empty|
|
||||
9024|2019_06_27_bots_pet_get_lost.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'petgetlost'|empty|
|
||||
9025|2019_08_26_bots_owner_option_spawn_message.sql|SELECT * FROM db_version WHERE bots_version >= 9025|empty|
|
||||
9026|2019_09_09_bots_owner_options_rework.sql|SHOW COLUMNS FROM `bot_owner_options` LIKE 'option_type'|empty|
|
||||
9027|2020_03_30_bots_view_update.sql|SELECT * FROM db_version WHERE bots_version >= 9027|empty|
|
||||
9028|2021_06_04_bot_create_combinations.sql|SHOW TABLES LIKE 'bot_create_combinations'|empty|
|
||||
9029|2022_06_21_bot_groups_auto_spawn.sql|SHOW COLUMNS from `bot_groups` LIKE 'auto_spawm'|empty|
|
||||
9030|2022_10_27_bot_data_buckets.sql|SHOW COLUMNS FROM `bot_spells_entries` LIKE 'bucket_name'|empty|
|
||||
9031|2022_11_13_bot_spells_entries.sql|SELECT * FROM db_version WHERE bots_version >= 9031|empty|
|
||||
9032|2022_11_07_bot_expansion_bitmask.sql|SHOW COLUMNS FROM `bot_data` LIKE 'expansion_bitmask'|empty|
|
||||
9033|2022_11_19_bot_spell_settings.sql|SHOW TABLES LIKE 'bot_spell_settings'|empty|
|
||||
9034|2022_12_02_bot_spell_settings.sql|SHOW COLUMNS FROM `bot_data` LIKE 'enforce_spell_settings'|empty|
|
||||
9035|2022_12_04_bot_archery.sql|SHOW COLUMNS FROM `bot_data` LIKE 'archery_setting'|empty|
|
||||
9036|2023_01_19_drop_bot_views.sql|SHOW TABLES LIKE 'vw_groups'|not_empty|
|
||||
9037|2023_01_22_add_name_index.sql||show index from bot_data WHERE key_name = 'name`|empty|
|
||||
9038|2023_02_16_add_caster_range.sql|SHOW COLUMNS FROM `bot_data` LIKE 'caster_range'|empty|
|
||||
9039|2023_03_31_remove_bot_groups.sql|SHOW TABLES LIKE 'bot_groups'|not_empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
# yet using the versioning system to figure out where the database is schema wise to determine
|
||||
# which updates are necessary to run
|
||||
#
|
||||
# Example: Version|Filename.sql|Query_to_Check_Condition_For_Needed_Update|match type|text to match
|
||||
# 0 = Database Version
|
||||
# 1 = Filename.sql
|
||||
# 2 = Query_to_Check_Condition_For_Needed_Update
|
||||
# 3 = Match Type - If condition from match type to Value 4 is true, update will flag for needing to be ran
|
||||
# contains = If query results contains text from 4th value
|
||||
# match = If query results matches text from 4th value
|
||||
# missing = If query result is missing text from 4th value
|
||||
# empty = If the query results in no results
|
||||
# not_empty = If the query is not empty
|
||||
# 4 = Text to match
|
||||
#
|
||||
#
|
||||
@@ -1,27 +0,0 @@
|
||||
ALTER TABLE `botguildmembers` ADD `alt` TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER `public_note`;
|
||||
|
||||
DROP VIEW IF EXISTS `vwGuildMembers`;
|
||||
CREATE VIEW `vwGuildMembers` AS
|
||||
select 'C' as mobtype,
|
||||
cm.char_id,
|
||||
cm.guild_id,
|
||||
cm.rank,
|
||||
cm.tribute_enable,
|
||||
cm.total_tribute,
|
||||
cm.last_tribute,
|
||||
cm.banker,
|
||||
cm.public_note,
|
||||
cm.alt
|
||||
from guild_members as cm
|
||||
union all
|
||||
select 'B' as mobtype,
|
||||
bm.char_id,
|
||||
bm.guild_id,
|
||||
bm.rank,
|
||||
bm.tribute_enable,
|
||||
bm.total_tribute,
|
||||
bm.last_tribute,
|
||||
bm.banker,
|
||||
bm.public_note,
|
||||
bm.alt
|
||||
from botguildmembers as bm;
|
||||
@@ -1,74 +0,0 @@
|
||||
-- A fix for the auto-conversion view renaming issue
|
||||
|
||||
|
||||
DROP VIEW IF EXISTS `vwbotcharactermobs`;
|
||||
DROP VIEW IF EXISTS `vwbotgroups`;
|
||||
DROP VIEW IF EXISTS `vwgroups`;
|
||||
DROP VIEW IF EXISTS `vwguildmembers`;
|
||||
|
||||
|
||||
CREATE VIEW `vwBotCharacterMobs` AS
|
||||
SELECT _utf8'C' AS mobtype,
|
||||
c.`id`,
|
||||
c.`name`,
|
||||
c.`class`,
|
||||
c.`level`,
|
||||
c.`last_login`,
|
||||
c.`zone_id`
|
||||
FROM `character_data` AS c
|
||||
UNION ALL
|
||||
SELECT _utf8'B' AS mobtype,
|
||||
b.`BotID` AS id,
|
||||
b.`Name` AS name,
|
||||
b.`Class` AS class,
|
||||
b.`BotLevel` AS level,
|
||||
0 AS timelaston,
|
||||
0 AS zoneid
|
||||
FROM bots AS b;
|
||||
|
||||
CREATE VIEW `vwGroups` AS
|
||||
SELECT g.`groupid` AS groupid,
|
||||
GetMobType(g.`name`) AS mobtype,
|
||||
g.`name` AS name,
|
||||
g.`charid` AS mobid,
|
||||
IFNULL(c.`level`, b.`BotLevel`) AS level
|
||||
FROM `group_id` AS g
|
||||
LEFT JOIN `character_data` AS c ON g.`name` = c.`name`
|
||||
LEFT JOIN `bots` AS b ON g.`name` = b.`Name`;
|
||||
|
||||
CREATE VIEW `vwBotGroups` AS
|
||||
SELECT g.`BotGroupId`,
|
||||
g.`BotGroupName`,
|
||||
g.`BotGroupLeaderBotId`,
|
||||
b.`Name` AS BotGroupLeaderName,
|
||||
b.`BotOwnerCharacterId`,
|
||||
c.`name` AS BotOwnerCharacterName
|
||||
FROM `botgroup` AS g
|
||||
JOIN `bots` AS b ON g.`BotGroupLeaderBotId` = b.`BotID`
|
||||
JOIN `character_data` AS c ON b.`BotOwnerCharacterID` = c.`id`
|
||||
ORDER BY b.`BotOwnerCharacterId`, g.`BotGroupName`;
|
||||
|
||||
CREATE VIEW `vwGuildMembers` AS
|
||||
SELECT 'C' AS mobtype,
|
||||
cm.`char_id`,
|
||||
cm.`guild_id`,
|
||||
cm.`rank`,
|
||||
cm.`tribute_enable`,
|
||||
cm.`total_tribute`,
|
||||
cm.`last_tribute`,
|
||||
cm.`banker`,
|
||||
cm.`public_note`,
|
||||
cm.`alt`
|
||||
FROM `guild_members` AS cm
|
||||
UNION ALL
|
||||
SELECT 'B' AS mobtype,
|
||||
bm.`char_id`,
|
||||
bm.`guild_id`,
|
||||
bm.`rank`,
|
||||
bm.`tribute_enable`,
|
||||
bm.`total_tribute`,
|
||||
bm.`last_tribute`,
|
||||
bm.`banker`,
|
||||
bm.`public_note`,
|
||||
bm.`alt`
|
||||
FROM `botguildmembers` AS bm;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,85 +0,0 @@
|
||||
-- 'drop_bots (pre-update script)' sql script file
|
||||
-- current as of 11/30/2015
|
||||
--
|
||||
-- Note: This file will remove bot schema loaded by 'load_bots' sql scripts.
|
||||
-- There may still be remnants of bot activity in tables `guild_members` and
|
||||
-- `group_id`. If these entries are causing issues, you may need to manually
|
||||
-- remove them.
|
||||
|
||||
|
||||
SELECT "dropping views...";
|
||||
DROP VIEW IF EXISTS `vwGuildMembers`;
|
||||
DROP VIEW IF EXISTS `vwGroups`;
|
||||
DROP VIEW IF EXISTS `vwBotGroups`;
|
||||
DROP VIEW IF EXISTS `vwBotCharacterMobs`;
|
||||
|
||||
|
||||
SELECT "dropping functions...";
|
||||
DROP FUNCTION IF EXISTS `GetMobTypeByName`;
|
||||
DROP FUNCTION IF EXISTS `GetMobTypeByID`;
|
||||
DROP FUNCTION IF EXISTS `GetMobType`;
|
||||
|
||||
|
||||
SELECT "dropping tables...";
|
||||
DROP TABLE IF EXISTS `botguildmembers`;
|
||||
DROP TABLE IF EXISTS `botgroupmembers`;
|
||||
DROP TABLE IF EXISTS `botgroup`;
|
||||
DROP TABLE IF EXISTS `botgroups`; -- this table is not a part of 'load_bots.sql'
|
||||
DROP TABLE IF EXISTS `botpetinventory`;
|
||||
DROP TABLE IF EXISTS `botpetbuffs`;
|
||||
DROP TABLE IF EXISTS `botpets`;
|
||||
DROP TABLE IF EXISTS `botinventory`;
|
||||
DROP TABLE IF EXISTS `botbuffs`;
|
||||
DROP TABLE IF EXISTS `bottimers`;
|
||||
DROP TABLE IF EXISTS `botstances`;
|
||||
DROP TABLE IF EXISTS `bots`;
|
||||
|
||||
DROP PROCEDURE IF EXISTS `DropBotsSchema`;
|
||||
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE PROCEDURE `DropBotsSchema` ()
|
||||
BEGIN
|
||||
SELECT "deleting rules...";
|
||||
DELETE FROM `rule_values` WHERE `rule_name` LIKE 'Bots%';
|
||||
|
||||
|
||||
SELECT "deleting command...";
|
||||
DELETE FROM `commands` WHERE `command` LIKE 'bot';
|
||||
|
||||
|
||||
SELECT "restoring keys...";
|
||||
IF (EXISTS(SELECT `CONSTRAINT_NAME` FROM `information_schema`.`KEY_COLUMN_USAGE` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'group_id' AND `CONSTRAINT_NAME` = 'PRIMARY')) THEN
|
||||
ALTER TABLE `group_id` DROP PRIMARY KEY;
|
||||
END IF;
|
||||
ALTER TABLE `group_id` ADD PRIMARY KEY (`groupid`, `charid`, `ismerc`);
|
||||
|
||||
IF (EXISTS(SELECT `CONSTRAINT_NAME` FROM `information_schema`.`KEY_COLUMN_USAGE` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'guild_members' AND `CONSTRAINT_NAME` = 'PRIMARY')) THEN
|
||||
ALTER TABLE `guild_members` DROP PRIMARY KEY;
|
||||
END IF;
|
||||
ALTER TABLE `guild_members` ADD PRIMARY KEY (`char_id`);
|
||||
|
||||
|
||||
SELECT "de-activating spawns...";
|
||||
UPDATE `spawn2` SET `enabled` = 0 WHERE `id` IN (59297,59298);
|
||||
|
||||
|
||||
SELECT "clearing database version...";
|
||||
IF (EXISTS(SELECT `COLUMN_NAME` FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'db_version' AND `COLUMN_NAME` = 'bots_version')) THEN
|
||||
UPDATE `db_version`
|
||||
SET `bots_version` = 0;
|
||||
END IF;
|
||||
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
|
||||
CALL `DropBotsSchema`();
|
||||
|
||||
SELECT "dropping procedure...";
|
||||
DROP PROCEDURE IF EXISTS `DropBotsSchema`;
|
||||
|
||||
|
||||
-- End of File
|
||||
@@ -1,280 +0,0 @@
|
||||
-- 'load_bots' sql script file
|
||||
-- current as of 10/15/2014
|
||||
--
|
||||
-- Use this file on databases where the player profile blob has been converted.
|
||||
--
|
||||
-- Note: This file assumes a database free of bot remnants. If you have a prior
|
||||
-- bot installation and wish to reload the default schema and entries, then
|
||||
-- source 'drop_bots.sql' before sourcing this file.
|
||||
|
||||
|
||||
ALTER TABLE `guild_members` DROP PRIMARY KEY;
|
||||
ALTER TABLE `group_id` DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(`groupid`, `charid`, `name`, `ismerc`);
|
||||
|
||||
UPDATE `spawn2` SET `enabled` = 1 WHERE `id` IN (59297,59298);
|
||||
|
||||
-- old command kept for reference (`commands` now only has 2 columns - `command` and `access`)
|
||||
-- INSERT INTO `commands` VALUES ('bot', '0', 'Type \"#bot help\" to the see the list of available commands for bots.');
|
||||
INSERT INTO `commands` VALUES ('bot', '0');
|
||||
|
||||
INSERT INTO `rule_values` VALUES
|
||||
('1', 'Bots:BotAAExpansion', '8', 'The expansion through which bots will obtain AAs'),
|
||||
('1', 'Bots:BotFinishBuffing', 'false', 'Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.'),
|
||||
('1', 'Bots:BotGroupBuffing', 'false', 'Bots will cast single target buffs as group buffs, default is false for single. Does not make single target buffs work for MGB.'),
|
||||
('1', 'Bots:BotManaRegen', '3.0', 'Adjust mana regen for bots, 1 is fast and higher numbers slow it down 3 is about the same as players.'),
|
||||
('1', 'Bots:BotQuest', 'false', 'Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl'),
|
||||
('1', 'Bots:BotSpellQuest', 'false', 'Anita Thrall\'s (Anita_Thrall.pl) Bot Spell Scriber quests.'),
|
||||
('1', 'Bots:CreateBotCount', '150', 'Number of bots that each account can create'),
|
||||
('1', 'Bots:SpawnBotCount', '71', 'Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid');
|
||||
|
||||
CREATE TABLE `bots` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotOwnerCharacterID` INT(10) UNSIGNED NOT NULL,
|
||||
`BotSpellsID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Name` VARCHAR(64) NOT NULL,
|
||||
`LastName` VARCHAR(32) DEFAULT NULL,
|
||||
`BotLevel` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Race` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`Class` TINYINT(2) NOT NULL DEFAULT '0',
|
||||
`Gender` TINYINT(2) NOT NULL DEFAULT '0',
|
||||
`Size` FLOAT NOT NULL DEFAULT '0',
|
||||
`Face` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinHairStyle` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinHairColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinEyeColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinEyeColor2` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinBeardColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinBeard` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinHeritage` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinTattoo` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinDetails` INT(10) NOT NULL DEFAULT '0',
|
||||
`HP` INTEGER NOT NULL DEFAULT '0',
|
||||
`Mana` INTEGER NOT NULL DEFAULT '0',
|
||||
`MR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`CR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`DR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`FR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`PR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`Corrup` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`AC` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`STR` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`STA` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`DEX` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`AGI` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`_INT` MEDIUMINT(8) NOT NULL DEFAULT '80',
|
||||
`WIS` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`CHA` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`ATK` MEDIUMINT(9) NOT NULL DEFAULT '0',
|
||||
`BotCreateDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`LastSpawnDate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`TotalPlayTime` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`LastZoneId` SMALLINT(6) NOT NULL DEFAULT '0',
|
||||
`BotInspectMessage` VARCHAR(256) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botstances` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`StanceID` TINYINT UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotID`),
|
||||
CONSTRAINT `FK_botstances_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
);
|
||||
|
||||
CREATE TABLE `bottimers` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`TimerID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Value` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotID`),
|
||||
CONSTRAINT `FK_bottimers_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
);
|
||||
|
||||
CREATE TABLE `botbuffs` (
|
||||
`BotBuffId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SpellId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterLevel` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DurationFormula` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`TicsRemaining` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`PoisonCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DiseaseCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CurseCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CorruptionCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`HitCount` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`MeleeRune` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`MagicRune` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DeathSaveSuccessChance` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterAARank` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Persistent` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotBuffId`),
|
||||
KEY `FK_botbuff_1` (`BotId`),
|
||||
CONSTRAINT `FK_botbuff_1` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botinventory` (
|
||||
`BotInventoryID` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotID` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SlotID` INTEGER SIGNED NOT NULL DEFAULT '0',
|
||||
`ItemID` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`charges` TINYINT(3) UNSIGNED DEFAULT 0,
|
||||
`color` INTEGER UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot5` MEDIUMINT(7) UNSIGNED DEFAULT 0,
|
||||
`instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`BotInventoryID`),
|
||||
KEY `FK_botinventory_1` (`BotID`),
|
||||
CONSTRAINT `FK_botinventory_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botpets` (
|
||||
`BotPetsId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`PetId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Name` VARCHAR(64) NULL,
|
||||
`Mana` INTEGER NOT NULL DEFAULT '0',
|
||||
`HitPoints` INTEGER NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetsId`),
|
||||
KEY `FK_botpets_1` (`BotId`),
|
||||
CONSTRAINT `FK_botpets_1` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`),
|
||||
CONSTRAINT `U_botpets_1` UNIQUE (`BotId`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botpetbuffs` (
|
||||
`BotPetBuffId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotPetsId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SpellId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterLevel` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Duration` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetBuffId`),
|
||||
KEY `FK_botpetbuffs_1` (`BotPetsId`),
|
||||
CONSTRAINT `FK_botpetbuffs_1` FOREIGN KEY (`BotPetsId`) REFERENCES `botpets` (`BotPetsID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botpetinventory` (
|
||||
`BotPetInventoryId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotPetsId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`ItemId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetInventoryId`),
|
||||
KEY `FK_botpetinventory_1` (`BotPetsId`),
|
||||
CONSTRAINT `FK_botpetinventory_1` FOREIGN KEY (`BotPetsId`) REFERENCES `botpets` (`BotPetsID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botgroup` (
|
||||
`BotGroupId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotGroupLeaderBotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotGroupName` VARCHAR(64) NOT NULL,
|
||||
PRIMARY KEY (`BotGroupId`),
|
||||
KEY `FK_botgroup_1` (`BotGroupLeaderBotId`),
|
||||
CONSTRAINT `FK_botgroup_1` FOREIGN KEY (`BotGroupLeaderBotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botgroupmembers` (
|
||||
`BotGroupMemberId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotGroupId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotGroupMemberId`),
|
||||
KEY `FK_botgroupmembers_1` (`BotGroupId`),
|
||||
CONSTRAINT `FK_botgroupmembers_1` FOREIGN KEY (`BotGroupId`) REFERENCES `botgroup` (`BotGroupId`),
|
||||
KEY `FK_botgroupmembers_2` (`BotId`),
|
||||
CONSTRAINT `FK_botgroupmembers_2` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botguildmembers` (
|
||||
`char_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`guild_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`rank` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`tribute_enable` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`total_tribute` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`last_tribute` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`banker` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`public_note` TEXT NULL,
|
||||
`alt` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`char_id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE FUNCTION `GetMobType` (mobname VARCHAR(64)) RETURNS CHAR(1)
|
||||
BEGIN
|
||||
DECLARE Result CHAR(1);
|
||||
|
||||
SET Result = NULL;
|
||||
|
||||
IF (SELECT COUNT(*) FROM `character_data` WHERE `name` = mobname) > 0 THEN
|
||||
SET Result = 'C';
|
||||
ELSEIF (SELECT COUNT(*) FROM `bots` WHERE `Name` = mobname) > 0 THEN
|
||||
SET Result = 'B';
|
||||
END IF;
|
||||
|
||||
RETURN Result;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
CREATE VIEW `vwBotCharacterMobs` AS
|
||||
SELECT _utf8'C' AS mobtype,
|
||||
c.`id`,
|
||||
c.`name`,
|
||||
c.`class`,
|
||||
c.`level`,
|
||||
c.`last_login`,
|
||||
c.`zone_id`
|
||||
FROM `character_data` AS c
|
||||
UNION ALL
|
||||
SELECT _utf8'B' AS mobtype,
|
||||
b.`BotID` AS id,
|
||||
b.`Name` AS name,
|
||||
b.`Class` AS class,
|
||||
b.`BotLevel` AS level,
|
||||
0 AS timelaston,
|
||||
0 AS zoneid
|
||||
FROM bots AS b;
|
||||
|
||||
CREATE VIEW `vwGroups` AS
|
||||
SELECT g.`groupid` AS groupid,
|
||||
GetMobType(g.`name`) AS mobtype,
|
||||
g.`name` AS name,
|
||||
g.`charid` AS mobid,
|
||||
IFNULL(c.`level`, b.`BotLevel`) AS level
|
||||
FROM `group_id` AS g
|
||||
LEFT JOIN `character_data` AS c ON g.`name` = c.`name`
|
||||
LEFT JOIN `bots` AS b ON g.`name` = b.`Name`;
|
||||
|
||||
CREATE VIEW `vwBotGroups` AS
|
||||
SELECT g.`BotGroupId`,
|
||||
g.`BotGroupName`,
|
||||
g.`BotGroupLeaderBotId`,
|
||||
b.`Name` AS BotGroupLeaderName,
|
||||
b.`BotOwnerCharacterId`,
|
||||
c.`name` AS BotOwnerCharacterName
|
||||
FROM `botgroup` AS g
|
||||
JOIN `bots` AS b ON g.`BotGroupLeaderBotId` = b.`BotID`
|
||||
JOIN `character_data` AS c ON b.`BotOwnerCharacterID` = c.`id`
|
||||
ORDER BY b.`BotOwnerCharacterId`, g.`BotGroupName`;
|
||||
|
||||
CREATE VIEW `vwGuildMembers` AS
|
||||
SELECT 'C' AS mobtype,
|
||||
cm.`char_id`,
|
||||
cm.`guild_id`,
|
||||
cm.`rank`,
|
||||
cm.`tribute_enable`,
|
||||
cm.`total_tribute`,
|
||||
cm.`last_tribute`,
|
||||
cm.`banker`,
|
||||
cm.`public_note`,
|
||||
cm.`alt`
|
||||
FROM `guild_members` AS cm
|
||||
UNION ALL
|
||||
SELECT 'B' AS mobtype,
|
||||
bm.`char_id`,
|
||||
bm.`guild_id`,
|
||||
bm.`rank`,
|
||||
bm.`tribute_enable`,
|
||||
bm.`total_tribute`,
|
||||
bm.`last_tribute`,
|
||||
bm.`banker`,
|
||||
bm.`public_note`,
|
||||
bm.`alt`
|
||||
FROM `botguildmembers` AS bm;
|
||||
@@ -1,280 +0,0 @@
|
||||
-- 'load_bots_old' sql script file
|
||||
-- current as of 10/15/2014
|
||||
--
|
||||
-- Use this file on databases where the player profile blob has not been converted
|
||||
--
|
||||
-- Note: This file assumes a database free of bot remnants. If you have a prior
|
||||
-- bot installation and wish to reload the default schema and entries, then
|
||||
-- source 'drop_bots.sql' before sourcing this file.
|
||||
|
||||
|
||||
ALTER TABLE `guild_members` DROP PRIMARY KEY;
|
||||
ALTER TABLE `group_id` DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(`groupid`, `charid`, `name`, `ismerc`);
|
||||
|
||||
UPDATE `spawn2` SET `enabled` = 1 WHERE `id` IN (59297,59298);
|
||||
|
||||
-- old command kept for reference (`commands` now only has 2 columns - `command` and `access`)
|
||||
-- INSERT INTO `commands` VALUES ('bot', '0', 'Type \"#bot help\" to the see the list of available commands for bots.');
|
||||
INSERT INTO `commands` VALUES ('bot', '0');
|
||||
|
||||
INSERT INTO `rule_values` VALUES
|
||||
('1', 'Bots:BotAAExpansion', '8', 'The expansion through which bots will obtain AAs'),
|
||||
('1', 'Bots:BotFinishBuffing', 'false', 'Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.'),
|
||||
('1', 'Bots:BotGroupBuffing', 'false', 'Bots will cast single target buffs as group buffs, default is false for single. Does not make single target buffs work for MGB.'),
|
||||
('1', 'Bots:BotManaRegen', '3.0', 'Adjust mana regen for bots, 1 is fast and higher numbers slow it down 3 is about the same as players.'),
|
||||
('1', 'Bots:BotQuest', 'false', 'Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl'),
|
||||
('1', 'Bots:BotSpellQuest', 'false', 'Anita Thrall\'s (Anita_Thrall.pl) Bot Spell Scriber quests.'),
|
||||
('1', 'Bots:CreateBotCount', '150', 'Number of bots that each account can create'),
|
||||
('1', 'Bots:SpawnBotCount', '71', 'Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid');
|
||||
|
||||
CREATE TABLE `bots` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotOwnerCharacterID` INT(10) UNSIGNED NOT NULL,
|
||||
`BotSpellsID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Name` VARCHAR(64) NOT NULL,
|
||||
`LastName` VARCHAR(32) DEFAULT NULL,
|
||||
`BotLevel` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Race` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`Class` TINYINT(2) NOT NULL DEFAULT '0',
|
||||
`Gender` TINYINT(2) NOT NULL DEFAULT '0',
|
||||
`Size` FLOAT NOT NULL DEFAULT '0',
|
||||
`Face` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinHairStyle` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinHairColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinEyeColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinEyeColor2` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinBeardColor` INT(10) NOT NULL DEFAULT '1',
|
||||
`LuclinBeard` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinHeritage` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinTattoo` INT(10) NOT NULL DEFAULT '0',
|
||||
`DrakkinDetails` INT(10) NOT NULL DEFAULT '0',
|
||||
`HP` INTEGER NOT NULL DEFAULT '0',
|
||||
`Mana` INTEGER NOT NULL DEFAULT '0',
|
||||
`MR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`CR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`DR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`FR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`PR` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`Corrup` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`AC` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`STR` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`STA` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`DEX` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`AGI` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`_INT` MEDIUMINT(8) NOT NULL DEFAULT '80',
|
||||
`WIS` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`CHA` MEDIUMINT(8) NOT NULL DEFAULT '75',
|
||||
`ATK` MEDIUMINT(9) NOT NULL DEFAULT '0',
|
||||
`BotCreateDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`LastSpawnDate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`TotalPlayTime` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`LastZoneId` SMALLINT(6) NOT NULL DEFAULT '0',
|
||||
`BotInspectMessage` VARCHAR(256) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botstances` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`StanceID` TINYINT UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotID`),
|
||||
CONSTRAINT `FK_botstances_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
);
|
||||
|
||||
CREATE TABLE `bottimers` (
|
||||
`BotID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`TimerID` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Value` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotID`),
|
||||
CONSTRAINT `FK_bottimers_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
);
|
||||
|
||||
CREATE TABLE `botbuffs` (
|
||||
`BotBuffId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SpellId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterLevel` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DurationFormula` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`TicsRemaining` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`PoisonCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DiseaseCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CurseCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CorruptionCounters` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`HitCount` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`MeleeRune` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`MagicRune` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`DeathSaveSuccessChance` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterAARank` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Persistent` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotBuffId`),
|
||||
KEY `FK_botbuff_1` (`BotId`),
|
||||
CONSTRAINT `FK_botbuff_1` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botinventory` (
|
||||
`BotInventoryID` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotID` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SlotID` INTEGER SIGNED NOT NULL DEFAULT '0',
|
||||
`ItemID` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`charges` TINYINT(3) UNSIGNED DEFAULT 0,
|
||||
`color` INTEGER UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot1` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot2` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot3` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot4` MEDIUMINT(7) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`augslot5` MEDIUMINT(7) UNSIGNED DEFAULT 0,
|
||||
`instnodrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`BotInventoryID`),
|
||||
KEY `FK_botinventory_1` (`BotID`),
|
||||
CONSTRAINT `FK_botinventory_1` FOREIGN KEY (`BotID`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botpets` (
|
||||
`BotPetsId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`PetId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Name` VARCHAR(64) NULL,
|
||||
`Mana` INTEGER NOT NULL DEFAULT '0',
|
||||
`HitPoints` INTEGER NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetsId`),
|
||||
KEY `FK_botpets_1` (`BotId`),
|
||||
CONSTRAINT `FK_botpets_1` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`),
|
||||
CONSTRAINT `U_botpets_1` UNIQUE (`BotId`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botpetbuffs` (
|
||||
`BotPetBuffId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotPetsId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`SpellId` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`CasterLevel` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`Duration` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetBuffId`),
|
||||
KEY `FK_botpetbuffs_1` (`BotPetsId`),
|
||||
CONSTRAINT `FK_botpetbuffs_1` FOREIGN KEY (`BotPetsId`) REFERENCES `botpets` (`BotPetsID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botpetinventory` (
|
||||
`BotPetInventoryId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotPetsId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`ItemId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotPetInventoryId`),
|
||||
KEY `FK_botpetinventory_1` (`BotPetsId`),
|
||||
CONSTRAINT `FK_botpetinventory_1` FOREIGN KEY (`BotPetsId`) REFERENCES `botpets` (`BotPetsID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `botgroup` (
|
||||
`BotGroupId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotGroupLeaderBotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotGroupName` VARCHAR(64) NOT NULL,
|
||||
PRIMARY KEY (`BotGroupId`),
|
||||
KEY `FK_botgroup_1` (`BotGroupLeaderBotId`),
|
||||
CONSTRAINT `FK_botgroup_1` FOREIGN KEY (`BotGroupLeaderBotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botgroupmembers` (
|
||||
`BotGroupMemberId` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`BotGroupId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
`BotId` INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`BotGroupMemberId`),
|
||||
KEY `FK_botgroupmembers_1` (`BotGroupId`),
|
||||
CONSTRAINT `FK_botgroupmembers_1` FOREIGN KEY (`BotGroupId`) REFERENCES `botgroup` (`BotGroupId`),
|
||||
KEY `FK_botgroupmembers_2` (`BotId`),
|
||||
CONSTRAINT `FK_botgroupmembers_2` FOREIGN KEY (`BotId`) REFERENCES `bots` (`BotID`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `botguildmembers` (
|
||||
`char_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`guild_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`rank` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`tribute_enable` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`total_tribute` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`last_tribute` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`banker` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`public_note` TEXT NULL,
|
||||
`alt` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`char_id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE FUNCTION `GetMobType` (mobname VARCHAR(64)) RETURNS CHAR(1)
|
||||
BEGIN
|
||||
DECLARE Result CHAR(1);
|
||||
|
||||
SET Result = NULL;
|
||||
|
||||
IF (SELECT COUNT(*) FROM `character_` WHERE `name` = mobname) > 0 THEN
|
||||
SET Result = 'C';
|
||||
ELSEIF (SELECT COUNT(*) FROM `bots` WHERE `Name` = mobname) > 0 THEN
|
||||
SET Result = 'B';
|
||||
END IF;
|
||||
|
||||
RETURN Result;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
CREATE VIEW `vwBotCharacterMobs` AS
|
||||
SELECT _utf8'C' AS mobtype,
|
||||
c.`id`,
|
||||
c.`name`,
|
||||
c.`class`,
|
||||
c.`level`,
|
||||
c.`timelaston`,
|
||||
c.`zoneid`
|
||||
FROM `character_` AS c
|
||||
UNION ALL
|
||||
SELECT _utf8'B' AS mobtype,
|
||||
b.`BotID` AS id,
|
||||
b.`Name` AS name,
|
||||
b.`Class` AS class,
|
||||
b.`BotLevel` AS level,
|
||||
0 AS timelaston,
|
||||
0 AS zoneid
|
||||
FROM bots AS b;
|
||||
|
||||
CREATE VIEW `vwGroups` AS
|
||||
SELECT g.`groupid` AS groupid,
|
||||
GetMobType(g.`name`) AS mobtype,
|
||||
g.`name` AS name,
|
||||
g.`charid` AS mobid,
|
||||
IFNULL(c.`level`, b.`BotLevel`) AS level
|
||||
FROM `group_id` AS g
|
||||
LEFT JOIN `character_` AS c ON g.`name` = c.`name`
|
||||
LEFT JOIN `bots` AS b ON g.`name` = b.`Name`;
|
||||
|
||||
CREATE VIEW `vwBotGroups` AS
|
||||
SELECT g.`BotGroupId`,
|
||||
g.`BotGroupName`,
|
||||
g.`BotGroupLeaderBotId`,
|
||||
b.`Name` AS BotGroupLeaderName,
|
||||
b.`BotOwnerCharacterId`,
|
||||
c.`name` AS BotOwnerCharacterName
|
||||
FROM `botgroup` AS g
|
||||
JOIN `bots` AS b ON g.`BotGroupLeaderBotId` = b.`BotID`
|
||||
JOIN `character_` AS c ON b.`BotOwnerCharacterID` = c.`id`
|
||||
ORDER BY b.`BotOwnerCharacterId`, g.`BotGroupName`;
|
||||
|
||||
CREATE VIEW `vwGuildMembers` AS
|
||||
SELECT 'C' AS mobtype,
|
||||
cm.`char_id`,
|
||||
cm.`guild_id`,
|
||||
cm.`rank`,
|
||||
cm.`tribute_enable`,
|
||||
cm.`total_tribute`,
|
||||
cm.`last_tribute`,
|
||||
cm.`banker`,
|
||||
cm.`public_note`,
|
||||
cm.`alt`
|
||||
FROM `guild_members` AS cm
|
||||
UNION ALL
|
||||
SELECT 'B' AS mobtype,
|
||||
bm.`char_id`,
|
||||
bm.`guild_id`,
|
||||
bm.`rank`,
|
||||
bm.`tribute_enable`,
|
||||
bm.`total_tribute`,
|
||||
bm.`last_tribute`,
|
||||
bm.`banker`,
|
||||
bm.`public_note`,
|
||||
bm.`alt`
|
||||
FROM `botguildmembers` AS bm;
|
||||
@@ -1,74 +0,0 @@
|
||||
-- 'drop_bots' sql script file
|
||||
-- current as of 12/11/2015
|
||||
--
|
||||
-- Note: This file will remove bot schema loaded by 'load_bots' sql scripts.
|
||||
-- There may still be remnants of bot activity in tables `guild_members` and
|
||||
-- `group_id`. If these entries are causing issues, you may need to manually
|
||||
-- remove them.
|
||||
--
|
||||
-- Use eqemu_update.pl to administer this script
|
||||
|
||||
|
||||
DROP VIEW IF EXISTS `vwguildmembers`;
|
||||
DROP VIEW IF EXISTS `vwgroups`;
|
||||
DROP VIEW IF EXISTS `vwbotgroups`;
|
||||
DROP VIEW IF EXISTS `vwbotcharactermobs`;
|
||||
|
||||
DROP VIEW IF EXISTS `vwGuildMembers`;
|
||||
DROP VIEW IF EXISTS `vwGroups`;
|
||||
DROP VIEW IF EXISTS `vwBotGroups`;
|
||||
DROP VIEW IF EXISTS `vwBotCharacterMobs`;
|
||||
|
||||
DROP VIEW IF EXISTS `vw_guild_members`;
|
||||
DROP VIEW IF EXISTS `vw_groups`;
|
||||
DROP VIEW IF EXISTS `vw_bot_groups`;
|
||||
DROP VIEW IF EXISTS `vw_bot_character_mobs`;
|
||||
|
||||
DROP FUNCTION IF EXISTS `GetMobTypeByName`;
|
||||
DROP FUNCTION IF EXISTS `GetMobTypeByID`;
|
||||
DROP FUNCTION IF EXISTS `GetMobType`;
|
||||
|
||||
DROP TABLE IF EXISTS `botguildmembers`;
|
||||
DROP TABLE IF EXISTS `botgroupmembers`;
|
||||
DROP TABLE IF EXISTS `botgroup`;
|
||||
DROP TABLE IF EXISTS `botpetinventory`;
|
||||
DROP TABLE IF EXISTS `botpetbuffs`;
|
||||
DROP TABLE IF EXISTS `botpets`;
|
||||
DROP TABLE IF EXISTS `botinventory`;
|
||||
DROP TABLE IF EXISTS `botbuffs`;
|
||||
DROP TABLE IF EXISTS `bottimers`;
|
||||
DROP TABLE IF EXISTS `botstances`;
|
||||
DROP TABLE IF EXISTS `bots`;
|
||||
|
||||
DROP TABLE IF EXISTS `botgroups`; -- this table is not a part of 'load_bots.sql'
|
||||
|
||||
DROP TABLE IF EXISTS `botguildmembers_old`;
|
||||
DROP TABLE IF EXISTS `botgroupmembers_old`;
|
||||
DROP TABLE IF EXISTS `botgroup_old`;
|
||||
DROP TABLE IF EXISTS `botpetinventory_old`;
|
||||
DROP TABLE IF EXISTS `botpetbuffs_old`;
|
||||
DROP TABLE IF EXISTS `botpets_old`;
|
||||
DROP TABLE IF EXISTS `botinventory_old`;
|
||||
DROP TABLE IF EXISTS `botbuffs_old`;
|
||||
DROP TABLE IF EXISTS `bottimers_old`;
|
||||
DROP TABLE IF EXISTS `botstances_old`;
|
||||
DROP TABLE IF EXISTS `bots_old`;
|
||||
|
||||
DROP TABLE IF EXISTS `bot_guild_members`;
|
||||
DROP TABLE IF EXISTS `bot_group_members`;
|
||||
DROP TABLE IF EXISTS `bot_groups`;
|
||||
DROP TABLE IF EXISTS `bot_pet_inventories`;
|
||||
DROP TABLE IF EXISTS `bot_pet_buffs`;
|
||||
DROP TABLE IF EXISTS `bot_pets`;
|
||||
DROP TABLE IF EXISTS `bot_inventories`;
|
||||
DROP TABLE IF EXISTS `bot_buffs`;
|
||||
DROP TABLE IF EXISTS `bot_timers`;
|
||||
DROP TABLE IF EXISTS `bot_stances`;
|
||||
DROP TABLE IF EXISTS `bot_inspect_messages`;
|
||||
DROP TABLE IF EXISTS `bot_data`;
|
||||
|
||||
DROP PROCEDURE IF EXISTS `LoadBotsSchema`;
|
||||
DROP PROCEDURE IF EXISTS `DropBotsSchema`;
|
||||
|
||||
|
||||
-- End of File
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES
|
||||
(1, 'Bots:CommandSpellRank', '1', 'Filters bot command spells by rank (1, 2 and 3 are valid filters - any other number allows all ranks)'),
|
||||
(1, 'Bots:HealRotationMaxMembers', '24', 'Maximum number of heal rotation members'),
|
||||
(1, 'Bots:HealRotationMaxTargets', '12', 'Maximum number of heal rotation targets'),
|
||||
(1, 'Bots:PreferNoManaCommandSpells', 'true', 'Give sorting priority to newer no-mana spells (i.e., \'Bind Affinity\')');
|
||||
@@ -1,102 +0,0 @@
|
||||
CREATE TABLE `bot_command_settings` (
|
||||
`bot_command` varchar(128) NOT NULL DEFAULT '',
|
||||
`access` int(11) NOT NULL DEFAULT '0',
|
||||
`aliases` varchar(256) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`bot_command`),
|
||||
UNIQUE KEY `UK_bot_command_settings_1` (`bot_command`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
INSERT INTO `bot_command_settings` VALUES
|
||||
('actionable', 0, ''),
|
||||
('aggressive', 0, 'agg'),
|
||||
('attack', 0, 'atk'),
|
||||
('bindaffinity', 0, 'bind'),
|
||||
('bot', 0, 'b'),
|
||||
('botappearance', 0, 'app|appearance'),
|
||||
('botbeardcolor', 0, 'bc|beardcolor'),
|
||||
('botbeardstyle', 0, 'bs|beardstyle'),
|
||||
('botcamp', 0, 'camp'),
|
||||
('botclone', 200, 'clone'),
|
||||
('botcreate', 0, 'create'),
|
||||
('botdelete', 0, 'delete'),
|
||||
('botdetails', 0, 'details'),
|
||||
('botdyearmor', 0, 'dyearmor'),
|
||||
('boteyes', 0, 'eyes'),
|
||||
('botface', 0, 'face'),
|
||||
('botfollowdistance', 0, 'followd'),
|
||||
('botgroup', 0, 'bg'),
|
||||
('botgroupaddmember', 0, 'bgadd'),
|
||||
('botgroupcreate', 0, 'bgcreate'),
|
||||
('botgroupdelete', 0, 'bgdelete'),
|
||||
('botgrouplist', 0, 'bglist'),
|
||||
('botgroupload', 0, 'bgload'),
|
||||
('botgroupremovemember', 0, 'bgremove'),
|
||||
('bothaircolor', 0, 'hc|haircolor'),
|
||||
('bothairstyle', 0, 'hs|hairstyle'),
|
||||
('botheritage', 0, 'her|heritage'),
|
||||
('botinspectmessage', 0, 'inspect'),
|
||||
('botlist', 0, 'list'),
|
||||
('botoutofcombat', 0, 'ooc|outofcombat'),
|
||||
('botreport', 0, 'report|health|mana'),
|
||||
('botspawn', 0, 'spawn'),
|
||||
('botstance', 0, 'stance'),
|
||||
('botsummon', 0, 'summon'),
|
||||
('bottattoo', 0, 'tattoo'),
|
||||
('bottogglearcher', 0, 'archer|togglearcher'),
|
||||
('bottogglehelm', 0, 'helm|togglehelm'),
|
||||
('botupdate', 0, 'update'),
|
||||
('botwoad', 0, 'woad'),
|
||||
('charm', 0, ''),
|
||||
('circle', 0, 'cir'),
|
||||
('cure', 0, ''),
|
||||
('defensive', 0, 'def'),
|
||||
('depart', 0, 'dep'),
|
||||
('escape', 0, 'evac|succor'),
|
||||
('findaliases', 0, 'alias'),
|
||||
('follow', 0, ''),
|
||||
('guard', 0, ''),
|
||||
('healrotation', 0, 'hr'),
|
||||
('healrotationadaptivetargeting', 0, 'hradapt'),
|
||||
('healrotationaddmember', 0, 'hraddm'),
|
||||
('healrotationaddtarget', 0, 'hraddt'),
|
||||
('healrotationadjustcritical', 0, 'hrcrit'),
|
||||
('healrotationadjustsafe', 0, 'hrsafe'),
|
||||
('healrotationcastingoverride', 0, 'hroverride'),
|
||||
('healrotationchangeinterval', 0, 'hrinterval'),
|
||||
('healrotationcleartargets', 0, 'hrclear'),
|
||||
('healrotationcreate', 0, 'hrcreate'),
|
||||
('healrotationfastheals', 0, 'hrfastheals'),
|
||||
('healrotationlist', 0, 'hrlist'),
|
||||
('healrotationremovemember', 0, 'hrremm'),
|
||||
('healrotationremovetarget', 0, 'hrremt'),
|
||||
('healrotationresetlimits', 0, 'hrreset'),
|
||||
('healrotationstart', 0, 'hrstart'),
|
||||
('healrotationstop', 0, 'hrstop'),
|
||||
('help', 0, '?'),
|
||||
('hold', 0, ''),
|
||||
('identify', 0, 'lore'),
|
||||
('inventory', 0, 'inv'),
|
||||
('inventorygive', 0, 'invgive'),
|
||||
('inventorylist', 0, 'invlist'),
|
||||
('inventoryremove', 0, 'invremove'),
|
||||
('invisibility', 0, 'invis'),
|
||||
('levitation', 0, 'lev'),
|
||||
('lull', 0, 'calm|pacify'),
|
||||
('mesmerize', 0, 'mez'),
|
||||
('movementspeed', 0, 'sow'),
|
||||
('pet', 0, 'p'),
|
||||
('petremove', 0, 'prem'),
|
||||
('petsettype', 0, 'pset'),
|
||||
('picklock', 0, 'pl'),
|
||||
('portal', 0, 'port'),
|
||||
('pull', 0, ''),
|
||||
('release', 0, ''),
|
||||
('resistance', 0, 'resist'),
|
||||
('resurrect', 0, 'revive'),
|
||||
('rune', 0, ''),
|
||||
('sendhome', 0, 'gate'),
|
||||
('size', 0, ''),
|
||||
('summoncorpse', 0, 'scorpse'),
|
||||
('taunt', 0, ''),
|
||||
('track', 0, ''),
|
||||
('waterbreathing', 0, 'wb|eb');
|
||||
@@ -1 +0,0 @@
|
||||
ALTER TABLE `bot_pets` CHANGE COLUMN `pet_id` `spell_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `pets_index`;
|
||||
@@ -1,3 +0,0 @@
|
||||
INSERT INTO `bot_command_settings` VALUES
|
||||
('healrotationclearhot', 0, 'hrclearhot'),
|
||||
('healrotationsethot', 0, 'hrsethot');
|
||||
@@ -1,41 +0,0 @@
|
||||
CREATE TABLE `bot_heal_rotations` (
|
||||
`heal_rotation_index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`bot_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`interval` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`fast_heals` INT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`adaptive_targeting` INT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`casting_override` INT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`safe_hp_base` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`safe_hp_cloth` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`safe_hp_leather` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`safe_hp_chain` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`safe_hp_plate` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`critical_hp_base` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`critical_hp_cloth` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`critical_hp_leather` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`critical_hp_chain` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`critical_hp_plate` FLOAT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`heal_rotation_index`),
|
||||
CONSTRAINT `FK_bot_heal_rotations` FOREIGN KEY (`bot_id`) REFERENCES `bot_data` (`bot_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `bot_heal_rotation_members` (
|
||||
`member_index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`heal_rotation_index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`bot_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`member_index`),
|
||||
CONSTRAINT `FK_bot_heal_rotation_members_1` FOREIGN KEY (`heal_rotation_index`) REFERENCES `bot_heal_rotations` (`heal_rotation_index`),
|
||||
CONSTRAINT `FK_bot_heal_rotation_members_2` FOREIGN KEY (`bot_id`) REFERENCES `bot_data` (`bot_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `bot_heal_rotation_targets` (
|
||||
`target_index` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`heal_rotation_index` INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`target_name` varchar(64) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`target_index`),
|
||||
CONSTRAINT `FK_bot_heal_rotation_targets` FOREIGN KEY (`heal_rotation_index`) REFERENCES `bot_heal_rotations` (`heal_rotation_index`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
INSERT INTO `bot_command_settings` VALUES
|
||||
('healrotationdelete', 0, 'hrdelete'),
|
||||
('healrotationsave', 0, 'hrsave');
|
||||
@@ -1,2 +0,0 @@
|
||||
INSERT INTO `bot_command_settings` VALUES
|
||||
('inventorywindow', 0, 'invwindow');
|
||||
@@ -1,2 +0,0 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES
|
||||
(1, 'Bots:AllowCamelCaseNames', 'false', 'Allows the use of \'MyBot\' type names');
|
||||
@@ -1 +0,0 @@
|
||||
ALTER TABLE `bot_inventories` MODIFY COLUMN `inst_charges` SMALLINT(3) UNSIGNED NULL DEFAULT '0';
|
||||
@@ -1,29 +0,0 @@
|
||||
-- Delete any existing `bots_spells_entries` table
|
||||
DROP TABLE IF EXISTS `bots_spells_entries`;
|
||||
|
||||
-- Create new bot spells entries table (new table does not have spells_id_spellid constraint)
|
||||
CREATE TABLE `bot_spells_entries` (
|
||||
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`npc_spells_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`spellid` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`type` INT(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`minlevel` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`maxlevel` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255',
|
||||
`manacost` SMALLINT(5) NOT NULL DEFAULT '-1',
|
||||
`recast_delay` INT(11) NOT NULL DEFAULT '-1',
|
||||
`priority` SMALLINT(5) NOT NULL DEFAULT '0',
|
||||
`resist_adjust` INT(11) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
COLLATE='latin1_swedish_ci'
|
||||
ENGINE=InnoDB
|
||||
AUTO_INCREMENT=1
|
||||
;
|
||||
|
||||
-- Copy bots spells into new table
|
||||
INSERT INTO `bot_spells_entries` (`npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`, `resist_adjust`)
|
||||
SELECT `npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`, `resist_adjust`
|
||||
FROM `npc_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712';
|
||||
|
||||
-- Delete bot spells from old table
|
||||
DELETE FROM `npc_spells_entries` WHERE `npc_spells_id` >= '701' AND `npc_spells_id` <= '712';
|
||||
@@ -1,153 +0,0 @@
|
||||
DELETE FROM `bot_spells_entries` WHERE `npc_spells_id` = '711';
|
||||
|
||||
INSERT INTO `bot_spells_entries`(`npc_spells_id`,`spellid`,`type`,`minlevel`,`maxlevel`,`manacost`,`recast_delay`,`priority`,`resist_adjust`) VALUES
|
||||
|
||||
-- versioning entry
|
||||
('711', '0', '4294901760', '0', '0', '-1', '-1', '0', NULL), -- 0xFFFF0000
|
||||
|
||||
-- nuke
|
||||
('711', '704', '1', '12', '54', '-1', '-1', '1', NULL),
|
||||
('711', '1747', '1', '55', '127', '-1', '-1', '1', NULL),
|
||||
|
||||
-- escape
|
||||
('711', '1749', '16', '60', '127', '-1', '-1', '1', NULL),
|
||||
|
||||
-- dot
|
||||
('711', '743', '256', '38', '64', '-1', '-1', '1', NULL),
|
||||
('711', '3367', '256', '65', '69', '-1', '-1', '1', NULL),
|
||||
('711', '5385', '256', '70', '79', '-1', '-1', '1', NULL),
|
||||
('711', '14074', '256', '80', '84', '-1', '-1', '1', NULL),
|
||||
('711', '18059', '256', '85', '89', '-1', '-1', '1', NULL),
|
||||
('711', '26084', '256', '90', '94', '-1', '-1', '1', NULL),
|
||||
('711', '29182', '256', '95', '127', '-1', '-1', '1', NULL),
|
||||
('711', '3566', '256', '50', '62', '-1', '-1', '2', NULL),
|
||||
('711', '3370', '256', '63', '67', '-1', '-1', '2', NULL),
|
||||
('711', '5378', '256', '68', '77', '-1', '-1', '2', NULL),
|
||||
('711', '14071', '256', '78', '82', '-1', '-1', '2', NULL),
|
||||
('711', '18056', '256', '83', '87', '-1', '-1', '2', NULL),
|
||||
('711', '26033', '256', '88', '92', '-1', '-1', '2', NULL),
|
||||
('711', '29128', '256', '93', '127', '-1', '-1', '2', NULL),
|
||||
('711', '744', '256', '46', '62', '-1', '-1', '3', NULL),
|
||||
('711', '3373', '256', '63', '66', '-1', '-1', '3', NULL),
|
||||
('711', '5379', '256', '67', '76', '-1', '-1', '3', NULL),
|
||||
('711', '14068', '256', '77', '81', '-1', '-1', '3', NULL),
|
||||
('711', '18053', '256', '82', '86', '-1', '-1', '3', NULL),
|
||||
('711', '26003', '256', '87', '91', '-1', '-1', '3', NULL),
|
||||
('711', '29101', '256', '92', '127', '-1', '-1', '3', NULL),
|
||||
('711', '3567', '256', '42', '60', '-1', '-1', '4', NULL),
|
||||
('711', '3363', '256', '61', '65', '-1', '-1', '4', NULL),
|
||||
('711', '5371', '256', '66', '75', '-1', '-1', '4', NULL),
|
||||
('711', '14065', '256', '76', '80', '-1', '-1', '4', NULL),
|
||||
('711', '18050', '256', '81', '85', '-1', '-1', '4', NULL),
|
||||
('711', '25976', '256', '86', '90', '-1', '-1', '4', NULL),
|
||||
('711', '29077', '256', '91', '127', '-1', '-1', '4', NULL),
|
||||
('711', '707', '256', '30', '59', '-1', '-1', '5', NULL),
|
||||
('711', '4210', '256', '60', '127', '-1', '-1', '5', NULL),
|
||||
|
||||
-- slow
|
||||
('711', '738', '8192', '23', '50', '-1', '-1', '1', NULL),
|
||||
('711', '1751', '8192', '51', '59', '-1', '-1', '1', NULL),
|
||||
('711', '1748', '8192', '60', '63', '-1', '-1', '1', NULL),
|
||||
('711', '3066', '8192', '64', '127', '-1', '-1', '1', NULL),
|
||||
('711', '738', '8192', '51', '63', '-1', '-1', '2', NULL),
|
||||
('711', '1751', '8192', '64', '127', '-1', '-1', '2', NULL),
|
||||
('711', '738', '8192', '64', '127', '-1', '-1', '3', NULL),
|
||||
|
||||
-- cure
|
||||
('711', '3682', '32768', '45', '85', '-1', '-1', '1', NULL),
|
||||
('711', '25958', '32768', '86', '90', '-1', '-1', '1', NULL),
|
||||
('711', '29059', '32768', '91', '127', '-1', '-1', '1', NULL),
|
||||
('711', '3681', '32768', '52', '127', '-1', '-1', '2', NULL),
|
||||
('711', '10448', '32768', '74', '78', '-1', '-1', '3', NULL),
|
||||
('711', '14029', '32768', '79', '83', '-1', '-1', '3', NULL),
|
||||
('711', '18023', '32768', '84', '127', '-1', '-1', '3', NULL),
|
||||
|
||||
-- hate redux
|
||||
('711', '1754', '131072', '53', '127', '-1', '-1', '1', NULL),
|
||||
('711', '10436', '131072', '73', '127', '-1', '-1', '2', NULL),
|
||||
|
||||
-- in-combat buff songs
|
||||
('711', '2606', '262144', '52', '59', '-1', '-1', '1', NULL),
|
||||
('711', '2610', '262144', '60', '127', '-1', '-1', '1', NULL),
|
||||
('711', '700', '262144', '1', '9', '-1', '-1', '2', NULL),
|
||||
('711', '701', '262144', '10', '35', '-1', '-1', '2', NULL),
|
||||
('711', '740', '262144', '36', '41', '-1', '-1', '2', NULL),
|
||||
('711', '702', '262144', '42', '49', '-1', '-1', '2', NULL),
|
||||
('711', '747', '262144', '50', '61', '-1', '-1', '2', NULL),
|
||||
('711', '3374', '262144', '62', '64', '-1', '-1', '2', NULL),
|
||||
('711', '4871', '262144', '65', '67', '-1', '-1', '2', NULL),
|
||||
('711', '5376', '262144', '68', '78', '-1', '-1', '2', NULL),
|
||||
('711', '14080', '262144', '79', '83', '-1', '-1', '2', NULL),
|
||||
('711', '18065', '262144', '84', '88', '-1', '-1', '2', NULL),
|
||||
('711', '26042', '262144', '89', '93', '-1', '-1', '2', NULL),
|
||||
('711', '29143', '262144', '94', '127', '-1', '-1', '2', NULL),
|
||||
('711', '7', '262144', '6', '19', '-1', '-1', '2', NULL),
|
||||
('711', '1287', '262144', '20', '31', '-1', '-1', '3', NULL),
|
||||
('711', '723', '262144', '32', '33', '-1', '-1', '3', NULL),
|
||||
('711', '1448', '262144', '34', '54', '-1', '-1', '3', NULL),
|
||||
('711', '1759', '262144', '55', '61', '-1', '-1', '3', NULL),
|
||||
('711', '3651', '262144', '62', '66', '-1', '-1', '3', NULL),
|
||||
('711', '5377', '262144', '67', '70', '-1', '-1', '3', NULL),
|
||||
('711', '10421', '262144', '71', '75', '-1', '-1', '3', NULL),
|
||||
('711', '14008', '262144', '76', '80', '-1', '-1', '3', NULL),
|
||||
('711', '18008', '262144', '81', '87', '-1', '-1', '3', NULL),
|
||||
('711', '26015', '262144', '88', '92', '-1', '-1', '3', NULL),
|
||||
('711', '29107', '262144', '93', '127', '-1', '-1', '3', NULL),
|
||||
('711', '734', '262144', '7', '8', '-1', '-1', '4', NULL),
|
||||
('711', '710', '262144', '9', '12', '-1', '-1', '4', NULL),
|
||||
('711', '711', '262144', '13', '16', '-1', '-1', '4', NULL),
|
||||
('711', '709', '262144', '17', '40', '-1', '-1', '4', NULL),
|
||||
('711', '714', '262144', '41', '46', '-1', '-1', '4', NULL),
|
||||
('711', '748', '262144', '47', '57', '-1', '-1', '4', NULL),
|
||||
('711', '1763', '262144', '58', '72', '-1', '-1', '4', NULL),
|
||||
('711', '11881', '262144', '73', '77', '-1', '-1', '4', NULL),
|
||||
('711', '14056', '262144', '78', '82', '-1', '-1', '4', NULL),
|
||||
('711', '18041', '262144', '83', '87', '-1', '-1', '4', NULL),
|
||||
('711', '26027', '262144', '88', '92', '-1', '-1', '4', NULL),
|
||||
('711', '29122', '262144', '93', '127', '-1', '-1', '4', NULL),
|
||||
('711', '734', '262144', '9', '24', '-1', '-1', '5', NULL),
|
||||
('711', '712', '262144', '25', '28', '-1', '-1', '5', NULL),
|
||||
('711', '715', '262144', '29', '32', '-1', '-1', '5', NULL),
|
||||
('711', '713', '262144', '33', '36', '-1', '-1', '5', NULL),
|
||||
('711', '716', '262144', '37', '44', '-1', '-1', '5', NULL),
|
||||
('711', '4083', '262144', '45', '52', '-1', '-1', '5', NULL),
|
||||
('711', '4084', '262144', '53', '63', '-1', '-1', '5', NULL),
|
||||
('711', '3362', '262144', '64', '64', '-1', '-1', '5', NULL),
|
||||
('711', '4872', '262144', '65', '68', '-1', '-1', '5', NULL),
|
||||
('711', '5382', '262144', '69', '75', '-1', '-1', '5', NULL),
|
||||
('711', '14062', '262144', '76', '80', '-1', '-1', '5', NULL),
|
||||
('711', '18047', '262144', '81', '85', '-1', '-1', '5', NULL),
|
||||
('711', '25961', '262144', '86', '90', '-1', '-1', '5', NULL),
|
||||
('711', '29062', '262144', '91', '127', '-1', '-1', '5', NULL),
|
||||
('711', '734', '262144', '25', '43', '-1', '-1', '6', NULL),
|
||||
('711', '4085', '262144', '44', '51', '-1', '-1', '6', NULL),
|
||||
('711', '4086', '262144', '52', '62', '-1', '-1', '6', NULL),
|
||||
('711', '4087', '262144', '63', '68', '-1', '-1', '6', NULL),
|
||||
('711', '5374', '262144', '69', '71', '-1', '-1', '6', NULL),
|
||||
('711', '10439', '262144', '72', '76', '-1', '-1', '6', NULL),
|
||||
('711', '14020', '262144', '77', '81', '-1', '-1', '6', NULL),
|
||||
('711', '18014', '262144', '82', '86', '-1', '-1', '6', NULL),
|
||||
('711', '25991', '262144', '87', '127', '-1', '-1', '6', NULL),
|
||||
('711', '734', '262144', '30', '82', '-1', '-1', '7', NULL),
|
||||
('711', '18020', '262144', '83', '127', '-1', '-1', '7', NULL),
|
||||
('711', '734', '262144', '83', '127', '-1', '-1', '8', NULL),
|
||||
('711', '2603', '262144', '30', '127', '-1', '-1', '9', NULL),
|
||||
|
||||
-- out-of-combat buff songs
|
||||
('711', '7', '524288', '6', '19', '-1', '-1', '1', NULL),
|
||||
('711', '1287', '524288', '20', '31', '-1', '-1', '1', NULL),
|
||||
('711', '723', '524288', '32', '33', '-1', '-1', '1', NULL),
|
||||
('711', '1448', '524288', '34', '54', '-1', '-1', '1', NULL),
|
||||
('711', '1759', '524288', '55', '61', '-1', '-1', '1', NULL),
|
||||
('711', '3651', '524288', '62', '66', '-1', '-1', '1', NULL),
|
||||
('711', '5377', '524288', '67', '70', '-1', '-1', '1', NULL),
|
||||
('711', '10421', '524288', '71', '75', '-1', '-1', '1', NULL),
|
||||
('711', '14008', '524288', '76', '80', '-1', '-1', '1', NULL),
|
||||
('711', '18008', '524288', '81', '87', '-1', '-1', '1', NULL),
|
||||
('711', '26015', '524288', '88', '92', '-1', '-1', '1', NULL),
|
||||
('711', '29107', '524288', '93', '127', '-1', '-1', '1', NULL),
|
||||
('711', '717', '524288', '5', '29', '-1', '-1','2', NULL),
|
||||
('711', '2603', '524288', '30', '127', '-1', '-1','2', NULL),
|
||||
('711', '717', '524288', '30', '48', '-1', '-1','3', NULL),
|
||||
('711', '2605', '524288', '49', '127', '-1', '-1','3', NULL),
|
||||
('711', '2602', '524288', '15', '127', '-1', '-1','4', NULL);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
||||
-- Re-ordered entries according to actual class values and added melee types (for future expansion)
|
||||
DELETE FROM `npc_spells` WHERE `id` >= '701' AND `id` <= '712';
|
||||
|
||||
INSERT INTO `npc_spells` VALUES (3001, 'Warrior Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3002, 'Cleric Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3003, 'Paladin Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3004, 'Ranger Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3005, 'Shadowknight Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3006, 'Druid Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3007, 'Monk Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3008, 'Bard Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3009, 'Rogue Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3010, 'Shaman Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3011, 'Necromancer Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3012, 'Wizard Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3013, 'Magician Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3014, 'Enchanter Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3015, 'Beastlord Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
INSERT INTO `npc_spells` VALUES (3016, 'Berserker Bot', 0, -1, 3, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
File diff suppressed because it is too large
Load Diff
-13
@@ -1,13 +0,0 @@
|
||||
-- Update npc_spells_id to new values
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3002' WHERE `npc_spells_id` = '701';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3012' WHERE `npc_spells_id` = '702';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3011' WHERE `npc_spells_id` = '703';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3013' WHERE `npc_spells_id` = '704';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3014' WHERE `npc_spells_id` = '705';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3010' WHERE `npc_spells_id` = '706';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3006' WHERE `npc_spells_id` = '707';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3003' WHERE `npc_spells_id` = '708';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3005' WHERE `npc_spells_id` = '709';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3004' WHERE `npc_spells_id` = '710';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3008' WHERE `npc_spells_id` = '711';
|
||||
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3015' WHERE `npc_spells_id` = '712';
|
||||
@@ -1,17 +0,0 @@
|
||||
-- Update spells_id to new values
|
||||
UPDATE `bot_data` SET `spells_id` = '3001' WHERE `class` = '1';
|
||||
UPDATE `bot_data` SET `spells_id` = '3002' WHERE `class` = '2';
|
||||
UPDATE `bot_data` SET `spells_id` = '3003' WHERE `class` = '3';
|
||||
UPDATE `bot_data` SET `spells_id` = '3004' WHERE `class` = '4';
|
||||
UPDATE `bot_data` SET `spells_id` = '3005' WHERE `class` = '5';
|
||||
UPDATE `bot_data` SET `spells_id` = '3006' WHERE `class` = '6';
|
||||
UPDATE `bot_data` SET `spells_id` = '3007' WHERE `class` = '7';
|
||||
UPDATE `bot_data` SET `spells_id` = '3008' WHERE `class` = '8';
|
||||
UPDATE `bot_data` SET `spells_id` = '3009' WHERE `class` = '9';
|
||||
UPDATE `bot_data` SET `spells_id` = '3010' WHERE `class` = '10';
|
||||
UPDATE `bot_data` SET `spells_id` = '3011' WHERE `class` = '11';
|
||||
UPDATE `bot_data` SET `spells_id` = '3012' WHERE `class` = '12';
|
||||
UPDATE `bot_data` SET `spells_id` = '3013' WHERE `class` = '13';
|
||||
UPDATE `bot_data` SET `spells_id` = '3014' WHERE `class` = '14';
|
||||
UPDATE `bot_data` SET `spells_id` = '3015' WHERE `class` = '15';
|
||||
UPDATE `bot_data` SET `spells_id` = '3016' WHERE `class` = '16';
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
-- Fix spells_id for existing Shadowknight entries
|
||||
UPDATE `bot_data` SET `spells_id` = '3005' WHERE `class` = '5';
|
||||
@@ -1,2 +0,0 @@
|
||||
ALTER TABLE `bot_spells_entries` ADD `min_hp` SMALLINT(5) DEFAULT '0';
|
||||
ALTER TABLE `bot_spells_entries` ADD `max_hp` SMALLINT(5) DEFAULT '0';
|
||||
@@ -1,8 +0,0 @@
|
||||
ALTER TABLE `bot_data` ADD COLUMN `stop_melee_level` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255' AFTER `follow_distance`;
|
||||
|
||||
INSERT INTO `bot_command_settings`(`bot_command`, `access`, `aliases`) VALUES ('botstopmeleelevel', '0', 'sml');
|
||||
|
||||
SELECT @csml_raw := (SELECT `rule_value` FROM `rule_values` WHERE `rule_name` LIKE 'Bots:CasterStopMeleeLevel' LIMIT 1);
|
||||
SELECT @csml_value := IF((SELECT @csml_raw REGEXP '^[0-9]+$') = '1', @csml_raw, '13');
|
||||
|
||||
UPDATE `bot_data` SET `stop_melee_level` = @csml_value WHERE `class` IN ('2', '6', '10', '11', '12', '13', '14');
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user