mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +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:
@@ -98,7 +98,6 @@ bool CBank::wasVisited (PlayerColor player) const
|
|||||||
void CBank::onHeroVisit(const CGHeroInstance * h) const
|
void CBank::onHeroVisit(const CGHeroInstance * h) const
|
||||||
{
|
{
|
||||||
int banktext = 0;
|
int banktext = 0;
|
||||||
ui16 soundID = soundBase::ROGUE;
|
|
||||||
switch (ID)
|
switch (ID)
|
||||||
{
|
{
|
||||||
case Obj::DERELICT_SHIP:
|
case Obj::DERELICT_SHIP:
|
||||||
@@ -114,7 +113,6 @@ void CBank::onHeroVisit(const CGHeroInstance * h) const
|
|||||||
banktext = 122;
|
banktext = 122;
|
||||||
break;
|
break;
|
||||||
case Obj::PYRAMID:
|
case Obj::PYRAMID:
|
||||||
soundID = soundBase::MYSTERY;
|
|
||||||
banktext = 105;
|
banktext = 105;
|
||||||
break;
|
break;
|
||||||
case Obj::CREATURE_BANK:
|
case Obj::CREATURE_BANK:
|
||||||
@@ -124,7 +122,7 @@ void CBank::onHeroVisit(const CGHeroInstance * h) const
|
|||||||
}
|
}
|
||||||
BlockingDialog bd(true, false);
|
BlockingDialog bd(true, false);
|
||||||
bd.player = h->getOwner();
|
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);
|
bd.text.addTxt(MetaString::ADVOB_TXT, banktext);
|
||||||
if (banktext == 32)
|
if (banktext == 32)
|
||||||
bd.text.addReplacement(getObjectName());
|
bd.text.addReplacement(getObjectName());
|
||||||
|
|||||||
Reference in New Issue
Block a user