clintbellanger/flare — Issue #256: Dummy StatBlock in MapIso issue
Author: clintbellanger
Created: 2012-01-01 00:04:12+00:00
State: open

Powers and Hazards assume a live StatBlock pointer.

MapIso.cpp around line 800 we create a dummy StatBlock for map-generated powers (e.g. traps). Once that data reaches the Hazard level, I think it's mainly only used to carry the Accuracy stat.

The issue is that we're not currently deleting the dummy pointer, so it's causing a tiny memory leak. We need to be deleting that right after the powers->activate() call.

Make it so that Hazards aren't absolutely dependent on having a StatBlock. Check the Hazard code and the TakeHit code. Perhaps for Map-generated powers we give Hazard a NULL statblock. Give Hazards a 100% accuracy flag for map events. In the Hazard and TakeHit code, always check to see if statblock is NULL before using it.