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


C++ DeleteRefundDataFromDB函數代碼示例

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


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

示例1: GetGUIDLow

bool Item::LoadRefundDataFromDB(Player* owner)
{
    bool failed = true;

    if (!IsRefundOrSoulboundTradeExpired(owner))
    {
        QueryResult* result = CharacterDatabase.PQuery("SELECT paidMoney, paidExtendedCost FROM item_refund_instance WHERE itemGuid = %u AND playerGuid = %u", GetGUIDLow(), owner->GetGUIDLow());
        if (result)
        {
            Field* fields = result->Fetch();
            SetRefundable(owner, fields[0].GetUInt32(), fields[1].GetUInt16(), true);
            delete result;
            failed = false;
        }
    }
    else
        DeleteRefundDataFromDB();

    if (failed)
    {
        RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE);
        SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, 0);
        return false;
    }

    return true;
}
開發者ID:Splash,項目名稱:mangos,代碼行數:27,代碼來源:Item.cpp

示例2: RemoveFlag

void Item::SetNotRefundable(Player *owner, bool changestate) {
	if (!HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE))
		return;

	RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE);
	// Following is not applicable in the trading procedure
	if (changestate)
		SetState(ITEM_CHANGED, owner);

	SetRefundRecipient(0);
	SetPaidMoney(0);
	SetPaidExtendedCost(0);
	DeleteRefundDataFromDB();

	owner->DeleteRefundReference(GetGUIDLow());
}
開發者ID:rexy,項目名稱:ArkCORE,代碼行數:16,代碼來源:Item.cpp

示例3: RemoveFlag

void Item::SetNotRefundable(Player* owner, bool changeState/*=true*/)
{
    if (!HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE))
        return;

    RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE);
    SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, 0);

    if (changeState)
        SetState(ITEM_CHANGED, owner);

    m_paidCost = 0;
    m_paidExtCost = 0;

    DeleteRefundDataFromDB();
    owner->RemoveItemWithTimeCheck(GetGUIDLow());
}
開發者ID:Splash,項目名稱:mangos,代碼行數:17,代碼來源:Item.cpp


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