• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetAuctionOutBid函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetAuctionOutBid函数的典型用法代码示例。如果您正苦于以下问题:C++ GetAuctionOutBid函数的具体用法?C++ GetAuctionOutBid怎么用?C++ GetAuctionOutBid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetAuctionOutBid函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: uint32

// this function inserts to WorldPacket auction's data
bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const
{
    Item *pItem = sAuctionMgr.GetAItem(itemGuidLow);
    if (!pItem)
    {
        sLog.outError("auction to item, that doesn't exist !!!!");
        return false;
    }
    data << uint32(Id);
    data << uint32(pItem->GetEntry());

    for (uint8 i = 0; i < MAX_INSPECTED_ENCHANTMENT_SLOT; ++i)
    {
        data << uint32(pItem->GetEnchantmentId(EnchantmentSlot(i)));
        data << uint32(pItem->GetEnchantmentDuration(EnchantmentSlot(i)));
        data << uint32(pItem->GetEnchantmentCharges(EnchantmentSlot(i)));
    }

    data << uint32(pItem->GetItemRandomPropertyId());       // random item property id
    data << uint32(pItem->GetItemSuffixFactor());           // SuffixFactor
    data << uint32(pItem->GetCount());                      // item->count
    data << uint32(pItem->GetSpellCharges());               // item->charge FFFFFFF
    data << uint32(0);                                      // item flags (dynamic?) (0x04 no lockId?)
    data << ObjectGuid(HIGHGUID_PLAYER, owner);             // Auction->owner
    data << uint32(startbid);                               // Auction->startbid (not sure if useful)
    data << uint32(bid ? GetAuctionOutBid() : 0);           // minimal outbid
    data << uint32(buyout);                                 // auction->buyout
    data << uint32((expireTime-time(NULL))*IN_MILLISECONDS);// time left
    data << ObjectGuid(HIGHGUID_PLAYER, bidder);            // auction->bidder current
    data << uint32(bid);                                    // current bid
    return true;
}
开发者ID:SparkFan,项目名称:mangos,代码行数:33,代码来源:AuctionHouseMgr.cpp


示例2: uint32

//this function inserts to WorldPacket auction's data
bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const
{
    Item *pItem = sAuctionMgr.GetAItem(item_guidlow);
    if (!pItem)
    {
        sLog.outError("auction to item, that doesn't exist !!!!");
        return false;
    }
    data << uint32(Id);
    data << uint32(pItem->GetEntry());

    // [-ZERO] no other infos about enchantment in 1.12 [?]
    //for (uint8 i = 0; i < MAX_INSPECTED_ENCHANTMENT_SLOT; ++i)
    //{
        data << uint32(pItem->GetEnchantmentId(EnchantmentSlot(PERM_ENCHANTMENT_SLOT)));
    //    data << uint32(pItem->GetEnchantmentDuration(EnchantmentSlot(i)));
    //    data << uint32(pItem->GetEnchantmentCharges(EnchantmentSlot(i)));
    //}

    data << uint32(pItem->GetItemRandomPropertyId());       //random item property id
    data << uint32(pItem->GetItemSuffixFactor());           //SuffixFactor
    data << uint32(pItem->GetCount());                      //item->count
    data << uint32(pItem->GetSpellCharges());               //item->charge FFFFFFF
    data << uint64(owner);                                  //Auction->owner
    data << uint32(startbid);                               //Auction->startbid (not sure if useful)
    data << uint32(bid ? GetAuctionOutBid() : 0);
    //minimal outbid
    data << uint32(buyout);                                 //auction->buyout
    data << uint32((expire_time-time(NULL))*IN_MILISECONDS);//time left
    data << uint64(bidder) ;                                //auction->bidder current
    data << uint32(bid);                                    //current bid
    return true;
}
开发者ID:Corenex,项目名称:mangoszero,代码行数:34,代码来源:AuctionHouseMgr.cpp


示例3: uint32

