当前位置: 首页>>代码示例>>C++>>正文


C++ HasGeneratedLoot函数代码示例

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


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

示例1: IsBindedNotWith

bool Item::IsBindedNotWith(Player const* player) const
{
    // own item
    if (GetOwnerGuid() == player->GetObjectGuid())
        return false;

    if (HasFlag(ITEM_FIELD_FLAGS, ITEM_DYNFLAG_BOP_TRADEABLE))
    {
        if (m_allowedLooterGuids.find(player->GetObjectGuid().GetCounter()) != m_allowedLooterGuids.end())
            return false;
    }

    // has loot with diff owner
    if (HasGeneratedLoot())
        return true;

    // not binded item
    if (!IsSoulBound())
        return false;

    // not BOA item case
    if (!IsBoundAccountWide())
        return true;

    // online
    if (Player* owner = GetOwner())
    {
        return owner->GetSession()->GetAccountId() != player->GetSession()->GetAccountId();
    }
    // offline slow case
    else
    {
        return sAccountMgr.GetPlayerAccountIdByGUID(GetOwnerGuid()) != player->GetSession()->GetAccountId();
    }
}
开发者ID:Splash,项目名称:mangos,代码行数:35,代码来源:Item.cpp

示例2: CanBeTraded

bool Item::CanBeTraded(bool mail, bool trade) const
{

    if ((!mail || !IsBoundAccountWide()) && (IsSoulBound() && (!HasFlag(ITEM_FIELD_FLAGS, ITEM_DYNFLAG_BOP_TRADEABLE) || !trade)))
        return false;

    if (IsBag() && (Player::IsBagPos(GetPos()) || !((Bag const*)this)->IsEmpty()) )
        return false;

    if (Player* owner = GetOwner())
    {
        if (owner->CanUnequipItem(GetPos(),false) !=  EQUIP_ERR_OK )
            return false;
        if (owner->GetLootGUID()==GetGUID())
            return false;
    }

    if (HasGeneratedLoot())
        return false;

    if (IsBoundByEnchant())
        return false;

    return true;
}
开发者ID:SeTM,项目名称:mangos-1,代码行数:25,代码来源:Item.cpp

示例3: IsBindedNotWith

bool Item::IsBindedNotWith(Player const* player) const
{
    // own item
    if (GetOwnerGuid() == player->GetObjectGuid())
        return false;

    // has loot with diff owner
    if (HasGeneratedLoot())
        return true;

    // not binded item
    if (!IsSoulBound())
        return false;

    // not BOA item case
    if (!IsBoundAccountWide())
        return true;

    // online
    if (Player* owner = GetOwner())
    {
        return owner->GetSession()->GetAccountId() != player->GetSession()->GetAccountId();
    }
    // offline slow case
    else
    {
        return sObjectMgr.GetPlayerAccountIdByGUID(GetOwnerGuid()) != player->GetSession()->GetAccountId();
    }
}
开发者ID:82cheyenne82,项目名称:MaNGOS-Core-4.3.4,代码行数:29,代码来源:Item.cpp

示例4: CanBeMergedPartlyWith

InventoryResult Item::CanBeMergedPartlyWith(ItemPrototype const* proto) const
{
    // check item type
    if (GetEntry() != proto->ItemId)
        return EQUIP_ERR_ITEM_CANT_STACK;

    // check free space (full stacks can't be target of merge
    if (GetCount() >= proto->GetMaxStackSize())
        return EQUIP_ERR_ITEM_CANT_STACK;

    // not allow merge looting currently items
    if (HasGeneratedLoot())
        return EQUIP_ERR_ALREADY_LOOTED;

    return EQUIP_ERR_OK;
}
开发者ID:Splash,项目名称:mangos,代码行数:16,代码来源:Item.cpp

示例5: IsBindedNotWith

bool Item::IsBindedNotWith(Player const* player) const
{
    // own item
    if (GetOwnerGuid() == player->GetObjectGuid())
        return false;

    // has loot with diff owner
    if (HasGeneratedLoot())
        return true;

    // not binded item
    if (!IsSoulBound())
        return false;

    return true;
}
开发者ID:Flairgun,项目名称:mangos-tbc,代码行数:16,代码来源:Item.cpp

示例6: CanBeTraded

bool Item::CanBeTraded() const
{
    if (IsSoulBound())
        return false;
    if (IsBag() && (Player::IsBagPos(GetPos()) || !((Bag const*)this)->IsEmpty()))
        return false;

    if (Player* owner = GetOwner())
    {
        if (owner->CanUnequipItem(GetPos(), false) !=  EQUIP_ERR_OK)
            return false;
        if (owner->GetLootGuid() == GetObjectGuid())
            return false;
    }

    if (HasGeneratedLoot())
        return false;

    if (IsBoundByEnchant())
        return false;

    return true;
}
开发者ID:Flairgun,项目名称:mangos-tbc,代码行数:23,代码来源:Item.cpp


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