Skip to content

Commit

Permalink
safer?
Browse files Browse the repository at this point in the history
  • Loading branch information
RayDeeUx committed Jul 29, 2024
1 parent 1e61027 commit 4861b85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@ class $modify(PlayLayer) {
class $modify(MyCurrencyRewardLayer, CurrencyRewardLayer) {
bool init(int orbs, int stars, int moons, int diamonds, CurrencySpriteType demonKey, int keyCount, CurrencySpriteType shardType, int shardsCount, cocos2d::CCPoint position, CurrencyRewardType p9, float p10, float time) {
bool result = CurrencyRewardLayer::init(orbs, stars, moons, diamonds, demonKey, keyCount, shardType, shardsCount, position, p9, p10, time);
if (this->getParent()->getID() == "EndLevelLayer" && Mod::get()->getSettingValue<bool>("hideEndLevelLayer")) {
this->setVisible(false);
if (Mod::get()->getSettingValue<bool>("hideEndLevelLayer")) {
if (typeinfo_cast<EndLevelLayer*>(this->getParent())) {
this->setVisible(false);
}
}
return result;
}
Expand Down

0 comments on commit 4861b85

Please sign in to comment.