//this function inserts to WorldPacket auction's data
bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
{
    Item* item = sAuctionMgr->GetAItem(item_guidlow);
    if (!item)
    {
        sLog->outError("AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, item_guidlow);
        return false;
    }
    data << uint32(Id);
    data << uint32(item->GetEntry());

    for (uint8 i = 0; i < MAX_INSPECTED_ENCHANTMENT_SLOT; ++i)
    {
        data << uint32(item->GetEnchantmentId(EnchantmentSlot(i)));
        data << uint32(item->GetEnchantmentDuration(EnchantmentSlot(i)));
        data << uint32(item->GetEnchantmentCharges(EnchantmentSlot(i)));
    }

    data << int32(item->GetItemRandomPropertyId());        //random item property id
    data << uint32(item->GetItemSuffixFactor());           //SuffixFactor
    data << uint32(item->GetCount());                      //item->count
    data << uint32(item->GetSpellCharges());               //item->charge FFFFFFF
    data << uint32(0);                                      //Unknown
    data << uint64(owner);                                  //Auction->owner
    data << uint64(startbid);                               //Auction->startbid (not sure if useful)
    data << uint64(bid ? GetAuctionOutBid() : 0);
    //minimal outbid
    data << uint64(buyout);                                 //auction->buyout
    data << uint32((expire_time-time(NULL)) * IN_MILLISECONDS);//time left
    data << uint64(bidder);                                 //auction->bidder current
    data << uint64(bid);                                    //current bid
    return true;
}
开发者ID:AwkwardDev,项目名称:Darkcore-Rebase,代码行数:34,代码来源:AuctionHouseMgr.cpp


示例4: uint32

bool Auction::BuildAuctionInfo(WorldPacket& data)
{
    if (!pItem)
    {
        Log.Error("AuctionHouse", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, pItem->GetEntry());
        return false;
    }
    data << uint32(Id);
    data << uint32(pItem->GetEntry());

    for (uint8 i = 0; i < PROP_ENCHANTMENT_SLOT_0; ++i) // PROP_ENCHANTMENT_SLOT_0 = 10
    {
        data << uint32(pItem->GetEnchantmentId(EnchantmentSlot(i)));
        data << uint32(pItem->GetEnchantmentDuration(EnchantmentSlot(i)));
        data << uint32(pItem->GetEnchantmentCharges(EnchantmentSlot(i)));
    }

    data << int32(pItem->GetItemRandomPropertyId());                // Random item property id
    data << uint32(pItem->GetItemRandomSuffixFactor());             // SuffixFactor
    data << uint32(pItem->GetStackCount());                         // item->count
    data << uint32(pItem->GetChargesLeft());                        // item->charge FFFFFFF
    data << uint32(0);                                              // Unknown
    data << uint64(Owner);                                          // Auction->owner
    data << uint64(StartingPrice);                                  // Auction->startbid (not sure if useful)
    data << uint64(HighestBid ? GetAuctionOutBid() : 0);
    // Minimal outbid
    data << uint64(BuyoutPrice);                                    // Auction->buyout
    data << uint32((ExpiryTime - time(NULL)) * IN_MILLISECONDS);    // time left
    data << uint64(HighestBidder);                                  // auction->bidder current
    data << uint64(HighestBid);                                     // current bid
    return true;
}
开发者ID:beyourself,项目名称:AscEmu_CATA,代码行数:32,代码来源:AuctionHouse.cpp


示例5: uint32

//this function inserts to WorldPacket auction's data
bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
{
    Item* item = sAuctionMgr->GetAItem(itemGUIDLow);
    if (!item)
    {
        sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, itemGUIDLow);
        return false;
    }
    data << uint32(Id);
    data << uint32(item->GetEntry());

    for (uint8 i = 0; i < PROP_ENCHANTMENT_SLOT_0; ++i) // PROP_ENCHANTMENT_SLOT_0 = 8
    {
        data << uint32(item->GetEnchantmentId(EnchantmentSlot(i)));
        data << uint32(item->GetEnchantmentDuration(EnchantmentSlot(i)));
        data << uint32(item->GetEnchantmentCharges(EnchantmentSlot(i)));
    }

    data << uint32(0);
    data << int32(item->GetItemRandomPropertyId());                 // Random item property id
    data << uint32(item->GetItemSuffixFactor());                    // SuffixFactor
    data << uint32(item->GetCount());                               // item->count
    data << uint32(item->GetSpellCharges());                        // item->charge FFFFFFF
    data << uint32(0);                                              // Unk
    data << uint64(MAKE_NEW_GUID(owner, 0, HIGHGUID_PLAYER));       // Auction->owner
    data << uint64(startbid);                                       // Auction->startbid (not sure if useful)
    data << uint64(bid ? GetAuctionOutBid() : 0);
    // Minimal outbid
    data << uint64(buyout);                                         // Auction->buyout
    data << uint32((expire_time - time(NULL)) * IN_MILLISECONDS);   // time left
    data << uint64(MAKE_NEW_GUID(bidder, 0, HIGHGUID_PLAYER));      // auction->bidder current
    data << uint64(bid);                                            // current bid
    return true;
}
开发者ID:Cailiaock,项目名称:5.4.7-Wow-source,代码行数:35,代码来源:AuctionHouseMgr.cpp


