Пример #1
0
	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();
		}
	}
Пример #2
0
Файл: tag.c Проект: Limsik/e17
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);
}
Пример #3
0
void
upload_free(Upload **_ul)
{
   ASSERT_RETURN_VOID(_ul != NULL);
   Upload *ul = *_ul;

   ASSERT_RETURN_VOID(ul != NULL);
   evas_object_del(ul->main);
}
Пример #4
0
Файл: tag.c Проект: Limsik/e17
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));
}
Пример #5
0
Файл: iptc.c Проект: Limsik/e17
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);
}
Пример #6
0
	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;
		}
	}
Пример #7
0
void
tag_menu_free(Tag_Menu *tag_menu)
{
   ASSERT_RETURN_VOID(tag_menu != NULL);

   evas_object_del(tag_menu->menu);
}
Пример #8
0
void SessionOfflineState::OnEnter()
{
    PlayerSession* session = dynamic_cast<PlayerSession*>(stateOwner);
    ASSERT_RETURN_VOID(session != NULL);

    session->ReleaseGracefully();
}
Пример #9
0
Файл: iptc.c Проект: Limsik/e17
static void
_job_free(Enlil_IPTC_Job *job)
{
   ASSERT_RETURN_VOID(job != NULL);

   FREE(job);
}
Пример #10
0
	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);
	}
Пример #11
0
Файл: iptc.c Проект: Limsik/e17
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);
}
Пример #12
0
Файл: tag.c Проект: Limsik/e17
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);
}
Пример #13
0
Файл: tag.c Проект: Limsik/e17
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;
}
Пример #14
0
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);
   }
}
Пример #15
0
	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);
	}
Пример #16
0
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);
	}
}
Пример #17
0
Файл: tag.c Проект: Limsik/e17
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);
     }
Пример #18
0
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);
      }
Пример #19
0
Файл: iptc.c Проект: Limsik/e17
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);
}
Пример #20
0
Файл: album.c Проект: Limsik/e17
/**
 * @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);
     }
Пример #21
0
	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;
		}
	}
Пример #22
0
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);
}