void BlankTile::confirmed(CCObject* obj){ auto dict = CCDictionary::create(); dict->setObject(CCString::createWithFormat("%d",0), "point"); auto& info = ToolController::getInstance()->getToolInfoById(ITEM_NEW_BEGINNER_MOVE); if (info.getCNT() > 0) { dict->setObject(CCString::create(info.uuid), "goodsId"); if (GlobalData::shared()->trans_res_forbidden_swith == 1) { bool flag = ActivityController::getInstance()->checkServerCanJoin(GlobalData::shared()->playerInfo.currentServerId); if (!flag && (GlobalData::shared()->resourceInfo.lFood > GlobalData::shared()->trans_res_limit || GlobalData::shared()->resourceInfo.lWood > GlobalData::shared()->trans_res_limit)) { CCCallFuncO* fun = CCCallFuncO::create(this, callfuncO_selector(BlankTile::alertShow), dict); YesNoDialog::marchAlertShow(_lang_1("104959", CC_ITOA(GlobalData::shared()->trans_res_limit)), fun, NULL); } else { WorldMapView::instance()->afterCrossCityMove(dict); this->closeSelf(); } } else { WorldMapView::instance()->afterCrossCityMove(dict); this->closeSelf(); } } else { closeSelf(); } return; }
void AllianceAreaPopupView::doBuy(){ unsigned int index = WorldController::getIndexByPoint(currentCenterPt); WorldAllianceAreaCreateCommand* cmd = new WorldAllianceAreaCreateCommand(index,m_aareaId); cmd->sendAndRelease(); // WorldAllianceAreaCancelCommand *cancelCmd = new WorldAllianceAreaCancelCommand(index,uuid); // cancelCmd->sendAndRelease(); closeSelf(); }
CPortC32Interface* CPortC32Interface::NewL(CPortFactory& aPortFactory, CPortFactory::TC32PortInfo& aPortInfo) /** * This method uses two phase construction and the cleanup stack to create * an instance of class CPortC32Interface. * * @param aPortFactory - Reference to the port factory * @param aPortInfo - Reference to the port information * @return Pointer to the created instance */ { _LOG_L4C1( "CPortC32Interface::NewL"); CPortC32Interface* self = new(ELeave) CPortC32Interface(aPortFactory, aPortInfo); TCleanupItem closeSelf(CPortFactory::CloseObject, self); CleanupStack::PushL(closeSelf); self->ConstructL(); CleanupStack::Pop(self); return self; }
void ResourceTileInfoPopUpView::onToolUseBtnClick(cocos2d::CCObject * pSender, CCControlEvent pCCControlEvent) { PopupViewController::getInstance()->addPopupInView(UseItemStatusView::create(8,_lang("101406"),_lang("101448"))); closeSelf(); }