示例6: GetAuctionOutBid

//this function inserts to WorldPacket auction's data
bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const
{
    Item *pItem = auctionmgr.GetAItem(item_guidlow);
    if (!pItem)
    {
        sLog.outError("auction to item, that doesn't exist !!!!");
        return false;
    }
    data << (uint32) Id;
    data << (uint32) pItem->GetEntry();

    for (uint8 i = 0; i < MAX_INSPECTED_ENCHANTMENT_SLOT; i++)
    {
        data << (uint32) pItem->GetEnchantmentId(EnchantmentSlot(i));
        data << (uint32) pItem->GetEnchantmentDuration(EnchantmentSlot(i));
        data << (uint32) pItem->GetEnchantmentCharges(EnchantmentSlot(i));
    }

    data << (uint32) pItem->GetItemRandomPropertyId();      //random item property id
    data << (uint32) pItem->GetItemSuffixFactor();          //SuffixFactor
    data << (uint32) pItem->GetCount();                     //item->count
    data << (uint32) pItem->GetSpellCharges();              //item->charge FFFFFFF
    data << (uint32) 0;                                     //Unknown
    data << (uint64) owner;                                 //Auction->owner
    data << (uint32) startbid;                              //Auction->startbid (not sure if useful)
    data << (uint32) (bid ? GetAuctionOutBid() : 0);
    //minimal outbid
    data << (uint32) buyout;                                //auction->buyout
    data << (uint32) (expire_time - time(NULL))* 1000;      //time left
    data << (uint64) bidder;                                //auction->bidder current
    data << (uint32) bid;                                   //current bid
    return true;
}
开发者ID:opivfx,项目名称:mangos,代码行数:34,代码来源:AuctionHouseMgr.cpp


示例7: TC_LOG_ERROR

