Closed mysterymagination closed 9 months ago
ideally we'd completely remove any coupling between objects generating data and objects making use of that data to support weird stuff like armor and weapons and anatomy that isn't part of the relevant Actor or attacks that aren't part of the weapon at the time its data is needed to process an attack. That presupposes a narrow definition of weapon and armor, however, when all those words mean to Clash is damage tx and rx. Also it would be a major pain. I think going forward with solving the particular problems raised by this ticket for now and not getting mired in theoretical API optimizations should do the trick.
of course, anatomyunit is another matter that could benefit from a data packet thing to separate out structure from function, but... meh. Don't really need that now.
the AActor we pass in to the ApplyPointDamage event is a nother nother point of interest; nothing to be done about that short of making a new event that takes a unique string attribution rather than AActor*.
~todo~: install updated stats into claw slash attack when the treant decides to use it. The projectile things will have the stats installed when the projectile is created.
~todo~: add associated Actor transform to FBattleStatsData objects at population
~todo~: Weapon::WielderData needs to be populated where relevant; that's the main bridge we use to communicate battle stats data to attacks etc. via IAttacker/IDefender::GetBattleStatsData() in cases where the IBattleStatsBearer is not also the Actor delivering the Attack. Mostly it's for the projectiles, but for consistency I guess we should make use of it everywhere; the clawcapsulecomponent can just query the Actor for the latest battle stats data, install it in the Claw weapon WielderData, and then return the Claw's WielderData.