1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

* fixed possible corruption of pack sent by server when player request is rejected

* BattleAI will restore callback to its previous state, fixes freeze after battle #1104
* BattleAI won't lose turn when unable to correctly evaluate a spell
* VCAI will correctly recognize hero standing on town entrance
* War machines of defender will have correctly set side
* Faction 9 as neutral causes crashes, changing to -1 as used elsewhere in the code
This commit is contained in:
Michał W. Urbańczyk
2012-09-29 14:44:06 +00:00
parent b6a20b6e99
commit f30ee8ff04
6 changed files with 37 additions and 7 deletions

View File

@ -123,7 +123,7 @@ CCreature * CModHandler::loadCreature (const JsonNode &node)
cre->cost = Res::ResourceSet(node["cost"]);
cre->level = node["level"].Float();
cre->faction = 9; //neutral faction is 9 for now. Will be replaced by string -> id conversion
cre->faction = -1; //neutral faction is 9 for now. Will be replaced by string -> id conversion
//TODO: node["faction"].String() to id
cre->fightValue = node["fightValue"].Float();
cre->AIValue = node["aiValue"].Float();