//this function inserts to WorldPacket auction's data
bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
{
    Item* item = sAuctionMgr->GetAItem(itemGUIDLow);
    if (!item)
    {
        TC_LOG_ERROR("misc", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", autcionId, itemGUIDLow);
        return false;
    }

    ObjectGuid ownerGUID = MAKE_NEW_GUID(owner, 0, HIGHGUID_PLAYER);
    ObjectGuid bidderGUID = MAKE_NEW_GUID(bidder, 0, HIGHGUID_PLAYER);
    ObjectGuid itemGUID = MAKE_NEW_GUID(itemGUIDLow, 0, HIGHGUID_ITEM);
    ObjectGuid ownerAccountID = 0;                                               // Owner Account ID -- Added in WoD

    // Write Item Instances
    data << uint32(item->GetEntry());
    data << uint32(item->GetItemSuffixFactor());
    data << uint32(item->GetItemRandomPropertyId());
    data.FlushBits();
    data.WriteBit(0);                                                             // HasItemBonus     -- Added in WoD
    data.WriteBit(0);                                                             // HasModifications -- Added in WoD

    data << int32(item->GetCount());
    data << int32(item->GetSpellCharges());
    data << int32(PROP_ENCHANTMENT_SLOT_0);
    data << int32(0);                                                             // flags            -- Added in WoD???
    data << int32(autcionId);
    data << ownerGUID;
    data << uint64(startbid);
    data << uint64(bid ? GetAuctionOutBid() : 0);
    data << uint64(buyout);
    data << int32((expire_time - time(NULL)) * IN_MILLISECONDS);
    data << uint8(0);                                                             // Delete Reason   -- Added in WoD

    for (uint8 i = 0; i < PROP_ENCHANTMENT_SLOT_0; ++i)
    {
        data << int32(item->GetEnchantmentId(EnchantmentSlot(i)));
        data << uint32(item->GetEnchantmentDuration(EnchantmentSlot(i)));
        data << int32(item->GetEnchantmentCharges(EnchantmentSlot(i)));
        data << uint8(0);                                                         // Slot
    }

    data.FlushBits();

    data.WriteBit(1);                                                            // ServerSideInfo -- Disable for more check
    data.WriteBit(0);                                                            // BidInfo

    /* ServerSideInfo Added In WoD
    data << _itemGUID;
    data << _ownerAccountID;
    data << uint32((expire_time) * IN_MILLISECONDS);
    */

    data << bidderGUID;
    data << int64(bid);

    return true;
}
开发者ID:GlassFace,项目名称:Skyfire-6.1.2-version,代码行数:59,代码来源:AuctionHouseMgr.cpp


示例8: uint32

void BlackMarketMgr::BuildBlackMarketAuctionsPacket(WorldPacket& data, uint32 guidLow)
{
    uint32 count = 0;

    data << uint32(time(NULL));

    for (auto const &kvPair : m_bmAuctionsMap)
        if (kvPair.second->IsActive())
            ++count;

    data.WriteBits(count, 18);

    ByteBuffer datas;

    for (auto const &kvPair : m_bmAuctionsMap)
    {
        auto const auction = kvPair.second;
        if (!auction->IsActive())
            continue;

        // Is owner
        data.WriteBit(guidLow == auction->bidder);

        uint64 currentBid = auction->bidder ? auction->bid : 0;
        uint64 nextBidPrice = auction->bidder ? auction->bid + GetAuctionOutBid(auction->bid) : auction->bid;
        uint64 upPrice = auction->bidder ? nextBidPrice - currentBid : 1;

        datas << uint32(auction->bmTemplate->itemEntry);
        datas << uint32(auction->bmTemplate->seller);
        datas << uint32(auction->id);
        datas << uint32(auction->bidderCount);
        datas << uint32(auction->TimeLeft());
        datas << uint64(currentBid);
        datas << uint32(auction->bmTemplate->itemCount);
        datas << uint32(0);                                 // Unk
        datas << uint64(nextBidPrice);
        datas << uint64(upPrice);
    }

    data.FlushBits();

    if (datas.size())
        data.append(datas);

    TC_LOG_DEBUG("network", ">> Sent %u BlackMarket Auctions", count);
}
开发者ID:Exodius,项目名称:chuspi,代码行数:46,代码来源:BlackMarketMgr.cpp


示例9: uint32

void BlackMarketMgr::BuildBlackMarketAuctionsPacket(WorldPacket& data, uint32 guidLow)
{
    uint32 count = 0;
    ByteBuffer datas;

    data << uint32(time(NULL));

    for (BMAuctionEntryMap::const_iterator itr = GetAuctionsBegin(); itr != GetAuctionsEnd(); ++itr)
        if (itr->second->IsActive())
            ++count;

    data.WriteBits(count, 18);

    for (BMAuctionEntryMap::const_iterator itr = GetAuctionsBegin(); itr != GetAuctionsEnd(); ++itr)
    {
        BMAuctionEntry* auction = itr->second;

        if (!auction->IsActive())
            continue;

        data.WriteBit(guidLow == auction->bidder);          // Is owner

        uint64 currentBid = auction->bidder ? auction->bid : 0;
        uint64 nextBidPrice = auction->bidder ? auction->bid + GetAuctionOutBid(auction->bid) : auction->bid;
        uint64 upPrice = auction->bidder ? nextBidPrice - currentBid : 1;

        datas << uint32(auction->bm_template->itemEntry);
        datas << uint64(nextBidPrice);
        datas << uint64(currentBid);
        datas << uint32(0);                                 // Unk
        datas << uint32(auction->id);
        datas << uint32(auction->bm_template->seller);
        datas << uint64(upPrice);
        datas << uint32(auction->TimeLeft());
        datas << uint32(auction->bidderCount);
        datas << uint32(auction->bm_template->itemCount);
    }

    data.FlushBits();
    if (datas.size())
        data.append(datas);

    sLog->outInfo(LOG_FILTER_NETWORKIO, ">> Sent %u BlackMarket Auctions", count);
}
开发者ID:Cailiaock,项目名称:5.4.7-Wow-source,代码行数:44,代码来源:BlackMarketMgr.cpp


示例10: TC_LOG_ERROR

//this function inserts to WorldPacket auction's data
void AuctionEntry::BuildAuctionInfo(std::vector<WorldPackets::AuctionHouse::AuctionItem>& items, bool listAuctionItems) const
{
    Item* item = sAuctionMgr->GetAItem(itemGUIDLow);
    if (!item)
    {
        TC_LOG_ERROR("misc", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: " UI64FMTD, Id, itemGUIDLow);
        return;
    }

    WorldPackets::AuctionHouse::AuctionItem auctionItem;

    auctionItem.AuctionItemID = Id;
    auctionItem.Item.Initialize(item);
    auctionItem.BuyoutPrice = buyout;
    auctionItem.CensorBidInfo = false;
    auctionItem.CensorServerSideInfo = listAuctionItems;
    auctionItem.Charges = item->GetSpellCharges();
    auctionItem.Count = item->GetCount();
    auctionItem.DeleteReason = 0; // Always 0 ?
    auctionItem.DurationLeft = (expire_time - time(NULL)) * IN_MILLISECONDS;
    auctionItem.EndTime = expire_time;
    auctionItem.Flags = 0; // todo
    auctionItem.ItemGuid = item->GetGUID();
    auctionItem.MinBid = startbid;
    auctionItem.Owner = ObjectGuid::Create<HighGuid::Player>(owner);
    auctionItem.OwnerAccountID = ObjectGuid::Create<HighGuid::WowAccount>(ObjectMgr::GetPlayerAccountIdByGUID(auctionItem.Owner));
    auctionItem.MinIncrement = bidder ? GetAuctionOutBid() : 0;
    auctionItem.Bidder = bidder ? ObjectGuid::Create<HighGuid::Player>(bidder) : ObjectGuid::Empty;
    auctionItem.BidAmount = bidder ? bid : 0;

    for (uint8 i = 0; i < MAX_INSPECTED_ENCHANTMENT_SLOT; i++)
    {
        if (!item->GetEnchantmentId((EnchantmentSlot) i))
            continue;

        auctionItem.Enchantments.emplace_back(item->GetEnchantmentId((EnchantmentSlot) i), item->GetEnchantmentDuration((EnchantmentSlot) i), item->GetEnchantmentCharges((EnchantmentSlot) i), i);
    }

    items.emplace_back(auctionItem);
}
开发者ID:DrYaling,项目名称:eluna-wod,代码行数:41,代码来源:AuctionHouseMgr.cpp



注:本文中的GetAuctionOutBid函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetAuctionsMap函数代码示例发布时间:2022-05-30
下一篇:
C++ GetAttributes函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap