mirror of
https://github.com/azerothcore/mod-transmog
synced 2025-11-29 22:48:30 +08:00
feat: TransmogPlus - Skip Level Req (#162)
This commit is contained in:
@@ -288,6 +288,11 @@ Transmogrification.SetCopperCost = 0
|
|||||||
# Example: Transmogrification.MembershipLevelsPet = "1,2,3"
|
# Example: Transmogrification.MembershipLevelsPet = "1,2,3"
|
||||||
# Default: ""
|
# 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
|
# Transmogrification.PetSpellId
|
||||||
# Description: The ID used by the transmog pet in the spell_dbc table
|
# Description: The ID used by the transmog pet in the spell_dbc table
|
||||||
# Example: Transmogrification.PetSpellId = 2000100
|
# Example: Transmogrification.PetSpellId = 2000100
|
||||||
@@ -298,6 +303,7 @@ Transmogrification.EnablePlus = 0
|
|||||||
Transmogrification.MembershipLevels = ""
|
Transmogrification.MembershipLevels = ""
|
||||||
Transmogrification.MembershipLevelsLegendary = ""
|
Transmogrification.MembershipLevelsLegendary = ""
|
||||||
Transmogrification.MembershipLevelsPet = ""
|
Transmogrification.MembershipLevelsPet = ""
|
||||||
|
Transmogrification.MembershipLevelsSkipLevelReq = ""
|
||||||
Transmogrification.PetSpellId = 2000100
|
Transmogrification.PetSpellId = 2000100
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -792,7 +792,7 @@ bool Transmogrification::SuitableForTransmogrification(Player* player, ItemTempl
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IgnoreReqLevel && player->GetLevel() < proto->RequiredLevel)
|
if (!IgnoreReqLevel && IsPlusFeatureEligible(player->GetGUID(), PLUS_FEATURE_SKIP_LEVEL_REQ) && player->GetLevel() < proto->RequiredLevel)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (AllowLowerTiers && TierAvailable(player, 0, proto->SubClass))
|
if (AllowLowerTiers && TierAvailable(player, 0, proto->SubClass))
|
||||||
@@ -881,7 +881,7 @@ bool Transmogrification::SuitableForTransmogrification(ObjectGuid guid, ItemTemp
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IgnoreReqLevel && playerLevel < proto->RequiredLevel)
|
if (!IgnoreReqLevel && IsPlusFeatureEligible(guid, PLUS_FEATURE_SKIP_LEVEL_REQ) && playerLevel < proto->RequiredLevel)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (AllowLowerTiers && TierAvailable(NULL, playerGuid, proto->SubClass))
|
if (AllowLowerTiers && TierAvailable(NULL, playerGuid, proto->SubClass))
|
||||||
@@ -1154,6 +1154,12 @@ void Transmogrification::LoadConfig(bool reload)
|
|||||||
plusDataMap[PLUS_FEATURE_PET].push_back(Acore::StringTo<uint32>(itr).value());
|
plusDataMap[PLUS_FEATURE_PET].push_back(Acore::StringTo<uint32>(itr).value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stringMembershipIds = sConfigMgr->GetOption<std::string>("Transmogrification.MembershipLevelsSkipLevelReq", "");
|
||||||
|
for (auto& itr : Acore::Tokenize(stringMembershipIds, ',', false))
|
||||||
|
{
|
||||||
|
plusDataMap[PLUS_FEATURE_SKIP_LEVEL_REQ].push_back(Acore::StringTo<uint32>(itr).value());
|
||||||
|
}
|
||||||
|
|
||||||
PetSpellId = sConfigMgr->GetOption<uint32>("Transmogrification.PetSpellId", 2000100);
|
PetSpellId = sConfigMgr->GetOption<uint32>("Transmogrification.PetSpellId", 2000100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ enum PlusFeatures
|
|||||||
{
|
{
|
||||||
PLUS_FEATURE_GREY_ITEMS,
|
PLUS_FEATURE_GREY_ITEMS,
|
||||||
PLUS_FEATURE_LEGENDARY_ITEMS,
|
PLUS_FEATURE_LEGENDARY_ITEMS,
|
||||||
PLUS_FEATURE_PET
|
PLUS_FEATURE_PET,
|
||||||
|
PLUS_FEATURE_SKIP_LEVEL_REQ
|
||||||
};
|
};
|
||||||
|
|
||||||
class Transmogrification
|
class Transmogrification
|
||||||
|
|||||||
Reference in New Issue
Block a user