本文整理汇总了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();
}
}
示例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;
}
示例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();
}
}
示例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;
}
示例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;
}
示例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;
}