您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetCheckedAuctionHouseForAuctioneer函数代码示例

51自学网 2021-06-01 21:04:55
  C++
这篇教程C++ GetCheckedAuctionHouseForAuctioneer函数代码示例写得很实用,希望能帮到您。

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

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

示例1: DEBUG_LOG

void WorldSession::HandleAuctionListPendingSales( WorldPacket & recv_data ){    DEBUG_LOG("CMSG_AUCTION_LIST_PENDING_SALES");    ObjectGuid auctioneerGuid;    recv_data >> auctioneerGuid;                            // auctioneer guid    AuctionHouseEntry const* auctionHouseEntry = GetCheckedAuctionHouseForAuctioneer(auctioneerGuid);    if (!auctionHouseEntry)        return;    uint32 count = 0;    WorldPacket data(SMSG_AUCTION_LIST_PENDING_SALES, 4);    data << uint32(count);                                  // count    /*for(uint32 i = 0; i < count; ++i)    {        data << "";                                         // string        data << "";                                         // string        data << uint32(0);        data << uint32(0);        data << float(0);    }*/    SendPacket(&data);}
开发者ID:Warlord123,项目名称:mangos-current,代码行数:26,


示例2: DEBUG_LOG

void WorldSession::HandleAuctionListPendingSales(WorldPacket& recv_data){    DEBUG_LOG("WORLD: CMSG_AUCTION_LIST_PENDING_SALES");    ObjectGuid auctioneerGuid;    recv_data >> auctioneerGuid;                            // auctioneer guid    AuctionHouseEntry const* auctionHouseEntry = GetCheckedAuctionHouseForAuctioneer(auctioneerGuid);    if (!auctionHouseEntry)        return;    uint32 count = 0;    WorldPacket data(SMSG_AUCTION_LIST_PENDING_SALES, 4);    data << uint32(count);                                  // count    // pending list include all auction house entries for character    for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i)        sAuctionMgr.GetAuctionsMap(AuctionHouseType(i))->BuildListPendingSales(data, _player, count);    data.put<uint32>(0, count);    SendPacket(&data);    DEBUG_LOG("WORLD: Sent SMSG_AUCTION_LIST_PENDING_SALES");}
开发者ID:Jojo2323,项目名称:mangos3,代码行数:25,


示例3: DEBUG_LOG

// this void is called when player clicks on search buttonvoid WorldSession::HandleAuctionListItems(WorldPacket& recv_data){    DEBUG_LOG("WORLD: HandleAuctionListItems");    ObjectGuid auctioneerGuid;    std::string searchedname;    uint8 levelmin, levelmax, usable;    uint32 listfrom, auctionSlotID, auctionMainCategory, auctionSubCategory, quality;    recv_data >> auctioneerGuid;    recv_data >> listfrom;                                  // start, used for page control listing by 50 elements    recv_data >> searchedname;    recv_data >> levelmin >> levelmax;    recv_data >> auctionSlotID >> auctionMainCategory >> auctionSubCategory >> quality;    recv_data >> usable;    AuctionHouseEntry const* auctionHouseEntry = GetCheckedAuctionHouseForAuctioneer(auctioneerGuid);    if (!auctionHouseEntry)        return;    // always return pointer    AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(auctionHouseEntry);    // DEBUG_LOG("Auctionhouse search %s list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",    //  auctioneerGuid.GetString().c_str(), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);    WorldPacket data(SMSG_AUCTION_LIST_RESULT, (4 + 4));    uint32 count = 0;    uint32 totalcount = 0;    data << uint32(0);    // converting string that we try to find to lower case    std::wstring wsearchedname;    if (!Utf8toWStr(searchedname, wsearchedname))        return;    wstrToLower(wsearchedname);    auctionHouse->BuildListAuctionItems(data, _player,                                        wsearchedname, listfrom, levelmin, levelmax, usable,                                        auctionSlotID, auctionMainCategory, auctionSubCategory, quality,                                        count, totalcount);    data.put<uint32>(0, count);    data << uint32(totalcount);    SendPacket(data);}
开发者ID:killerwife,项目名称:mangos-classic,代码行数:49,


示例4: DEBUG_LOG

void WorldSession::HandleAuctionListPendingSales( WorldPacket & recv_data ){    DEBUG_LOG("CMSG_AUCTION_LIST_PENDING_SALES");    ObjectGuid auctioneerGuid;    recv_data >> auctioneerGuid;                            // auctioneer guid    AuctionHouseEntry const* auctionHouseEntry = GetCheckedAuctionHouseForAuctioneer(auctioneerGuid);    if (!auctionHouseEntry)        return;    // always return pointer    AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(auctionHouseEntry);    uint32 count = 0;    WorldPacket data(SMSG_AUCTION_LIST_PENDING_SALES, 4);    data << uint32(count);                                  // count    auctionHouse->BuildListPendingSales(data, _player, count);    data.put<uint32>(0, count);    SendPacket(&data);}
开发者ID:xiaojie,项目名称:mangos,代码行数:23,


示例5: DEBUG_LOG

// this void is called when auction_owner cancels his auctionvoid WorldSession::HandleAuctionRemoveItem(WorldPacket& recv_data){    DEBUG_LOG("WORLD: HandleAuctionRemoveItem");    ObjectGuid auctioneerGuid;    uint32 auctionId;    recv_data >> auctioneerGuid;    recv_data >> auctionId;    // DEBUG_LOG("Cancel AUCTION AuctionID: %u", auctionId);    AuctionHouseEntry const* auctionHouseEntry = GetCheckedAuctionHouseForAuctioneer(auctioneerGuid);    if (!auctionHouseEntry)        return;    // always return pointer    AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(auctionHouseEntry);    // remove fake death    if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))        GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);    AuctionEntry* auction = auctionHouse->GetAuction(auctionId);    Player* pl = GetPlayer();    if (!auction || auction->owner != pl->GetGUIDLow())    {        SendAuctionCommandResult(NULL, AUCTION_REMOVED, AUCTION_ERR_DATABASE);        sLog.outError("CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", pl->GetGUIDLow(), auctionId);        return;    }    Item* pItem = sAuctionMgr.GetAItem(auction->itemGuidLow);    if (!pItem)    {        sLog.outError("Auction id: %u has nonexistent item (item guid : %u)!!!", auction->Id, auction->itemGuidLow);        SendAuctionCommandResult(NULL, AUCTION_REMOVED, AUCTION_ERR_INVENTORY, EQUIP_ERR_ITEM_NOT_FOUND);        return;    }    if (auction->bid)                                       // If we have a bid, we have to send him the money he paid    {        uint32 auctionCut = auction->GetAuctionCut();        if (pl->GetMoney() < auctionCut)                    // player doesn't have enough money, maybe message needed            return;        if (auction->bidder)                                // if auction have real existed bidder send mail            SendAuctionCancelledToBidderMail(auction);        pl->ModifyMoney(-int32(auctionCut));    }    // Return the item by mail    std::ostringstream msgAuctionCanceledOwner;    msgAuctionCanceledOwner << auction->itemTemplate << ":" << auction->itemRandomPropertyId << ":" << AUCTION_CANCELED;    // item will deleted or added to received mail list    MailDraft(msgAuctionCanceledOwner.str())    .AddItem(pItem)    .SendMailTo(pl, auction, MAIL_CHECK_MASK_COPIED);    // inform player, that auction is removed    SendAuctionCommandResult(auction, AUCTION_REMOVED, AUCTION_OK);    // Now remove the auction    CharacterDatabase.BeginTransaction();    auction->DeleteFromDB();    pl->SaveInventoryAndGoldToDB();    CharacterDatabase.CommitTransaction();    sAuctionMgr.RemoveAItem(auction->itemGuidLow);    // used by eluna    sHookMgr->OnRemove(auctionHouse);    auctionHouse->RemoveAuction(auction->Id);    delete auction;}
开发者ID:monstermosh,项目名称:ZeroServer,代码行数:73,


示例6: DEBUG_LOG

// this void is called when player clicks on search buttonvoid WorldSession::HandleAuctionListItems(WorldPacket & recv_data){    DEBUG_LOG("WORLD: HandleAuctionListItems");    ObjectGuid auctioneerGuid;    std::string searchedname;    uint8 levelmin, levelmax, usable, isFull, sortCount;    uint32 listfrom, auctionSlotID, auctionMainCategory, auctionSubCategory, quality;    recv_data >> auctioneerGuid;    recv_data >> listfrom;                                  // start, used for page control listing by 50 elements    recv_data >> searchedname;    recv_data >> levelmin >> levelmax;    recv_data >> auctionSlotID >> auctionMainCategory >> auctionSubCategory >> quality;    recv_data >> usable >> isFull >> sortCount;    if (sortCount >= MAX_AUCTION_SORT)        return;    uint8 Sort[MAX_AUCTION_SORT];    memset(Sort, MAX_AUCTION_SORT, MAX_AUCTION_SORT);    // auction columns sorting    for (uint32 i = 0; i < sortCount; ++i)    {        uint8 column, reversed;        recv_data >> column;        if (column >= MAX_AUCTION_SORT)            return;        recv_data >> reversed;        Sort[i] = (reversed > 0) ? (column |= AUCTION_SORT_REVERSED) : column;    }    AuctionHouseEntry const* auctionHouseEntry = GetCheckedAuctionHouseForAuctioneer(auctioneerGuid);    if (!auctionHouseEntry)        return;    // always return pointer    AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(auctionHouseEntry);    // Sort    AuctionHouseObject::AuctionEntryMap const& aucs = auctionHouse->GetAuctions();    std::vector<AuctionEntry*> auctions;    auctions.reserve(aucs.size());    for (AuctionHouseObject::AuctionEntryMap::const_iterator itr = aucs.begin(); itr != aucs.end(); ++itr)        auctions.push_back(itr->second);    AuctionSorter sorter(Sort, GetPlayer());    std::sort(auctions.begin(), auctions.end(), sorter);    // remove fake death    if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))        GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);    //DEBUG_LOG("Auctionhouse search %s list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",    //  auctioneerGuid.GetString().c_str(), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);    WorldPacket data(SMSG_AUCTION_LIST_RESULT, (4+4+4));    uint32 count = 0;    uint32 totalcount = 0;    data << uint32(0);    // converting string that we try to find to lower case    std::wstring wsearchedname;    if (!Utf8toWStr(searchedname, wsearchedname))        return;    wstrToLower(wsearchedname);    BuildListAuctionItems(auctions, data, wsearchedname, listfrom, levelmin, levelmax, usable,        auctionSlotID, auctionMainCategory, auctionSubCategory, quality, count, totalcount, isFull);    data.put<uint32>(0, count);    data << uint32(totalcount);    data << uint32(300);                                    // 2.3.0 delay for next isFull request?    SendPacket(&data);}
开发者ID:AngelX,项目名称:mangos,代码行数:82,



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


C++ GetCheckedRadioButton函数代码示例
C++ GetCharacterMovement函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。