Adding projected atack result: BattleInfo..CBattleInterface?

I am working on bugs.vcmi.eu/view.php?id=949 - “Adding projected attack outcome hintbox…” and I got working but in a somewhat hacky way, and I am trying to make it right a little nicer and I have a question in regards to that. It may very well be a silly question, and I do apolozise if it is… anyway my question is:

It seems very strange to me that there is no easy way to get to BattleInfo from CBattleInterface. And it seems strange because CBattleInterface depends very much on BattleInfo, it is defacto constructed from BattleInfo and yet there is no data member or method in CBattleInterface that can easily get us to BattleInfo??

One has to get the curInt then from it the CCallback * cb pointer and then we can get to the BattleInfo…


Is there any reason for not allowing easy access to the BattleInfo from CBattleInterface?

BattleInfo is part of mechanics, all changes are applied directly to it, by a separate thread. Callback is supposed to provide at least short-time consistency of that data. I’m not sure if it is really needed in this particular case, but a general design is to obtain changeable mechanical info via a callback.