mirror of
https://github.com/azerothcore/mod-transmog
synced 2025-11-29 22:48:30 +08:00
feat: move SPELL_SUMMON_ETHEREAL_WARPWEAVER to config field (#144)
* feat: move SPELL_SUMMON_ETHEREAL_WARPWEAVER to config field * style: move GetOption to be more in line with the .conf.dist order
This commit is contained in:
@@ -278,11 +278,17 @@ Transmogrification.SetCopperCost = 0
|
||||
# Example: Transmogrification.MembershipLevelsPet = "1,2,3"
|
||||
# Default: ""
|
||||
#
|
||||
# Transmogrification.PetSpellId
|
||||
# Description: The ID used by the transmog pet in the spell_dbc table
|
||||
# Example: Transmogrification.PetSpellId = 2000100
|
||||
# Default: 2000100
|
||||
#
|
||||
|
||||
Transmogrification.EnablePlus = 0
|
||||
Transmogrification.MembershipLevels = ""
|
||||
Transmogrification.MembershipLevelsLegendary = ""
|
||||
Transmogrification.MembershipLevelsPet = ""
|
||||
Transmogrification.PetSpellId = 2000100
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
@@ -1058,6 +1058,8 @@ void Transmogrification::LoadConfig(bool reload)
|
||||
for (auto& itr : Acore::Tokenize(stringMembershipIds, ',', false)) {
|
||||
MembershipIdsPet.push_back(Acore::StringTo<uint32>(itr).value());
|
||||
}
|
||||
|
||||
PetSpellId = sConfigMgr->GetOption<uint32>("Transmogrification.PetSpellId", 2000100);
|
||||
}
|
||||
|
||||
void Transmogrification::DeleteFakeFromDB(ObjectGuid::LowType itemLowGuid, CharacterDatabaseTransaction* trans /*= nullptr*/)
|
||||
|
||||
@@ -63,11 +63,6 @@ enum TransmogAcoreStrings // Language.h might have same entries, appears when ex
|
||||
LANG_CMD_TRANSMOG_COMPLETE_SYNC = 11116,
|
||||
};
|
||||
|
||||
enum TransmogSpells
|
||||
{
|
||||
SPELL_SUMMON_ETHEREAL_WARPWEAVER = 2000100
|
||||
};
|
||||
|
||||
class Transmogrification
|
||||
{
|
||||
public:
|
||||
@@ -102,6 +97,8 @@ public:
|
||||
float SetCostModifier;
|
||||
int32 SetCopperCost;
|
||||
|
||||
uint32 PetSpellId;
|
||||
|
||||
bool GetEnableSets() const;
|
||||
uint8 GetMaxSets() const;
|
||||
float GetSetCostModifier() const;
|
||||
|
||||
@@ -307,7 +307,7 @@ public:
|
||||
|
||||
if (sTransmogrification->IsTransmogPlusEnabled) {
|
||||
if (sTransmogrification->isTransmogPlusPetEligible(player->GetGUID())) {
|
||||
player->CastSpell((Unit*)nullptr, SPELL_SUMMON_ETHEREAL_WARPWEAVER, true);
|
||||
player->CastSpell((Unit*)nullptr, sTransmogrification->PetSpellId, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -316,7 +316,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
player->CastSpell((Unit*)nullptr, SPELL_SUMMON_ETHEREAL_WARPWEAVER, true);
|
||||
player->CastSpell((Unit*)nullptr, sTransmogrification->PetSpellId, true);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user