MantisBT - VCMI
View Issue Details
0002969VCMIModspublic2018-07-16 02:552018-07-17 01:29
0002969: Towns are initialized before articact handler can patch creature handler with war machine ID
So @Andruids reported on slack that his mod of war machine is crashes on attempt to buy his replacement war machine within town. Basically

As I find out problem is that sequence is like this:

* First default siege weapon get loaded by CArtHandler::loadFromJson.
* Then all default towns are initialized by CTownHandler::loadTown. At this point custom war machine creature don't have artifactID.
* Only now CArtHandler::loadFromJson loading our custom war machine artifact so it's where appropriate warmachine ArtifaftID is set for creature.
* Now when you try to open town window ArtifactID::NONE passed to UI and obviously it's cause crash.

VLC->creh->>warMachine = art->id;
No tags attached.
zip (122,945) 2018-07-16 02:55
Issue History
2018-07-16 02:55SXXNew Issue
2018-07-16 02:55SXXStatusnew => assigned
2018-07-16 02:55SXXAssigned To => AVS
2018-07-16 02:55SXXFile Added:
2018-07-17 01:29AVSNote Added: 0007588
2018-07-17 01:29AVSStatusassigned => resolved
2018-07-17 01:29AVSFixed in Version =>
2018-07-17 01:29AVSResolutionopen => fixed

2018-07-17 01:29   
Fixed in [^]