@@ -356,6 +356,9 @@ void EventsPush::onClickBtn(CCObject* ret) {
356356 } else if (eventType == EventType::Weekly) {
357357 DailyLevelPage::create (GJTimedLevelType::Weekly)->show ();
358358 return ;
359+ } else if (eventType == EventType::Event) {
360+ DailyLevelPage::create (GJTimedLevelType::Event)->show ();
361+ return ;
359362 } else if (eventType == EventType::List) {
360363 if (events_layer->level ->m_levelID == 0 ) return ;
361364
@@ -419,6 +422,7 @@ bool EventsPush::init(sio::message::ptr const& data) {
419422 bool newRate = Mod::get ()->template getSettingValue <bool >(" newRate" );
420423 bool daily = Mod::get ()->template getSettingValue <bool >(" daily" );
421424 bool weekly = Mod::get ()->template getSettingValue <bool >(" weekly" );
425+ bool event = Mod::get ()->template getSettingValue <bool >(" event" );
422426 bool smallChest = Mod::get ()->template getSettingValue <bool >(" smallChest" );
423427 bool largeChest = Mod::get ()->template getSettingValue <bool >(" largeChest" );
424428 bool list = Mod::get ()->template getSettingValue <bool >(" newListRate" );
@@ -441,6 +445,9 @@ bool EventsPush::init(sio::message::ptr const& data) {
441445 case 5 : // List
442446 eventType = EventType::List;
443447 break ;
448+ case 6 : // Event
449+ eventType = EventType::Event;
450+ break ;
444451 }
445452 if (type == 0 && !newRate) {
446453 EventsPush::eventCompletedCallback (scene);
@@ -466,6 +473,10 @@ bool EventsPush::init(sio::message::ptr const& data) {
466473 EventsPush::eventCompletedCallback (scene);
467474 return true ;
468475 }
476+ if (type == 6 && !event) {
477+ EventsPush::eventCompletedCallback (scene);
478+ return true ;
479+ }
469480
470481 auto director = CCDirector::sharedDirector ();
471482 auto winSize = director->getWinSize ();
@@ -793,10 +804,12 @@ bool EventsPush::init(sio::message::ptr const& data) {
793804 level_title->limitLabelWidth (120 , 0 .46f , 0 .1f );
794805 node->addChild (level_title);
795806
796- if (type > 0 && type < 3 ) {
807+ if (( type > 0 && type < 3 ) || type == 6 ) {
797808 CCSprite* crown;
798809 if (type == 1 ) {
799810 crown = cocos2d::CCSprite::createWithSpriteFrameName (" gj_dailyCrown_001.png" );
811+ } else if (type == 6 ) {
812+ crown = cocos2d::CCSprite::createWithSpriteFrameName (" gj_eventCrown_001.png" );
800813 } else {
801814 crown = cocos2d::CCSprite::createWithSpriteFrameName (" gj_weeklyCrown_001.png" );
802815 }
0 commit comments