Commit graph

139 commits

Author SHA1 Message Date
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
Mag-nus
bb8e6a9ac3
Improvements to help garbage collection (#4104)
* Enum ToSentence improvements

* Network.EnqueueSend improvements

* Improve SerializePhysicsData

* GameMessage improvements

* GameEventMessage updates

* more initial sizes

* Few more GameMessages

* few more
2024-03-13 02:37:40 +00:00
gmriggs
efda13bdfd
fix some instances of casting locking up for pk players (#3949) 2023-01-21 00:18:04 -05:00
gmriggs
3fd3bed72a
adding non-standard server option 'fix_chest_missing_inventory_window' to fix chest bug (#3134) 2022-08-21 23:47:25 -04:00
OptimShi
c2c7b93458
Added some comments and made the CalculateObjDesc() function more efficient (#3850) 2022-05-13 13:38:24 -04:00
Ty Conner
fceece5d13
Match up Burden flag behavior with other similar properties (#3732) 2021-11-07 11:16:15 -05:00
gmriggs
e2ada57215
mitigate odd client behavior when swapping bows during repeat attacks fix possible CurrentMotionState.Stance thrashing and possible dps increase (#3137)
* mitigate odd client behavior when swapping bows during repeat attacks, fix possible CurrentMotionState.Stance thrashing and possible dps increase

* further fixes to prevent CurrentMotionState thrashing / arrow visibility while stance swapping after launching first arrow w/ repeat attacks
2021-05-22 15:54:00 -04:00
gmriggs
a1a37c480b
improve autonomous motion persistence through non-autonomous actions for missile combat (#3474)
* add motion copy constructor

* improve autonomous motion persistence through non-autonomous actions for missile combat

* fixing more state desync bugs when going into magic combat. it wasn't just autorun unfortunately, and has more to do with unresolvable bugs that originate on the client when entering magic combat mode.

* latest updates
2021-02-28 20:11:02 -05:00
Ty Conner
e36c0136c5
Partial revert for HouseOwner in CreateObject (#3454) 2021-02-08 00:40:41 -05:00
Ty Conner
afe0f9a0f0
Adjust some House permissions (#3452)
* Adjust some House permissions

* Update PropertyInt.cs
2021-02-07 22:45:40 -05:00
Ty Conner
326ca8c37b
Adjust handling of Quest string to mimic UpdateQuest via EmoteManager (#3053) 2020-07-01 13:05:50 -04:00
gmriggs
cb7d7339cb
cleanup lootgen factory (#2961)
* cleanup lootgen factory

* .
2020-04-25 03:10:33 -04: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
gmriggs
56255472e4
fix corpses spawning frozen in mid-air (#2848)
* fix corpses spawning frozen in mid-air

* updating fields

* /movetome admin command

* adding /showvelocity dev command

* only applies to player killers

* ensure corpse items are saved correctly if server crashes
2020-03-23 20:56:34 -04:00
gmriggs
441810ab10
adding non-default server option to broadcast spell projectiles as ethereal to clients (#2839) 2020-03-21 13:40:48 -04:00
gmriggs
6e0d2a19e8
add support for gems with UseUserAnimation and UseSound (#2806)
* add support for gems with UseUserAnimation and UseSound

* refactor Food

* add player.IsDead check to Gem use
2020-03-15 17:11:25 -04:00
gmriggs
77bfaaf9d6
improvements from fixcast (#2798) 2020-03-09 03:26:57 -04:00
gmriggs
b89af7d7fb
adding support for fastbuffing (#2687)
* adding support for fastbuffing

* adding server option, retail default
2020-02-04 17:53:21 -05:00
gmriggs
7a45ad8ad6
broadcast windup motions as actions, as per retail (#2630) 2020-01-21 06:02:01 -05:00
gmriggs
f9cb6d59e9
preliminary merge of branches (#2546)
* preliminary merge of branches

* adding Player_Move2

* adding spellcast_max_angle server config option

* adding fizzle if player exits combat stance during casting

* improvements

* wip for command-interp2 merger

* fixing fastcasting lockup bug

* removing debug lines
2019-12-30 22:18:09 -05:00
gmriggs
c93b5069c7
fixing monster special attack fx (#2559) 2019-12-22 02:50:10 -05:00
gmriggs
7d720df1fa
backporting support functions from 1991 (#2537)
* backporting support functions from 1991

* adding MoveToComplete shell function
2019-12-15 09:54:16 -05:00
gmriggs
5225a0e231
moving UpdatePlayerPhysics to Player_Tick.cs (#2489) 2019-12-03 12:13:45 -05:00
gmriggs
362b1e408e
backporting Player_Magic refactoring from 1991 (#2404)
* backporting Player_Magic refactoring from 1991

* fixing gap with untargeted void spells

* adding isWeaponSpell check to HasComponents

* adding null check to OnAttackMonster

* .

* adding /debugbusy temporary debugging command for ce

* temporarily revert chaining to old version

* more revert to exact original functionality + new architecture

* adding null checks

* IsBusyCompleted

* adding /castlog for debugging DM

* limiting CurrentMotionState thrashing from EnqueueMotion

* temp fix until concurrent dictionary

* removing debug code

* .
2019-11-15 21:46:05 -05:00
Mag-nus
b504cb418f
Multi-thread landblock ticking (Landblock Groups w/Thread Safety) (#2303)
* WIP: Multi-thread landblock ticking

This is the start of "landblock group" ticking.

The idea behind the landblock groups are that each group may contain multiple landblocks that must be ticked on the same thread, but, each group itself can be ticked on independant threads.

The current groups are as follows:
Every outdoor landblock is in a group
Every dungeon landblock is in it's own group (one per dungeon)

This is not ready for public servers yet.

* More changes

* First pass at actual groups

* ObjMaint.KnownPlayers needs to be concurrent

* Removing original PoC code from LandblockManager

* Landblock Tick Cleanup

* VisibleObjects also needs to be concurrent

* DestructionQueue also needs to be concurrent

* KnownObjects needs to be concurrent

* Use a bool to toggle multi-threading

* Add thread safety to SequenceManager

* Move landblock phsyics ticking to LandblockManager

Also

* Cleanup log.Info level messages

Log.info is the default console output and is intended for:
server startup
connection/disconnections
admin initiated command output
server shutdown

Log.Debug is the appropriate level for debug-type messages that are to be logged and audited at a later date, but not output to the console.

* Missed a couple

* Move HandleSalvaging from Warn to Debug

* Add thread safety to Landblock

* More landblock group calc stuff

* couple comments

* Add some thread capping

* Limit database from taking all the threads

This adds limits to the database thread consumption.

It also should allow the world to now consume threads easier.

The way it is done is as follows.

- We determine the number of available threads using Environment.ProcessCount
- We allocate (int)Math.Max(Environment.ProcessorCount * .34, 1) to the World, and the remainder tothe database.

It breaks down as follows
1 vCPU = 1 thread world, 1 thread database
2 vCPU = 1 thread world, 1 thread database
3 vCPU = 1 thread world, 2 thread database
4 vCPU = 1 thread world, 3 thread database
5 vCPU = 1 thread world, 4 thread database
6 vCPU = 2 thread world, 4 thread database
7 vCPU = 2 thread world, 5 thread database
8 vCPU = 2 thread world, 6 thread database
9 vCPU = 3 thread world, 6 thread database
10 vCPU = 3 thread world, 7 thread database

I'd like to get some feedback from this PR on various sized servers.

What you may notice is that loading a player may take slightly longer (very slightly).

What you will probably notice is no discenerable difference in-game.

What I want to make sure happens is that the world doesn't end up feeling more choppy due to the parallel processing of outbound network traffic. Hopefully the more fair thread distriubiton will help prevent thread starvation.

* quit if not enough vCPU

* separate landblock group recal between add/remove

* revert landblockMutex in Landblock.cs

* World Manager AboveNormal thread priority.

* Add some tags

* Couple more

* Create LandBlockGroup entity

* remove space between tags

* Update the log4net examples

* Efficiency improvements

* fix message

* more WIP

* Improve log4net

Add color to console output

Make the default logger use Log4Net.Async

* WIP

* More WIP

* more WIP

* More WIP

* more WIP

* More WIP

* more WIP

* wip

* more WIP

* remove old processor count check

* Create ServerObjectManager

This removes the ServerObjects collection out of ObjectMaint into it's own class.

This paves the way for thread safety that will need to be added to ObjectMaint for the multi-threaded landblock groups.

* Only split if multi-threading is enabled

* remove comment

* ObjMaint refactor

* all obj maint collections are now private

* few more optimizations

* alternate objectmaint thread safety model

* fix

* Remove a couple of comments

* improved ObjectMaint locking

* lock (ThreadConfiguration.WorldLockObject) OnDeath

* progress

* set MultiThreadedLandblockGroupPhysicsTicking to false

* Move a bool

* add lock

* physics ticking thread safety improvement

* use Config.js for thread configuration

* Add config comments

* measure physics ticking performance

* /serverstatus info added

* comments
2019-10-08 20:25:49 -05:00
Mag-nus
c2c96870e0
LandblockManager/Landblock now manages Physics Landblocks (#2297)
LandblockManager:
- Improved locks
- Only sets adjacents on GetLandblock if the landblock was just loaded, or, if loadAdjacents was set
- Now passes the adjacents to the physics landblock instead of asking the physics landblock to recalculate their own adjacents

ACE.Server.Entity.Landblock:
- _landblock renamed to PhysicsLandblock
- contructs the phyics landblock directly instead of using LScape.get_landblock
- Has a new Init() function that should be called after ctor to actually init the landblock

ACE.Server.Physics.Common.LScape:
- local landblock management is only used if Physics.Engine.Instance.Server is set to true

ACE.Server.Physics.Common.Landblock:
- Local adjacent calculation has been removed. IIRC, the 3rd party tools do not deal with adjacents.

ACE.Server.Physics.Common.ObjectMaint:
- To get a list of ServerObjects in the area, the work (funciton) has been added to the physics landblock class where it can more easily be made thread safe
2019-09-22 16:23:06 -05:00
gmriggs
60496e628d
improved collision detection for archers (#2231) 2019-08-14 22:57:14 -04:00
OptimShi
8c231d394c Tailoring (#2193)
* WIP

* '

* WIP

* Beginnings of icon_overlay handling

* Remove ability to 'Lower' Chest Armor

* Update shard to work with master

* Update handling of armor items with IconOverlay

* Update ShardDatabase.cs

* Revert "Update ShardDatabase.cs"

This reverts commit 25d8ae8964.

* Revert "Update shard to work with master"

This reverts commit 9f21fbaf65.
2019-08-07 22:42:21 -05:00
gmriggs
6100f96b47
adding RestrictionDB to house combat barriers (#2197) 2019-08-06 19:00:44 -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
Slushnas
42421af052 Add Curse of Raven Fury spell (#2140)
* Add NonTracking spell property.

* Fix DefaultScript and DefaultScriptIntensity serialization.

* Give EncumbranceVal a default value of 0.

* Add support for Curse of Raven Fury spell and some minor refactoring.

* A few minor tweaks.

* Add CasterEffect
2019-07-22 01:41:27 -04:00
Ty Conner
0d0216ea38
Various updates to House things (#2108)
* Various updates to House things

* Update PlayerManager.cs

* Update AppraiseInfo.cs

* Update HouseProfile.cs

* Update SlumLord.cs
2019-07-15 03:07:32 -05:00
gmriggs
dba040d79e
ObjMaint v3 (#2086)
* additional ObjMaint refactoring

* re-adding CheckPlayers()

* the call to GetVisibleObjects() in Monster.FindNextTarget() is no longer needed in new design

* removing more unused code

* teleport delay 1

* adding CurCell null checks, moving DestroyObjects from Player to WO

* removing duplicate defaults for Attackable and Tolerance

* ObjectDescriptionFlags refactoring

* fixing container bug

* adding comments

* preliminary checkin

* adding comments, fixing typo

* CombatPet Attackable

* GetCleaveTarget()

* fixing HeritageMod appraisal for casters

* debug output

* summoning work

* latest checkin

* cleanup

* fix reversed IsVisibleTarget

* updating comments

* + comment updates

* RemoveObject -> VisibleTargets

* ensuring contained containers are openable

* .

* latest refactoring - more consistent handling of inverses

* leak detection

* updates for Summoning

* removing leak detection code

* merge cleanup
2019-07-12 09:21:30 -04:00
Ty Conner
70936fdee5 Fix issue with some recipe changes and ObjectDescriptionFlags (#2098)
* Fix issue with some recipe changes and ObjectDescriptionFlags

* Switch back to CO updating ODF
2019-07-12 08:32:10 -04:00
gmriggs
23a005a763
multihouse decommission (#2067)
* prototype: adding account-wide house recall

* updating restriction db / has permissions

* additional ObjMaint refactoring

* re-adding CheckPlayers()

* the call to GetVisibleObjects() in Monster.FindNextTarget() is no longer needed in new design

* removing more unused code

* very preliminary testing

* prevent 1 character from purchasing multiple houses

* adding account/character houses

* further work on AccountHouses / CharacterHouses

* latest updates, account/character multihouse polish, apartment deed location

* adding /house-select process

* HouseManager refactoring, removing async, fixing PlayerHouse.CompareTo equals, fixed InventoryLoaded for weenies, added Player_House.GetHouseInstance()

* first posted draft

* wiring up the remaining HouseInstance -> GetHouseInstance()

* preventing maintenance items from being added for houses owned by players in multihouse state

* cleaning up log messages, handling some edge cases
2019-07-10 13:39:10 -04:00
gmriggs
174184bf71
ObjectDescriptionFlags cleanup (#2078)
* removing duplicate defaults for Attackable and Tolerance

* ObjectDescriptionFlags refactoring

* fixing container bug

* adding comments

* adding comments, fixing typo

* CombatPet Attackable

* GetCleaveTarget()

* ensuring contained containers are openable

* do not persist adminVision

* suggested openable fix

* simplify openable

* IsOpen
2019-07-10 13:07:52 -04:00
gmriggs
74531f55e2
adding EnqueueMotion_Force for food, reverting to original EnqueueMotion for everything else (#2031) 2019-06-22 23:02:47 -04:00
Ty Conner
4d804e5055
Generator system revamp (#1964)
* Add Landblock_Tick_GeneratorRegeneration

* Split up Generator Regeneration and Heartbeats

* Stop saving Gateway portals to Shard DB

* Add IsGateway to Portal

* Add default sound to Pressure Plates

* Notify Geneator of Pickup of Landblock Stackable

* Add RegenerationTimestamp and GeneratedTreasureItem properties

* Generators 3.0

* Add InitializeGenerator
* Remove IsLinked
* Change SelectProfilesInit to use GetMaxObjects
* Change SelectProfilesMax to use GetMaxObjects
* Update GetMaxObjects
  - -1 MaxCreate == Fill up all slots
* Renamed HandleStatus to HandleStatusStaged
* Restore previous HandleStatus
* Update StartGenerator
  - GeneratorInitialDelay > 0: offset NextGeneratorRegenerationTime
- else if InitCreate > 0: Regen
* Add GetNextRegenerationTime
  - If generator isn't previously loaded, skip delay
* Update DisableGenerator
  -  Add ProcessGeneratorDestructionDirective
  - Support GeneratorDestructionType and GeneratorEndDestructionType
* Update AddGeneratorLinks
  - Increate InitCreate and MaxCreate per profile template spec, per each link added
* Update Generator_HeartBeat
  - Starts/Stops Generator, checks event status
* Add Generator_Regeneration
  - Queues for Respawn and/or/both Spawns objects
* Add ResetGenerator
* Update GetSpawnTime to always return UtcNow
* Update Spawn
  - If TreasureGenerator is used, set GeneratedTreasureItem
  - If profile PaletteId and/or/both Shade have value, use it
* Wire up `@regen` command
* Add `@generatordump` command

* Change EmoteType.Generate to use Generator_Regeneration

* Update OnDeath to call OnGeneratorDeath for Generators

* Update OnActivate

* Move default action to last action to allow other actions to start before
* Change OnGenerate to use Generator_Regeneration

* Update Chests

* Remove ResetGenerator
* If Locked disable timed regen of contents
* Update Reset
* Override ResetGenerator

* cleanup

* Rename Generator to GeneratorProfile

* Rename Generator.cs to GeneratorProfile.cs

* Update GeneratorProfile.cs

* Update WorldObject_Generators.cs

* Skip PlaceHolder object profiles
* Change ProcessGeneratorDestructionDirective to not affect dead/dying creatures

* more cleanup

* Update WorldObject_Generators.cs

Bad data protection

* Update WorldObject_Generators.cs

* Update GeneratorProfile.cs

Catch for bad profile data

* Update WorldObject_Generators.cs

log error for generators with Max < Init

* Update Corpse Logs

* Attempt to curb generator sprawl

* Update WorldObject_Generators.cs

* Update GetRNGInitToMaxObjects

* Update WorldObject_Generators.cs

* Code fix for linkitemgen2minutes

Bad Init/Max for linkable

* Fix issue with spawning treasureDID profiles

* Add GeneratorUpdateTimestamp

* GeneratorHeartbeat renamed to GeneratorUpdate

This matches property found in enum

* Update debug output

* Update Landblock.cs

* Update WorldObject_Generators.cs

* Update DeveloperCommands.cs

* Update ResetInterval resetting

* Update SortedGeneratorRegenerationList when already spawned generator is re-enabled

* More changes

* Container updates

* More Debug Info Added

* Do not change default icon unless Shade or Palette was defined

* Wire up `trophies` command

* Add corpse_decay_tick_logging option

* Add NpcInteractsSilently handling for EmoteType.Give

* Update EmoteManager.cs

* Master change fixes

* Update DeveloperCommands.cs

* Update ServerPerformanceMonitor.cs

* Update DeveloperCommands.cs

* Update changelog.md
2019-06-21 03:16:05 -05:00
gmriggs
4b2bd3aae1
updating fellowship level proportional xp sharing (#2011)
* updating fellowship level proportional xp sharing

* fixing EvenShare/Proportional/None

* sending ShareLoot in fellow update packet

* updating comments

* adding /fellow-info developer command for fellowship debugging

* adding CurrentMotionState null check

* -1
2019-06-18 00:32:04 -04:00
gmriggs
eca1eae88e
consumables refactoring (#2008)
* consumables refactoring

* capping message / damagehistory to actual vital change
2019-06-17 00:02:13 -04:00
gmriggs
0243ce1183
adding missile launcher reload anim speed (#2003) 2019-06-15 03:16:57 -04:00
Mag-nus
2eeebcd706
Switch Physics WeenieObject to hold a weak reference to WorldObject (#1878)
* Switch Physics WeenieObject to hold a weak reference to WorldObject

This is mainly just a test to see if it's the physics engine that's holding into references, or something else.

This *should* allow WorldObjects to be garbage collected even if their physics counterparts haven't been released.

This is a test mainly for CE.

* Fix exception

* null checks added
2019-06-10 19:59:42 -05:00
gmriggs
8f29c47875
adding tailoring retained error msg (#1966)
* adding tailoring retained error msg

* adding acpedia url
2019-06-04 20:47:01 -04:00
Mag-nus
27a562b674
Too many overloads... VendorFix (#1744) 2019-04-15 21:34:31 -05:00
gmriggs
17fa0cdb24 ensuring BF_OPENABLE flag for inventory containers (#1738) 2019-04-15 02:15:36 -05:00
Ty Conner
89dee0d2a6
Update for quest changes (#1728)
* Update for quest changes

* Fix issue with Emote.Motion and MotionCommand.Dead

* Fix FellowPortalSending spells

* Update WorldObject_Magic.cs

* things

* updates

* update house permissions checks

* Update WorldManager.cs

* further improvements

* Update Player_House.cs

* Update Player_Tick.cs

* update chargen stuff

* Update Player_Tracking.cs

* channel work

* .

* Update PlayerManager.cs

* channel stuff

* Update WorldObject_Magic.cs

* audits

* Update AdminCommands.cs

* Update AdminCommands.cs

* Update PlayerManager.cs

* fix a bool
2019-04-15 02:15:18 -05:00
OptimShi
26b5965544 Gear Knight display fixes (#1610)
* Gear Knight Fix

* Work around old Gear Knights
2019-03-31 09:11:03 -04: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
1b9141ea70
Odds and Ends (#1543)
* Skip Burden in CreateObject if object is Creature

* Update PlayerDescriptionEvent for pulling correct WeenieType and HasHealth bool

* Stop sending all children equipped items

* Allow Ammo to be seen by others, if not in peace mode

* whitespace issue
2019-03-16 02:40:11 -05:00
gmriggs
6b4e9cfb12
Adding monster spawning aggro (#1477) 2019-03-02 03:16:03 -05:00