1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

* small fixes for creature banks info

This commit is contained in:
mateuszb 2009-09-17 10:47:47 +00:00
parent 7660e29751
commit 320e3b9cde
2 changed files with 14 additions and 2 deletions

View File

@ -73,8 +73,10 @@
71 InfernalTroglodyte
72 Harpy
73 HarpyHag
73 M73
74 Beholder
75 EvilEye
75 M75
76 Medusa
76 Medusae
77 MedusaQueen
@ -106,6 +108,7 @@
103 BronzeGorgon
104 DragonFly
104 SerpentFly
104 Dragonflies
105 FireDragonFly
106 Basilisk
107 GreaterBasilisk

View File

@ -22,6 +22,7 @@
#include "../StartInfo.h"
#include "../lib/map.h"
#include <sstream>
#include <SDL_stdinc.h>
using namespace boost::assign;
/*
@ -177,9 +178,17 @@ void CObjectHandler::loadObjects()
istr >> bc.combatValue;
bc.resources.resize(RESOURCE_QUANTITY);
//a dirty trick to make it work if there is no 0 for 0 quantity (like in grotto - last entry)
char buft[52];
istr.getline(buft, 50, '\t');
for(int h=0; h<7; ++h)
{
istr >> bc.resources[h];
istr.getline(buft, 50, '\t');
if(buft[0] == '\0')
bc.resources[h] = 0;
else
bc.resources[h] = SDL_atoi(buft);
}
readCreatures(istr, bc, false);