mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Put Warrior's Tomb into the switch statement and properly set the sound returned.
This commit is contained in:
parent
534c9142ac
commit
bc4f856bfc
@ -5554,8 +5554,9 @@ ui8 CGGarrison::getPassableness() const
|
||||
|
||||
void CGOnceVisitable::onHeroVisit( const CGHeroInstance * h ) const
|
||||
{
|
||||
int sound = 0;
|
||||
int txtid = -1;
|
||||
int sound;
|
||||
int txtid;
|
||||
|
||||
switch(ID)
|
||||
{
|
||||
case 22: //Corpse
|
||||
@ -5570,24 +5571,22 @@ void CGOnceVisitable::onHeroVisit( const CGHeroInstance * h ) const
|
||||
sound = soundBase::GENIE;
|
||||
txtid = 154;
|
||||
break;
|
||||
case 108:
|
||||
case 108://Warrior's Tomb
|
||||
{
|
||||
//ask if player wants to search the Tomb
|
||||
BlockingDialog bd(true, false);
|
||||
bd.soundID = soundBase::GRAVEYARD;
|
||||
bd.player = h->getOwner();
|
||||
bd.text.addTxt(MetaString::ADVOB_TXT,161);
|
||||
cb->showBlockingDialog(&bd,boost::bind(&CGOnceVisitable::searchTomb,this,h,_1));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
tlog1 << "Error: Unknown object (" << ID <<") treated as CGOnceVisitable!\n";
|
||||
return;
|
||||
}
|
||||
|
||||
if(ID == 108)//Warrior's Tomb
|
||||
{
|
||||
//ask if player wants to search the Tomb
|
||||
BlockingDialog bd(true, false);
|
||||
sound = soundBase::GRAVEYARD;
|
||||
bd.player = h->getOwner();
|
||||
bd.text.addTxt(MetaString::ADVOB_TXT,161);
|
||||
cb->showBlockingDialog(&bd,boost::bind(&CGOnceVisitable::searchTomb,this,h,_1));
|
||||
return;
|
||||
}
|
||||
|
||||
InfoWindow iw;
|
||||
iw.soundID = sound;
|
||||
iw.player = h->getOwner();
|
||||
|
Loading…
Reference in New Issue
Block a user