void KBagManager::InitOneBag(const void* pData, int nLen) { ASSERT_RETURN_VOID(pData); KMsgInputStream si(pData, nLen); BYTE nBagID = 0; BOOL bRet = si.ReadByte(nBagID); ASSERT_RETURN_VOID(bRet); // 装备背包 switch(nBagID) { case enum_item_BagNormal: InitOneBagNormal(si); // 普通背包 break; default: ASSERT_I(false); break; } KBag* pBag = FindBag(enum_item_BagReaderAttach); if (!pBag) { InitOneReaderAttach(); } }
void enlil_tag_photo_add(Enlil_Tag *tag, Enlil_Photo *photo) { ASSERT_RETURN_VOID(tag != NULL); ASSERT_RETURN_VOID(photo != NULL); tag->photos = eina_list_append(tag->photos, photo); }
void upload_free(Upload **_ul) { ASSERT_RETURN_VOID(_ul != NULL); Upload *ul = *_ul; ASSERT_RETURN_VOID(ul != NULL); evas_object_del(ul->main); }
void enlil_tag_copy(const Enlil_Tag *tag_src, Enlil_Tag *tag_dest) { ASSERT_RETURN_VOID(tag_src != NULL); ASSERT_RETURN_VOID(tag_dest != NULL); enlil_tag_name_set(tag_dest, enlil_tag_name_get(tag_src)); enlil_tag_description_set(tag_dest, enlil_tag_description_get(tag_src)); }
void enlil_iptc_copy(Enlil_IPTC *iptc_src, Enlil_IPTC *iptc_dest) { ASSERT_RETURN_VOID(iptc_src != NULL); ASSERT_RETURN_VOID(iptc_dest != NULL); iptc_dest->record = iptc_src->record; iptc_dest->tag = iptc_src->tag; iptc_dest->name = eina_stringshare_add(iptc_src->name); iptc_dest->title = eina_stringshare_add(iptc_src->title); iptc_dest->value = eina_stringshare_add(iptc_src->value); }
void KBagManager::InitOneBagNormal(KMsgInputStream& si) { KBagNormal* pNewBag = KBagNormal::Alloc(); ASSERT_RETURN_VOID(pNewBag); pNewBag->Reset(); ASSERT_RETURN_VOID(pNewBag->UnserilizeInitInfo(si)); if(!_AddBagList(pNewBag)) { pNewBag->Release(); return; } }
void tag_menu_free(Tag_Menu *tag_menu) { ASSERT_RETURN_VOID(tag_menu != NULL); evas_object_del(tag_menu->menu); }
void SessionOfflineState::OnEnter() { PlayerSession* session = dynamic_cast<PlayerSession*>(stateOwner); ASSERT_RETURN_VOID(session != NULL); session->ReleaseGracefully(); }
static void _job_free(Enlil_IPTC_Job *job) { ASSERT_RETURN_VOID(job != NULL); FREE(job); }
void KBagManager::ChangeItemState( int nBoxId, int nPos, bool bLock ) { IBlock* pIB = KBlockBoxManager::Instance()->GetBlock(nBoxId, nPos); ASSERT_RETURN_VOID(pIB); pIB->SetLock(bLock); KBlockBoxManager::Instance()->OnBlockInfoChanged(nBoxId, nPos); }
void enlil_iptc_free(Enlil_IPTC **iptc) { ASSERT_RETURN_VOID(iptc != NULL); Enlil_IPTC *_iptc = *iptc; ASSERT_RETURN_VOID(_iptc != NULL); if(_iptc->name) eina_stringshare_del(_iptc->name); if(_iptc->title) eina_stringshare_del(_iptc->title); if(_iptc->value) eina_stringshare_del(_iptc->value); FREE(_iptc); }
void enlil_tag_free(Enlil_Tag **tag) { Enlil_Photo *photo; ASSERT_RETURN_VOID(tag != NULL); Enlil_Tag *_tag = *tag; ASSERT_RETURN_VOID(_tag != NULL); if(_tag->free_cb) _tag->free_cb(_tag, _tag->user_data); EINA_STRINGSHARE_DEL(_tag->name); EINA_LIST_FREE(_tag->photos, photo) ; free(_tag); }
void enlil_tag_user_data_set(Enlil_Tag *tag, void *user_data, Enlil_Tag_Free_Cb cb) { ASSERT_RETURN_VOID(tag != NULL); tag->user_data = user_data; tag->free_cb = cb; }
void list_left_col_album_add(List_Left *list_left, Enlil_Collection *col, Enlil_Album *album) { ASSERT_RETURN_VOID(list_left != NULL); ASSERT_RETURN_VOID(col != NULL); ASSERT_RETURN_VOID(album != NULL); Enlil_Collection_Data *col_data = enlil_collection_user_data_get(col); if (elm_genlist_item_expanded_get(col_data->list_col_item)) { enki_elm_genlist_item_collection_append(main_panel_object, &itc_col_album, album, col_data->list_col_item, _gl_col_album_sel, album); } }
void KBagManager::_UseItemErrResponse(const SC_BagUseErrResponse* pBUER) { ASSERT_RETURN_VOID(pBUER); int nErr = 0; switch(pBUER->result) { case SC_BagUseErrResponse::E_RESULT::FAILED_LEVEL_LIMIT: nErr = 1401601; // 1401601 无法使用:人物等级不足 break; default: ASSERT_I(false); return; } const char* pErr = KStringManager::Instance()->GetStringByID(nErr); ASSERT_RETURN_VOID(pErr); //g_DynamicWorld.ShowHeadInfoMsg(pErr); }
void KPlayerQuestManager::HistoryInit(int nCount, void * pData, int nLen) { KMsgInputStream is(pData, nLen); KDBQuestHistoryDataUnit dataUnit; for (int i=0; i<nCount; i++) { ASSERT_RETURN_VOID(is.ReadByteArray(&dataUnit, sizeof(KDBQuestHistoryDataUnit))); m_questHistory.insert_unique(dataUnit); } }
void enlil_tag_list_print(const Eina_List *tags) { const Eina_List *l; const Enlil_Tag *tag; ASSERT_RETURN_VOID(tags != NULL); EINA_LIST_FOREACH(tags, l, tag) { printf("\n"); enlil_tag_print(tag); }
void list_left_col_album_remove(List_Left *list_left, Enlil_Collection *col, Enlil_Album *album) { Eina_List *l; Enlil_Album *_album; ASSERT_RETURN_VOID(list_left != NULL); ASSERT_RETURN_VOID(col != NULL); ASSERT_RETURN_VOID(album != NULL); Enlil_Collection_Data *col_data = enlil_collection_user_data_get(col); if (elm_genlist_item_expanded_get(col_data->list_col_item)) { photos_list_object_freeze(col_data->enlil_data->list_photo->o_list, 1); photos_list_object_hide_all(col_data->enlil_data->list_photo->o_list); EINA_LIST_FOREACH(enlil_collection_albums_get(col), l, _album) { Enlil_Album_Data *album_data = enlil_album_user_data_get(_album); photos_list_object_header_show(album_data->list_photo_item); }
void enlil_iptc_job_del(Enlil_IPTC_Job *job) { ASSERT_RETURN_VOID(job != NULL); if(job == job_current) { job_current = NULL; } l_jobs = eina_list_remove(l_jobs, job); _job_free(job); }
/** * @brief Copy an Enlil_Album in a second album. This method is used when a change is detected on an album already loaded. We load the changed album (album_src) and copy his fields in the loaded album (album_dest).<br> * A change on an album doesn't means we have a change in the photo list, the changes on a photo are managed separately. Consequently we do not copy the photo list. */ void enlil_album_copy(const Enlil_Album *album_src, Enlil_Album *album_dest) { const Eina_List *l; const Enlil_Album_Collection *album_col; ASSERT_RETURN_VOID(album_src != NULL); ASSERT_RETURN_VOID(album_dest != NULL); enlil_album_name_set(album_dest, enlil_album_name_get(album_src)); enlil_album_file_name_set(album_dest, enlil_album_file_name_get(album_src)); enlil_album_path_set(album_dest, enlil_album_path_get(album_src)); enlil_album_description_set(album_dest, enlil_album_description_get(album_src)); enlil_album__time_set(album_dest, enlil_album__time_get(album_src)); EINA_LIST_FOREACH(enlil_album_collections_get(album_src), l, album_col) { Enlil_Album_Collection *_album_col = calloc(1, sizeof(Enlil_Album_Collection)); _album_col->name = eina_stringshare_add(album_col->name); _album_col->album = album_dest; _album_col->collection = NULL; album_dest->collections = eina_list_append(album_dest->collections, _album_col); }
void KBagManager::InitOneReaderAttach() { KBagReaderAttach* pNewBag = KBagReaderAttach::Alloc(); ASSERT_RETURN_VOID(pNewBag); pNewBag->Reset(); pNewBag->m_nMasterID = 0;//KUserData::GetInstancePtr()->getMainPlayerID(); pNewBag->m_nCellMaxCount = BagReaderAttachCount; pNewBag->m_nCellUnLockCount = BagReaderAttachCount; if(!_AddBagList(pNewBag)) { pNewBag->Release(); return; } }
void DefaultMessageHelper::HandleMessage() { GameServerMessage* gamesvrMsg = dynamic_cast<GameServerMessage*>(message); ASSERT_RETURN_VOID(gamesvrMsg != NULL); PlayerSessionModule& sessionModule = theModule(PlayerSessionModule); PlayerSession* session = sessionModule.GetSessionBySessionID(gamesvrMsg->GetSessionID()); if (NULL == session) { return; } // player处理消息 session->HandleMessage(*gamesvrMsg); session->GetCSResponser().TryFinishResponse(session); }