Commit graph

72 commits

Author SHA1 Message Date
Ty Conner
66d3b98339
Add options for database logging (#4352) 2025-08-23 13:32:35 -04:00
Galli
ecd6ce2b43
Remove UTF-8 BOMs across repository (#4324)
* remove bom from source files

* Remove stray BOM cleanup comments
2025-06-22 15:33:36 -04:00
Ty Conner
74cce13847
Cache ServerVersion.AutoDetect (#4256)
* Cache ServerVersion.AutoDetect

Adjusted database connections so that they cache ServerVersion.AutoDetect result on first hit and reuse.

This resolves a current bug that exhausts or times out connections to database.

* Change to dictionary

* Update Source/ACE.Database/DatabaseManager.cs

Co-authored-by: gmriggs <gmriggs@gmail.com>

* Update DatabaseManager.cs

* Update DatabaseManager.cs

---------

Co-authored-by: gmriggs <gmriggs@gmail.com>
2024-12-18 12:17:00 -05:00
Mag-nus
31d4437baf
Efnet8 (#4182)
* Update packages and notes

* Update package

* Scaffold
2024-07-17 00:03:33 -04:00
Ty Conner
9a13f7ff9e
Adjust connection options for SQL servers (#4027)
Refactored to a non-user configurable string reference, shared across all connection paths

Added AllowUserVariables=True to fix bug introduced as a result of switching to MySqlConnector
2023-07-20 02:05:18 -04:00
Ty Conner
00b14af0e2
Add AllowPublicKeyRetrieval to SQL connections (#3871) 2022-07-04 13:04:05 -04:00
Ty Conner
71cc24f3ec
Add SslMode to SQL connection strings (#3863)
* Update AuthDbContext.cs

* Update ShardDbContext.cs

* Update WorldDbContext.cs

* Update Program_DbUpdates.cs
2022-07-02 12:13:37 -04:00
Mag-nus
d0b75cc69a
Update EF Nuget Packages (#3750)
* Update EF Nuget Packages

This requires ACE.Adapter and ACE.Database to be updated from .net standard 2.0 to 2.1

* Update ACE.Database.csproj

* fix merge
2021-12-01 10:13:52 -06:00
ziang4891
07339654dc
Magic refactor (#3703)
* Start of magic refactor

* Add missed DB update file

* Split out SpellType primitives

* Revert DB column name change

* Fix bug

* gmriggs changes

* gmriggs changes.part2

* Minor tweak

* Proficiency correction

* remove unneeded uint damage

* more consolidation

* refactor for EnchantmentStatus-PlayScript

* add missing return statements for WeenieError.OlthoiCanOnlyRecallToLifestone

* .

* additional-cleanup-for-target-acquisition
2021-11-07 08:10:05 -05:00
Ty Conner
880c031102
Update SQL Writer output (#3694)
* Update SQL Writer output

* Update SQLWriter.cs

* Add PacketOpCodeNames

* Update PropertyInt.cs

* Update PropertyInt.cs
2021-10-18 21:33:27 -04:00
Mag-nus
43c9300b10
.NET Entity Framework Core 3.1 support (attempt #2) (#3356)
* packages updated, fix compiler errors/warnings

* scaffold

* fix ShardDatabaseOfflineTools

* WorldDatabase fix performance

* ShardDatabase fix GetCharacters

* move comment

stuff

* extend UseMySQL statements

* fix character creation linq parsing

* fix exception

* fix references
2020-12-07 20:59:40 -06:00
Mag-nus
d052089247
Misc Database Improvements/Cleanup (#3357)
* Add Resilient connections

* remove some comments

* Tracking Improvements

* Spelling fix

* Create global.json

Co-authored-by: Ty Conner <tyconner@itcproductions.com>
2020-11-15 13:07:15 -06:00
gmriggs
e327049005
adding chance tables for gem count (#3199)
* add scaffolding

* adding chance tables for gem count

* update scaffolding

* update var names

* moving treasure-gem-count.sql test file to WorldBase and 16PY-patches
2020-09-10 08:03:01 -04:00
Mag-nus
c085564e34
EnableSensitiveDataLogging for shard and world (#2916)
* EnableSensitiveDataLogging for shard and world

* Add missing .GetFullMessage()
2020-04-16 08:29:29 -05:00
Mag-nus
c1d480a01a
Step 2. Convert WorldDatabase Weenie Cache from the ACE.Database model to the new ACE.Entity model (#2702)
* Step 1. Add new adapter classes and models

All classes and objects added are in new namespaces.

This add has 0 interraction on existing ACE code.

This sets the groundwork for Step 2. Moving World DB caching to the new models

* first part of the world entity usage

* almost there

* final part

* update WeenieExtensions

* fix

* merge fixes and improvements

* More code ported from Step 3

* Update WorldDatabaseWithEntityCache.cs

* GetCachedCookbooks(recpieId) -> GetCookbooksByRecipeId(recpieId)

* build fix

* changelog
2020-03-02 08:03:50 -06:00
harliq
0f89aa5bdf Caster update (#2451)
* LootGen

* lootgen command

* Updated LootGenTest

* Updated LootGen Droprates to better align with retail droprates.  Fixes droprates in clothing

* re-adding shard base

* Fixed & to &&

* Adding Class TestLootGenerationFactory

* Added more stats for weapons in Test Loot Gen
If tier is between 4-6 then a chance for non elemental missile weapon.  HarliQ 11/17/19
Tier 6 and up, Only elemental missile weapons are supposed to drop per retail. HarliQ 11/17/19
Added 10% varaiance for Damage Modifier.  Full Modifier was rare in retail
Added +19 Elemental (like retail) and readjusted odds (odds are approximate, no hard data).  HarliQ 11/17/19
Made MeleeDefenseMod appropiate to Bow Reqs.  Data is supports 375 wields should go upto +20, however I left them at +18 for now
Added Class for finding Epics

* CodeCleanup from StyleCop

* Changed name of function for getting MeleeD, removed TestLootGenerationFactory.cs (no need for it now, and may change the way I was going to do it).

* Added melee upto +20 for 375 missile weapons and added 385 to meleeD table

* Found Bug with 315 req weapon not getting elemental damage sometimes.  Corrected by changing to wield req and not tier.  Also changed ratio for wield drops in tiers. MinReq=30%, MidReq=50%, MaxReq=20%. I may change this once I get more data from Magnus, to reflect the exact ratio from retail

* TestLootGen stats updated, refactoring CreateCaster, added Missile/Magic D bonuses

* updates

* refactoring create caster

* Finalized Code, Added Value to TestLootGen

* StyleCop adustments

* Moved TestLootGen to new Class, moved commands to its own class.

* Removed Partial from ConsoleCommands (forgot to put that back)

* Changes requested by Ripley and gmriggs
2019-12-01 19:47:08 -05:00
Ty Conner
de6019fe31
Minor coinstack / PreCheckItem refactor (#2218)
* Minor coinstack / PreCheckItem refactor

* IsContainer -> RequiresBackPackSlot

* IsContainer -> RequiresBackpackSlot

* RequiresBackpackSlot -> RequiresBackpackSlotOrIsContainer
2019-08-11 23:44:21 -05:00
Ty Conner
0c24b2090e
Add support for version command response (#2085) 2019-07-08 11:49:08 -05:00
Ty Conner
ec268b8f01
Add type_value_idx to BiotaPropertiesIID table and Rescaffold (#1933)
* Add type_value_combined to BiotaPropertiesIID table

* Update Scaffolding

* Correct for scaffolding changes

* Update 2019-05-23-00-Update_Biota_IID_Table.sql

* Update 2019-05-23-00-Update_Biota_IID_Table.sql

* Update 2019-05-23-00-Update_Biota_IID_Table.sql

* Remove Generated column, add index
2019-05-24 01:13:30 -05:00
OptimShi
a9536aecc9 Loot colors (#1775)
* Random Colors in Loot

* WIP with TreasureMaterialColor usage.

* WIP

* More WIP

* Added Material Tables, debug command for testing

* Updated treasure tables for consistent int/uint usage. Added required SQL.

* Set the lootgeneration items to use the new GetMaterial function

* Update changelog

* Removed data from new tables.

* Update changelog.md

* Update 2019-04-20-00-Treasure-Materials.sql

* Update README.md

* Update changelog.md

* Changed lootgen() access level to developer

* Fixed null material type crashing the value function in loot gen
2019-04-21 03:01:12 -04:00
Ty Conner
317e8f9e1b Revert "Loot Colors (#1769)" (#1771)
This reverts commit 5acf14c787.
2019-04-20 19:54:52 -04:00
OptimShi
5acf14c787 Loot Colors (#1769)
* Random Colors in Loot

* WIP with TreasureMaterialColor usage.

* WIP

* More WIP

* Added Material Tables, debug command for testing

* Updated treasure tables for consistent int/uint usage. Added required SQL.

* Set the lootgeneration items to use the new GetMaterial function

* Update changelog

* Removed data from new tables.

* Update changelog.md

* Update 2019-04-20-00-Treasure-Materials.sql

* Update README.md

* Update changelog.md

* Changed lootgen() access level to developer
2019-04-20 18:17:28 -04:00
Ty Conner
f9ee96a5c1
Fix Recipe Issue (#1721)
* Fix minor issue with scrolls

* Fix scoping issue with Recipe Requirements and Mods

* Update changelog and readme
2019-04-13 15:07:09 -05:00
gmriggs
abe9340bca
Adding alternate currency for vendors (#1575)
* Adding alternate currency for vendors

* minor update

* updating Pluralize()
2019-03-28 00:26:25 -04:00
Ty Conner
bd5d7fc32d
Add LastModified to things (#1410)
* Add LastModified to things

* Create db-pr-override.txt

* Update changelog.md

* Update README.md
2019-02-04 11:55:13 -06:00
Mag-nus
616feed958
Assembly changes (#1369)
* Change child assemblies to AnyCPU. Ace.Server still x64

* Fix LifestonedConverter for > ushort.MaxValue weenies

* Allow DbContexts to be configured/used by other applications

* Make GetWeenie public

* SQLWriters should take IDictionary, not Dictionary

* Include links

* Keep tests as x64
2019-01-26 10:09:13 -06:00
Ty Conner
3dbf792591
Add and use DotDuration in Spells (#1331)
* Add DotDuration to Spell table

* Rename Emote Table script slightly

* Change to Double

* Update Duration to use DotDuration if it has a value

* Add DotDuration to SQL Writer
2019-01-20 22:15:12 -06:00
Ty Conner
350edddcf6
World DB Changes (#1295)
* Minor PCAP commenting fix

* Remove Duplicated Data from Spell Table

* Update MySqlInstall.bat

* Update Recipe Mods table column Unknown1 to Source

* Update SpellProperties.cs

* Add spell-export

* cleanup

* Update code

* delete spell-export

* remove data that was redunant from dat

* Update CreateList and Generator labels

* Change Emote.Display to Bool

* Change Emote.Display to Bool

* Fix script

* update changelog

* Add some null checks

* More null check

* syntax error

* cleanup

* more cleanup

* Create db-pr-override.txt
2019-01-19 19:55:26 -06:00
Ty Conner
e813990318
Change Enchantment Registry to use a composite key (#1202)
* Change Enchantment Registry to use composite key instead of a primary key id column

* Add a few indexes

* Remove indexes added in #1206

* Rescaffold

* Switch EnableSensitiveDataLogging in AuthDbContext to a specific EFAUTHDEBUG variable

* Update changelog.md
2019-01-03 10:53:29 -06:00
gmriggs
68c3d439d9
Improving recipe manager, adding tinkering and imbues to crafting system (#1184)
* prototyping tinkering / imbues

* Appending /buff with Arcanum Salvaging

* Removing debug messages

* Adding recipe requirements type checking system

* Refactoring old code

* Adding mod types

* re-org material types by skill

* update linen

* adding return

* Adding icon underlays from @dgatewood

* network sending icon updates

* adjusting icons

* Reverting Source back to Unknown1

* Fixing attuned and retained

* .
2018-12-30 17:47:40 -05:00
gmriggs
17cd82e1e8
Adding summoning from @mcreedjr (#1117)
* WIP and bad WIP at that. Just transferring work from one computing device to another.

* Initial summoning functionality

* Remove debugging line

* Implement 45 second duration and remove unneeded monster spell casting dependency

* Add comment containing PCAP file providing good examples and first pass at implementing cool down timer enchantment

* Fix merge lint

* Add summoning features back in that were removed.

* Cleanup

* Bringing up-to-date with latest build

* Latest WIP build

* Moving SQL to ACE-World-16PY-Patches

* Adding some aggro methods

* Latest build / refactoring

* Adding skill usage requirements

* Adding combat pets drawing aggro

* Adding elemental damage types

* Adding message for summoning installation

* Some minor adjustments

* Cleanup

* Fixing callchain for SetEphemeralValues
2018-12-15 00:55:52 -05:00
gmriggs
ecf829d08b Refactored generators, improved RNG selection formula (#1041)
* Refactored generators, improved RNG selection formula

* Removing calls to PerfTimer

* .

* Fixing AL/RL display in character info panel

* Fixing issue with MaxCreate

* Adding check for GeneratorDisabled status, cleaning up EventManager

* Removing int cast for latest version of DB
2018-10-03 15:01:59 -04:00
Ty Conner
eac0370646
Fix Generator Ints (#1042)
* Add SQL update scripts

* Update Shard and World base scripts

* Update Shard Scaffolding

* Update World database Scaffolding
2018-10-02 21:34:58 -04:00
gmriggs
43d1373568
Adding Void magic (#1028)
* Adding Void magic

* Mapping BaseRangeConstant to SpellBase

* Fixing DoTs to only use the top layer enchantments

* Added limiter for switching between war and void magic
2018-09-28 03:55:32 -04:00
Mag-nus
47f89f18d6 Remove unused index
We never used any of these in ACE, so we don't need the database to keep track of them for us.
2018-08-06 01:28:24 -05:00
Mag-nus
c079bf0fd0 Treasure Death/Wielded column names updated (Thanks GDLE) 2018-08-06 00:16:28 -05:00
Mag-nus
478e891aa3 PropertiesSkill AdjustPP removed
In the cache.bin, this is probably a bool. It is 1 for every instance found.

If/When we understand what this flag might have meant, we can re-add. However, given that it was always true in cache.bin, that is unlikely.

Furthermore, in GDLE, this bit was always set to 1 on write, and always masked off on read.
2018-08-05 23:27:06 -05:00
Mag-nus
15c9c6f8a3 Redunent keys for foreign keys removed
keys will automatically be created for columns that reference foreign keys.

We do not need to manually define them as well.
2018-08-05 12:40:34 -05:00
Mag-nus
e9db9ab530 Defaults removed for native type default values
If an int/float had a default of '0', it was removed.
If a nullable had adefault of NULL, it was removed.

This isn't needed for EF.
This cleans up the SQL.
This also helps make sure our sql writers are generating the full INSERT query to recreate a record.
2018-08-05 12:24:43 -05:00
Mag-nus
7feffeedcc Spell table columns Id and SpellId merged into Id
There are no need for duplicate unique id's. The Spell Id is already gauranteed to be unique
2018-08-05 08:54:42 -05:00
Mag-nus
004d7d4f19 LandblockInstance refactored. DYNAMIC SUPPORT REMOVED
Columns id and guid have been combined into a single guid column.

This requires that every landblock instance be provided with a valid unique guid.

In the old code, you could provide an instance that would have an auto generated id (column) and a guid of 0. ACE would then see the guid is 0 and would use the following:
GuidManager.NewDynamicGuid();

In the cache.bin, every landblock instance has a unique id.

If we need to add the ability to have dynamically guid'd landblockinstances, this is an easy thing to add back.
2018-08-05 07:30:14 -05:00
Mag-nus
33ef2f2e7c Rename landblock_instances to landblock_instance
This follows the singular naming convention we are using for the other tables
2018-08-04 14:24:52 -05:00
Mag-nus
ab980c21b5 Didn't have the latest scaffold for worlddbcontet from previous checkin 2018-08-04 09:43:58 -05:00
Mag-nus
005fd2339a EmoteActions are now childeren of Emote 2018-08-04 09:02:41 -05:00
Mag-nus
409f7f28a1 Forgot to remove RecipeComponent.cs file after table was removed. 2018-08-01 23:11:14 -05:00
Mag-nus
70d7ca78a5 Quest message column allow null
Text columns should allow null
2018-08-01 22:58:19 -05:00
Mag-nus
1429c1751f Cook_book column reorder
Source now comes before target
2018-08-01 22:56:21 -05:00
Mag-nus
2c8e2507d4 Recipe_Mod Health/Stamina/Mana cleaned up
There were 3 redundant values which were basically flags indicating if it's associated vital was actually used.

However, in the cache.bin, any time a vital was present, it's associated flag was also set to 1. This is basically redundant.

We can simplify this as follows. If the Vital != 0, it gets applied. If the Vital == 0, it doesn't get applied.

I suspect they may have wanted the flag so they could leave a vital value in the db, but just have it disabled. We don't need this.
2018-08-01 22:54:06 -05:00
Mag-nus
79b07792de Recipe_Mod ExecuteOnSuccess field added
This allows us to not have to add all 8 records found in the cache.bin.

Instead, we only have to add the records that actually modify something. This new bool basically indicates if it was the first 4 or the last 4 or the fixed 8 found in the cache.bin
2018-08-01 22:40:36 -05:00
Mag-nus
88805c14a8 Recipe_Component table removed and merged into Recipe table
We were relying on the order of the recipe_componet records to remain the same, but this isn't gauranteed unless we provide a zIndex.

Instead of adding a zIndex to the Recipe_Component table, we can just put the static values in the base Recipe table.
2018-08-01 22:09:09 -05:00