Commit graph

142 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
36557921aa
Update AccountExtensions.cs (#4173) 2024-05-11 23:24:59 -04:00
Ty Conner
ec5ecd62c4
Adjust AddSpellToBar (#4131)
* Adjust AddSpellToBar

Check for existing SpellId on same SpellBar before attempting to add

* Update Player_Character.cs
2024-03-20 00:33:00 -04:00
Mag-nus
9d70b48380
Improve logging overhead by fixing string interpolation (#4107)
* First batch

* Second batch

* another batch

* last batch hopefully

* fix
2024-03-13 02:38:39 +00: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
a7f12a3600
Update Friends commands (#3911)
* Update Friends commands

* Update Player_Character.cs
2022-10-16 15:54:50 -04:00
Ty Conner
0c0ca9c7a4
Update to .NET6 (#3739)
* Update to .NET6

* Update dockerfiles to NET6

* Update appveyor.yml

* Update ACE.DatLoader.csproj

* Update Program_Setup.cs

* Update Program_DbUpdates.cs

* Update Program_DbUpdates.cs

* Update ACE.DatLoader.Tests.csproj

* Update ACE.Database.Tests.csproj

* Update ACE.Database.csproj

* Update ACE.Server.Tests.csproj

* Update ACE.Server.csproj

* Update ACE.DatLoader.csproj

* Update ACE.Database.csproj

* Update ACE.Server.csproj

* Update EF packages to EFCore 6

Requires Database, Database.Tests and Adapater to target .NET6 framework

* Update ACE.Server.csproj

* Update ACE.Database.csproj

* Update Program_BinUpdates.cs

* Update AccountExtensions.cs

* update nugets

* Remove TimeZoneConverter

net6 includes built in functionality

* update csproj files

* Update ACE.Server.csproj
2022-07-13 12:30:32 -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
47bb9e9e82
Contract registry thread safety (#3458)
* Fix a couple of cases where character collections were accessed outside thread safe methods

* Contract Thread Safety
2021-02-13 08:24:56 -06:00
Mag-nus
c350e00da7
Add thread safety to Character QuestRegistry (#3449)
* Add thread safety to Character QuestRegistry

* Forgot to add the new quest to the collection
2021-02-13 08:24:44 -06: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
Ty Conner
f862d12a9c
Add support for account bans (#2917)
* Add support for account bans

* Update SentinelCommands.cs

* Update AdminCommands.cs

* Update SentinelCommands.cs

* Update SentinelCommands.cs

* Update SentinelCommands.cs

* Update SentinelCommands.cs
2020-04-12 18:47:17 -04:00
Ty Conner
4a24710f4e
Fix spell bar position save issue (#2918)
* Fix spell bar position save issue

* Update 2020-04-11-00-Update-Character-SpellBars.sql

* Switch CharacterPropertiesSpellBar to composite key

* Fix incorrect indexes in SpellBars

* Update ShardDatabaseOfflineTools.cs

* Update PropertyManager.cs

* Update DatabaseManager.cs

* Update 2020-04-11-00-Update-Character-SpellBars.sql

* Update 2020-04-11-00-Update-Character-SpellBars.sql

* Update ShardDatabaseOfflineTools.cs

* Update 2020-04-11-00-Update-Character-SpellBars.sql

* Update ShardDatabaseOfflineTools.cs

* Update DeveloperDatabaseCommands.cs

* Update Program.cs

* Update 2020-04-11-00-Update-Character-SpellBars.sql

* Update 2020-04-11-00-Update-Character-SpellBars.sql

* Update ShardDatabaseOfflineTools.cs

* Update ShardDbContext.cs

* .

* Update DeveloperDatabaseCommands.cs

* Update DeveloperDatabaseCommands.cs

optimizations by @gmriggs

Co-Authored-By: gmriggs <gmriggs@gmail.com>

Co-authored-by: gmriggs <gmriggs@gmail.com>
2020-04-12 17:01:22 -04:00
Mag-nus
885ff2964d
Add order to BiotaPropertiesPalette (#2892)
This fixes corpse palette ordering after a server restart
2020-04-11 16:19:48 -05:00
Mag-nus
75fc1ce23c
Step 3. Convert ShardDatabase/WorldObjects biota from the ACE.Database model to the new ACE.Entity model (#2731)
* 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

* ACE.Database new code

* it compiles

* InitializePropertyDictionaries

* WOrldDatabaseWithEntityCache cleanup

* ShardDatabaseWithCaching

* ShardDatabase Cleanup

* todo

* cache counts reported in serverstatus

* House InitializePropertyDictionaries

* improve ServerStatus

* BiotaModel change HousePermissions to Dictionary<uint, bool>

* PropertiesAllegiance to dictionary

* BiotaUpdater improvements

* Shard Database Cache Reporting

* More code ported from Step 3

* Remove stub CharacterCache

* Update WorldDatabaseWithEntityCache.cs

* build fixes

* code audit

* Remove non-callback functions from SerializedShardDatabase

* BiotaUpdater progress.. only emote left

* Emotes done... now need to test

* fix

* Burden/Value fix for containers

* fat fingered EncumbranceVal

* add some safety

* Don't cache player biotas for initial PlayerManager load

* fix null spellbook

* Add another null check

This is redundant as the check is also upstream.

This is to prevent an exception in the future if this function is called from another source.
2020-04-02 22:40:27 -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
Mag-nus
446f2f1a18
switch BiotaPropertiesInt to Composite Key (#2563)
* switch BiotaPropertiesInt to Composite Key

* Update the remaining tables

* Update 2019-12-22-00-Convert-AutoIncrement-To-Composite-Key.sql

* Fix ShardDatabaseWithoutCaching

* empty statement fix
2020-01-13 07:53:13 -06:00
gmriggs
eb6579d01f
refactoring raise attribute/vital/skill, fixing security issues with them (#2483)
* cleanup playscript

* refactoring raise attribute/vital/skill, fixing security issues with them

* fixing some issues with proficiency xp
2019-12-05 02:54:58 -05: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
Mag-nus
34d54c8cb1 Set all Shard non-zero defaults to zero (#2459)
* Set all Shard non-zero defaults to zero

There appears to be a bug in EF where, if the models value is not nullab,e and is 0, and the SQL columns default is not 0, the EF.SaveChanges() command will INSERT the record but omit the columns that are 0 value.

The DB will then add default values for the omitted columns.

The entire record is then returned as a result, and EF uses this to update the model, now setting those fields that were 0 to the new non-zero default.

This is the cause for the Jive Turkey emote delay issues.

The next step will be to create an update script that will set existing shard objects to their weenie defaults. The following tables will need to be investigated:
biota_properties_create_list
biota_properties_emote
biota_properties_emote_action

* biota_properties_spell_book probability
2019-11-26 16:28:37 -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
d9da6d19ba
Fix issue with spell book probabilities (#2211)
* Fix issue with spell book probabilities

* Update WorldObject.cs

* Update WorldObject.cs

* changes

* Update Player_Inventory.cs

* Update Player_Inventory.cs

* Update Player_Inventory.cs

* Update Player_Inventory.cs

* Update Player_Inventory.cs
2019-08-11 02:28:22 -05:00
gmriggs
bad821f601
persisting allegiance bans / approved vassals (#2175) 2019-08-04 14:42:19 -04:00
gmriggs
eaa9246552
persisting squelches to db (#2165)
* persisting squelches to db

* removing unneeded index

* re-running scaffolding

* re-running scaffolding

* re-running scaffolding

* adding SquelchMask

* updating SquelchMask

* adding support for masks

* updating comments

* adding global squelches

* adding chat filters in system

* adding remaining squelch filters

* fixing typo

* .

* commenting out debug lines

* updating to latest master
2019-07-31 02:05:00 -04:00
Ty Conner
2d87ef74e3
Add full support for Contracts (#2150)
* Add full support for Contracts

* Update Commands

* Update ContractManager.cs

* Update DeveloperCommands.cs

* Update ContractManager.cs

Fix PackableHashTable stuff

* Update ContractTracker.cs

Add in vaguely used Stamped version

* Update ContractManager.cs

* Update ContractManager.cs

* Some tweaks

* More tweaking

* Create ContractId.cs

* Update PropertyInt.cs

* Update ContractId.cs

* Provide feedback for IsFull

* Update QM to prevent Update from writing more solves than max allows

* null catch

* .

* Update LifestonedConverter.cs

* Update Gem.cs

* Update changelog.md

* Update changelog.md
2019-07-28 22:25:22 -05:00
Ty Conner
0c24b2090e
Add support for version command response (#2085) 2019-07-08 11:49:08 -05:00
Ty Conner
3fc219e811
Add Creation/LastLogin IP/DateTime (#1985)
* Create 2019-06-10-00-Add_Fields_To_Account_Table.sql

* Scaffold new Account fields

* Add support for Create/LastLogin IP/DateTime

* Add CreateTime, CreateIP, LastLoginTime, LastLoginIp to finger output

* Update 2019-06-10-00-Add_Fields_To_Account_Table.sql

* update scaffolding

* changes as discussed

* BannedByAccountId

* sql changes as discussed

* update output

* Update AdminCommands.cs

* Update changelog.md
2019-07-06 16:12:24 -05:00
gmriggs
4b6555b35d
additional IsBusy checks (#2075)
* additional IsBusy checks

* swap
2019-07-05 03:36:09 -04:00
gmriggs
62b0421d1d
adding biota wcid idx (#2047)
* adding biota wcid idx

* scaffolding
2019-06-26 00:01:59 -04: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
cefc62ae9a
Shortcut Fix Stage 2 (#1748)
* Changes to shortcut bar coding and storage

* Update CharacterExtensions.cs

* Update CharacterExtensions.cs

* Update Player_Character.cs

* Update 2019-04-17-00-Character_Shortcut_Changes.sql

* Add fix-shortcut-bars command as a helper to server admins

* Update DeveloperDatabaseCommands.cs

fix-shortcut-bars func written by @gmriggs

* Update DeveloperDatabaseCommands.cs

.

Co-Authored-By: gmriggs <gmriggs@gmail.com>

* Update DeveloperDatabaseCommands.cs

Co-Authored-By: gmriggs <gmriggs@gmail.com>

* Update DeveloperDatabaseCommands.cs

* Update changelog.md

* Update changelog.md

* Update DeveloperDatabaseCommands.cs

* Add log_audit option

* Update PlayerManager.cs

* Update changelog.md

* Update shutdown commands

* Update AdminShardCommands.cs

* Update changelog.md

* Update changelog.md

* Update PlayerManager.cs

* Update DeveloperDatabaseCommands.cs

* Update ServerManager.cs

* Update ServerManager.cs

* Update changelog.md
2019-04-20 12:57:44 -05: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
Mag-nus
b6951c575f
Add biota id:name to db exceptions (#1707)
* Add biota id and name to db failures

* fix HouseManager exception from log statement
2019-04-12 06:32:53 -05:00
Ty Conner
e0aaaa676f
More fixes for player corpse appearance issue (#1693)
* More fixes for player corpse apperance issue

* Update 2019-04-09-00-Biota_Palette_Change.sql
2019-04-10 23:06:03 -05:00
Ty Conner
0395d73755
Change Shard Biota Palette table (#1679)
* Change Shard Biota Palette table

* Update changelog.md
2019-04-09 03:34:48 -05:00
Mag-nus
e8284981d6
SpellbookCache (#1656)
* WIP

* SpellbookCache

This uses a dictionary to check if spells are known instead of having to iterate over every record of BiotaPropertiesSpellBook every time a player casts a spell.
2019-04-07 08:05:35 -05:00
Ty Conner
35c611bec3
Update ShardDB Enchantment Registry Composite Key (#1605) 2019-03-30 14:15:37 -05:00