mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-15 11:46:56 +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
|
//TODO: visitMode and selectMode
|
||||||
|
|
||||||
object->soundID = parameters["soundID"].Float();
|
|
||||||
object->resetDuration = parameters["resetDuration"].Float();
|
object->resetDuration = parameters["resetDuration"].Float();
|
||||||
object->canRefuse =parameters["canRefuse"].Bool();
|
object->canRefuse =parameters["canRefuse"].Bool();
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,6 @@ void CRewardableObject::onHeroVisit(const CGHeroInstance *h) const
|
|||||||
{
|
{
|
||||||
InfoWindow iw;
|
InfoWindow iw;
|
||||||
iw.player = h->tempOwner;
|
iw.player = h->tempOwner;
|
||||||
iw.soundID = soundID;
|
|
||||||
iw.text = vi.message;
|
iw.text = vi.message;
|
||||||
vi.reward.loadComponents(iw.components, h);
|
vi.reward.loadComponents(iw.components, h);
|
||||||
cb->showInfoDialog(&iw);
|
cb->showInfoDialog(&iw);
|
||||||
@ -114,7 +113,6 @@ void CRewardableObject::onHeroVisit(const CGHeroInstance *h) const
|
|||||||
{
|
{
|
||||||
BlockingDialog sd(canRefuse, rewards.size() > 1);
|
BlockingDialog sd(canRefuse, rewards.size() > 1);
|
||||||
sd.player = h->tempOwner;
|
sd.player = h->tempOwner;
|
||||||
sd.soundID = soundID;
|
|
||||||
sd.text = onSelect;
|
sd.text = onSelect;
|
||||||
for (auto index : rewards)
|
for (auto index : rewards)
|
||||||
sd.components.push_back(getVisitInfo(index, h).reward.getDisplayedComponent(h));
|
sd.components.push_back(getVisitInfo(index, h).reward.getDisplayedComponent(h));
|
||||||
@ -138,7 +136,6 @@ void CRewardableObject::onHeroVisit(const CGHeroInstance *h) const
|
|||||||
{
|
{
|
||||||
InfoWindow iw;
|
InfoWindow iw;
|
||||||
iw.player = h->tempOwner;
|
iw.player = h->tempOwner;
|
||||||
iw.soundID = soundID;
|
|
||||||
if (!onEmpty.toString().empty())
|
if (!onEmpty.toString().empty())
|
||||||
iw.text = onEmpty;
|
iw.text = onEmpty;
|
||||||
else
|
else
|
||||||
@ -182,7 +179,6 @@ void CRewardableObject::onHeroVisit(const CGHeroInstance *h) const
|
|||||||
logGlobal->debug("Revisiting already visited object");
|
logGlobal->debug("Revisiting already visited object");
|
||||||
InfoWindow iw;
|
InfoWindow iw;
|
||||||
iw.player = h->tempOwner;
|
iw.player = h->tempOwner;
|
||||||
iw.soundID = soundID;
|
|
||||||
if (!onVisited.toString().empty())
|
if (!onVisited.toString().empty())
|
||||||
iw.text = onVisited;
|
iw.text = onVisited;
|
||||||
else
|
else
|
||||||
@ -451,7 +447,6 @@ void CRewardableObject::newTurn(CRandomGenerator & rand) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
CRewardableObject::CRewardableObject():
|
CRewardableObject::CRewardableObject():
|
||||||
soundID(soundBase::invalid),
|
|
||||||
selectMode(0),
|
selectMode(0),
|
||||||
visitMode(0),
|
visitMode(0),
|
||||||
selectedReward(0),
|
selectedReward(0),
|
||||||
|
@ -220,8 +220,6 @@ protected:
|
|||||||
MetaString onVisited;
|
MetaString onVisited;
|
||||||
MetaString onEmpty;
|
MetaString onEmpty;
|
||||||
|
|
||||||
/// sound that will be played alongside with *any* message
|
|
||||||
ui16 soundID;
|
|
||||||
/// how reward will be selected, uses ESelectMode enum
|
/// how reward will be selected, uses ESelectMode enum
|
||||||
ui8 selectMode;
|
ui8 selectMode;
|
||||||
/// contols who can visit an object, uses EVisitMode enum
|
/// contols who can visit an object, uses EVisitMode enum
|
||||||
@ -271,7 +269,11 @@ public:
|
|||||||
h & onVisited;
|
h & onVisited;
|
||||||
h & onEmpty;
|
h & onEmpty;
|
||||||
h & visitMode;
|
h & visitMode;
|
||||||
h & soundID;
|
if(version < 778)
|
||||||
|
{
|
||||||
|
ui16 soundID = 0;
|
||||||
|
h & soundID;
|
||||||
|
}
|
||||||
h & selectMode;
|
h & selectMode;
|
||||||
h & selectedReward;
|
h & selectedReward;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user