Core/DataStores: Updated db2 structures to 9.0.2
Port From (https://github.com/TrinityCore/TrinityCore/commit/b82a3a557a7bf13d48342ea189325550059b622d)
This commit is contained in:
@@ -91,14 +91,20 @@ namespace Game.DataStorage
|
||||
BattlemasterListStorage = ReadDB2<BattlemasterListRecord>("BattlemasterList.db2", HotfixStatements.SEL_BATTLEMASTER_LIST, HotfixStatements.SEL_BATTLEMASTER_LIST_LOCALE);
|
||||
BroadcastTextStorage = ReadDB2<BroadcastTextRecord>("BroadcastText.db2", HotfixStatements.SEL_BROADCAST_TEXT, HotfixStatements.SEL_BROADCAST_TEXT_LOCALE);
|
||||
CfgRegionsStorage = ReadDB2<Cfg_RegionsRecord>("Cfg_Regions.db2", HotfixStatements.SEL_CFG_REGIONS);
|
||||
CharacterFacialHairStylesStorage = ReadDB2<CharacterFacialHairStylesRecord>("CharacterFacialHairStyles.db2", HotfixStatements.SEL_CHARACTER_FACIAL_HAIR_STYLES);
|
||||
CharBaseSectionStorage = ReadDB2<CharBaseSectionRecord>("CharBaseSection.db2", HotfixStatements.SEL_CHAR_BASE_SECTION);
|
||||
CharSectionsStorage = ReadDB2<CharSectionsRecord>("CharSections.db2", HotfixStatements.SEL_CHAR_SECTIONS);
|
||||
CharStartOutfitStorage = ReadDB2<CharStartOutfitRecord>("CharStartOutfit.db2", HotfixStatements.SEL_CHAR_START_OUTFIT);
|
||||
CharTitlesStorage = ReadDB2<CharTitlesRecord>("CharTitles.db2", HotfixStatements.SEL_CHAR_TITLES, HotfixStatements.SEL_CHAR_TITLES_LOCALE);
|
||||
CharacterLoadoutStorage = ReadDB2<CharacterLoadoutRecord>("CharacterLoadout.db2", HotfixStatements.SEL_CHARACTER_LOADOUT);
|
||||
CharacterLoadoutItemStorage = ReadDB2<CharacterLoadoutItemRecord>("CharacterLoadoutItem.db2", HotfixStatements.SEL_CHARACTER_LOADOUT_ITEM);
|
||||
ChatChannelsStorage = ReadDB2<ChatChannelsRecord>("ChatChannels.db2", HotfixStatements.SEL_CHAT_CHANNELS, HotfixStatements.SEL_CHAT_CHANNELS_LOCALE);
|
||||
ChrClassesStorage = ReadDB2<ChrClassesRecord>("ChrClasses.db2", HotfixStatements.SEL_CHR_CLASSES, HotfixStatements.SEL_CHR_CLASSES_LOCALE);
|
||||
ChrClassesXPowerTypesStorage = ReadDB2<ChrClassesXPowerTypesRecord>("ChrClassesXPowerTypes.db2", HotfixStatements.SEL_CHR_CLASSES_X_POWER_TYPES);
|
||||
ChrCustomizationChoiceStorage= ReadDB2<ChrCustomizationChoiceRecord>("ChrCustomizationChoice.db2", HotfixStatements.SEL_CHR_CUSTOMIZATION_CHOICE, HotfixStatements.SEL_CHR_CUSTOMIZATION_CHOICE_LOCALE);
|
||||
ChrCustomizationDisplayInfoStorage= ReadDB2<ChrCustomizationDisplayInfoRecord>("ChrCustomizationDisplayInfo.db2", HotfixStatements.SEL_CHR_CUSTOMIZATION_DISPLAY_INFO);
|
||||
ChrCustomizationElementStorage =ReadDB2<ChrCustomizationElementRecord>("ChrCustomizationElement.db2", HotfixStatements.SEL_CHR_CUSTOMIZATION_ELEMENT);
|
||||
ChrCustomizationOptionStorage =ReadDB2<ChrCustomizationOptionRecord>("ChrCustomizationOption.db2", HotfixStatements.SEL_CHR_CUSTOMIZATION_OPTION, HotfixStatements.SEL_CHR_CUSTOMIZATION_OPTION_LOCALE);
|
||||
ChrCustomizationReqStorage =ReadDB2<ChrCustomizationReqRecord>("ChrCustomizationReq.db2", HotfixStatements.SEL_CHR_CUSTOMIZATION_REQ);
|
||||
ChrCustomizationReqChoiceStorage =ReadDB2<ChrCustomizationReqChoiceRecord>("ChrCustomizationReqChoice.db2", HotfixStatements.SEL_CHR_CUSTOMIZATION_REQ_CHOICE);
|
||||
ChrModelStorage =ReadDB2<ChrModelRecord>("ChrModel.db2", HotfixStatements.SEL_CHR_MODEL);
|
||||
ChrRaceXChrModelStorage =ReadDB2<ChrRaceXChrModelRecord>("ChrRaceXChrModel.db2", HotfixStatements.SEL_CHR_RACE_X_CHR_MODEL);
|
||||
ChrRacesStorage = ReadDB2<ChrRacesRecord>("ChrRaces.db2", HotfixStatements.SEL_CHR_RACES, HotfixStatements.SEL_CHR_RACES_LOCALE);
|
||||
ChrSpecializationStorage = ReadDB2<ChrSpecializationRecord>("ChrSpecialization.db2", HotfixStatements.SEL_CHR_SPECIALIZATION, HotfixStatements.SEL_CHR_SPECIALIZATION_LOCALE);
|
||||
CinematicCameraStorage = ReadDB2<CinematicCameraRecord>("CinematicCamera.db2", HotfixStatements.SEL_CINEMATIC_CAMERA);
|
||||
@@ -232,7 +238,6 @@ namespace Game.DataStorage
|
||||
RewardPackStorage = ReadDB2<RewardPackRecord>("RewardPack.db2", HotfixStatements.SEL_REWARD_PACK);
|
||||
RewardPackXCurrencyTypeStorage = ReadDB2<RewardPackXCurrencyTypeRecord>("RewardPackXCurrencyType.db2", HotfixStatements.SEL_REWARD_PACK_X_CURRENCY_TYPE);
|
||||
RewardPackXItemStorage = ReadDB2<RewardPackXItemRecord>("RewardPackXItem.db2", HotfixStatements.SEL_REWARD_PACK_X_ITEM);
|
||||
ScalingStatDistributionStorage = ReadDB2<ScalingStatDistributionRecord>("ScalingStatDistribution.db2", HotfixStatements.SEL_SCALING_STAT_DISTRIBUTION);
|
||||
ScenarioStorage = ReadDB2<ScenarioRecord>("Scenario.db2", HotfixStatements.SEL_SCENARIO, HotfixStatements.SEL_SCENARIO_LOCALE);
|
||||
ScenarioStepStorage = ReadDB2<ScenarioStepRecord>("ScenarioStep.db2", HotfixStatements.SEL_SCENARIO_STEP, HotfixStatements.SEL_SCENARIO_STEP_LOCALE);
|
||||
//SceneScriptStorage = ReadDB2<SceneScriptRecord>("SceneScript.db2", HotfixStatements.SEL_SCENE_SCRIPT);
|
||||
@@ -287,6 +292,7 @@ namespace Game.DataStorage
|
||||
TotemCategoryStorage = ReadDB2<TotemCategoryRecord>("TotemCategory.db2", HotfixStatements.SEL_TOTEM_CATEGORY, HotfixStatements.SEL_TOTEM_CATEGORY_LOCALE);
|
||||
ToyStorage = ReadDB2<ToyRecord>("Toy.db2", HotfixStatements.SEL_TOY, HotfixStatements.SEL_TOY_LOCALE);
|
||||
TransmogHolidayStorage = ReadDB2<TransmogHolidayRecord>("TransmogHoliday.db2", HotfixStatements.SEL_TRANSMOG_HOLIDAY);
|
||||
TransmogIllusionStorage = ReadDB2<TransmogIllusionRecord>("TransmogIllusion.db2", HotfixStatements.SEL_TRANSMOG_ILLUSION);
|
||||
TransmogSetStorage = ReadDB2<TransmogSetRecord>("TransmogSet.db2", HotfixStatements.SEL_TRANSMOG_SET, HotfixStatements.SEL_TRANSMOG_SET_LOCALE);
|
||||
TransmogSetGroupStorage = ReadDB2<TransmogSetGroupRecord>("TransmogSetGroup.db2", HotfixStatements.SEL_TRANSMOG_SET_GROUP, HotfixStatements.SEL_TRANSMOG_SET_GROUP_LOCALE);
|
||||
TransmogSetItemStorage = ReadDB2<TransmogSetItemRecord>("TransmogSetItem.db2", HotfixStatements.SEL_TRANSMOG_SET_ITEM);
|
||||
@@ -440,14 +446,20 @@ namespace Game.DataStorage
|
||||
public static DB6Storage<BattlemasterListRecord> BattlemasterListStorage;
|
||||
public static DB6Storage<BroadcastTextRecord> BroadcastTextStorage;
|
||||
public static DB6Storage<Cfg_RegionsRecord> CfgRegionsStorage;
|
||||
public static DB6Storage<CharacterFacialHairStylesRecord> CharacterFacialHairStylesStorage;
|
||||
public static DB6Storage<CharBaseSectionRecord> CharBaseSectionStorage;
|
||||
public static DB6Storage<CharSectionsRecord> CharSectionsStorage;
|
||||
public static DB6Storage<CharStartOutfitRecord> CharStartOutfitStorage;
|
||||
public static DB6Storage<CharTitlesRecord> CharTitlesStorage;
|
||||
public static DB6Storage<CharacterLoadoutRecord> CharacterLoadoutStorage;
|
||||
public static DB6Storage<CharacterLoadoutItemRecord> CharacterLoadoutItemStorage;
|
||||
public static DB6Storage<ChatChannelsRecord> ChatChannelsStorage;
|
||||
public static DB6Storage<ChrClassesRecord> ChrClassesStorage;
|
||||
public static DB6Storage<ChrClassesXPowerTypesRecord> ChrClassesXPowerTypesStorage;
|
||||
public static DB6Storage<ChrCustomizationChoiceRecord> ChrCustomizationChoiceStorage;
|
||||
public static DB6Storage<ChrCustomizationDisplayInfoRecord> ChrCustomizationDisplayInfoStorage;
|
||||
public static DB6Storage<ChrCustomizationElementRecord> ChrCustomizationElementStorage;
|
||||
public static DB6Storage<ChrCustomizationReqRecord> ChrCustomizationReqStorage;
|
||||
public static DB6Storage<ChrCustomizationReqChoiceRecord> ChrCustomizationReqChoiceStorage;
|
||||
public static DB6Storage<ChrModelRecord> ChrModelStorage;
|
||||
public static DB6Storage<ChrRaceXChrModelRecord> ChrRaceXChrModelStorage;
|
||||
public static DB6Storage<ChrCustomizationOptionRecord> ChrCustomizationOptionStorage;
|
||||
public static DB6Storage<ChrRacesRecord> ChrRacesStorage;
|
||||
public static DB6Storage<ChrSpecializationRecord> ChrSpecializationStorage;
|
||||
public static DB6Storage<CinematicCameraRecord> CinematicCameraStorage;
|
||||
@@ -581,7 +593,6 @@ namespace Game.DataStorage
|
||||
public static DB6Storage<RewardPackRecord> RewardPackStorage;
|
||||
public static DB6Storage<RewardPackXCurrencyTypeRecord> RewardPackXCurrencyTypeStorage;
|
||||
public static DB6Storage<RewardPackXItemRecord> RewardPackXItemStorage;
|
||||
public static DB6Storage<ScalingStatDistributionRecord> ScalingStatDistributionStorage;
|
||||
public static DB6Storage<ScenarioRecord> ScenarioStorage;
|
||||
public static DB6Storage<ScenarioStepRecord> ScenarioStepStorage;
|
||||
//public static DB6Storage<SceneScriptRecord> SceneScriptStorage;
|
||||
@@ -636,6 +647,7 @@ namespace Game.DataStorage
|
||||
public static DB6Storage<TotemCategoryRecord> TotemCategoryStorage;
|
||||
public static DB6Storage<ToyRecord> ToyStorage;
|
||||
public static DB6Storage<TransmogHolidayRecord> TransmogHolidayStorage;
|
||||
public static DB6Storage<TransmogIllusionRecord> TransmogIllusionStorage;
|
||||
public static DB6Storage<TransmogSetRecord> TransmogSetStorage;
|
||||
public static DB6Storage<TransmogSetGroupRecord> TransmogSetGroupStorage;
|
||||
public static DB6Storage<TransmogSetItemRecord> TransmogSetItemStorage;
|
||||
|
||||
@@ -23,6 +23,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Collections;
|
||||
using Framework.Dynamic;
|
||||
|
||||
namespace Game.DataStorage
|
||||
{
|
||||
@@ -123,41 +124,6 @@ namespace Game.DataStorage
|
||||
}
|
||||
}
|
||||
|
||||
foreach (CharacterFacialHairStylesRecord characterFacialStyle in CliDB.CharacterFacialHairStylesStorage.Values)
|
||||
_characterFacialHairStyles.Add(Tuple.Create(characterFacialStyle.RaceID, characterFacialStyle.SexID, (uint)characterFacialStyle.VariationID));
|
||||
|
||||
CliDB.CharacterFacialHairStylesStorage.Clear();
|
||||
|
||||
CharBaseSectionVariation[] sectionToBase = new CharBaseSectionVariation[(int)CharSectionType.Max];
|
||||
foreach (CharBaseSectionRecord charBaseSection in CliDB.CharBaseSectionStorage.Values)
|
||||
{
|
||||
Cypher.Assert(charBaseSection.ResolutionVariationEnum < (byte)CharSectionType.Max, $"SECTION_TYPE_MAX ({(byte)CharSectionType.Max}) must be equal to or greater than {charBaseSection.ResolutionVariationEnum + 1}");
|
||||
Cypher.Assert(charBaseSection.VariationEnum < CharBaseSectionVariation.Max, $"CharBaseSectionVariation.Max {(byte)CharBaseSectionVariation.Max} must be equal to or greater than {charBaseSection.VariationEnum + 1}");
|
||||
|
||||
sectionToBase[charBaseSection.ResolutionVariationEnum] = charBaseSection.VariationEnum;
|
||||
}
|
||||
|
||||
CliDB.CharBaseSectionStorage.Clear();
|
||||
|
||||
MultiMap<Tuple<byte, byte, CharBaseSectionVariation>, Tuple<byte, byte>> addedSections = new MultiMap<Tuple<byte, byte, CharBaseSectionVariation>, Tuple<byte, byte>>();
|
||||
foreach (CharSectionsRecord charSection in CliDB.CharSectionsStorage.Values)
|
||||
{
|
||||
Cypher.Assert(charSection.BaseSection < (byte)CharSectionType.Max, $"SECTION_TYPE_MAX ({(byte)CharSectionType.Max}) must be equal to or greater than {charSection.BaseSection + 1}");
|
||||
|
||||
Tuple<byte, byte, CharBaseSectionVariation> sectionKey = Tuple.Create(charSection.RaceID, charSection.SexID, sectionToBase[charSection.BaseSection]);
|
||||
Tuple<byte, byte> sectionCombination = Tuple.Create(charSection.VariationIndex, charSection.ColorIndex);
|
||||
if (addedSections.Contains(sectionKey, sectionCombination))
|
||||
continue;
|
||||
|
||||
addedSections.Add(sectionKey, sectionCombination);
|
||||
_charSections.Add(sectionKey, charSection);
|
||||
}
|
||||
|
||||
CliDB.CharSectionsStorage.Clear();
|
||||
|
||||
foreach (var outfit in CliDB.CharStartOutfitStorage.Values)
|
||||
_charStartOutfits[(uint)((byte)outfit.RaceID | (outfit.ClassID << 8) | (outfit.SexID << 16))] = outfit;
|
||||
|
||||
var powers = new List<ChrClassesXPowerTypesRecord>();
|
||||
foreach (var chrClasses in CliDB.ChrClassesXPowerTypesStorage.Values)
|
||||
powers.Add(chrClasses);
|
||||
@@ -175,6 +141,71 @@ namespace Game.DataStorage
|
||||
_powersByClass[power.ClassID][power.PowerType] = index;
|
||||
}
|
||||
|
||||
foreach (var customizationChoice in CliDB.ChrCustomizationChoiceStorage.Values)
|
||||
_chrCustomizationChoicesByOption.Add(customizationChoice.ChrCustomizationOptionID, customizationChoice);
|
||||
|
||||
MultiMap<uint, Tuple<uint, byte>> shapeshiftFormByModel = new MultiMap<uint, Tuple<uint, byte>>();
|
||||
Dictionary<uint, ChrCustomizationDisplayInfoRecord> displayInfoByCustomizationChoice = new Dictionary<uint, ChrCustomizationDisplayInfoRecord>();
|
||||
|
||||
// build shapeshift form model lookup
|
||||
foreach (ChrCustomizationElementRecord customizationElement in CliDB.ChrCustomizationElementStorage.Values)
|
||||
{
|
||||
ChrCustomizationDisplayInfoRecord customizationDisplayInfo = CliDB.ChrCustomizationDisplayInfoStorage.LookupByKey(customizationElement.ChrCustomizationDisplayInfoID);
|
||||
if (customizationDisplayInfo != null)
|
||||
{
|
||||
ChrCustomizationChoiceRecord customizationChoice = CliDB.ChrCustomizationChoiceStorage.LookupByKey(customizationElement.ChrCustomizationChoiceID);
|
||||
if (customizationChoice != null)
|
||||
{
|
||||
displayInfoByCustomizationChoice[customizationElement.ChrCustomizationChoiceID] = customizationDisplayInfo;
|
||||
ChrCustomizationOptionRecord customizationOption = CliDB.ChrCustomizationOptionStorage.LookupByKey(customizationChoice.ChrCustomizationOptionID);
|
||||
if (customizationOption != null)
|
||||
shapeshiftFormByModel.Add(customizationOption.ChrModelID, Tuple.Create(customizationOption.Id, (byte)customizationDisplayInfo.ShapeshiftFormID));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MultiMap<uint, ChrCustomizationOptionRecord> customizationOptionsByModel = new MultiMap<uint, ChrCustomizationOptionRecord>();
|
||||
foreach (ChrCustomizationOptionRecord customizationOption in CliDB.ChrCustomizationOptionStorage.Values)
|
||||
customizationOptionsByModel.Add(customizationOption.ChrModelID, customizationOption);
|
||||
|
||||
foreach (ChrCustomizationReqChoiceRecord reqChoice in CliDB.ChrCustomizationReqChoiceStorage.Values)
|
||||
{
|
||||
ChrCustomizationChoiceRecord customizationChoice = CliDB.ChrCustomizationChoiceStorage.LookupByKey(reqChoice.ChrCustomizationChoiceID);
|
||||
if (customizationChoice != null)
|
||||
{
|
||||
if (!_chrCustomizationRequiredChoices.ContainsKey(reqChoice.ChrCustomizationReqID))
|
||||
_chrCustomizationRequiredChoices[reqChoice.ChrCustomizationReqID] = new MultiMap<uint, uint>();
|
||||
|
||||
_chrCustomizationRequiredChoices[reqChoice.ChrCustomizationReqID].Add(customizationChoice.ChrCustomizationOptionID, reqChoice.ChrCustomizationChoiceID);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (ChrRaceXChrModelRecord raceModel in CliDB.ChrRaceXChrModelStorage.Values)
|
||||
{
|
||||
ChrModelRecord model = CliDB.ChrModelStorage.LookupByKey(raceModel.ChrModelID);
|
||||
if (model != null)
|
||||
{
|
||||
_chrModelsByRaceAndGender[Tuple.Create((byte)raceModel.ChrRacesID, (byte)model.Sex)] = model;
|
||||
|
||||
var customizationOptionsForModel = customizationOptionsByModel.LookupByKey(model.Id);
|
||||
if (customizationOptionsForModel != null)
|
||||
_chrCustomizationOptionsByRaceAndGender.AddRange(Tuple.Create((byte)raceModel.ChrRacesID, (byte)model.Sex), customizationOptionsForModel);
|
||||
|
||||
// link shapeshift displays to race/gender/form
|
||||
foreach (var shapeshiftOptionsForModel in shapeshiftFormByModel.LookupByKey(model.Id))
|
||||
{
|
||||
ShapeshiftFormModelData data = _chrCustomizationChoicesForShapeshifts[Tuple.Create((byte)raceModel.ChrRacesID, (byte)model.Sex, shapeshiftOptionsForModel.Item2)];
|
||||
data.OptionID = shapeshiftOptionsForModel.Item2;
|
||||
data.Choices = _chrCustomizationChoicesByOption.LookupByKey(shapeshiftOptionsForModel.Item2);
|
||||
if (!data.Choices.Empty())
|
||||
{
|
||||
for (int i = 0; i < data.Choices.Count; ++i)
|
||||
data.Displays[i] = displayInfoByCustomizationChoice.LookupByKey(data.Choices[i].Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (ChrSpecializationRecord chrSpec in CliDB.ChrSpecializationStorage.Values)
|
||||
{
|
||||
//ASSERT(chrSpec.ClassID < MAX_CLASSES);
|
||||
@@ -190,9 +221,6 @@ namespace Game.DataStorage
|
||||
_chrSpecializationsByIndex[storageIndex] = new ChrSpecializationRecord[PlayerConst.MaxSpecializations];
|
||||
|
||||
_chrSpecializationsByIndex[storageIndex][chrSpec.OrderIndex] = chrSpec;
|
||||
|
||||
if (chrSpec.Flags.HasAnyFlag(ChrSpecializationFlag.Recommended))
|
||||
_defaultChrSpecializationsByClass[(uint)chrSpec.ClassID] = chrSpec;
|
||||
}
|
||||
|
||||
foreach (ContentTuningXExpectedRecord contentTuningXExpectedStat in CliDB.ContentTuningXExpectedStorage.Values)
|
||||
@@ -557,7 +585,7 @@ namespace Game.DataStorage
|
||||
UiMapRecord parentUiMap = CliDB.UiMapStorage.LookupByKey(uiMap.ParentUiMapID);
|
||||
if (parentUiMap != null)
|
||||
{
|
||||
if (Convert.ToBoolean(parentUiMap.Flags & 0x80))
|
||||
if (parentUiMap.GetFlags().HasAnyFlag(UiMapFlag.NoWorldPositions))
|
||||
continue;
|
||||
UiMapAssignmentRecord uiMapAssignment = null;
|
||||
UiMapAssignmentRecord parentUiMapAssignment = null;
|
||||
@@ -744,9 +772,7 @@ namespace Game.DataStorage
|
||||
|
||||
public uint GetEmptyAnimStateID()
|
||||
{
|
||||
return 1484;
|
||||
// TEMP: well... AnimationData.db2 in 8.3.0 has more rows than max hardcoded anim id in client
|
||||
// return sAnimationDataStore.GetNumRows();
|
||||
return (uint)CliDB.AnimationDataStorage.Count;
|
||||
}
|
||||
|
||||
public List<uint> GetAreasForGroup(uint areaGroupId)
|
||||
@@ -855,31 +881,6 @@ namespace Game.DataStorage
|
||||
return broadcastText.Text[SharedConst.DefaultLocale];
|
||||
}
|
||||
|
||||
public bool HasCharacterFacialHairStyle(Race race, Gender gender, uint variationId)
|
||||
{
|
||||
return _characterFacialHairStyles.Contains(Tuple.Create((byte)race, (byte)gender, variationId));
|
||||
}
|
||||
|
||||
public bool HasCharSections(Race race, Gender gender, CharBaseSectionVariation variation)
|
||||
{
|
||||
return _charSections.ContainsKey(Tuple.Create((byte)race, (byte)gender, variation));
|
||||
}
|
||||
|
||||
public CharSectionsRecord GetCharSectionEntry(Race race, Gender gender, CharBaseSectionVariation variation, byte variationIndex, byte colorIndex)
|
||||
{
|
||||
var list = _charSections.LookupByKey(Tuple.Create((byte)race, (byte)gender, variation));
|
||||
foreach (var charSection in list)
|
||||
if (charSection.VariationIndex == variationIndex && charSection.ColorIndex == colorIndex)
|
||||
return charSection;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public CharStartOutfitRecord GetCharStartOutfitEntry(uint race, uint class_, uint gender)
|
||||
{
|
||||
return _charStartOutfits.LookupByKey(race | (class_ << 8) | (gender << 16));
|
||||
}
|
||||
|
||||
public string GetClassName(Class class_, Locale locale = Locale.enUS)
|
||||
{
|
||||
ChrClassesRecord classEntry = CliDB.ChrClassesStorage.LookupByKey(class_);
|
||||
@@ -897,6 +898,26 @@ namespace Game.DataStorage
|
||||
return _powersByClass[(int)classId][(int)powerType];
|
||||
}
|
||||
|
||||
public List<ChrCustomizationChoiceRecord> GetCustomiztionChoices(uint chrCustomizationOptionId)
|
||||
{
|
||||
return _chrCustomizationChoicesByOption.LookupByKey(chrCustomizationOptionId);
|
||||
}
|
||||
|
||||
public List<ChrCustomizationOptionRecord> GetCustomiztionOptions(Race race, Gender gender)
|
||||
{
|
||||
return _chrCustomizationOptionsByRaceAndGender.LookupByKey(Tuple.Create(race, gender));
|
||||
}
|
||||
|
||||
public MultiMap<uint, uint> GetRequiredCustomizationChoices(uint chrCustomizationReqId)
|
||||
{
|
||||
return _chrCustomizationRequiredChoices.LookupByKey(chrCustomizationReqId);
|
||||
}
|
||||
|
||||
public ChrModelRecord GetChrModel(Race race, Gender gender)
|
||||
{
|
||||
return _chrModelsByRaceAndGender.LookupByKey(Tuple.Create(race, gender));
|
||||
}
|
||||
|
||||
public string GetChrRaceName(Race race, Locale locale = Locale.enUS)
|
||||
{
|
||||
ChrRacesRecord raceEntry = CliDB.ChrRacesStorage.LookupByKey(race);
|
||||
@@ -916,7 +937,46 @@ namespace Game.DataStorage
|
||||
|
||||
public ChrSpecializationRecord GetDefaultChrSpecializationForClass(Class class_)
|
||||
{
|
||||
return _defaultChrSpecializationsByClass.LookupByKey(class_);
|
||||
return GetChrSpecializationByIndex(class_, PlayerConst.InitialSpecializationIndex);
|
||||
}
|
||||
|
||||
public ContentTuningLevels? GetContentTuningData(uint contentTuningId, uint replacementConditionMask, bool forItem = false)
|
||||
{
|
||||
ContentTuningRecord contentTuning = CliDB.ContentTuningStorage.LookupByKey(contentTuningId);
|
||||
if (contentTuning == null)
|
||||
return null;
|
||||
|
||||
if (forItem && contentTuning.GetFlags().HasFlag(ContentTuningFlag.DisabledForItem))
|
||||
return null;
|
||||
|
||||
int getLevelAdjustment(ContentTuningCalcType type) => type switch
|
||||
{
|
||||
ContentTuningCalcType.PlusOne => 1,
|
||||
ContentTuningCalcType.PlusMaxLevelForExpansion => (int)Global.ObjectMgr.GetMaxLevelForExpansion((Expansion)WorldConfig.GetUIntValue(WorldCfg.Expansion)),
|
||||
_ => 0
|
||||
};
|
||||
|
||||
ContentTuningLevels levels = new ContentTuningLevels();
|
||||
levels.MinLevel = (short)(contentTuning.MinLevel + getLevelAdjustment((ContentTuningCalcType)contentTuning.MinLevelType));
|
||||
levels.MaxLevel = (short)(contentTuning.MaxLevel + getLevelAdjustment((ContentTuningCalcType)contentTuning.MaxLevelType));
|
||||
levels.MinLevelWithDelta = (short)Math.Clamp(levels.MinLevel + contentTuning.TargetLevelDelta, 1, SharedConst.MaxLevel);
|
||||
levels.MaxLevelWithDelta = (short)Math.Clamp(levels.MaxLevel + contentTuning.TargetLevelMaxDelta, 1, SharedConst.MaxLevel);
|
||||
|
||||
// clamp after calculating levels with delta (delta can bring "overflown" level back into correct range)
|
||||
levels.MinLevel = (short)Math.Clamp((int)levels.MinLevel, 1, SharedConst.MaxLevel);
|
||||
levels.MaxLevel = (short)Math.Clamp((int)levels.MaxLevel, 1, SharedConst.MaxLevel);
|
||||
|
||||
if (contentTuning.TargetLevelMin != 0)
|
||||
levels.TargetLevelMin = (short)contentTuning.TargetLevelMin;
|
||||
else
|
||||
levels.TargetLevelMin = levels.MinLevelWithDelta;
|
||||
|
||||
if (contentTuning.TargetLevelMax != 0)
|
||||
levels.TargetLevelMax = (short)contentTuning.TargetLevelMax;
|
||||
else
|
||||
levels.TargetLevelMax = levels.MaxLevelWithDelta;
|
||||
|
||||
return levels;
|
||||
}
|
||||
|
||||
public string GetCreatureFamilyPetName(CreatureFamily petfamily, Locale locale)
|
||||
@@ -1708,6 +1768,11 @@ namespace Game.DataStorage
|
||||
return _rewardPackItems.LookupByKey(rewardPackID);
|
||||
}
|
||||
|
||||
public ShapeshiftFormModelData GetShapeshiftFormModelData(Race race, Gender gender, ShapeShiftForm form)
|
||||
{
|
||||
return _chrCustomizationChoicesForShapeshifts.LookupByKey(Tuple.Create((byte)race, (byte)gender, (byte)form));
|
||||
}
|
||||
|
||||
public List<SkillLineRecord> GetSkillLinesForParentSkill(uint parentSkillId)
|
||||
{
|
||||
return _skillLinesByParentSkillLine.LookupByKey(parentSkillId);
|
||||
@@ -2091,12 +2156,13 @@ namespace Game.DataStorage
|
||||
MultiMap<uint, AzeritePowerSetMemberRecord> _azeritePowers = new MultiMap<uint, AzeritePowerSetMemberRecord>();
|
||||
Dictionary<(uint azeriteUnlockSetId, ItemContext itemContext), byte[]> _azeriteTierUnlockLevels = new Dictionary<(uint azeriteUnlockSetId, ItemContext itemContext), byte[]>();
|
||||
Dictionary<(uint itemId, ItemContext itemContext), AzeriteUnlockMappingRecord> _azeriteUnlockMappings = new Dictionary<(uint itemId, ItemContext itemContext), AzeriteUnlockMappingRecord>();
|
||||
List<Tuple<byte, byte, uint>> _characterFacialHairStyles = new List<Tuple<byte, byte, uint>>();
|
||||
MultiMap<Tuple<byte, byte, CharBaseSectionVariation>, CharSectionsRecord> _charSections = new MultiMap<Tuple<byte, byte, CharBaseSectionVariation>, CharSectionsRecord>();
|
||||
Dictionary<uint, CharStartOutfitRecord> _charStartOutfits = new Dictionary<uint, CharStartOutfitRecord>();
|
||||
uint[][] _powersByClass = new uint[(int)Class.Max][];
|
||||
MultiMap<uint, ChrCustomizationChoiceRecord> _chrCustomizationChoicesByOption = new MultiMap<uint, ChrCustomizationChoiceRecord>();
|
||||
Dictionary<Tuple<byte, byte>, ChrModelRecord> _chrModelsByRaceAndGender = new Dictionary<Tuple<byte, byte>, ChrModelRecord>();
|
||||
Dictionary<Tuple<byte, byte, byte>, ShapeshiftFormModelData> _chrCustomizationChoicesForShapeshifts = new Dictionary<Tuple<byte, byte, byte>, ShapeshiftFormModelData>();
|
||||
MultiMap<Tuple<byte, byte>, ChrCustomizationOptionRecord> _chrCustomizationOptionsByRaceAndGender = new MultiMap<Tuple<byte, byte>, ChrCustomizationOptionRecord>();
|
||||
Dictionary<uint, MultiMap<uint, uint>> _chrCustomizationRequiredChoices = new Dictionary<uint, MultiMap<uint, uint>>();
|
||||
ChrSpecializationRecord[][] _chrSpecializationsByIndex = new ChrSpecializationRecord[(int)Class.Max + 1][];
|
||||
Dictionary<uint, ChrSpecializationRecord> _defaultChrSpecializationsByClass = new Dictionary<uint, ChrSpecializationRecord>();
|
||||
MultiMap<uint, CurvePointRecord> _curvePoints = new MultiMap<uint, CurvePointRecord>();
|
||||
Dictionary<Tuple<uint, byte, byte, byte>, EmotesTextSoundRecord> _emoteTextSounds = new Dictionary<Tuple<uint, byte, byte, byte>, EmotesTextSoundRecord>();
|
||||
Dictionary<Tuple<uint, int>, ExpectedStatRecord> _expectedStatsByLevel = new Dictionary<Tuple<uint, int>, ExpectedStatRecord>();
|
||||
@@ -2363,6 +2429,23 @@ namespace Game.DataStorage
|
||||
}
|
||||
}
|
||||
|
||||
public struct ContentTuningLevels
|
||||
{
|
||||
public short MinLevel;
|
||||
public short MaxLevel;
|
||||
public short MinLevelWithDelta;
|
||||
public short MaxLevelWithDelta;
|
||||
public short TargetLevelMin;
|
||||
public short TargetLevelMax;
|
||||
}
|
||||
|
||||
public class ShapeshiftFormModelData
|
||||
{
|
||||
public uint OptionID;
|
||||
public List<ChrCustomizationChoiceRecord> Choices = new List<ChrCustomizationChoiceRecord>();
|
||||
public List<ChrCustomizationDisplayInfoRecord> Displays = new List<ChrCustomizationDisplayInfoRecord>();
|
||||
}
|
||||
|
||||
enum CurveInterpolationMode
|
||||
{
|
||||
Linear = 0,
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace Game.DataStorage
|
||||
public int RewardItemID;
|
||||
public uint CriteriaTree;
|
||||
public ushort SharesCriteria;
|
||||
public int CovenantID;
|
||||
}
|
||||
|
||||
public sealed class AnimationDataRecord
|
||||
@@ -79,7 +80,6 @@ namespace Game.DataStorage
|
||||
public ushort UwAmbience;
|
||||
public ushort ZoneMusic;
|
||||
public ushort UwZoneMusic;
|
||||
public sbyte ExplorationLevel;
|
||||
public ushort IntroSound;
|
||||
public uint UwIntroSound;
|
||||
public byte FactionGroupMask;
|
||||
@@ -89,6 +89,7 @@ namespace Game.DataStorage
|
||||
public byte WildBattlePetLevelMin;
|
||||
public byte WildBattlePetLevelMax;
|
||||
public byte WindSettingsID;
|
||||
public uint ContentTuningID;
|
||||
public AreaFlags[] Flags = new AreaFlags[2];
|
||||
public ushort[] LiquidTypeID = new ushort[4];
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Game.DataStorage
|
||||
public sealed class BattlePetBreedStateRecord
|
||||
{
|
||||
public uint Id;
|
||||
public byte BattlePetStateID;
|
||||
public int BattlePetStateID;
|
||||
public ushort Value;
|
||||
public uint BattlePetBreedID;
|
||||
}
|
||||
@@ -72,6 +72,7 @@ namespace Game.DataStorage
|
||||
public sbyte SourceTypeEnum;
|
||||
public int CardUIModelSceneID;
|
||||
public int LoadoutUIModelSceneID;
|
||||
public int CovenantID;
|
||||
}
|
||||
|
||||
public sealed class BattlePetSpeciesStateRecord
|
||||
@@ -100,7 +101,7 @@ namespace Game.DataStorage
|
||||
public ushort HolidayWorldState;
|
||||
public BattlemasterListFlags Flags;
|
||||
public int IconFileDataID;
|
||||
public short RequiredPlayerConditionID;
|
||||
public int RequiredPlayerConditionID;
|
||||
public short[] MapId = new short[16];
|
||||
}
|
||||
|
||||
@@ -109,7 +110,7 @@ namespace Game.DataStorage
|
||||
public LocalizedString Text;
|
||||
public LocalizedString Text1;
|
||||
public uint Id;
|
||||
public byte LanguageID;
|
||||
public int LanguageID;
|
||||
public int ConditionID;
|
||||
public ushort EmotesID;
|
||||
public byte Flags;
|
||||
|
||||
@@ -30,47 +30,6 @@ namespace Game.DataStorage
|
||||
public uint ChallengeOrigin;
|
||||
}
|
||||
|
||||
public sealed class CharacterFacialHairStylesRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int[] Geoset = new int[5];
|
||||
public byte RaceID;
|
||||
public byte SexID;
|
||||
public byte VariationID;
|
||||
}
|
||||
|
||||
public sealed class CharBaseSectionRecord
|
||||
{
|
||||
public uint Id;
|
||||
public byte LayoutResType;
|
||||
public CharBaseSectionVariation VariationEnum;
|
||||
public byte ResolutionVariationEnum;
|
||||
}
|
||||
|
||||
public sealed class CharSectionsRecord
|
||||
{
|
||||
public uint Id;
|
||||
public byte RaceID;
|
||||
public byte SexID;
|
||||
public sbyte BaseSection;
|
||||
public byte VariationIndex;
|
||||
public byte ColorIndex;
|
||||
public short Flags;
|
||||
public int[] MaterialResourcesID = new int[3];
|
||||
}
|
||||
|
||||
public sealed class CharStartOutfitRecord
|
||||
{
|
||||
public uint Id;
|
||||
public byte ClassID;
|
||||
public byte SexID;
|
||||
public byte OutfitID;
|
||||
public uint PetDisplayID; // Pet Model ID for starting pet
|
||||
public byte PetFamilyID; // Pet Family Entry for starting pet
|
||||
public int[] ItemID = new int[24];
|
||||
public uint RaceID;
|
||||
}
|
||||
|
||||
public sealed class CharTitlesRecord
|
||||
{
|
||||
public uint Id;
|
||||
@@ -80,13 +39,31 @@ namespace Game.DataStorage
|
||||
public sbyte Flags;
|
||||
}
|
||||
|
||||
public sealed class ChatChannelsRecord
|
||||
public sealed class CharacterLoadoutRecord
|
||||
{
|
||||
public long RaceMask;
|
||||
public uint Id;
|
||||
public sbyte ChrClassID;
|
||||
public sbyte Purpose;
|
||||
|
||||
public bool IsForNewCharacter() { return Purpose == 9; }
|
||||
}
|
||||
|
||||
public sealed class CharacterLoadoutItemRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort CharacterLoadoutID;
|
||||
public uint ItemID;
|
||||
}
|
||||
|
||||
public sealed class ChatChannelsRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public string Shortcut;
|
||||
public string Shortcut;
|
||||
public uint Id;
|
||||
public ChannelDBCFlags Flags;
|
||||
public sbyte FactionGroup;
|
||||
public int Ruleset;
|
||||
}
|
||||
|
||||
public sealed class ChrClassesRecord
|
||||
@@ -96,14 +73,29 @@ namespace Game.DataStorage
|
||||
public string NameMale;
|
||||
public string NameFemale;
|
||||
public string PetNameToken;
|
||||
public string Description;
|
||||
public string RoleInfoString;
|
||||
public string DisabledString;
|
||||
public string HyphenatedNameMale;
|
||||
public string HyphenatedNameFemale;
|
||||
public uint Id;
|
||||
public uint CreateScreenFileDataID;
|
||||
public uint SelectScreenFileDataID;
|
||||
public uint IconFileDataID;
|
||||
public uint LowResScreenFileDataID;
|
||||
public int StartingLevel;
|
||||
public uint Flags;
|
||||
public uint SpellTextureBlobFileDataID;
|
||||
public ushort Flags;
|
||||
public uint RolesMask;
|
||||
public uint ArmorTypeMask;
|
||||
public int CharStartKitUnknown901;
|
||||
public int MaleCharacterCreationVisualFallback;
|
||||
public int MaleCharacterCreationIdleVisualFallback;
|
||||
public int FemaleCharacterCreationVisualFallback;
|
||||
public int FemaleCharacterCreationIdleVisualFallback;
|
||||
public int CharacterCreationIdleGroundVisualFallback;
|
||||
public int CharacterCreationGroundVisualFallback;
|
||||
public int AlteredFormCharacterCreationIdleVisualFallback;
|
||||
public int CharacterCreationAnimLoopWaitTimeMsFallback;
|
||||
public ushort CinematicSequenceID;
|
||||
public ushort DefaultSpec;
|
||||
public byte PrimaryStatPriority;
|
||||
@@ -112,6 +104,9 @@ namespace Game.DataStorage
|
||||
public byte AttackPowerPerAgility;
|
||||
public byte AttackPowerPerStrength;
|
||||
public byte SpellClassSet;
|
||||
public byte ChatColorR;
|
||||
public byte ChatColorG;
|
||||
public byte ChatColorB;
|
||||
}
|
||||
|
||||
public sealed class ChrClassesXPowerTypesRecord
|
||||
@@ -121,6 +116,103 @@ namespace Game.DataStorage
|
||||
public uint ClassID;
|
||||
}
|
||||
|
||||
public sealed class ChrCustomizationChoiceRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public uint Id;
|
||||
public uint ChrCustomizationOptionID;
|
||||
public uint ChrCustomizationReqID;
|
||||
public ushort SortOrder;
|
||||
public int SwatchColor1;
|
||||
public int SwatchColor2;
|
||||
public ushort UiOrderIndex;
|
||||
public int Flags;
|
||||
}
|
||||
|
||||
public sealed class ChrCustomizationDisplayInfoRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int ShapeshiftFormID;
|
||||
public uint DisplayID;
|
||||
public float BarberShopMinCameraDistance;
|
||||
public float BarberShopHeightOffset;
|
||||
}
|
||||
|
||||
public sealed class ChrCustomizationElementRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint ChrCustomizationChoiceID;
|
||||
public int RelatedChrCustomizationChoiceID;
|
||||
public int ChrCustomizationGeosetID;
|
||||
public int ChrCustomizationSkinnedModelID;
|
||||
public int ChrCustomizationMaterialID;
|
||||
public int ChrCustomizationBoneSetID;
|
||||
public int ChrCustomizationCondModelID;
|
||||
public int ChrCustomizationDisplayInfoID;
|
||||
}
|
||||
|
||||
public sealed class ChrCustomizationOptionRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public uint Id;
|
||||
public ushort SecondaryID;
|
||||
public int Flags;
|
||||
public uint ChrModelID;
|
||||
public int SortIndex;
|
||||
public int ChrCustomizationCategoryID;
|
||||
public int OptionType;
|
||||
public float BarberShopCostModifier;
|
||||
public int ChrCustomizationID;
|
||||
public int ChrCustomizationReqID;
|
||||
public int UiOrderIndex;
|
||||
}
|
||||
|
||||
public sealed class ChrCustomizationReqRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int Flags;
|
||||
public int ClassMask;
|
||||
public int AchievementID;
|
||||
public int OverrideArchive; // -1: allow any, otherwise must match OverrideArchive cvar
|
||||
public uint ItemModifiedAppearanceID;
|
||||
|
||||
public ChrCustomizationReqFlag GetFlags() { return (ChrCustomizationReqFlag)Flags; }
|
||||
}
|
||||
|
||||
public sealed class ChrCustomizationReqChoiceRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint ChrCustomizationChoiceID;
|
||||
public uint ChrCustomizationReqID;
|
||||
}
|
||||
|
||||
public sealed class ChrModelRecord
|
||||
{
|
||||
public float[] FaceCustomizationOffset = new float[3];
|
||||
public float[] CustomizeOffset = new float[3];
|
||||
public uint Id;
|
||||
public int Sex;
|
||||
public uint DisplayID;
|
||||
public int CharComponentTextureLayoutID;
|
||||
public int Flags;
|
||||
public int SkeletonFileDataID;
|
||||
public int ModelFallbackChrModelID;
|
||||
public int TextureFallbackChrModelID;
|
||||
public int HelmVisFallbackChrModelID;
|
||||
public float CustomizeScale;
|
||||
public float CustomizeFacing;
|
||||
public float CameraDistanceOffset;
|
||||
public float BarberShopCameraOffsetScale;
|
||||
public float BarberShopCameraRotationOffset;
|
||||
}
|
||||
|
||||
public sealed class ChrRaceXChrModelRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int ChrRacesID;
|
||||
public int ChrModelID;
|
||||
}
|
||||
|
||||
public sealed class ChrRacesRecord
|
||||
{
|
||||
public string ClientPrefix;
|
||||
@@ -129,37 +221,39 @@ namespace Game.DataStorage
|
||||
public string NameFemale;
|
||||
public string NameLowercase;
|
||||
public string NameFemaleLowercase;
|
||||
public string NameS;
|
||||
public string NameFemaleS;
|
||||
public string NameLowercaseS;
|
||||
public string NameFemaleLowercaseS;
|
||||
public string RaceFantasyDescription;
|
||||
public string NameL;
|
||||
public string NameFemaleL;
|
||||
public string NameLowercaseL;
|
||||
public string NameFemaleLowercaseL;
|
||||
public uint Id;
|
||||
public int Flags;
|
||||
public uint MaleDisplayId;
|
||||
public uint FemaleDisplayId;
|
||||
public uint HighResMaleDisplayId;
|
||||
public uint HighResFemaleDisplayId;
|
||||
public int BaseLanguage;
|
||||
public int ResSicknessSpellID;
|
||||
public int SplashSoundID;
|
||||
public int CreateScreenFileDataID;
|
||||
public int SelectScreenFileDataID;
|
||||
public float[] MaleCustomizeOffset = new float[3];
|
||||
public float[] FemaleCustomizeOffset = new float[3];
|
||||
public int LowResScreenFileDataID;
|
||||
public uint[] AlteredFormStartVisualKitID = new uint[3];
|
||||
public uint[] AlteredFormFinishVisualKitID = new uint[3];
|
||||
public int HeritageArmorAchievementID;
|
||||
public int StartingLevel;
|
||||
public int UiDisplayOrder;
|
||||
public int FemaleSkeletonFileDataID;
|
||||
public int MaleSkeletonFileDataID;
|
||||
public int HelmVisFallbackRaceID;
|
||||
public int PlayableRaceBit;
|
||||
public int HelmetAnimScalingRaceID;
|
||||
public int TransmogrifyDisabledSlotMask;
|
||||
public float[] AlteredFormCustomizeOffsetFallback = new float[3];
|
||||
public float AlteredFormCustomizeRotationFallback;
|
||||
public ushort FactionID;
|
||||
public ushort CinematicSequenceID;
|
||||
public short ResSicknessSpellID;
|
||||
public short SplashSoundID;
|
||||
public sbyte BaseLanguage;
|
||||
public sbyte CreatureType;
|
||||
public sbyte Alliance;
|
||||
public sbyte RaceRelated;
|
||||
public sbyte UnalteredVisualRaceID;
|
||||
public sbyte CharComponentTextureLayoutID;
|
||||
public sbyte CharComponentTexLayoutHiResID;
|
||||
public sbyte DefaultClassID;
|
||||
public sbyte NeutralRaceID;
|
||||
public sbyte MaleModelFallbackRaceID;
|
||||
@@ -170,6 +264,7 @@ namespace Game.DataStorage
|
||||
public sbyte MaleTextureFallbackSex;
|
||||
public sbyte FemaleTextureFallbackRaceID;
|
||||
public sbyte FemaleTextureFallbackSex;
|
||||
public sbyte UnalteredVisualCustomizationRaceID;
|
||||
}
|
||||
|
||||
public sealed class ChrSpecializationRecord
|
||||
@@ -213,10 +308,31 @@ namespace Game.DataStorage
|
||||
public sealed class ContentTuningRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int MinLevel;
|
||||
public int MaxLevel;
|
||||
public int Flags;
|
||||
public int ExpansionID;
|
||||
public int MinLevel;
|
||||
public int MaxLevel;
|
||||
public int MinLevelType;
|
||||
public int MaxLevelType;
|
||||
public int TargetLevelDelta;
|
||||
public int TargetLevelMaxDelta;
|
||||
public int TargetLevelMin;
|
||||
public int TargetLevelMax;
|
||||
public int MinItemLevel;
|
||||
|
||||
public ContentTuningFlag GetFlags() { return (ContentTuningFlag)Flags; }
|
||||
|
||||
public int GetScalingFactionGroup()
|
||||
{
|
||||
ContentTuningFlag flags = GetFlags();
|
||||
if (flags.HasFlag(ContentTuningFlag.Horde))
|
||||
return 5;
|
||||
|
||||
if (flags.HasFlag(ContentTuningFlag.Alliance))
|
||||
return 3;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ContentTuningXExpectedRecord
|
||||
@@ -284,15 +400,9 @@ namespace Game.DataStorage
|
||||
public sbyte DisplayRaceID;
|
||||
public sbyte DisplaySexID;
|
||||
public sbyte DisplayClassID;
|
||||
public sbyte SkinID;
|
||||
public sbyte FaceID;
|
||||
public sbyte HairStyleID;
|
||||
public sbyte HairColorID;
|
||||
public sbyte FacialHairID;
|
||||
public sbyte Flags;
|
||||
public int BakeMaterialResourcesID;
|
||||
public int HDBakeMaterialResourcesID;
|
||||
public byte[] CustomDisplayOption = new byte[3];
|
||||
}
|
||||
|
||||
public sealed class CreatureFamilyRecord
|
||||
@@ -385,18 +495,19 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public string Name;
|
||||
public string Description;
|
||||
public byte CategoryID;
|
||||
public int CategoryID;
|
||||
public int InventoryIconFileID;
|
||||
public uint SpellWeight;
|
||||
public byte SpellCategory;
|
||||
public uint MaxQty;
|
||||
public uint MaxEarnablePerWeek;
|
||||
public uint Flags;
|
||||
public sbyte Quality;
|
||||
public int FactionID;
|
||||
public int ItemGroupSoundsID;
|
||||
public int ConvertToPlayerExperience;
|
||||
public int PlayerConditionID;
|
||||
public int XpQuestDifficulty;
|
||||
public int AwardConditionID;
|
||||
public int MaxQtyWorldStateID;
|
||||
public int[] Flags = new int[2];
|
||||
}
|
||||
|
||||
public sealed class CurveRecord
|
||||
@@ -410,6 +521,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public Vector2 Pos;
|
||||
public Vector2 PosPreSquish;
|
||||
public ushort CurveID;
|
||||
public byte OrderIndex;
|
||||
}
|
||||
|
||||
@@ -24,20 +24,20 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public sbyte State0ImpactEffectDoodadSet;
|
||||
public byte State0AmbientDoodadSet;
|
||||
public ushort State1Wmo;
|
||||
public uint State1Wmo;
|
||||
public sbyte State1DestructionDoodadSet;
|
||||
public sbyte State1ImpactEffectDoodadSet;
|
||||
public byte State1AmbientDoodadSet;
|
||||
public ushort State2Wmo;
|
||||
public uint State2Wmo;
|
||||
public sbyte State2DestructionDoodadSet;
|
||||
public sbyte State2ImpactEffectDoodadSet;
|
||||
public byte State2AmbientDoodadSet;
|
||||
public ushort State3Wmo;
|
||||
public uint State3Wmo;
|
||||
public byte State3InitDoodadSet;
|
||||
public byte State3AmbientDoodadSet;
|
||||
public byte EjectDirection;
|
||||
public byte DoNotHighlight;
|
||||
public ushort State0Wmo;
|
||||
public uint State0Wmo;
|
||||
public byte HealEffect;
|
||||
public ushort HealEffectSpeed;
|
||||
public byte State0NameSet;
|
||||
@@ -69,7 +69,7 @@ namespace Game.DataStorage
|
||||
public LocalizedString Name;
|
||||
public uint Id;
|
||||
public short MapID;
|
||||
public sbyte DifficultyID;
|
||||
public int DifficultyID;
|
||||
public int OrderIndex;
|
||||
public int CompleteWorldStateID;
|
||||
public sbyte Bit;
|
||||
|
||||
@@ -47,13 +47,13 @@ namespace Game.DataStorage
|
||||
public Vector3 Pos;
|
||||
public float[] Rot = new float[4];
|
||||
public uint Id;
|
||||
public ushort OwnerID;
|
||||
public ushort DisplayID;
|
||||
public uint OwnerID;
|
||||
public uint DisplayID;
|
||||
public float Scale;
|
||||
public GameObjectTypes TypeID;
|
||||
public byte PhaseUseFlags;
|
||||
public ushort PhaseID;
|
||||
public ushort PhaseGroupID;
|
||||
public int PhaseUseFlags;
|
||||
public int PhaseID;
|
||||
public int PhaseGroupID;
|
||||
public int[] PropValue = new int[8];
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Game.DataStorage
|
||||
public byte BuildingType;
|
||||
public uint HordeGameObjectID;
|
||||
public uint AllianceGameObjectID;
|
||||
public byte GarrSiteID;
|
||||
public int GarrSiteID;
|
||||
public byte UpgradeLevel;
|
||||
public int BuildSeconds;
|
||||
public ushort CurrencyTypeID;
|
||||
@@ -153,6 +153,8 @@ namespace Game.DataStorage
|
||||
public byte ChrClassID;
|
||||
public byte Flags;
|
||||
public byte Gender;
|
||||
public int AutoCombatantID;
|
||||
public int CovenantID;
|
||||
}
|
||||
|
||||
public sealed class GarrFollowerXAbilityRecord
|
||||
@@ -218,7 +220,6 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public ushort EnchantId;
|
||||
public SocketColor Type;
|
||||
public ushort MinItemLevel;
|
||||
}
|
||||
|
||||
public sealed class GlyphBindableSpellRecord
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace Game.DataStorage
|
||||
public sbyte SoundOverrideSubclassID;
|
||||
public int IconFileDataID;
|
||||
public byte ItemGroupSoundsID;
|
||||
public int ModifiedCraftingReagentItemID;
|
||||
}
|
||||
|
||||
public sealed class ItemAppearanceRecord
|
||||
@@ -66,6 +67,7 @@ namespace Game.DataStorage
|
||||
public uint ItemDisplayInfoID;
|
||||
public int DefaultIconFileDataID;
|
||||
public int UiOrder;
|
||||
public int PlayerConditionID;
|
||||
}
|
||||
|
||||
public sealed class ItemArmorQualityRecord
|
||||
@@ -100,7 +102,7 @@ namespace Game.DataStorage
|
||||
public sealed class ItemBonusRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int[] Value = new int[3];
|
||||
public int[] Value = new int[4];
|
||||
public ushort ParentItemBonusListID;
|
||||
public ItemBonusType BonusType;
|
||||
public byte OrderIndex;
|
||||
@@ -109,11 +111,12 @@ namespace Game.DataStorage
|
||||
public sealed class ItemBonusListGroupEntryRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int ItemBonusListGroupID;
|
||||
public int ItemBonusListID;
|
||||
public int ItemLevelSelectorID;
|
||||
public int OrderIndex;
|
||||
public int ItemExtendedCostID;
|
||||
public int ItemBonusListGroupID;
|
||||
public int PlayerConditionID;
|
||||
}
|
||||
|
||||
public sealed class ItemBonusListLevelDeltaRecord
|
||||
@@ -345,6 +348,9 @@ namespace Game.DataStorage
|
||||
public float PriceRandomValue;
|
||||
public int[] Flags = new int[4];
|
||||
public int FactionRelated;
|
||||
public int ModifiedCraftingReagentItemID;
|
||||
public uint ContentTuningID;
|
||||
public uint PlayerLevelToItemLevelCurveID;
|
||||
public ushort ItemNameDescriptionID;
|
||||
public ushort RequiredTransmogHoliday;
|
||||
public ushort RequiredHoliday;
|
||||
@@ -359,7 +365,6 @@ namespace Game.DataStorage
|
||||
public ushort StartQuestID;
|
||||
public ushort PageID;
|
||||
public ushort ItemDelay;
|
||||
public ushort ScalingStatDistributionID;
|
||||
public ushort MinFactionID;
|
||||
public ushort RequiredSkillRank;
|
||||
public ushort RequiredSkill;
|
||||
|
||||
@@ -25,8 +25,6 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public string Description;
|
||||
public byte MinLevel;
|
||||
public ushort MaxLevel;
|
||||
public LfgType TypeID;
|
||||
public byte Subtype;
|
||||
public sbyte Faction;
|
||||
@@ -40,9 +38,6 @@ namespace Game.DataStorage
|
||||
public byte GroupID;
|
||||
public byte OrderIndex;
|
||||
public uint RequiredPlayerConditionId;
|
||||
public byte TargetLevel;
|
||||
public byte TargetLevelMin;
|
||||
public ushort TargetLevelMax;
|
||||
public ushort RandomID;
|
||||
public ushort ScenarioID;
|
||||
public ushort FinalEncounterID;
|
||||
@@ -55,6 +50,7 @@ namespace Game.DataStorage
|
||||
public ushort BonusReputationAmount;
|
||||
public ushort MentorItemLevel;
|
||||
public byte MentorCharLevel;
|
||||
public uint ContentTuningID;
|
||||
public LfgFlags[] Flags = new LfgFlags[2];
|
||||
|
||||
// Helpers
|
||||
@@ -100,6 +96,7 @@ namespace Game.DataStorage
|
||||
public sealed class LockRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int Flags;
|
||||
public int[] Index = new int[SharedConst.MaxLockCase];
|
||||
public ushort[] Skill = new ushort[SharedConst.MaxLockCase];
|
||||
public byte[] LockType = new byte[SharedConst.MaxLockCase];
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public string Directory;
|
||||
public LocalizedString MapName;
|
||||
public string InternalName;
|
||||
public string MapDescription0; // Horde
|
||||
public string MapDescription1; // Alliance
|
||||
public string PvpShortDescription;
|
||||
|
||||
@@ -37,11 +37,9 @@ namespace Game.DataStorage
|
||||
public long RaceMask;
|
||||
public string FailureDescription;
|
||||
public uint Id;
|
||||
public ushort MinLevel;
|
||||
public ushort MaxLevel;
|
||||
public int ClassMask;
|
||||
public uint SkillLogic;
|
||||
public byte LanguageID;
|
||||
public int LanguageID;
|
||||
public byte MinLanguage;
|
||||
public int MaxLanguage;
|
||||
public ushort MaxFactionID;
|
||||
@@ -57,7 +55,7 @@ namespace Game.DataStorage
|
||||
public byte ItemFlags;
|
||||
public uint AuraSpellLogic;
|
||||
public ushort WorldStateExpressionID;
|
||||
public byte WeatherID;
|
||||
public int WeatherID;
|
||||
public byte PartyStatus;
|
||||
public byte LifetimeMaxPVPRank;
|
||||
public uint AchievementLogic;
|
||||
@@ -66,7 +64,7 @@ namespace Game.DataStorage
|
||||
public uint AreaLogic;
|
||||
public uint LfgLogic;
|
||||
public uint CurrencyLogic;
|
||||
public ushort QuestKillID;
|
||||
public uint QuestKillID;
|
||||
public uint QuestKillLogic;
|
||||
public sbyte MinExpansionLevel;
|
||||
public sbyte MaxExpansionLevel;
|
||||
@@ -77,7 +75,7 @@ namespace Game.DataStorage
|
||||
public byte PhaseUseFlags;
|
||||
public ushort PhaseID;
|
||||
public uint PhaseGroupID;
|
||||
public byte Flags;
|
||||
public int Flags;
|
||||
public sbyte ChrSpecializationIndex;
|
||||
public sbyte ChrSpecializationRole;
|
||||
public uint ModifierTreeID;
|
||||
@@ -91,14 +89,16 @@ namespace Game.DataStorage
|
||||
public sbyte MinExpansionTier;
|
||||
public byte MinPVPRank;
|
||||
public byte MaxPVPRank;
|
||||
public uint ContentTuningID;
|
||||
public int CovenantID;
|
||||
public ushort[] SkillID = new ushort[4];
|
||||
public ushort[] MinSkill = new ushort[4];
|
||||
public ushort[] MaxSkill = new ushort[4];
|
||||
public uint[] MinFactionID = new uint[3];
|
||||
public byte[] MinReputation = new byte[3];
|
||||
public ushort[] PrevQuestID = new ushort[4];
|
||||
public ushort[] CurrQuestID = new ushort[4];
|
||||
public ushort[] CurrentCompletedQuestID = new ushort[4];
|
||||
public uint[] PrevQuestID = new uint[4];
|
||||
public uint[] CurrQuestID = new uint[4];
|
||||
public uint[] CurrentCompletedQuestID = new uint[4];
|
||||
public uint[] SpellID = new uint[4];
|
||||
public uint[] ItemID = new uint[4];
|
||||
public uint[] ItemCount = new uint[4];
|
||||
|
||||
@@ -21,14 +21,6 @@ using System;
|
||||
|
||||
namespace Game.DataStorage
|
||||
{
|
||||
public sealed class ScalingStatDistributionRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort PlayerLevelToItemLevelCurveID;
|
||||
public int MinLevel;
|
||||
public int MaxLevel;
|
||||
}
|
||||
|
||||
public sealed class ScenarioRecord
|
||||
{
|
||||
public uint Id;
|
||||
@@ -46,7 +38,7 @@ namespace Game.DataStorage
|
||||
public string Title;
|
||||
public ushort ScenarioID;
|
||||
public uint CriteriaTreeId;
|
||||
public ushort RewardQuestID;
|
||||
public uint RewardQuestID;
|
||||
public int RelatedStep; // Bonus step can only be completed if scenario is in the step specified in this field
|
||||
public ushort Supersedes; // Used in conjunction with Proving Grounds scenarios, when sequencing steps (Not using step order?)
|
||||
public byte OrderIndex;
|
||||
@@ -117,7 +109,7 @@ namespace Game.DataStorage
|
||||
public AbilityLearnType AcquireMethod;
|
||||
public ushort TrivialSkillLineRankHigh;
|
||||
public ushort TrivialSkillLineRankLow;
|
||||
public sbyte Flags;
|
||||
public int Flags;
|
||||
public byte NumSkillUps;
|
||||
public short UniqueBit;
|
||||
public short TradeSkillCategoryID;
|
||||
@@ -205,7 +197,6 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public int Base;
|
||||
public short PerLevel;
|
||||
public int Minimum;
|
||||
}
|
||||
|
||||
@@ -269,7 +260,6 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public int Duration;
|
||||
public uint DurationPerLevel;
|
||||
public int MaxDuration;
|
||||
}
|
||||
|
||||
@@ -333,14 +323,16 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class SpellItemEnchantmentRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string Name;
|
||||
public string HordeName;
|
||||
public uint Id;
|
||||
public uint[] EffectArg = new uint[ItemConst.MaxItemEnchantmentEffects];
|
||||
public float[] EffectScalingPoints = new float[ItemConst.MaxItemEnchantmentEffects];
|
||||
public uint TransmogPlayerConditionID;
|
||||
public uint TransmogCost;
|
||||
public uint IconFileDataID;
|
||||
public int MinItemLevel;
|
||||
public int MaxItemLevel;
|
||||
public uint TransmogUseConditionID;
|
||||
public uint TransmogCost;
|
||||
public ushort[] EffectPointsMin = new ushort[ItemConst.MaxItemEnchantmentEffects];
|
||||
public ushort ItemVisual;
|
||||
public EnchantmentSlotMask Flags;
|
||||
@@ -379,17 +371,17 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public byte DifficultyID;
|
||||
public ushort BaseLevel;
|
||||
public ushort MaxLevel;
|
||||
public ushort SpellLevel;
|
||||
public byte MaxPassiveAuraLevel;
|
||||
public ushort BaseLevel;
|
||||
public ushort SpellLevel;
|
||||
public uint SpellID;
|
||||
}
|
||||
|
||||
public sealed class SpellMiscRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int[] Attributes = new int[14];
|
||||
public int[] Attributes = new int[15];
|
||||
public byte DifficultyID;
|
||||
public ushort CastingTimeIndex;
|
||||
public ushort DurationIndex;
|
||||
@@ -401,6 +393,9 @@ namespace Game.DataStorage
|
||||
public uint SpellIconFileDataID;
|
||||
public uint ActiveIconFileDataID;
|
||||
public uint ContentTuningID;
|
||||
public int ShowFutureSpellPlayerConditionID;
|
||||
public int SpellVisualScript;
|
||||
public int ActiveSpellVisualScript;
|
||||
public uint SpellID;
|
||||
}
|
||||
|
||||
@@ -447,7 +442,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public SpellProcsPerMinuteModType Type;
|
||||
public ushort Param;
|
||||
public uint Param;
|
||||
public float Coeff;
|
||||
public uint SpellProcsPerMinuteID;
|
||||
}
|
||||
@@ -550,7 +545,6 @@ namespace Game.DataStorage
|
||||
public byte DifficultyID;
|
||||
public uint SpellVisualID;
|
||||
public float Probability;
|
||||
public byte Flags;
|
||||
public byte Priority;
|
||||
public int SpellIconFileID;
|
||||
public int ActiveIconFileID;
|
||||
|
||||
@@ -103,6 +103,15 @@ namespace Game.DataStorage
|
||||
public int RequiredTransmogHoliday;
|
||||
}
|
||||
|
||||
public sealed class TransmogIllusionRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int UnlockConditionID;
|
||||
public int TransmogCost;
|
||||
public int SpellItemEnchantmentID;
|
||||
public int Flags;
|
||||
}
|
||||
|
||||
public sealed class TransmogSetRecord
|
||||
{
|
||||
public string Name;
|
||||
|
||||
@@ -27,15 +27,16 @@ namespace Game.DataStorage
|
||||
public int Flags;
|
||||
public int System;
|
||||
public UiMapType Type;
|
||||
public uint LevelRangeMin;
|
||||
public uint LevelRangeMax;
|
||||
public int BountySetID;
|
||||
public uint BountyDisplayLocation;
|
||||
public int VisibilityPlayerConditionID;
|
||||
public sbyte HelpTextPosition;
|
||||
public int BkgAtlasID;
|
||||
public int AlternateUiMapGroup;
|
||||
}
|
||||
public int ContentTuningID;
|
||||
|
||||
public UiMapFlag GetFlags() { return (UiMapFlag)Flags; }
|
||||
}
|
||||
|
||||
public sealed class UiMapAssignmentRecord
|
||||
{
|
||||
@@ -61,6 +62,7 @@ namespace Game.DataStorage
|
||||
public int ChildUiMapID;
|
||||
public int OverrideHighlightFileDataID;
|
||||
public int OverrideHighlightAtlasID;
|
||||
public int Flags;
|
||||
}
|
||||
|
||||
public sealed class UiMapXMapArtRecord
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace Game.DataStorage
|
||||
public float FacingLimitRight;
|
||||
public float FacingLimitLeft;
|
||||
public float CameraYawOffset;
|
||||
public byte UiLocomotionType;
|
||||
public ushort VehicleUIIndicatorID;
|
||||
public int MissileTargetingID;
|
||||
public ushort VehiclePOITypeID;
|
||||
public ushort[] SeatID = new ushort[8];
|
||||
public ushort[] PowerDisplayID = new ushort[3];
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Game.DataStorage
|
||||
guildGuid = guild.GetGUID();
|
||||
|
||||
_whoListStorage.Add(new WhoListPlayerInfo(player.GetGUID(), player.GetTeam(), player.GetSession().GetSecurity(), player.GetLevel(),
|
||||
player.GetClass(), player.GetRace(), player.GetZoneId(), player.m_playerData.NativeSex, player.IsVisible(),
|
||||
player.GetClass(), player.GetRace(), player.GetZoneId(), (byte)player.GetNativeSex(), player.IsVisible(),
|
||||
player.IsGameMaster(), playerName, guildName, guildGuid));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user