1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed #583. Minor fixes.

This commit is contained in:
DjWarmonger 2010-08-15 16:24:58 +00:00
parent cbc215fa38
commit 6f022e02bb
4 changed files with 6 additions and 6 deletions

View File

@ -3316,7 +3316,7 @@ void CGResource::endBattle( BattleResult *result, const CGHeroInstance *h ) cons
void CGVisitableOPW::newTurn() const
{
if (cb->getDate(1)==1) //first day of week
if (cb->getDate(1) == 1) //first day of week = 1
{
cb->setObjProperty(id, ObjProperty::VISITED, false);
MetaString ms; //set text to "not visited"
@ -4608,7 +4608,7 @@ void CGBonusingObject::onHeroVisit( const CGHeroInstance * h ) const
gbonus.bdescr << std::pair<ui8,ui32>(6,103);
bonusMove = 400;
break;
case 94: //Stables TODO: upgrade Cavaliers
case 94: //Stables
sound = soundBase::horse20;
CCreatureSet creatures;
for (TSlots::const_iterator i = h->Slots().begin(); i != h->Slots().end(); ++i)

View File

@ -1152,7 +1152,7 @@ int CGameState::getDate(int mode) const
return day;
break;
case 1: //day of week
temp = (day)%7;
temp = (day)%7; // 1 - Monday, 7 - Sunday
if (temp)
return temp;
else return 7;

View File

@ -922,7 +922,7 @@ struct BattleResult : public CPackForClient//3003
ui8 result; //0 - normal victory; 1 - escape; 2 - surrender
ui8 winner; //0 - attacker, 1 - defender, [2 - draw (should be possible?)]
std::map<ui32,si32> casualties[2]; //first => casualties of attackers - map crid => number
ui32 exp[2]; //exp for attacker and defender
expType exp[2]; //exp for attacker and defender
std::set<ui32> artifacts; //artifacts taken from loser to winner

View File

@ -615,7 +615,7 @@ DLL_EXPORT void NewTurn::applyGs( CGameState *gs )
BOOST_FOREACH(CGHeroInstance *h, gs->map->heroes)
h->bonuses.remove_if(Bonus::OneDay);
if(gs->getDate(1) == 7) //new week
if(gs->getDate(1) == 1) //new week, Monday that is
BOOST_FOREACH(CGHeroInstance *h, gs->map->heroes)
h->bonuses.remove_if(Bonus::OneWeek);
@ -628,7 +628,7 @@ DLL_EXPORT void NewTurn::applyGs( CGameState *gs )
i->second.daysWithoutCastle++;
i->second.bonuses.remove_if(Bonus::OneDay);
if(gs->getDate(1) == 7) //new week
if(gs->getDate(1) == 1) //new week
i->second.bonuses.remove_if(Bonus::OneWeek);
}
}