diff --git a/hch/CObjectHandler.cpp b/hch/CObjectHandler.cpp index 29c2bb73d..30b06ee5f 100644 --- a/hch/CObjectHandler.cpp +++ b/hch/CObjectHandler.cpp @@ -4220,24 +4220,11 @@ void CBank::onHeroVisit (const CGHeroInstance * h) const else { InfoWindow iw; - if (ID == 85) - { - iw.components.push_back (Component (Component::MORALE, 0 , -1, 0)); - GiveBonus gbonus; - gbonus.hid = h->id; - gbonus.bonus.duration = HeroBonus::ONE_BATTLE; - gbonus.bonus.source = HeroBonus::OBJECT; - gbonus.bonus.id = ID; - gbonus.bdescr << "\n" << VLC->generaltexth->arraytxt[ID]; - gbonus.bonus.type = HeroBonus::MORALE; - gbonus.bonus.val = -1; - cb->giveHeroBonus(&gbonus); - } iw.soundID = soundBase::GRAVEYARD; iw.player = h->getOwner(); + //if (ID == 16 || ID == 24 || ID == 25 || ID == 84) iw.text << VLC->generaltexth->advobtxt[33]; - if (ID == 16 || ID == 24 || ID == 85) - iw.text.addReplacement (VLC->objh->creBanksNames[index]); + iw.text.addReplacement (VLC->objh->creBanksNames[index]); cb->showInfoDialog(&iw); } } @@ -4260,7 +4247,7 @@ void CBank::endBattle (const CGHeroInstance *h, const BattleResult *result) cons switch (ID) { - case 16: case 25: case 84: + case 16: case 25: textID = 34; break; case 24: //derelict ship @@ -4268,10 +4255,39 @@ void CBank::endBattle (const CGHeroInstance *h, const BattleResult *result) cons textID = 43; else { + iw.components.push_back (Component (Component::MORALE, 0 , -2, 0)); + GiveBonus gbonus; + gbonus.hid = h->id; + gbonus.bonus.duration = HeroBonus::ONE_BATTLE; + gbonus.bonus.source = HeroBonus::OBJECT; + gbonus.bonus.id = ID; + gbonus.bdescr << "\n" << VLC->generaltexth->arraytxt[ID]; + gbonus.bonus.type = HeroBonus::MORALE; + gbonus.bonus.val = -2; + cb->giveHeroBonus(&gbonus); textID = 42; iw.components.push_back (Component (Component::MORALE, 0 , -2, 0)); } break; + case 84: //Crypt + if (bc->resources.size() != 0) + textID = 121; + else + { + iw.components.push_back (Component (Component::MORALE, 0 , -1, 0)); + GiveBonus gbonus; + gbonus.hid = h->id; + gbonus.bonus.duration = HeroBonus::ONE_BATTLE; + gbonus.bonus.source = HeroBonus::OBJECT; + gbonus.bonus.id = ID; + gbonus.bdescr << "\n" << VLC->generaltexth->arraytxt[ID]; + gbonus.bonus.type = HeroBonus::MORALE; + gbonus.bonus.val = -1; + cb->giveHeroBonus(&gbonus); + textID = 120; + iw.components.push_back (Component (Component::MORALE, 0 , -1, 0)); + } + break; case 85: //shipwreck if (bc->resources.size() != 0) textID = 124; diff --git a/hch/CObjectHandler.h b/hch/CObjectHandler.h index f95e1d214..5b1d17d2c 100644 --- a/hch/CObjectHandler.h +++ b/hch/CObjectHandler.h @@ -955,7 +955,7 @@ public: template void serialize(Handler &h, const int version) { - h & static_cast(*this); + h & static_cast(*this); h & spell; } }; diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 6f1811648..ee415f9c4 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -2040,12 +2040,12 @@ bool CGameHandler::buildStructure( si32 tid, si32 bid ) ssi.creatures[bid-30].first = VLC->creh->creatures[crid].growth; ssi.creatures[bid-30].second.push_back(crid); sendAndApply(&ssi); - } - else if(bid == 11) - ns.bid.insert(27); - else if(bid == 12) - ns.bid.insert(28); - else if(bid == 13) + } + else if(bid == 11) + ns.bid.insert(27); + else if(bid == 12) + ns.bid.insert(28); + else if(bid == 13) ns.bid.insert(29); ns.bid.insert(bid);