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

CRewardableObject: remove now unused soundID

This commit is contained in:
Arseniy Shestakov 2017-09-13 03:29:50 +03:00 committed by DJWarmonger
parent f15cadc87b
commit c5ca75bc53
3 changed files with 5 additions and 9 deletions

View File

@ -119,7 +119,6 @@ void CRandomRewardObjectInfo::configureObject(CRewardableObject * object, CRando
//TODO: visitMode and selectMode
object->soundID = parameters["soundID"].Float();
object->resetDuration = parameters["resetDuration"].Float();
object->canRefuse =parameters["canRefuse"].Bool();
}

View File

@ -102,7 +102,6 @@ void CRewardableObject::onHeroVisit(const CGHeroInstance *h) const
{
InfoWindow iw;
iw.player = h->tempOwner;
iw.soundID = soundID;
iw.text = vi.message;
vi.reward.loadComponents(iw.components, h);
cb->showInfoDialog(&iw);
@ -114,7 +113,6 @@ void CRewardableObject::onHeroVisit(const CGHeroInstance *h) const
{
BlockingDialog sd(canRefuse, rewards.size() > 1);
sd.player = h->tempOwner;
sd.soundID = soundID;
sd.text = onSelect;
for (auto index : rewards)
sd.components.push_back(getVisitInfo(index, h).reward.getDisplayedComponent(h));
@ -138,7 +136,6 @@ void CRewardableObject::onHeroVisit(const CGHeroInstance *h) const
{
InfoWindow iw;
iw.player = h->tempOwner;
iw.soundID = soundID;
if (!onEmpty.toString().empty())
iw.text = onEmpty;
else
@ -182,7 +179,6 @@ void CRewardableObject::onHeroVisit(const CGHeroInstance *h) const
logGlobal->debug("Revisiting already visited object");
InfoWindow iw;
iw.player = h->tempOwner;
iw.soundID = soundID;
if (!onVisited.toString().empty())
iw.text = onVisited;
else
@ -451,7 +447,6 @@ void CRewardableObject::newTurn(CRandomGenerator & rand) const
}
CRewardableObject::CRewardableObject():
soundID(soundBase::invalid),
selectMode(0),
visitMode(0),
selectedReward(0),

View File

@ -220,8 +220,6 @@ protected:
MetaString onVisited;
MetaString onEmpty;
/// sound that will be played alongside with *any* message
ui16 soundID;
/// how reward will be selected, uses ESelectMode enum
ui8 selectMode;
/// contols who can visit an object, uses EVisitMode enum
@ -271,7 +269,11 @@ public:
h & onVisited;
h & onEmpty;
h & visitMode;
h & soundID;
if(version < 778)
{
ui16 soundID = 0;
h & soundID;
}
h & selectMode;
h & selectedReward;
}