mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
* reading of creature banks' names
This commit is contained in:
parent
320e3b9cde
commit
1a08772bc8
@ -695,7 +695,7 @@ list<int> CBattleLogic::PerformDefaultAction(int stackID, int &additionalInfo)
|
||||
|
||||
for (std::map<int, int>::iterator it = votes.begin(); it != votes.end(); ++it)
|
||||
{
|
||||
if (m_cb->battleGetStackByID(it->first)->attackerOwned == m_side //it's hostile stack
|
||||
if (bool(m_cb->battleGetStackByID(it->first)->attackerOwned) == m_side //it's hostile stack
|
||||
&& it->second > max_vote)
|
||||
{
|
||||
max_vote = it->second;
|
||||
|
@ -154,8 +154,12 @@ void CObjectHandler::loadObjects()
|
||||
|
||||
for(int g=0; g<21; ++g) //TODO: remove hardcoded value
|
||||
{
|
||||
//reading name - TODO: use it if necessary
|
||||
//reading name
|
||||
istr.getline(buffer, MAX_BUF, '\t');
|
||||
creBanksNames[g] = std::string(buffer);
|
||||
//remove trailing new line characters
|
||||
while(creBanksNames[g][0] == 10 || creBanksNames[g][0] == 13)
|
||||
creBanksNames[g].erase(creBanksNames[g].begin());
|
||||
|
||||
for(int i=0; i<4; ++i) //reading levels
|
||||
{
|
||||
|
@ -951,7 +951,8 @@ class DLL_EXPORT CObjectHandler
|
||||
{
|
||||
public:
|
||||
std::vector<si32> cregens; //type 17. dwelling subid -> creature ID
|
||||
std::map <ui32, std::vector <BankConfig> > banksInfo; //[index][preset], TODO: load it
|
||||
std::map <ui32, std::vector <BankConfig> > banksInfo; //[index][preset]
|
||||
std::map <ui32, std::string> creBanksNames; //[crebank index] -> name of this creature bank
|
||||
|
||||
void loadObjects();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user