1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fixed Crypt/Pyramid double visit sound.

Removed sound call from CBank to avoid two sounds from being launched at same time. Gave priority to JSON files.
This commit is contained in:
Ewilhan 2019-05-02 23:46:18 +01:00
parent 4a21841ce2
commit 91177c412c

View File

@ -98,7 +98,6 @@ bool CBank::wasVisited (PlayerColor player) const
void CBank::onHeroVisit(const CGHeroInstance * h) const
{
int banktext = 0;
ui16 soundID = soundBase::ROGUE;
switch (ID)
{
case Obj::DERELICT_SHIP:
@ -114,7 +113,6 @@ void CBank::onHeroVisit(const CGHeroInstance * h) const
banktext = 122;
break;
case Obj::PYRAMID:
soundID = soundBase::MYSTERY;
banktext = 105;
break;
case Obj::CREATURE_BANK:
@ -124,7 +122,7 @@ void CBank::onHeroVisit(const CGHeroInstance * h) const
}
BlockingDialog bd(true, false);
bd.player = h->getOwner();
bd.soundID = soundID;
bd.soundID = soundBase::invalid; // Sound is handled in json files, else two sounds are played
bd.text.addTxt(MetaString::ADVOB_TXT, banktext);
if (banktext == 32)
bd.text.addReplacement(getObjectName());