本文整理匯總了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;
}
}
示例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;
}
}
示例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;
}
}