Closed Rakaneth closed 6 years ago
Are you calling BurstAOE.setMap()
before... whatever method is blowing up? That call should set resistanceMap
based on the given char[][]
. Calling setMap() is mentioned throughout the AOE-related docs as a necessary step, but it's possible there's some methods that can be called without needing it, while others will throw exceptions if the map isn't up-to-date. You may have encountered mostly the former kind of method, so there wasn't a need for setMap() in your code until now, maybe?
EDIT: Ah, apply()
is a method on Technique
, which is what was confusing me. Technique
also has a setMap()
method; it should be used since it will call BurstAOE.setMap()
as well as set the origin for the BurstAOE
.
setMap()
gets called in the constructor for WolfSkill
(my Technique
wrapper).
Here is line 517 in BurstAOE.java:
return AreaUtils.arrayToHashMap(fov.calculateFOV(null, center.x, center.y, radius, radiusType));
This should be fixed now. I also checked for any other usages of calculateFOV that passed null directly, and I couldn't find any. Thanks for finding this.
I am not sure why this is, but at the moment, this causes
BurstAOE.apply
to blow up with aNullPointerException.