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