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