MantisBT - VCMI
View Issue Details
0002356VCMIMechanics - Otherpublic2015-12-25 08:062016-08-24 20:43
SXX 
SXX 
normalmajorN/A
assignedopen 
0.98e 
 
0002356: New turn handling need refactoring
Currently part of game state changes occur in "CGameHandler::newTurn" and other is occur within "NewTurn::applyGs". To be exact problem is caused by fact that too old bonuses only removed in "NewTurn::applyGs". This is cause bugs like 0002083, but most likely there is other problems too.

So this code needs refactoring because I'm currently hotfixing 0002083, but I feel like number of things in this code should be probably done in same place (so we just pass it using new netpacks to client) and some things may be moved to map object own "::newTurn".

Currently I'm really even sure why code like town update and heroes move points update isn't done by these object handlers so I wouldn't touch it.
No tags attached.
related to 0002083closed SXX Stables bonus is always reset at the beginning of 2nd day of new week 
Issue History
2015-12-25 08:06SXXNew Issue
2015-12-25 08:08SXXDescription Updatedbug_revision_view_page.php?rev_id=3081#r3081
2015-12-25 08:17SXXRelationship addedrelated to 0002083
2016-08-24 03:13SXXAssigned To => SXX
2016-08-24 03:13SXXStatusnew => assigned
2016-08-24 20:43AVSNote Added: 0006588

Notes
(0006588)
AVS   
2016-08-24 20:43   
1) CGameHandler`s newTurn part has multiple deps on CGameHandler
2) currently map objects do not use NetPacks directly, all gamestate changes are made there only via (high level) callback interface.