Fixed crash on game start when buildings are customized, should finally solve #1444.

git-svn-id: http://svn.code.sf.net/p/vcmi/code/trunk/@3567 4dfc6b2a-8b31-0410-aa91-d6c70e3ac834
Fixed AI detection of battle end (solves some freezes).

git-svn-id: http://svn.code.sf.net/p/vcmi/code/trunk/@3568 4dfc6b2a-8b31-0410-aa91-d6c70e3ac834