mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 00:08:01 +00:00
feat(Core/Game): Add option to disable trading BoP items among raid members (#4895)
This commit is contained in:
@@ -12704,7 +12704,7 @@ Item* Player::StoreNewItem(ItemPosCountVec const& dest, uint32 item, bool update
|
|||||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, item, count);
|
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM, item, count);
|
||||||
pItem = StoreItem(dest, pItem, update);
|
pItem = StoreItem(dest, pItem, update);
|
||||||
|
|
||||||
if (allowedLooters.size() > 1 && pItem->GetTemplate()->GetMaxStackSize() == 1 && pItem->IsSoulBound())
|
if (allowedLooters.size() > 1 && pItem->GetTemplate()->GetMaxStackSize() == 1 && pItem->IsSoulBound() && sWorld->getBoolConfig(CONFIG_SET_BOP_ITEM_TRADEABLE))
|
||||||
{
|
{
|
||||||
pItem->SetSoulboundTradeable(allowedLooters);
|
pItem->SetSoulboundTradeable(allowedLooters);
|
||||||
pItem->SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, GetTotalPlayedTime());
|
pItem->SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, GetTotalPlayedTime());
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ enum WorldBoolConfigs
|
|||||||
CONFIG_DEBUG_ARENA,
|
CONFIG_DEBUG_ARENA,
|
||||||
CONFIG_REGEN_HP_CANNOT_REACH_TARGET_IN_RAID,
|
CONFIG_REGEN_HP_CANNOT_REACH_TARGET_IN_RAID,
|
||||||
CONFIG_SET_SHAPASSHASH,
|
CONFIG_SET_SHAPASSHASH,
|
||||||
|
CONFIG_SET_BOP_ITEM_TRADEABLE,
|
||||||
BOOL_CONFIG_VALUE_COUNT
|
BOOL_CONFIG_VALUE_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1415,6 +1415,8 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
|
|
||||||
m_bool_configs[CONFIG_SET_SHAPASSHASH] = sConfigMgr->GetBoolDefault("SetDeprecatedExternalPasswords", false);
|
m_bool_configs[CONFIG_SET_SHAPASSHASH] = sConfigMgr->GetBoolDefault("SetDeprecatedExternalPasswords", false);
|
||||||
|
|
||||||
|
m_bool_configs[CONFIG_SET_BOP_ITEM_TRADEABLE] = sConfigMgr->GetOption<bool>("Item.SetItemTradeable", true);
|
||||||
|
|
||||||
// call ScriptMgr if we're reloading the configuration
|
// call ScriptMgr if we're reloading the configuration
|
||||||
sScriptMgr->OnAfterConfigLoad(reload);
|
sScriptMgr->OnAfterConfigLoad(reload);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3633,6 +3633,14 @@ LFG.Location.All = 0
|
|||||||
ICC.Buff.Horde = 73822
|
ICC.Buff.Horde = 73822
|
||||||
ICC.Buff.Alliance = 73828
|
ICC.Buff.Alliance = 73828
|
||||||
|
|
||||||
|
#
|
||||||
|
# Item.SetItemTradeable
|
||||||
|
# Description: Enabled/Disabled trading BoP items among raid members.
|
||||||
|
# Default: 1 - (Set BoP items tradeable timer to 2 hours)
|
||||||
|
# 0 - (Disable trading BoP items among raid members)
|
||||||
|
|
||||||
|
Item.SetItemTradeable = 1
|
||||||
|
|
||||||
#
|
#
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user