Commit graph

119 commits

Author SHA1 Message Date
Coldeve-ACE
a31112ea51
Common Logging Changes (#4345)
* Update ShardDatabaseOfflineTools.cs

* Update Corpse.cs

* Update Creature_Death.cs

* Update Player_Death.cs

* Update Player_Inventory.cs

* Update WorldObject_Decay.cs

* Update HouseManager.cs

* Update Player_House.cs

* Update RecipeManager.cs

* Update Player_Allegiance.cs

* Update AuthenticationDatabase.cs

* Update ShardDatabase.cs

* Update WorldDatabase.cs

* Update Player_Magic.cs

* Update Player_Skills.cs

* Update Player_Attributes.cs

* Update Player_Combat.cs

* Update PhysicsObj.cs

* Update Player_Vitals.cs

* Update Player_Missile.cs

* Update Player_Melee.cs

* Update Monster_Melee.cs

* Update Session.cs
2025-08-11 22:38:12 -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
gmriggs
c90baf8a80
update recipes to use mutation scripts (#3593)
* update recipes to use mutation scripts

* additional refactoring

* .

* update proficiency code

* foolproof salvage code is still needed until recipes are added

* add comment

* add rare foolproof

* update sandstone

* adding sandstone mutation

* update RecipeManager_New recipes for foolproof salvage

* add RecipeManager_New caching

* finish removing ClearRecipe()

* update comments

* update defense imbues to include shields, as per base recipe

* improved UpdateObject server sync
2021-07-11 20:14:21 -04:00
Mag-nus
7a0404c0a3
Improve World DB Startup Caching (#3587)
This is significantly faster than what is currently in master, and just slightly slower than PR #3582

It is now a single threaded operation, just like #3582 but instead of stitching the objects together manually, it lets EF stitch the objects together.

EF Tracking is required for the stitching to work.

This is the recommended pattern for these types of actions when dealing with EF.

I think similar improvements can be made to startup player caching
2021-06-12 14:15:42 -05:00
Ty Conner
533b037488
Prevent future instances of dynamic GUIDs in World Database (#3420) 2021-01-16 16:24:42 -05: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
gmriggs
366e83baa1
quick fix for spellbook reordering (#3291) 2020-11-22 03:27:16 -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
gmriggs
592a19dd7b
improved json landblock export (#2741)
* improved json landblock export

* .

* .
2020-02-27 15:04:08 -05:00
gmriggs
f29a055397
adding landblock instances to /clearcache content developer command (#2720) 2020-02-19 01:14:52 -05:00
Mag-nus
dff4617250
Improve startup time and memory consumption (#2704)
Limit number of threads used by database parallel work. This helps avoid "too many connections" errors on larger threaded machines. It also helps reduce memory consumption.

Use parallel for PlayerManager.Initialize()

ForceGC at the end of Startup, before the world is open. ForceGC is a pretty controversial thing. Typically if you're forcing gc, you're doing something wrong. In this case, we're forcing gc before the world starts up so that the work is done in an off-line state. This work will be done eventually, natrually by the gc, so better to get it done before the world is active. We force gc 10 times to make sure we get all objects. On a large server with many players and world precaching, this can free up 4 GB - 6 GB.
2020-02-12 19:49:34 -06:00
gmriggs
da2c3df688
adding quest support to import-json and import-sql (#2694)
* add support for recipes to DeveloperContentCommands

* adding landblock instance support to import-sql and import-json

* fixing spelling

* updating json landblock key

* adding quest support to import-json and import-sql

* fixing bug in original GDLEConverter.TryConvert() for reading landblock json

* adding comment

* removing duplicate code from merge
2020-02-12 12:45:27 -05:00
gmriggs
97ef273a73
add support for recipes to DeveloperContentCommands (#2664) 2020-02-12 03:31:38 -05:00
gmriggs
02505140ad
improving /createinst command for content dev (#2601)
* improving /createinst command for content dev

* .

* ..

* adding option to manually specify a start guid

* adding partial key handling, max static guid checks

* adding range check
2020-01-17 04:39:39 -05:00
Mag-nus
197d21c3db
Database Logging (#2596) 2020-01-06 06:57:45 -06:00
Mag-nus
c5ea7cc3b2
.NET Core 3.1 (#2329)
* Update TargetFrameworks and PackageReferences

* FromSql -> FromSqlRaw, ExecuteSqlCommand -> ExecuteSqlRaw

* Client side GroupBy is not supported in EF 3.0

* Update appveyor.yml

* readme updates

* Add NoTracking

* scaffolding notes update

* Revert back to EF Core 2.2

* EF Core 2.2.0 -> 2.2.6

* Update packages (Except EF Core)

* .net core 3.0 -> 3.1 (LTS)

* Update NuGet packages

* Update README.md

* Update appveyor.yml to use VS Preview

* Update appveyor.yml

* Update README_linux.md

Co-authored-by: Ty Conner <tyconner@itcproductions.com>
2020-01-06 06:00:00 -06:00
gmriggs
2307c00da7
better usage of body part quadrants for physical attacks (#2571)
* adding preliminary support for dual-wielding monsters

* fixing monster special attack fx

* improved monster combat maneuvers table

* adding dual wield speed modifier for mobs

* fixing mobs casting flame wave

* adding support for EmoteManager.CastSpell untargeted spell projectiles

* fixing untargeted Blast spells

* fixing blast spells

* fixing spell z-angle

* re-add Emote.Move* physics position sync w/ valid rotation check

* wip

* latest wip

* cleanup

* small position adjustments

* matching create.Y formula up to retail pcaps

* refactoring spell projectiles

* startPos based on targetPos instead of casterPos for strike spells?

* improved strike spawn position

* add error logging

* add support for peturbation, improve ring positioning for even # of projectiles

* adding /clearcache for content developers

* fixing boost variance

* adding quadrant stuff

* splatter dir

* better usage of body part quadrants for physical attacks

* found CMTs with multiple entries per lookup key, cycle through anims

* fixing portal gems
2019-12-31 01:56:07 -05:00
Ty Conner
94adc2c086
Housing: Basements and Hooks changes (#2279)
* Fix Hook Visibility Control in Basements

* Update WorldDatabase.cs

* GetBasementHouseGuid -> GetCachedBasementHouseGuid

* Fix issue on Hook Appraisal

* Workaround fix to spawn hooks

Missing hooks will now spawn

Also includes a change to remove hook from Shard DB when it doesn't contain anything

* Remove Storage chest when empty

* .

* Update Landblock.cs

- Update Logging messages
- Notify Generator of spawn failure for regen retry

* Revert "Update Landblock.cs"

This reverts commit b0ae262b27.

* Fix more Hook Appraisal issues

* .

* Update AppraiseInfo.cs

* Update AppraiseInfo.cs

* Update AppraiseInfo.cs

Owned Hooks always displayer owner

* Add null account check

* Save and Propigate HouseOwner to Basement

* Update HouseManager.cs

* .

* House/Payement Save/Destroy

* .

* .

* Update Hook.cs

* .

* updates to a few pieces

* Change spawn workaround

* .

* Update WorldObject.cs

* match current property save

* minor cleanup
2019-09-14 22:46:32 -05:00
Mag-nus
010d03c5bd Add caching to World GetCachedWeenie by name (#2116)
* Debugging for CE

* Add guid and name

* Revert "Add guid and name"

This reverts commit 6de8fb6078.

* Revert "Debugging for CE"

This reverts commit 7ea2e521f9.

* Focus logging on CreateCorpse

* Seaparte GetCachedWeenie from CreateNewWorldObject

* Improve weenie by name lookups using a dictionary

* Remove stopwatch diagnostics from creature_die
2019-08-11 22:51:56 -04:00
Ty Conner
0c24b2090e
Add support for version command response (#2085) 2019-07-08 11:49:08 -05:00
gmriggs
92dc48dbac
adding json import, live editing for content creators (#2042)
* adding json import, live editing for content creators

* using existing WriteOutput functions

* adding DeveloperContentCommands.cs

* adding import-sql

* adding sql2json

* adding try/catch to sql2json

* Add a null check to emote action writer

* Update SQL output

* Update DeveloperContentCommands.cs

* Update DeveloperContentCommands.cs
2019-07-01 03:36:56 -04:00
Ty Conner
1113950763
Update GetCachedInstancesByLandblock for external exporting (#2041) 2019-06-24 00:55:51 -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
Ty Conner
e3f7eb2db5
Some CombatPet tweaks (#1843)
* Update CombatPet to not drop loot, not spawn things

* Revert Caching of HasEnchantments (Players with no spells do not start ticking until relog)

* Remove Emotes from CombatPets

* Add Pet and CombatPet to IsCreature

* Always Allow ID for Pets

* .

* Restore HasEnchantments

* Update changelog.md

* Update changelog.md
2019-05-02 23:47:22 -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
gmriggs
4a16f6fb17
Adding support for new recipe formats (#1715)
* Adding support for new recipe formats

* hotspot / corpse fixes

* tinkering updates

* adding tinkering local broadcasts

* line endings

* updating for World DB 0.7.14

* reverting

* fixing item tinkering value
2019-04-14 13:49:42 -04:00
Mag-nus
0095e2cfcc
Reuse available Dynamic GUIDs (#1493)
* Reuse available Dynamic GUIDs

On ACE startup, the shard database is queried for available id's in the dynamic guid range.

This helps further reduce (max + 1) id allocation.

It's a bit premature, but, based on current architecture, I don't know if we'll ever need to do a id defragment.

A requirement of this method is that ace_world may only contain guids in the static range.

* GetMaxGuidFoundInRange has no valid use in ace_world

All ids must be in the static range

* Add world update script
2019-03-07 20:17:42 -06:00
Mag-nus
02d8b4d30e
LootGenFactory exception fixes (#1465)
* LootGenFactory exception fixes

* rename weenieID to spellID

* 8 to 7
2019-02-23 13:25:26 -06:00
Mag-nus
eb02530c78 This switches two world db house functions to use caching (#1434)
* This switches two world db house functions to use caching

GetHousePortals
GetHousePortalsByLandblock

* added CacheAllHousePortals()
2019-02-11 14:35:21 -05:00
gmriggs
9c8bc7ceb0
Adding /hslist <housetype> to show list of available houses (#1373)
* Adding /hslist <housetype> to show list of available houses

* Updating RootHouse

* Updating activation requirements for wielding items

* More updates

* Adding ConvertToMoASkill to activation requirements

* reversing lock check

* Fixing floating storage chests

* Revise comment
2019-01-26 15:14:32 -05: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
gmriggs
7837c7bf61
Adding housing portals / dungeons (#1187)
* Adding house guest and storage permissions, open/closed, hook visibility, and boot system

* Adding housing portals / dungeons

* small fix
2018-12-29 10:15:51 -05:00
dgatewood
8ce79470fc Adding scrolls to loot profiles (#1102)
* Adding scrolls to loot profiles

Scroll weenies are cached into lists, then created from those weenies, so the database isnt hit everytime there is a new scroll created.

* Fixed so that the lists for spell weenies are persistent and only are added when weenies are not present.

This should be good to go as I tested it thoroughly.

* Loads all weenies on first weenie looup

also, renamed variable of  result to spellWeenie and returned the dict value and not the value of the lookup.

* changed field to static so no need to make Database object

* WorldDatabase GetRandomWeeniesOfType -> GetRandomCachedWeeniesOfType

WorldDatabasePrecaching set to true is a requirement for proper loot generation

* Improve getting scroll weenies by spell id

* GetRandomCachedWeeniesOfType -> GetRandomWeeniesOfType
2018-11-27 20:51:47 -06:00
fartwhif
d37e6b70ad Command verb "list" for developer command /telepoi (#1066)
* adding command verb "list" to developer command /telepoi that (re)caches and lists all POIs

* hiding integral collection to make the data less vulnerable
removing return value of POI caching function
2018-10-18 19:04:29 -05:00
gmriggs
678681fbfa Adding methods to QuestManager (#1052)
* Fixing stance shuffling / refactoring moveto chains a bit

* Fixing vendor rotate

* Removing debug message

* Fixing stance change for player activating switches

* Adding methods to QuestManager

* Adding TimeSpanExtensions

* Adjusting walk/run threshold

* Adding quest restrictions for portals, and portal spawning triggered by monster deaths

* Updating function names

* Adding HasQuestCompletes

* Adding support for character titles to emotes

* Added emote hooks for portal use and creature death

* Adding KillTaunt and NewEnemy, updating questName@comment format

* Updating broadcast emotes

* Updating InqQuestSolves

* Adding fixes for Aerfalle

* Fixed rolling balls of death
2018-10-13 03:57:04 -04:00
Mag-nus
b7ca774e53 WeeniePrecaching (#1047)
* Landblock Preloader cleanup

* WorldDatabase spelling fixes

* Added CacheAllWeeniesInParallel

* Add WeeniePrecaching

* Improved WorldDatabase Caching

Null entries are now cached as well to prevent excessive queries to the database to pull records that do not exist.

The callers should raise warnings when a record doesn't exist.

* WorldDatabasePrecaching (~400MB)
2018-10-09 11:52:00 -04:00
Mag-nus
674d7f4dba
Timing (#1046)
* Remove the LastTickDuration code. It was never used

* RateLimiter added

* Spelling fix

* Session TickInParallel summary expanded

* RateLimiter argument range check changes for cosmetic reasons

* DoSessionWork Parallel option when session count >= 5
2018-10-06 18:45:01 -05: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
gmriggs
f1360a1e14 Adding the ability for players to buy houses (#1003)
* Adding the ability for players to buy houses

* Updating Property IDs

* Fixing links

* Updating purchase time to match AC data, calculating rent time dynamically

* Processing nested links recursively
2018-09-09 09:11:25 -07:00
Mag-nus
eda6ff4a12
WorldDatabase WeenieCache improvements and Character Spellbar/etc fixes (#935)
* WorldDatabase WeenieCache improvements

* Include child records when requesting Character from the database
2018-08-08 23:36:26 -05:00
Mag-nus
c612c9588a
Minor cleanup. Nothing major (#933)
* EmoteCache removed.

* WorldDatabase cleanup

* AdminCommand morph save cleanup
2018-08-08 09:17:03 -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
005fd2339a EmoteActions are now childeren of Emote 2018-08-04 09:02:41 -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