当前位置: 首页>>代码示例>>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;未经允许,请勿转载。