gpt4 book ai didi

AzerothCore 更改种族或派系 "could not change race for character"

转载 作者:行者123 更新时间:2023-12-04 07:43:06 28 4
gpt4 key购买 nike

使用后.character changefaction xxx.character changerace xxx关于字符xxx我无法自定义和保存角色,因为它失败了:

Could not change faction for character

最佳答案

TLDR:这是解决方案:

  • 确保角色不在公会
  • 确保角色不是竞技场队长
  • 确保该角色在邮箱中没有任何邮件
  • 确保角色没有任何拍卖待处理

  • 这就是我找到解决方案的方式。
    此操作由以下方法处理:
    void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
    CharacterHandler.cpp文件。
    所以这里是所有可能出错的地方:
            // if player is in a guild
    if (playerData->guildId && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD))
    {
    WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
    data << (uint8)CHAR_CREATE_CHARACTER_IN_GUILD;
    SendPacket(&data);
    return;
    }

    // is arena team captain
    if (sArenaTeamMgr->GetArenaTeamByCaptain(guid))
    {
    WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
    data << (uint8)CHAR_CREATE_CHARACTER_ARENA_LEADER;
    SendPacket(&data);
    return;
    }

    // check mailbox
    if (playerData->mailCount)
    {
    WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
    data << (uint8)CHAR_CREATE_CHARACTER_DELETE_MAIL;
    SendPacket(&data);
    return;
    }

    // check auctions, current packet is processed single-threaded way, so not a problem
    bool has_auctions = false;
    for (uint8 i = 0; i < 2; ++i) // check both neutral and faction-specific AH
    {
    AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(i == 0 ? 0 : (((1 << (playerData->race - 1))&RACEMASK_ALLIANCE) ? 12 : 29));
    AuctionHouseObject::AuctionEntryMap::const_iterator itr = auctionHouse->GetAuctionsBegin();
    AuctionHouseObject::AuctionEntryMap::const_iterator _end = auctionHouse->GetAuctionsEnd();
    for (; itr != _end; ++itr)
    {
    AuctionEntry* Aentry = itr->second;
    if (Aentry && (Aentry->owner == guid || Aentry->bidder == guid))
    {
    has_auctions = true;
    break;
    }
    }
    if (has_auctions)
    break;
    }
    if (has_auctions)
    {
    WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
    data << (uint8)CHAR_CREATE_ERROR;
    SendPacket(&data);
    return;
    }
    }

    关于AzerothCore 更改种族或派系 "could not change race for character",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67349437/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com