1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

A bunch of minor fixes, including enforced conversion warnings.

This commit is contained in:
DjWarmonger
2009-08-14 06:01:08 +00:00
parent ce86e88fa3
commit 9dbb6b03dd
3 changed files with 5 additions and 5 deletions

View File

@@ -412,7 +412,7 @@ ui64 CHeroHandler::reqExp(unsigned int level)
// exp*=1.2;
//}
//return exp;
return reqExp(level - 1) + (reqExp(level - 1) - reqExp(level - 2)) * 1.2; //inefficient but follows exactly H3 values
return (ui64)(reqExp(level - 1) + (reqExp(level - 1) - reqExp(level - 2)) * 1.2); //inefficient but follows exactly H3 values
}
}

View File

@@ -1803,7 +1803,7 @@ int CGCreature::takenAction(const CGHeroInstance *h, bool allowJoin) const
if(hlp >= 7)
factor = 11;
else if(hlp >= 1)
factor = 2*(hlp-1);
factor = (int)(2*(hlp-1));
else if(hlp >= 0.5)
factor = -1;
else if(hlp >= 0.333)
@@ -3824,7 +3824,7 @@ void CGSirens::onHeroVisit( const CGHeroInstance * h ) const
sg.garrs[h->id] = h->army;
for (std::map<si32,std::pair<ui32,si32> >::const_iterator i = h->army.slots.begin(); i != h->army.slots.end(); i++)
{
int drown = i->second.second * 0.3;
int drown = (int)(i->second.second * 0.3);
if(drown)
{
sg.garrs[h->id].slots[i->first].second -= drown;

View File

@@ -852,9 +852,9 @@ class DLL_EXPORT CBank : public CArmedInstance
public:
int index; //banks have unusal numbering - see ZCRBANK.txt and initObj()
BankConfig *bc;
ui8 multiplier; //for improved banks script, in percent
float multiplier; //for improved banks script, in percent
std::vector<si32> artifacts; //fixed and deterministic
mutable ui32 daycounter;
ui32 daycounter;
void initObj();
void setPropertyDer (ui8 what, ui32 val);