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:
parent
f15cadc87b
commit
c5ca75bc53
@ -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();
|
||||
}
|
||||
|
@ -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),
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user