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:
Axel Cocat
2024-03-19 21:30:06 +01:00
committed by GitHub
parent f984be398f
commit e70c5da3da
4 changed files with 12 additions and 7 deletions

View File

@@ -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
#
###################################################################################################

View File

@@ -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*/)

View File

@@ -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;

View File

@@ -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;