diff --git a/conf/transmog.conf.dist b/conf/transmog.conf.dist index 5ddaab88..1867676f 100644 --- a/conf/transmog.conf.dist +++ b/conf/transmog.conf.dist @@ -288,6 +288,11 @@ Transmogrification.SetCopperCost = 0 # Example: Transmogrification.MembershipLevelsPet = "1,2,3" # Default: "" # +# Transmogrification.MembershipLevelsSkipLevelReq +# Description: Membership levels ID from acore_cms_subscriptions that define the eligibility for skipping level checks when transmogfrifying +# Example: Transmogrification.MembershipLevelsSkipLevelReq = "1,2,3" +# Default: "" +# # Transmogrification.PetSpellId # Description: The ID used by the transmog pet in the spell_dbc table # Example: Transmogrification.PetSpellId = 2000100 @@ -298,6 +303,7 @@ Transmogrification.EnablePlus = 0 Transmogrification.MembershipLevels = "" Transmogrification.MembershipLevelsLegendary = "" Transmogrification.MembershipLevelsPet = "" +Transmogrification.MembershipLevelsSkipLevelReq = "" Transmogrification.PetSpellId = 2000100 # diff --git a/src/Transmogrification.cpp b/src/Transmogrification.cpp index 48b6911d..67499919 100644 --- a/src/Transmogrification.cpp +++ b/src/Transmogrification.cpp @@ -792,7 +792,7 @@ bool Transmogrification::SuitableForTransmogrification(Player* player, ItemTempl return false; } - if (!IgnoreReqLevel && player->GetLevel() < proto->RequiredLevel) + if (!IgnoreReqLevel && IsPlusFeatureEligible(player->GetGUID(), PLUS_FEATURE_SKIP_LEVEL_REQ) && player->GetLevel() < proto->RequiredLevel) return false; if (AllowLowerTiers && TierAvailable(player, 0, proto->SubClass)) @@ -881,7 +881,7 @@ bool Transmogrification::SuitableForTransmogrification(ObjectGuid guid, ItemTemp return false; } - if (!IgnoreReqLevel && playerLevel < proto->RequiredLevel) + if (!IgnoreReqLevel && IsPlusFeatureEligible(guid, PLUS_FEATURE_SKIP_LEVEL_REQ) && playerLevel < proto->RequiredLevel) return false; if (AllowLowerTiers && TierAvailable(NULL, playerGuid, proto->SubClass)) @@ -1154,6 +1154,12 @@ void Transmogrification::LoadConfig(bool reload) plusDataMap[PLUS_FEATURE_PET].push_back(Acore::StringTo(itr).value()); } + stringMembershipIds = sConfigMgr->GetOption("Transmogrification.MembershipLevelsSkipLevelReq", ""); + for (auto& itr : Acore::Tokenize(stringMembershipIds, ',', false)) + { + plusDataMap[PLUS_FEATURE_SKIP_LEVEL_REQ].push_back(Acore::StringTo(itr).value()); + } + PetSpellId = sConfigMgr->GetOption("Transmogrification.PetSpellId", 2000100); } diff --git a/src/Transmogrification.h b/src/Transmogrification.h index 248728aa..7fd0325b 100644 --- a/src/Transmogrification.h +++ b/src/Transmogrification.h @@ -91,7 +91,8 @@ enum PlusFeatures { PLUS_FEATURE_GREY_ITEMS, PLUS_FEATURE_LEGENDARY_ITEMS, - PLUS_FEATURE_PET + PLUS_FEATURE_PET, + PLUS_FEATURE_SKIP_LEVEL_REQ }; class Transmogrification