本文整理汇总了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;
}
}