當前位置: 首頁>>代碼示例>>C++>>正文


C++ AddToUpdateQueueOf函數代碼示例

本文整理匯總了C++中AddToUpdateQueueOf函數的典型用法代碼示例。如果您正苦於以下問題:C++ AddToUpdateQueueOf函數的具體用法?C++ AddToUpdateQueueOf怎麽用?C++ AddToUpdateQueueOf使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AddToUpdateQueueOf函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: RemoveFromUpdateQueueOf

void Item::SetState(ItemUpdateState state, Player *forplayer)
{
    if (uState == ITEM_NEW && state == ITEM_REMOVED)
    {
        // pretend the item never existed
        RemoveFromUpdateQueueOf(forplayer);
        delete this;
        return;
    }
    if (state != ITEM_UNCHANGED)
    {
        // new items must stay in new state until saved
        if (uState != ITEM_NEW)
            uState = state;

        AddToUpdateQueueOf(forplayer);
    }
    else
    {
        // unset in queue
        // the item must be removed from the queue manually
        uQueuePos = -1;
        uState = ITEM_UNCHANGED;
    }
}
開發者ID:Bootz,項目名稱:SF1,代碼行數:25,代碼來源:Item.cpp

示例2: RemoveFromUpdateQueueOf

void Item::SetState(ItemUpdateState state, Player* forPlayer)
{
    if (m_state == ITEM_NEW && state == ITEM_REMOVED)
    {
        // pretend the item never existed
        if (forPlayer || GetOwnerGuid())
            RemoveFromUpdateQueueOf(forPlayer);

        if (forPlayer)
            forPlayer->RemoveItemWithTimeCheck(GetGUIDLow());

        delete this;
        return;
    }

    if (state != ITEM_UNCHANGED)
    {
        // new items must stay in new state until saved
        if (m_state != ITEM_NEW)
            m_state = state;

        if (forPlayer || GetOwnerGuid())
            AddToUpdateQueueOf(forPlayer);
    }
    else
    {
        // unset in queue
        // the item must be removed from the queue manually
        m_queuePos = -1;
        m_state = ITEM_UNCHANGED;
    }
}
開發者ID:Splash,項目名稱:mangos,代碼行數:32,代碼來源:Item.cpp

示例3: RemoveFromUpdateQueueOf

void Item::SetState(ItemUpdateState state, Player* forplayer)
{
    if (uState == ITEM_NEW && state == ITEM_REMOVED)
    {
        RemoveFromUpdateQueueOf(forplayer);
        forplayer->DeleteRefundReference(GetGUIDLow());
        delete this;
        return;
    }

    if (state != ITEM_UNCHANGED)
    {
        if (uState != ITEM_NEW)
            uState = state;

        AddToUpdateQueueOf(forplayer);
    }
    else
    {
        uQueuePos = -1;
        uState = ITEM_UNCHANGED;
    }
}
開發者ID:boom8866,項目名稱:new,代碼行數:23,代碼來源:Item.cpp


注:本文中的AddToUpdateQueueOf函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。