Class ClientCombatDisplay
Handles client-side display of combat events: floating damage/heal numbers, death dialog, resurrect dialog hide, and achievement popups. Extracted from Client.cs.
public class ClientCombatDisplay
- Inheritance
-
ClientCombatDisplay
- Inherited Members
Remarks
Every method here runs on the hottest path the client has — one invocation per damage or
heal event, on every character in view, which in an AoE fight is dozens per frame. What it
used to do per invocation was a GetComponent<Collider> (a native call that walks
the GameObject's component list), a config dictionary probe with a string key, and an
int.ToString(). The first two are cached below; the third is served from a table for
the small values that make up almost all combat numbers.
Methods
Initialize()
Subscribes to damage/heal/kill/resurrect/achievement events. Call during startup.
public void Initialize()
RefreshConfig()
Re-reads the display toggles from the global settings.
public void RefreshConfig()
Remarks
Public so the options panel can call it after a settings change. The values were previously read out of the settings dictionary on every single damage event, by string key, which is a dictionary probe and a hash of a literal per hit.
Shutdown()
Unsubscribes from all combat/achievement events. Call during teardown.
public void Shutdown()
Tick()
Ages out predictions the server never confirmed. Driven by the client loop.
public void Tick()