Core/DataStores: Fixed db2 structures after 7.3.5
This commit is contained in:
@@ -538,7 +538,7 @@ namespace Framework.Constants
|
||||
|
||||
MaxAccountExpansions
|
||||
}
|
||||
public enum PowerType : byte
|
||||
public enum PowerType : sbyte
|
||||
{
|
||||
Mana = 0,
|
||||
Rage = 1,
|
||||
@@ -561,7 +561,7 @@ namespace Framework.Constants
|
||||
Pain = 18,
|
||||
Max = 19,
|
||||
All = 127, // default for class?
|
||||
Health = 0xFE, // (-2 as signed value)
|
||||
Health = -2, // (-2 as signed value)
|
||||
MaxPerClass = 6
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -69,7 +69,7 @@ namespace Game.Achievements
|
||||
return false;
|
||||
}
|
||||
|
||||
if (achievement.MapID != -1 && referencePlayer.GetMapId() != achievement.MapID)
|
||||
if (achievement.InstanceID != -1 && referencePlayer.GetMapId() != achievement.InstanceID)
|
||||
{
|
||||
Log.outTrace(LogFilter.Achievement, "CanUpdateCriteriaTree: (Id: {0} Type {1} Achievement {2}) Wrong map",
|
||||
criteria.ID, criteria.Entry.Type, achievement.Id);
|
||||
@@ -157,14 +157,14 @@ namespace Game.Achievements
|
||||
// Oddly, the target count is NOT contained in the achievement, but in each individual criteria
|
||||
if (entry.Flags.HasAnyFlag(AchievementFlags.Summ))
|
||||
{
|
||||
ulong progress = 0;
|
||||
long progress = 0;
|
||||
CriteriaManager.WalkCriteriaTree(tree, criteriaTree =>
|
||||
{
|
||||
if (criteriaTree.Criteria != null)
|
||||
{
|
||||
CriteriaProgress criteriaProgress = this.GetCriteriaProgress(criteriaTree.Criteria);
|
||||
if (criteriaProgress != null)
|
||||
progress += criteriaProgress.Counter;
|
||||
progress += (long)criteriaProgress.Counter;
|
||||
}
|
||||
});
|
||||
return progress >= tree.Entry.Amount;
|
||||
@@ -1092,7 +1092,7 @@ namespace Game.Achievements
|
||||
// Once Bitten, Twice Shy (10 player) - Icecrown Citadel
|
||||
AchievementRecord achievement1 = CliDB.AchievementStorage.LookupByKey(4539);
|
||||
if (achievement1 != null)
|
||||
achievement1.MapID = 631; // Correct map requirement (currently has Ulduar); 6.0.3 note - it STILL has ulduar requirement
|
||||
achievement1.InstanceID = 631; // Correct map requirement (currently has Ulduar); 6.0.3 note - it STILL has ulduar requirement
|
||||
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} achievement references in {1} ms.", count, Time.GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
@@ -1181,7 +1181,7 @@ namespace Game.Achievements
|
||||
if (reqType == 0)
|
||||
return true;
|
||||
|
||||
uint reqValue = tree.Entry.Asset[0];
|
||||
uint reqValue = tree.Entry.Asset;
|
||||
switch ((CriteriaAdditionalCondition)reqType)
|
||||
{
|
||||
case CriteriaAdditionalCondition.ItemLevel: // 3
|
||||
@@ -1485,8 +1485,8 @@ namespace Game.Achievements
|
||||
Dictionary<uint, ScenarioStepRecord> scenarioCriteriaTreeIds = new Dictionary<uint, ScenarioStepRecord>();
|
||||
foreach (ScenarioStepRecord scenarioStep in CliDB.ScenarioStepStorage.Values)
|
||||
{
|
||||
if (scenarioStep.CriteriaTreeID != 0)
|
||||
scenarioCriteriaTreeIds[scenarioStep.CriteriaTreeID] = scenarioStep;
|
||||
if (scenarioStep.CriteriaTreeId != 0)
|
||||
scenarioCriteriaTreeIds[scenarioStep.CriteriaTreeId] = scenarioStep;
|
||||
}
|
||||
|
||||
Dictionary<uint /*criteriaTreeID*/, QuestObjective> questObjectiveCriteriaTreeIds = new Dictionary<uint, QuestObjective>();
|
||||
|
||||
@@ -43,9 +43,9 @@ namespace Game
|
||||
FactionTemplateRecord uEntry = CliDB.FactionTemplateStorage.LookupByKey(factionTemplateId);
|
||||
if (uEntry == null)
|
||||
return mNeutralAuctions;
|
||||
else if ((uEntry.Mask & (int)FactionMasks.Alliance) != 0)
|
||||
else if ((uEntry.FactionGroup & (int)FactionMasks.Alliance) != 0)
|
||||
return mAllianceAuctions;
|
||||
else if ((uEntry.Mask & (int)FactionMasks.Horde) != 0)
|
||||
else if ((uEntry.FactionGroup & (int)FactionMasks.Horde) != 0)
|
||||
return mHordeAuctions;
|
||||
else
|
||||
return mNeutralAuctions;
|
||||
@@ -387,9 +387,9 @@ namespace Game
|
||||
FactionTemplateRecord u_entry = CliDB.FactionTemplateStorage.LookupByKey(factionTemplateId);
|
||||
if (u_entry == null)
|
||||
houseid = 7; // goblin auction house
|
||||
else if ((u_entry.Mask & (int)FactionMasks.Alliance) != 0)
|
||||
else if ((u_entry.FactionGroup & (int)FactionMasks.Alliance) != 0)
|
||||
houseid = 1; // human auction house
|
||||
else if ((u_entry.Mask & (int)FactionMasks.Horde) != 0)
|
||||
else if ((u_entry.FactionGroup & (int)FactionMasks.Horde) != 0)
|
||||
houseid = 6; // orc auction house
|
||||
else
|
||||
houseid = 7; // goblin auction house
|
||||
|
||||
@@ -45,20 +45,20 @@ namespace Game.BattlePets
|
||||
if (!result.IsEmpty())
|
||||
Global.ObjectMgr.GetGenerator(HighGuid.BattlePet).Set(result.Read<ulong>(0) + 1);
|
||||
|
||||
foreach (var breedState in CliDB.BattlePetBreedStateStorage.Values)
|
||||
foreach (var battlePetBreedState in CliDB.BattlePetBreedStateStorage.Values)
|
||||
{
|
||||
if (!_battlePetBreedStates.ContainsKey(breedState.BreedID))
|
||||
_battlePetBreedStates[breedState.BreedID] = new Dictionary<BattlePetState, int>();
|
||||
if (!_battlePetBreedStates.ContainsKey(battlePetBreedState.BattlePetBreedID))
|
||||
_battlePetBreedStates[battlePetBreedState.BattlePetBreedID] = new Dictionary<BattlePetState, int>();
|
||||
|
||||
_battlePetBreedStates[breedState.BreedID][(BattlePetState)breedState.State] = breedState.Value;
|
||||
_battlePetBreedStates[battlePetBreedState.BattlePetBreedID][(BattlePetState)battlePetBreedState.BattlePetStateID] = battlePetBreedState.Value;
|
||||
}
|
||||
|
||||
foreach (var speciesState in CliDB.BattlePetSpeciesStateStorage.Values)
|
||||
foreach (var battlePetSpeciesState in CliDB.BattlePetSpeciesStateStorage.Values)
|
||||
{
|
||||
if (!_battlePetSpeciesStates.ContainsKey(speciesState.SpeciesID))
|
||||
_battlePetSpeciesStates[speciesState.SpeciesID] = new Dictionary<BattlePetState, int>();
|
||||
if (!_battlePetSpeciesStates.ContainsKey(battlePetSpeciesState.BattlePetSpeciesID))
|
||||
_battlePetSpeciesStates[battlePetSpeciesState.BattlePetSpeciesID] = new Dictionary<BattlePetState, int>();
|
||||
|
||||
_battlePetSpeciesStates[speciesState.SpeciesID][(BattlePetState)speciesState.State] = speciesState.Value;
|
||||
_battlePetSpeciesStates[battlePetSpeciesState.BattlePetSpeciesID][(BattlePetState)battlePetSpeciesState.BattlePetStateID] = battlePetSpeciesState.Value;
|
||||
}
|
||||
|
||||
LoadAvailablePetBreeds();
|
||||
@@ -497,13 +497,13 @@ namespace Game.BattlePets
|
||||
}
|
||||
|
||||
// modify stats by quality
|
||||
foreach (var breedQualityRecord in CliDB.BattlePetBreedQualityStorage.Values)
|
||||
foreach (var battlePetBreedQuality in CliDB.BattlePetBreedQualityStorage.Values)
|
||||
{
|
||||
if (breedQualityRecord.Quality == PacketInfo.Quality)
|
||||
if (battlePetBreedQuality.QualityEnum == PacketInfo.Quality)
|
||||
{
|
||||
health *= breedQualityRecord.Modifier;
|
||||
power *= breedQualityRecord.Modifier;
|
||||
speed *= breedQualityRecord.Modifier;
|
||||
health *= battlePetBreedQuality.StateMultiplier;
|
||||
power *= battlePetBreedQuality.StateMultiplier;
|
||||
speed *= battlePetBreedQuality.StateMultiplier;
|
||||
break;
|
||||
}
|
||||
// TOOD: add check if pet has existing quality
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Game.Chat
|
||||
{
|
||||
if (target.HasTitle(titleInfo))
|
||||
{
|
||||
string name = (target.GetGender() == Gender.Male ? titleInfo.NameMale : titleInfo.NameFemale)[handler.GetSessionDbcLocale()];
|
||||
string name = (target.GetGender() == Gender.Male ? titleInfo.Name : titleInfo.Name1)[handler.GetSessionDbcLocale()];
|
||||
if (string.IsNullOrEmpty(name))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -327,9 +327,9 @@ namespace Game.Chat.Commands
|
||||
}
|
||||
|
||||
if ((node.Pos.X == 0.0f && node.Pos.Y == 0.0f && node.Pos.Z == 0.0f) ||
|
||||
!GridDefines.IsValidMapCoord(node.MapID, node.Pos.X, node.Pos.Y, node.Pos.Z))
|
||||
!GridDefines.IsValidMapCoord(node.ContinentID, node.Pos.X, node.Pos.Y, node.Pos.Z))
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.InvalidTargetCoord, node.Pos.X, node.Pos.Y, node.MapID);
|
||||
handler.SendSysMessage(CypherStrings.InvalidTargetCoord, node.Pos.X, node.Pos.Y, node.ContinentID);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ namespace Game.Chat.Commands
|
||||
else
|
||||
player.SaveRecallPosition();
|
||||
|
||||
player.TeleportTo(node.MapID, node.Pos.X, node.Pos.Y, node.Pos.Z, player.GetOrientation());
|
||||
player.TeleportTo(node.ContinentID, node.Pos.X, node.Pos.Y, node.Pos.Z, player.GetOrientation());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -366,9 +366,9 @@ namespace Game.Chat.Commands
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!GridDefines.IsValidMapCoord(at.MapID, at.Pos.X, at.Pos.Y, at.Pos.Z))
|
||||
if (!GridDefines.IsValidMapCoord(at.ContinentID, at.Pos.X, at.Pos.Y, at.Pos.Z))
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.InvalidTargetCoord, at.Pos.X, at.Pos.Y, at.MapID);
|
||||
handler.SendSysMessage(CypherStrings.InvalidTargetCoord, at.Pos.X, at.Pos.Y, at.ContinentID);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ namespace Game.Chat.Commands
|
||||
else
|
||||
player.SaveRecallPosition();
|
||||
|
||||
player.TeleportTo(at.MapID, at.Pos.X, at.Pos.Y, at.Pos.Z, player.GetOrientation());
|
||||
player.TeleportTo(at.ContinentID, at.Pos.X, at.Pos.Y, at.Pos.Z, player.GetOrientation());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ namespace Game.Chat.Commands
|
||||
AreaTableRecord zoneEntry = areaEntry.ParentAreaID != 0 ? CliDB.AreaTableStorage.LookupByKey(areaEntry.ParentAreaID) : areaEntry;
|
||||
Contract.Assert(zoneEntry != null);
|
||||
|
||||
Map map = Global.MapMgr.CreateBaseMap(zoneEntry.MapId);
|
||||
Map map = Global.MapMgr.CreateBaseMap(zoneEntry.ContinentID);
|
||||
|
||||
if (map.Instanceable())
|
||||
{
|
||||
@@ -430,9 +430,9 @@ namespace Game.Chat.Commands
|
||||
|
||||
Global.DB2Mgr.Zone2MapCoordinates(areaEntry.ParentAreaID != 0 ? areaEntry.ParentAreaID : areaId, ref x, ref y);
|
||||
|
||||
if (!GridDefines.IsValidMapCoord(zoneEntry.MapId, x, y))
|
||||
if (!GridDefines.IsValidMapCoord(zoneEntry.ContinentID, x, y))
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.InvalidTargetCoord, x, y, zoneEntry.MapId);
|
||||
handler.SendSysMessage(CypherStrings.InvalidTargetCoord, x, y, zoneEntry.ContinentID);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ namespace Game.Chat.Commands
|
||||
|
||||
float z = Math.Max(map.GetHeight(x, y, MapConst.MaxHeight), map.GetWaterLevel(x, y));
|
||||
|
||||
player.TeleportTo(zoneEntry.MapId, x, y, z, player.GetOrientation());
|
||||
player.TeleportTo(zoneEntry.ContinentID, x, y, z, player.GetOrientation());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -228,11 +228,11 @@ namespace Game.Chat.Commands
|
||||
if (skillLine.ClassMask != 0 && (skillLine.ClassMask & classmask) == 0)
|
||||
continue;
|
||||
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(skillLine.SpellID);
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(skillLine.Spell);
|
||||
if (spellInfo == null || !Global.SpellMgr.IsSpellValid(spellInfo, player, false))
|
||||
continue;
|
||||
|
||||
player.LearnSpell(skillLine.SpellID, false);
|
||||
player.LearnSpell(skillLine.Spell, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace Game.Chat.Commands
|
||||
|
||||
foreach (var entry in CliDB.SkillLineAbilityStorage.Values)
|
||||
{
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(entry.SpellID);
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(entry.Spell);
|
||||
if (spellInfo == null)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -713,10 +713,10 @@ namespace Game.Chat
|
||||
// send taxinode in "id - [name] (Map:m X:x Y:y Z:z)" format
|
||||
if (handler.GetSession() != null)
|
||||
handler.SendSysMessage(CypherStrings.TaxinodeEntryListChat, nodeEntry.Id, nodeEntry.Id, name, "",
|
||||
nodeEntry.MapID, nodeEntry.Pos.X, nodeEntry.Pos.Y, nodeEntry.Pos.Z);
|
||||
nodeEntry.ContinentID, nodeEntry.Pos.X, nodeEntry.Pos.Y, nodeEntry.Pos.Z);
|
||||
else
|
||||
handler.SendSysMessage(CypherStrings.TaxinodeEntryListConsole, nodeEntry.Id, name, "",
|
||||
nodeEntry.MapID, nodeEntry.Pos.X, nodeEntry.Pos.Y, nodeEntry.Pos.Z);
|
||||
nodeEntry.ContinentID, nodeEntry.Pos.X, nodeEntry.Pos.Y, nodeEntry.Pos.Z);
|
||||
|
||||
if (!found)
|
||||
found = true;
|
||||
@@ -795,7 +795,7 @@ namespace Game.Chat
|
||||
continue;
|
||||
|
||||
LocaleConstant locale = handler.GetSessionDbcLocale();
|
||||
string name = gender == Gender.Male ? titleInfo.NameMale[locale]: titleInfo.NameFemale[locale];
|
||||
string name = gender == Gender.Male ? titleInfo.Name[locale]: titleInfo.Name1[locale];
|
||||
if (string.IsNullOrEmpty(name))
|
||||
continue;
|
||||
|
||||
@@ -807,7 +807,7 @@ namespace Game.Chat
|
||||
if (locale == handler.GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = (gender == Gender.Male ? titleInfo.NameMale : titleInfo.NameFemale)[locale];
|
||||
name = (gender == Gender.Male ? titleInfo.Name : titleInfo.Name1)[locale];
|
||||
if (name.IsEmpty())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ namespace Game.Chat
|
||||
var record = CliDB.ItemSparseStorage.Values.FirstOrDefault(itemSparse =>
|
||||
{
|
||||
for (LocaleConstant i = 0; i < LocaleConstant.Max; ++i)
|
||||
if (itemName == itemSparse.Name[i])
|
||||
if (itemName == itemSparse.Display[i])
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -555,8 +555,8 @@ namespace Game.Chat
|
||||
return false;
|
||||
}
|
||||
|
||||
NotifyModification(handler, target, CypherStrings.YouChangePower, CypherStrings.YourPowerChanged, powerType.PowerTypeToken, powerAmount, powerAmount);
|
||||
powerAmount *= powerType.UIModifier;
|
||||
NotifyModification(handler, target, CypherStrings.YouChangePower, CypherStrings.YourPowerChanged, powerType.NameGlobalStringTag, powerAmount, powerAmount);
|
||||
powerAmount *= powerType.DisplayModifier;
|
||||
target.SetMaxPower(powerType.PowerTypeEnum, powerAmount);
|
||||
target.SetPower(powerType.PowerTypeEnum, powerAmount);
|
||||
return true;
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Game.Chat
|
||||
return false;
|
||||
}
|
||||
|
||||
PowerType powerType = classEntry.PowerType;
|
||||
PowerType powerType = classEntry.DisplayPower;
|
||||
|
||||
// reset m_form if no aura
|
||||
if (!player.HasAuraType(AuraType.ModShapeshift))
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Game.Chat.Commands
|
||||
target.SetTitle(titleInfo); // to be sure that title now known
|
||||
target.SetUInt32Value(PlayerFields.ChosenTitle, titleInfo.MaskID);
|
||||
|
||||
handler.SendSysMessage(CypherStrings.TitleCurrentRes, id, (target.GetGender() == Gender.Male ? titleInfo.NameMale : titleInfo.NameFemale)[handler.GetSessionDbcLocale()], tNameLink);
|
||||
handler.SendSysMessage(CypherStrings.TitleCurrentRes, id, (target.GetGender() == Gender.Male ? titleInfo.Name : titleInfo.Name1)[handler.GetSessionDbcLocale()], tNameLink);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Game.Chat.Commands
|
||||
|
||||
string tNameLink = handler.GetNameLink(target);
|
||||
|
||||
string titleNameStr = string.Format((target.GetGender() == Gender.Male ? titleInfo.NameMale : titleInfo.NameFemale)[handler.GetSessionDbcLocale()].ConvertFormatSyntax(), target.GetName());
|
||||
string titleNameStr = string.Format((target.GetGender() == Gender.Male ? titleInfo.Name : titleInfo.Name1)[handler.GetSessionDbcLocale()].ConvertFormatSyntax(), target.GetName());
|
||||
|
||||
target.SetTitle(titleInfo);
|
||||
handler.SendSysMessage(CypherStrings.TitleAddRes, id, titleNameStr, tNameLink);
|
||||
@@ -146,7 +146,7 @@ namespace Game.Chat.Commands
|
||||
|
||||
string tNameLink = handler.GetNameLink(target);
|
||||
|
||||
string titleNameStr = string.Format((target.GetGender() == Gender.Male ? titleInfo.NameMale : titleInfo.NameFemale)[handler.GetSessionDbcLocale()].ConvertFormatSyntax(), target.GetName());
|
||||
string titleNameStr = string.Format((target.GetGender() == Gender.Male ? titleInfo.Name : titleInfo.Name1)[handler.GetSessionDbcLocale()].ConvertFormatSyntax(), target.GetName());
|
||||
|
||||
handler.SendSysMessage(CypherStrings.TitleRemoveRes, id, titleNameStr, tNameLink);
|
||||
|
||||
|
||||
@@ -1792,10 +1792,10 @@ namespace Game
|
||||
if (condition.MovementFlags[1] != 0 && !Convert.ToBoolean((uint)player.GetUnitMovementFlags2() & condition.MovementFlags[1]))
|
||||
return false;
|
||||
|
||||
if (condition.MainHandItemSubclassMask != 0)
|
||||
if (condition.WeaponSubclassMask != 0)
|
||||
{
|
||||
Item mainHand = player.GetItemByPos(InventorySlots.Bag0, EquipmentSlot.MainHand);
|
||||
if (!mainHand || !Convert.ToBoolean((1 << (int)mainHand.GetTemplate().GetSubClass()) & condition.MainHandItemSubclassMask))
|
||||
if (!mainHand || !Convert.ToBoolean((1 << (int)mainHand.GetTemplate().GetSubClass()) & condition.WeaponSubclassMask))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1927,8 +1927,8 @@ namespace Game
|
||||
{
|
||||
if (condition.AuraSpellID[i] != 0)
|
||||
{
|
||||
if (condition.AuraCount[i] != 0)
|
||||
results[i] = player.GetAuraCount(condition.AuraSpellID[i]) >= condition.AuraCount[i];
|
||||
if (condition.AuraStacks[i] != 0)
|
||||
results[i] = player.GetAuraCount(condition.AuraSpellID[i]) >= condition.AuraStacks[i];
|
||||
else
|
||||
results[i] = player.HasAura(condition.AuraSpellID[i]);
|
||||
}
|
||||
|
||||
@@ -89,21 +89,21 @@ namespace Game.DataStorage
|
||||
DurabilityCostsStorage = DBReader.Read<DurabilityCostsRecord>("DurabilityCosts.db2", HotfixStatements.SEL_DURABILITY_COSTS);
|
||||
DurabilityQualityStorage = DBReader.Read<DurabilityQualityRecord>("DurabilityQuality.db2", HotfixStatements.SEL_DURABILITY_QUALITY);
|
||||
EmotesStorage = DBReader.Read<EmotesRecord>("Emotes.db2", HotfixStatements.SEL_EMOTES);
|
||||
EmotesTextStorage = DBReader.Read<EmotesTextRecord>("EmotesText.db2", HotfixStatements.SEL_EMOTES_TEXT, HotfixStatements.SEL_EMOTES_TEXT_LOCALE);
|
||||
EmotesTextStorage = DBReader.Read<EmotesTextRecord>("EmotesText.db2", HotfixStatements.SEL_EMOTES_TEXT);
|
||||
EmotesTextSoundStorage = DBReader.Read<EmotesTextSoundRecord>("EmotesTextSound.db2", HotfixStatements.SEL_EMOTES_TEXT_SOUND);
|
||||
FactionStorage = DBReader.Read<FactionRecord>("Faction.db2", HotfixStatements.SEL_FACTION, HotfixStatements.SEL_FACTION_LOCALE);
|
||||
FactionTemplateStorage = DBReader.Read<FactionTemplateRecord>("FactionTemplate.db2", HotfixStatements.SEL_FACTION_TEMPLATE);
|
||||
GameObjectsStorage = DBReader.Read<GameObjectsRecord>("GameObjects.db2", HotfixStatements.SEL_GAMEOBJECTS, HotfixStatements.SEL_GAMEOBJECTS_LOCALE);
|
||||
GameObjectDisplayInfoStorage = DBReader.Read<GameObjectDisplayInfoRecord>("GameObjectDisplayInfo.db2", HotfixStatements.SEL_GAMEOBJECT_DISPLAY_INFO);
|
||||
GameObjectsStorage = DBReader.Read<GameObjectsRecord>("GameObjects.db2", HotfixStatements.SEL_GAMEOBJECTS, HotfixStatements.SEL_GAMEOBJECTS_LOCALE);
|
||||
GarrAbilityStorage = DBReader.Read<GarrAbilityRecord>("GarrAbility.db2", HotfixStatements.SEL_GARR_ABILITY, HotfixStatements.SEL_GARR_ABILITY_LOCALE);
|
||||
GarrBuildingStorage = DBReader.Read<GarrBuildingRecord>("GarrBuilding.db2", HotfixStatements.SEL_GARR_BUILDING, HotfixStatements.SEL_GARR_BUILDING_LOCALE);
|
||||
GarrBuildingPlotInstStorage = DBReader.Read<GarrBuildingPlotInstRecord>("GarrBuildingPlotInst.db2", HotfixStatements.SEL_GARR_BUILDING_PLOT_INST);
|
||||
GarrClassSpecStorage = DBReader.Read<GarrClassSpecRecord>("GarrClassSpec.db2", HotfixStatements.SEL_GARR_CLASS_SPEC, HotfixStatements.SEL_GARR_CLASS_SPEC_LOCALE);
|
||||
GarrFollowerStorage = DBReader.Read<GarrFollowerRecord>("GarrFollower.db2", HotfixStatements.SEL_GARR_FOLLOWER, HotfixStatements.SEL_GARR_FOLLOWER_LOCALE);
|
||||
GarrFollowerXAbilityStorage = DBReader.Read<GarrFollowerXAbilityRecord>("GarrFollowerXAbility.db2", HotfixStatements.SEL_GARR_FOLLOWER_X_ABILITY);
|
||||
GarrPlotBuildingStorage = DBReader.Read<GarrPlotBuildingRecord>("GarrPlotBuilding.db2", HotfixStatements.SEL_GARR_PLOT_BUILDING);
|
||||
GarrPlotStorage = DBReader.Read<GarrPlotRecord>("GarrPlot.db2", HotfixStatements.SEL_GARR_PLOT, HotfixStatements.SEL_GARR_PLOT_LOCALE);
|
||||
GarrPlotInstanceStorage = DBReader.Read<GarrPlotInstanceRecord>("GarrPlotInstance.db2", HotfixStatements.SEL_GARR_PLOT_INSTANCE, HotfixStatements.SEL_GARR_PLOT_INSTANCE_LOCALE);
|
||||
GarrPlotBuildingStorage = DBReader.Read<GarrPlotBuildingRecord>("GarrPlotBuilding.db2", HotfixStatements.SEL_GARR_PLOT_BUILDING);
|
||||
GarrPlotInstanceStorage = DBReader.Read<GarrPlotInstanceRecord>("GarrPlotInstance.db2", HotfixStatements.SEL_GARR_PLOT_INSTANCE);
|
||||
GarrSiteLevelStorage = DBReader.Read<GarrSiteLevelRecord>("GarrSiteLevel.db2", HotfixStatements.SEL_GARR_SITE_LEVEL);
|
||||
GarrSiteLevelPlotInstStorage = DBReader.Read<GarrSiteLevelPlotInstRecord>("GarrSiteLevelPlotInst.db2", HotfixStatements.SEL_GARR_SITE_LEVEL_PLOT_INST);
|
||||
GemPropertiesStorage = DBReader.Read<GemPropertiesRecord>("GemProperties.db2", HotfixStatements.SEL_GEM_PROPERTIES);
|
||||
@@ -159,7 +159,7 @@ namespace Game.DataStorage
|
||||
//KeyChainStorage = DBReader.Read<KeyChainRecord>("KeyChain.db2", HotfixStatements.SEL_KEYCHAIN);
|
||||
LFGDungeonsStorage = DBReader.Read<LFGDungeonsRecord>("LFGDungeons.db2", HotfixStatements.SEL_LFG_DUNGEONS, HotfixStatements.SEL_LFG_DUNGEONS_LOCALE);
|
||||
LightStorage = DBReader.Read<LightRecord>("Light.db2", HotfixStatements.SEL_LIGHT);
|
||||
LiquidTypeStorage = DBReader.Read<LiquidTypeRecord>("LiquidType.db2", HotfixStatements.SEL_LIQUID_TYPE, HotfixStatements.SEL_LIQUID_TYPE_LOCALE);
|
||||
LiquidTypeStorage = DBReader.Read<LiquidTypeRecord>("LiquidType.db2", HotfixStatements.SEL_LIQUID_TYPE);
|
||||
LockStorage = DBReader.Read<LockRecord>("Lock.db2", HotfixStatements.SEL_LOCK);
|
||||
MailTemplateStorage = DBReader.Read<MailTemplateRecord>("MailTemplate.db2", HotfixStatements.SEL_MAIL_TEMPLATE, HotfixStatements.SEL_MAIL_TEMPLATE_LOCALE);
|
||||
MapStorage = DBReader.Read<MapRecord>("Map.db2", HotfixStatements.SEL_MAP, HotfixStatements.SEL_MAP_LOCALE);
|
||||
@@ -170,7 +170,7 @@ namespace Game.DataStorage
|
||||
MountTypeXCapabilityStorage = DBReader.Read<MountTypeXCapabilityRecord>("MountTypeXCapability.db2", HotfixStatements.SEL_MOUNT_TYPE_X_CAPABILITY);
|
||||
MountXDisplayStorage = DBReader.Read<MountXDisplayRecord>("MountXDisplay.db2", HotfixStatements.SEL_MOUNT_X_DISPLAY);
|
||||
MovieStorage = DBReader.Read<MovieRecord>("Movie.db2", HotfixStatements.SEL_MOVIE);
|
||||
NameGenStorage = DBReader.Read<NameGenRecord>("NameGen.db2", HotfixStatements.SEL_NAME_GEN, HotfixStatements.SEL_NAME_GEN_LOCALE);
|
||||
NameGenStorage = DBReader.Read<NameGenRecord>("NameGen.db2", HotfixStatements.SEL_NAME_GEN);
|
||||
NamesProfanityStorage = DBReader.Read<NamesProfanityRecord>("NamesProfanity.db2", HotfixStatements.SEL_NAMES_PROFANITY);
|
||||
NamesReservedStorage = DBReader.Read<NamesReservedRecord>("NamesReserved.db2", HotfixStatements.SEL_NAMES_RESERVED, HotfixStatements.SEL_NAMES_RESERVED_LOCALE);
|
||||
NamesReservedLocaleStorage = DBReader.Read<NamesReservedLocaleRecord>("NamesReservedLocale.db2", HotfixStatements.SEL_NAMES_RESERVED_LOCALE);
|
||||
@@ -265,19 +265,18 @@ namespace Game.DataStorage
|
||||
WorldMapTransformsStorage = DBReader.Read<WorldMapTransformsRecord>("WorldMapTransforms.db2", HotfixStatements.SEL_WORLD_MAP_TRANSFORMS);
|
||||
WorldSafeLocsStorage = DBReader.Read<WorldSafeLocsRecord>("WorldSafeLocs.db2", HotfixStatements.SEL_WORLD_SAFE_LOCS, HotfixStatements.SEL_WORLD_SAFE_LOCS_LOCALE);
|
||||
|
||||
|
||||
foreach (var entry in TaxiPathStorage.Values)
|
||||
{
|
||||
if (!TaxiPathSetBySource.ContainsKey(entry.From))
|
||||
TaxiPathSetBySource.Add(entry.From, new Dictionary<uint, TaxiPathBySourceAndDestination>());
|
||||
TaxiPathSetBySource[entry.From][entry.To] = new TaxiPathBySourceAndDestination(entry.Id, entry.Cost);
|
||||
if (!TaxiPathSetBySource.ContainsKey(entry.FromTaxiNode))
|
||||
TaxiPathSetBySource.Add(entry.FromTaxiNode, new Dictionary<uint, TaxiPathBySourceAndDestination>());
|
||||
TaxiPathSetBySource[entry.FromTaxiNode][entry.ToTaxiNode] = new TaxiPathBySourceAndDestination(entry.Id, entry.Cost);
|
||||
}
|
||||
|
||||
uint pathCount = TaxiPathStorage.Keys.Max() + 1;
|
||||
|
||||
// Calculate path nodes count
|
||||
uint[] pathLength = new uint[pathCount]; // 0 and some other indexes not used
|
||||
foreach (TaxiPathNodeRecord entry in CliDB.TaxiPathNodeStorage.Values)
|
||||
foreach (TaxiPathNodeRecord entry in TaxiPathNodeStorage.Values)
|
||||
if (pathLength[entry.PathID] < entry.NodeIndex + 1)
|
||||
pathLength[entry.PathID] = entry.NodeIndex + 1u;
|
||||
|
||||
@@ -305,7 +304,7 @@ namespace Game.DataStorage
|
||||
AllianceTaxiNodesMask[field] |= submask;
|
||||
|
||||
uint nodeMap;
|
||||
Global.DB2Mgr.DeterminaAlternateMapPosition(node.MapID, node.Pos.X, node.Pos.Y, node.Pos.Z, out nodeMap);
|
||||
Global.DB2Mgr.DeterminaAlternateMapPosition(node.ContinentID, node.Pos.X, node.Pos.Y, node.Pos.Z, out nodeMap);
|
||||
if (nodeMap < 2)
|
||||
OldContinentsNodesMask[field] |= submask;
|
||||
}
|
||||
|
||||
@@ -480,16 +480,17 @@ namespace Game.DataStorage
|
||||
static Dictionary<Type, int> bytecounts = new Dictionary<Type, int>()
|
||||
{
|
||||
{ typeof(byte), 1 },
|
||||
{ typeof(sbyte), 1 },
|
||||
{ typeof(short), 2 },
|
||||
{ typeof(ushort), 2 },
|
||||
};
|
||||
|
||||
static int GetPadding(Type type, int fieldIndex)
|
||||
{
|
||||
if (!bytecounts.ContainsKey(type))
|
||||
if (ColumnMeta[fieldIndex].CompressionType < DB2ColumnCompression.CommonData)
|
||||
return 0;
|
||||
|
||||
if (ColumnMeta[fieldIndex].CompressionType < DB2ColumnCompression.CommonData)
|
||||
if (!bytecounts.ContainsKey(type))
|
||||
return 0;
|
||||
|
||||
return 4 - bytecounts[type];
|
||||
|
||||
@@ -186,10 +186,10 @@ namespace Game.DataStorage
|
||||
else
|
||||
Log.outError(LogFilter.Sql, "Table `conversation_line_template` has missing template for line (ID: {0}) in Conversation {1}, skipped", currentConversationLine.Id, conversationTemplate.Id);
|
||||
|
||||
if (currentConversationLine.NextLineID == 0)
|
||||
if (currentConversationLine.NextConversationLineID == 0)
|
||||
break;
|
||||
|
||||
currentConversationLine = CliDB.ConversationLineStorage.LookupByKey(currentConversationLine.NextLineID);
|
||||
currentConversationLine = CliDB.ConversationLineStorage.LookupByKey(currentConversationLine.NextConversationLineID);
|
||||
}
|
||||
|
||||
_conversationTemplateStorage[conversationTemplate.Id] = conversationTemplate;
|
||||
|
||||
@@ -54,14 +54,14 @@ namespace Game.DataStorage
|
||||
|
||||
foreach (ArtifactPowerLinkRecord artifactPowerLink in CliDB.ArtifactPowerLinkStorage.Values)
|
||||
{
|
||||
_artifactPowerLinks.Add(artifactPowerLink.FromArtifactPowerID, artifactPowerLink.ToArtifactPowerID);
|
||||
_artifactPowerLinks.Add(artifactPowerLink.ToArtifactPowerID, artifactPowerLink.FromArtifactPowerID);
|
||||
_artifactPowerLinks.Add(artifactPowerLink.PowerA, artifactPowerLink.PowerB);
|
||||
_artifactPowerLinks.Add(artifactPowerLink.PowerB, artifactPowerLink.PowerA);
|
||||
}
|
||||
|
||||
CliDB.ArtifactPowerLinkStorage.Clear();
|
||||
|
||||
foreach (ArtifactPowerRankRecord artifactPowerRank in CliDB.ArtifactPowerRankStorage.Values)
|
||||
_artifactPowerRanks[Tuple.Create((uint)artifactPowerRank.ArtifactPowerID, artifactPowerRank.Rank)] = artifactPowerRank;
|
||||
_artifactPowerRanks[Tuple.Create((uint)artifactPowerRank.ArtifactPowerID, artifactPowerRank.RankIndex)] = artifactPowerRank;
|
||||
|
||||
CliDB.ArtifactPowerRankStorage.Clear();
|
||||
|
||||
@@ -73,10 +73,10 @@ namespace Game.DataStorage
|
||||
CharBaseSectionVariation[] sectionToBase = new CharBaseSectionVariation[(int)CharSectionType.Max];
|
||||
foreach (CharBaseSectionRecord charBaseSection in CliDB.CharBaseSectionStorage.Values)
|
||||
{
|
||||
Contract.Assert(charBaseSection.ResolutionVariation < (byte)CharSectionType.Max, $"SECTION_TYPE_MAX ({(byte)CharSectionType.Max}) must be equal to or greater than {charBaseSection.ResolutionVariation + 1}");
|
||||
Contract.Assert(charBaseSection.Variation < CharBaseSectionVariation.Max, $"CharBaseSectionVariation.Max {(byte)CharBaseSectionVariation.Max} must be equal to or greater than {charBaseSection.Variation + 1}");
|
||||
Contract.Assert(charBaseSection.ResolutionVariationEnum < (byte)CharSectionType.Max, $"SECTION_TYPE_MAX ({(byte)CharSectionType.Max}) must be equal to or greater than {charBaseSection.ResolutionVariationEnum + 1}");
|
||||
Contract.Assert(charBaseSection.VariationEnum < CharBaseSectionVariation.Max, $"CharBaseSectionVariation.Max {(byte)CharBaseSectionVariation.Max} must be equal to or greater than {charBaseSection.VariationEnum + 1}");
|
||||
|
||||
sectionToBase[charBaseSection.ResolutionVariation] = charBaseSection.Variation;
|
||||
sectionToBase[charBaseSection.ResolutionVariationEnum] = charBaseSection.VariationEnum;
|
||||
}
|
||||
|
||||
CliDB.CharBaseSectionStorage.Clear();
|
||||
@@ -98,7 +98,7 @@ namespace Game.DataStorage
|
||||
CliDB.CharSectionsStorage.Clear();
|
||||
|
||||
foreach (var outfit in CliDB.CharStartOutfitStorage.Values)
|
||||
_charStartOutfits[(uint)((byte)outfit.RaceID | (outfit.ClassID << 8) | (outfit.GenderID << 16))] = outfit;
|
||||
_charStartOutfits[(uint)((byte)outfit.RaceID | (outfit.ClassID << 8) | (outfit.SexID << 16))] = outfit;
|
||||
|
||||
var powers = new List<ChrClassesXPowerTypesRecord>();
|
||||
foreach (var chrClasses in CliDB.ChrClassesXPowerTypesStorage.Values)
|
||||
@@ -146,10 +146,10 @@ namespace Game.DataStorage
|
||||
CliDB.CurvePointStorage.Clear();
|
||||
|
||||
foreach (var key in _curvePoints.Keys.ToList())
|
||||
_curvePoints[key] = _curvePoints[key].OrderBy(point => point.Index).ToList();
|
||||
_curvePoints[key] = _curvePoints[key].OrderBy(point => point.OrderIndex).ToList();
|
||||
|
||||
foreach (EmotesTextSoundRecord emoteTextSound in CliDB.EmotesTextSoundStorage.Values)
|
||||
_emoteTextSounds[Tuple.Create((uint)emoteTextSound.EmotesTextId, emoteTextSound.RaceId, emoteTextSound.SexId, emoteTextSound.ClassId)] = emoteTextSound;
|
||||
_emoteTextSounds[Tuple.Create(emoteTextSound.EmotesTextId, emoteTextSound.RaceId, emoteTextSound.SexId, emoteTextSound.ClassId)] = emoteTextSound;
|
||||
|
||||
CliDB.EmotesTextSoundStorage.Clear();
|
||||
|
||||
@@ -183,23 +183,23 @@ namespace Game.DataStorage
|
||||
CliDB.GlyphRequiredSpecStorage.Clear();
|
||||
|
||||
foreach (var bonus in CliDB.ItemBonusStorage.Values)
|
||||
_itemBonusLists.Add(bonus.BonusListID, bonus);
|
||||
_itemBonusLists.Add(bonus.ParentItemBonusListID, bonus);
|
||||
|
||||
CliDB.ItemBonusStorage.Clear();
|
||||
|
||||
foreach (ItemBonusListLevelDeltaRecord itemBonusListLevelDelta in CliDB.ItemBonusListLevelDeltaStorage.Values)
|
||||
_itemLevelDeltaToBonusListContainer[itemBonusListLevelDelta.Delta] = itemBonusListLevelDelta.Id;
|
||||
_itemLevelDeltaToBonusListContainer[itemBonusListLevelDelta.ItemLevelDelta] = itemBonusListLevelDelta.Id;
|
||||
|
||||
CliDB.ItemBonusListLevelDeltaStorage.Clear();
|
||||
|
||||
foreach (var key in CliDB.ItemBonusTreeNodeStorage.Keys)
|
||||
{
|
||||
ItemBonusTreeNodeRecord bonusTreeNode = CliDB.ItemBonusTreeNodeStorage[key];
|
||||
uint bonusTreeId = bonusTreeNode.BonusTreeID;
|
||||
uint bonusTreeId = bonusTreeNode.ParentItemBonusTreeID;
|
||||
while (bonusTreeNode != null)
|
||||
{
|
||||
_itemBonusTrees.Add(bonusTreeId, bonusTreeNode);
|
||||
bonusTreeNode = CliDB.ItemBonusTreeNodeStorage.LookupByKey(bonusTreeNode.SubTreeID);
|
||||
bonusTreeNode = CliDB.ItemBonusTreeNodeStorage.LookupByKey(bonusTreeNode.ChildItemBonusTreeID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,35 +207,35 @@ namespace Game.DataStorage
|
||||
|
||||
foreach (ItemChildEquipmentRecord itemChildEquipment in CliDB.ItemChildEquipmentStorage.Values)
|
||||
{
|
||||
//ASSERT(_itemChildEquipment.find(itemChildEquipment.ItemID) == _itemChildEquipment.end(), "Item must have max 1 child item.");
|
||||
_itemChildEquipment[itemChildEquipment.ItemID] = itemChildEquipment;
|
||||
//ASSERT(_itemChildEquipment.find(itemChildEquipment.ParentItemID) == _itemChildEquipment.end(), "Item must have max 1 child item.");
|
||||
_itemChildEquipment[itemChildEquipment.ParentItemID] = itemChildEquipment;
|
||||
}
|
||||
|
||||
CliDB.ItemChildEquipmentStorage.Clear();
|
||||
|
||||
foreach (ItemClassRecord itemClass in CliDB.ItemClassStorage.Values)
|
||||
{
|
||||
//ASSERT(itemClass->OldEnumValue < _itemClassByOldEnum.size());
|
||||
//ASSERT(!_itemClassByOldEnum[itemClass->OldEnumValue]);
|
||||
_itemClassByOldEnum[itemClass.OldEnumValue] = itemClass;
|
||||
//ASSERT(itemClass->ClassID < _itemClassByOldEnum.size());
|
||||
//ASSERT(!_itemClassByOldEnum[itemClass->ClassID]);
|
||||
_itemClassByOldEnum[itemClass.ClassID] = itemClass;
|
||||
}
|
||||
|
||||
CliDB.ItemClassStorage.Clear();
|
||||
|
||||
foreach (ItemCurrencyCostRecord itemCurrencyCost in CliDB.ItemCurrencyCostStorage.Values)
|
||||
_itemsWithCurrencyCost.Add(itemCurrencyCost.ItemId);
|
||||
_itemsWithCurrencyCost.Add(itemCurrencyCost.ItemID);
|
||||
|
||||
CliDB.ItemCurrencyCostStorage.Clear();
|
||||
|
||||
foreach (ItemLevelSelectorQualityRecord itemLevelSelectorQuality in CliDB.ItemLevelSelectorQualityStorage.Values)
|
||||
_itemLevelQualitySelectorQualities.Add(itemLevelSelectorQuality.ItemLevelSelectorQualitySetID, itemLevelSelectorQuality);
|
||||
_itemLevelQualitySelectorQualities.Add(itemLevelSelectorQuality.ParentILSQualitySetID, itemLevelSelectorQuality);
|
||||
|
||||
CliDB.ItemLevelSelectorQualityStorage.Clear();
|
||||
|
||||
foreach (var appearanceMod in CliDB.ItemModifiedAppearanceStorage.Values)
|
||||
{
|
||||
//ASSERT(appearanceMod.ItemID <= 0xFFFFFF);
|
||||
_itemModifiedAppearancesByItem[(uint)((int)appearanceMod.ItemID | (appearanceMod.AppearanceModID << 24))] = appearanceMod;
|
||||
_itemModifiedAppearancesByItem[(uint)((int)appearanceMod.ItemID | (appearanceMod.ItemAppearanceModifierID << 24))] = appearanceMod;
|
||||
}
|
||||
|
||||
foreach (ItemSetSpellRecord itemSetSpell in CliDB.ItemSetSpellStorage.Values)
|
||||
@@ -249,7 +249,7 @@ namespace Game.DataStorage
|
||||
CliDB.ItemSpecOverrideStorage.Clear();
|
||||
|
||||
foreach (var itemBonusTreeAssignment in CliDB.ItemXBonusTreeStorage.Values)
|
||||
_itemToBonusTree.Add(itemBonusTreeAssignment.ItemID, itemBonusTreeAssignment.BonusTreeID);
|
||||
_itemToBonusTree.Add(itemBonusTreeAssignment.ItemID, itemBonusTreeAssignment.ItemBonusTreeID);
|
||||
|
||||
CliDB.ItemXBonusTreeStorage.Clear();
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace Game.DataStorage
|
||||
CliDB.MapDifficultyStorage.Clear();
|
||||
|
||||
foreach (var mount in CliDB.MountStorage.Values)
|
||||
_mountsBySpellId[mount.SpellId] = mount;
|
||||
_mountsBySpellId[mount.SourceSpellID] = mount;
|
||||
|
||||
foreach (MountTypeXCapabilityRecord mountTypeCapability in CliDB.MountTypeXCapabilityStorage.Values)
|
||||
_mountCapabilitiesByType.Add(mountTypeCapability.MountTypeID, mountTypeCapability);
|
||||
@@ -282,14 +282,14 @@ namespace Game.DataStorage
|
||||
|
||||
foreach (var entry in CliDB.NameGenStorage.Values)
|
||||
{
|
||||
if (!_nameGenData.ContainsKey(entry.Race))
|
||||
if (!_nameGenData.ContainsKey(entry.RaceID))
|
||||
{
|
||||
_nameGenData[entry.Race] = new List<NameGenRecord>[2];
|
||||
_nameGenData[entry.RaceID] = new List<NameGenRecord>[2];
|
||||
for (var i = 0; i < 2; ++i)
|
||||
_nameGenData[entry.Race][i] = new List<NameGenRecord>();
|
||||
_nameGenData[entry.RaceID][i] = new List<NameGenRecord>();
|
||||
}
|
||||
|
||||
_nameGenData[entry.Race][entry.Sex].Add(entry);
|
||||
_nameGenData[entry.RaceID][entry.Sex].Add(entry);
|
||||
}
|
||||
|
||||
CliDB.NameGenStorage.Clear();
|
||||
@@ -346,10 +346,10 @@ namespace Game.DataStorage
|
||||
}
|
||||
|
||||
foreach (PvpItemRecord pvpItem in CliDB.PvpItemStorage.Values)
|
||||
_pvpItemBonus[pvpItem.ItemID] = pvpItem.ItemLevelBonus;
|
||||
_pvpItemBonus[pvpItem.ItemID] = pvpItem.ItemLevelDelta;
|
||||
|
||||
foreach (PvpRewardRecord pvpReward in CliDB.PvpRewardStorage.Values)
|
||||
_pvpRewardPack[Tuple.Create((uint)pvpReward.Prestige, (uint)pvpReward.HonorLevel)] = pvpReward.RewardPackID;
|
||||
_pvpRewardPack[Tuple.Create((uint)pvpReward.PrestigeLevel, (uint)pvpReward.HonorLevel)] = pvpReward.RewardPackID;
|
||||
|
||||
CliDB.PvpRewardStorage.Clear();
|
||||
|
||||
@@ -390,13 +390,13 @@ namespace Game.DataStorage
|
||||
|
||||
foreach (QuestPackageItemRecord questPackageItem in CliDB.QuestPackageItemStorage.Values)
|
||||
{
|
||||
if (!_questPackages.ContainsKey(questPackageItem.QuestPackageID))
|
||||
_questPackages[questPackageItem.QuestPackageID] = Tuple.Create(new List<QuestPackageItemRecord>(), new List<QuestPackageItemRecord>());
|
||||
if (!_questPackages.ContainsKey(questPackageItem.PackageID))
|
||||
_questPackages[questPackageItem.PackageID] = Tuple.Create(new List<QuestPackageItemRecord>(), new List<QuestPackageItemRecord>());
|
||||
|
||||
if (questPackageItem.FilterType != QuestPackageFilter.Unmatched)
|
||||
_questPackages[questPackageItem.QuestPackageID].Item1.Add(questPackageItem);
|
||||
if (questPackageItem.DisplayType != QuestPackageFilter.Unmatched)
|
||||
_questPackages[questPackageItem.PackageID].Item1.Add(questPackageItem);
|
||||
else
|
||||
_questPackages[questPackageItem.QuestPackageID].Item2.Add(questPackageItem);
|
||||
_questPackages[questPackageItem.PackageID].Item2.Add(questPackageItem);
|
||||
}
|
||||
|
||||
CliDB.QuestPackageItemStorage.Clear();
|
||||
@@ -436,14 +436,14 @@ namespace Game.DataStorage
|
||||
if (!_spellPowerDifficulties[power.SpellID].ContainsKey(powerDifficulty.DifficultyID))
|
||||
_spellPowerDifficulties[power.SpellID][powerDifficulty.DifficultyID] = new List<SpellPowerRecord>();
|
||||
|
||||
_spellPowerDifficulties[power.SpellID][powerDifficulty.DifficultyID].Insert(powerDifficulty.PowerIndex, power);
|
||||
_spellPowerDifficulties[power.SpellID][powerDifficulty.DifficultyID].Insert(powerDifficulty.OrderIndex, power);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_spellPowers.ContainsKey(power.SpellID))
|
||||
_spellPowers[power.SpellID] = new List<SpellPowerRecord>();
|
||||
|
||||
_spellPowers[power.SpellID].Insert(power.PowerIndex, power);
|
||||
_spellPowers[power.SpellID].Insert(power.OrderIndex, power);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ namespace Game.DataStorage
|
||||
CliDB.TransmogSetItemStorage.Clear();
|
||||
|
||||
foreach (WMOAreaTableRecord entry in CliDB.WMOAreaTableStorage.Values)
|
||||
_wmoAreaTableLookup[Tuple.Create((short)entry.WMOID, entry.NameSet, entry.WMOGroupID)] = entry;
|
||||
_wmoAreaTableLookup[Tuple.Create((short)entry.WmoID, entry.NameSetID, entry.WmoGroupID)] = entry;
|
||||
|
||||
CliDB.WMOAreaTableStorage.Clear();
|
||||
|
||||
@@ -593,19 +593,18 @@ namespace Game.DataStorage
|
||||
|
||||
public string GetBroadcastTextValue(BroadcastTextRecord broadcastText, LocaleConstant locale = LocaleConstant.enUS, Gender gender = Gender.Male, bool forceGender = false)
|
||||
{
|
||||
if ((gender == Gender.Female || gender == Gender.None) && (forceGender || broadcastText.FemaleText.HasString(SharedConst.DefaultLocale)))
|
||||
if ((gender == Gender.Female || gender == Gender.None) && (forceGender || broadcastText.Text1.HasString(SharedConst.DefaultLocale)))
|
||||
{
|
||||
if (broadcastText.FemaleText.HasString(locale))
|
||||
return broadcastText.FemaleText[locale];
|
||||
if (broadcastText.Text1.HasString(locale))
|
||||
return broadcastText.Text1[locale];
|
||||
|
||||
return broadcastText.FemaleText[SharedConst.DefaultLocale];
|
||||
return broadcastText.Text1[SharedConst.DefaultLocale];
|
||||
}
|
||||
|
||||
if (broadcastText.Text.HasString(locale))
|
||||
return broadcastText.Text[locale];
|
||||
|
||||
if (broadcastText.MaleText.HasString(locale))
|
||||
return broadcastText.MaleText[locale];
|
||||
|
||||
return broadcastText.MaleText[SharedConst.DefaultLocale];
|
||||
return broadcastText.Text[SharedConst.DefaultLocale];
|
||||
}
|
||||
|
||||
public bool HasCharacterFacialHairStyle(Race race, Gender gender, uint variationId)
|
||||
@@ -728,82 +727,82 @@ namespace Game.DataStorage
|
||||
case CurveInterpolationMode.Linear:
|
||||
{
|
||||
int pointIndex = 0;
|
||||
while (pointIndex < points.Count && points[pointIndex].X <= x)
|
||||
while (pointIndex < points.Count && points[pointIndex].Pos.X <= x)
|
||||
++pointIndex;
|
||||
if (pointIndex == 0)
|
||||
return points[0].Y;
|
||||
return points[0].Pos.Y;
|
||||
if (pointIndex >= points.Count)
|
||||
return points.Last().Y;
|
||||
float xDiff = points[pointIndex].X - points[pointIndex - 1].X;
|
||||
return points.Last().Pos.Y;
|
||||
float xDiff = points[pointIndex].Pos.X - points[pointIndex - 1].Pos.X;
|
||||
if (xDiff == 0.0)
|
||||
return points[pointIndex].Y;
|
||||
return (((x - points[pointIndex - 1].X) / xDiff) * (points[pointIndex].Y - points[pointIndex - 1].Y)) + points[pointIndex - 1].Y;
|
||||
return points[pointIndex].Pos.Y;
|
||||
return (((x - points[pointIndex - 1].Pos.X) / xDiff) * (points[pointIndex].Pos.Y - points[pointIndex - 1].Pos.Y)) + points[pointIndex - 1].Pos.Y;
|
||||
}
|
||||
case CurveInterpolationMode.Cosine:
|
||||
{
|
||||
int pointIndex = 0;
|
||||
while (pointIndex < points.Count && points[pointIndex].X <= x)
|
||||
while (pointIndex < points.Count && points[pointIndex].Pos.X <= x)
|
||||
++pointIndex;
|
||||
if (pointIndex == 0)
|
||||
return points[0].Y;
|
||||
return points[0].Pos.Y;
|
||||
if (pointIndex >= points.Count)
|
||||
return points.Last().Y;
|
||||
float xDiff = points[pointIndex].X - points[pointIndex - 1].X;
|
||||
return points.Last().Pos.Y;
|
||||
float xDiff = points[pointIndex].Pos.X - points[pointIndex - 1].Pos.X;
|
||||
if (xDiff == 0.0)
|
||||
return points[pointIndex].Y;
|
||||
return (float)((points[pointIndex].Y - points[pointIndex - 1].Y) * (1.0f - Math.Cos((x - points[pointIndex - 1].X) / xDiff * Math.PI)) * 0.5f) + points[pointIndex - 1].Y;
|
||||
return points[pointIndex].Pos.Y;
|
||||
return (float)((points[pointIndex].Pos.Y - points[pointIndex - 1].Pos.Y) * (1.0f - Math.Cos((x - points[pointIndex - 1].Pos.X) / xDiff * Math.PI)) * 0.5f) + points[pointIndex - 1].Pos.Y;
|
||||
}
|
||||
case CurveInterpolationMode.CatmullRom:
|
||||
{
|
||||
int pointIndex = 1;
|
||||
while (pointIndex < points.Count && points[pointIndex].X <= x)
|
||||
while (pointIndex < points.Count && points[pointIndex].Pos.X <= x)
|
||||
++pointIndex;
|
||||
if (pointIndex == 1)
|
||||
return points[1].Y;
|
||||
return points[1].Pos.Y;
|
||||
if (pointIndex >= points.Count - 1)
|
||||
return points[points.Count - 2].Y;
|
||||
float xDiff = points[pointIndex].X - points[pointIndex - 1].X;
|
||||
return points[points.Count - 2].Pos.Y;
|
||||
float xDiff = points[pointIndex].Pos.X - points[pointIndex - 1].Pos.X;
|
||||
if (xDiff == 0.0)
|
||||
return points[pointIndex].Y;
|
||||
return points[pointIndex].Pos.Y;
|
||||
|
||||
float mu = (x - points[pointIndex - 1].X) / xDiff;
|
||||
float a0 = -0.5f * points[pointIndex - 2].Y + 1.5f * points[pointIndex - 1].Y - 1.5f * points[pointIndex].Y + 0.5f * points[pointIndex + 1].Y;
|
||||
float a1 = points[pointIndex - 2].Y - 2.5f * points[pointIndex - 1].Y + 2.0f * points[pointIndex].Y - 0.5f * points[pointIndex + 1].Y;
|
||||
float a2 = -0.5f * points[pointIndex - 2].Y + 0.5f * points[pointIndex].Y;
|
||||
float a3 = points[pointIndex - 1].Y;
|
||||
float mu = (x - points[pointIndex - 1].Pos.X) / xDiff;
|
||||
float a0 = -0.5f * points[pointIndex - 2].Pos.Y + 1.5f * points[pointIndex - 1].Pos.Y - 1.5f * points[pointIndex].Pos.Y + 0.5f * points[pointIndex + 1].Pos.Y;
|
||||
float a1 = points[pointIndex - 2].Pos.Y - 2.5f * points[pointIndex - 1].Pos.Y + 2.0f * points[pointIndex].Pos.Y - 0.5f * points[pointIndex + 1].Pos.Y;
|
||||
float a2 = -0.5f * points[pointIndex - 2].Pos.Y + 0.5f * points[pointIndex].Pos.Y;
|
||||
float a3 = points[pointIndex - 1].Pos.Y;
|
||||
|
||||
return a0 * mu * mu * mu + a1 * mu * mu + a2 * mu + a3;
|
||||
}
|
||||
case CurveInterpolationMode.Bezier3:
|
||||
{
|
||||
float xDiff = points[2].X - points[0].X;
|
||||
float xDiff = points[2].Pos.X - points[0].Pos.X;
|
||||
if (xDiff == 0.0)
|
||||
return points[1].Y;
|
||||
float mu = (x - points[0].X) / xDiff;
|
||||
return ((1.0f - mu) * (1.0f - mu) * points[0].Y) + (1.0f - mu) * 2.0f * mu * points[1].Y + mu * mu * points[2].Y;
|
||||
return points[1].Pos.Y;
|
||||
float mu = (x - points[0].Pos.X) / xDiff;
|
||||
return ((1.0f - mu) * (1.0f - mu) * points[0].Pos.Y) + (1.0f - mu) * 2.0f * mu * points[1].Pos.Y + mu * mu * points[2].Pos.Y;
|
||||
}
|
||||
case CurveInterpolationMode.Bezier4:
|
||||
{
|
||||
float xDiff = points[3].X - points[0].X;
|
||||
float xDiff = points[3].Pos.X - points[0].Pos.X;
|
||||
if (xDiff == 0.0)
|
||||
return points[1].Y;
|
||||
float mu = (x - points[0].X) / xDiff;
|
||||
return (1.0f - mu) * (1.0f - mu) * (1.0f - mu) * points[0].Y
|
||||
+ 3.0f * mu * (1.0f - mu) * (1.0f - mu) * points[1].Y
|
||||
+ 3.0f * mu * mu * (1.0f - mu) * points[2].Y
|
||||
+ mu * mu * mu * points[3].Y;
|
||||
return points[1].Pos.Y;
|
||||
float mu = (x - points[0].Pos.X) / xDiff;
|
||||
return (1.0f - mu) * (1.0f - mu) * (1.0f - mu) * points[0].Pos.Y
|
||||
+ 3.0f * mu * (1.0f - mu) * (1.0f - mu) * points[1].Pos.Y
|
||||
+ 3.0f * mu * mu * (1.0f - mu) * points[2].Pos.Y
|
||||
+ mu * mu * mu * points[3].Pos.Y;
|
||||
}
|
||||
case CurveInterpolationMode.Bezier:
|
||||
{
|
||||
float xDiff = points.Last().X - points[0].X;
|
||||
float xDiff = points.Last().Pos.X - points[0].Pos.X;
|
||||
if (xDiff == 0.0f)
|
||||
return points.Last().Y;
|
||||
return points.Last().Pos.Y;
|
||||
|
||||
float[] tmp = new float[points.Count];
|
||||
for (int c = 0; c < points.Count; ++c)
|
||||
tmp[c] = points[c].Y;
|
||||
tmp[c] = points[c].Pos.Y;
|
||||
|
||||
float mu = (x - points[0].X) / xDiff;
|
||||
float mu = (x - points[0].Pos.X) / xDiff;
|
||||
int i = points.Count - 1;
|
||||
while (i > 0)
|
||||
{
|
||||
@@ -817,7 +816,7 @@ namespace Game.DataStorage
|
||||
return tmp[0];
|
||||
}
|
||||
case CurveInterpolationMode.Constant:
|
||||
return points[0].Y;
|
||||
return points[0].Pos.Y;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -868,7 +867,7 @@ namespace Game.DataStorage
|
||||
return _itemLevelDeltaToBonusListContainer.LookupByKey(delta);
|
||||
}
|
||||
|
||||
public List<uint> GetItemBonusTree(uint itemId, uint itemBonusTreeMod)
|
||||
public List<uint> GetItemBonusTree(uint itemId, uint itemContext)
|
||||
{
|
||||
List<uint> bonusListIDs = new List<uint>();
|
||||
|
||||
@@ -888,20 +887,20 @@ namespace Game.DataStorage
|
||||
|
||||
foreach (ItemBonusTreeNodeRecord bonusTreeNode in treeList)
|
||||
{
|
||||
if (bonusTreeNode.BonusTreeModID != itemBonusTreeMod)
|
||||
if (bonusTreeNode.ItemContext != itemContext)
|
||||
continue;
|
||||
|
||||
if (bonusTreeNode.BonusListID != 0)
|
||||
if (bonusTreeNode.ChildItemBonusListID != 0)
|
||||
{
|
||||
bonusListIDs.Add(bonusTreeNode.BonusListID);
|
||||
bonusListIDs.Add(bonusTreeNode.ChildItemBonusListID);
|
||||
}
|
||||
else if (bonusTreeNode.ItemLevelSelectorID != 0)
|
||||
else if (bonusTreeNode.ChildItemLevelSelectorID != 0)
|
||||
{
|
||||
ItemLevelSelectorRecord selector = CliDB.ItemLevelSelectorStorage.LookupByKey(bonusTreeNode.ItemLevelSelectorID);
|
||||
ItemLevelSelectorRecord selector = CliDB.ItemLevelSelectorStorage.LookupByKey(bonusTreeNode.ChildItemLevelSelectorID);
|
||||
if (selector == null)
|
||||
continue;
|
||||
|
||||
short delta = (short)(selector.ItemLevel - proto.ItemLevel);
|
||||
short delta = (short)(selector.MinItemLevel - proto.ItemLevel);
|
||||
|
||||
uint bonus = GetItemBonusListForItemLevelDelta(delta);
|
||||
if (bonus != 0)
|
||||
@@ -914,15 +913,15 @@ namespace Game.DataStorage
|
||||
if (itemSelectorQualities != null)
|
||||
{
|
||||
ItemQuality quality = ItemQuality.Uncommon;
|
||||
if (selector.ItemLevel >= selectorQualitySet.ItemLevelMax)
|
||||
if (selector.MinItemLevel >= selectorQualitySet.IlvlEpic)
|
||||
quality = ItemQuality.Epic;
|
||||
else if (selector.ItemLevel >= selectorQualitySet.ItemLevelMin)
|
||||
else if (selector.MinItemLevel >= selectorQualitySet.IlvlRare)
|
||||
quality = ItemQuality.Rare;
|
||||
|
||||
var itemSelectorQuality = itemSelectorQualities.FirstOrDefault(p => p.Quality < (byte)quality);
|
||||
|
||||
if (itemSelectorQuality != null)
|
||||
bonusListIDs.Add(itemSelectorQuality.ItemBonusListID);
|
||||
bonusListIDs.Add(itemSelectorQuality.QualityItemBonusListID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -947,9 +946,9 @@ namespace Game.DataStorage
|
||||
ItemModifiedAppearanceRecord modifiedAppearance = GetItemModifiedAppearance(itemId, appearanceModId);
|
||||
if (modifiedAppearance != null)
|
||||
{
|
||||
ItemAppearanceRecord itemAppearance = CliDB.ItemAppearanceStorage.LookupByKey(modifiedAppearance.AppearanceID);
|
||||
ItemAppearanceRecord itemAppearance = CliDB.ItemAppearanceStorage.LookupByKey(modifiedAppearance.ItemAppearanceID);
|
||||
if (itemAppearance != null)
|
||||
return itemAppearance.DisplayID;
|
||||
return itemAppearance.ItemDisplayInfoID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1000,7 +999,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
foreach (var light in CliDB.LightStorage.Values.Reverse())
|
||||
{
|
||||
if (light.MapID == mapId && light.Pos.X == 0.0f && light.Pos.Y == 0.0f && light.Pos.Z == 0.0f)
|
||||
if (light.ContinentID == mapId && light.GameCoords.X == 0.0f && light.GameCoords.Y == 0.0f && light.GameCoords.Z == 0.0f)
|
||||
return light.Id;
|
||||
}
|
||||
|
||||
@@ -1011,7 +1010,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
LiquidTypeRecord liq = CliDB.LiquidTypeStorage.LookupByKey(liquidType);
|
||||
if (liq != null)
|
||||
return 1u << liq.LiquidType;
|
||||
return 1u << liq.SoundBank;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1104,7 +1103,7 @@ namespace Game.DataStorage
|
||||
return _mountDisplays.LookupByKey(mountId);
|
||||
}
|
||||
|
||||
public string GetNameGenEntry(uint race, uint gender, LocaleConstant locale, LocaleConstant defaultLocale)
|
||||
public string GetNameGenEntry(uint race, uint gender)
|
||||
{
|
||||
Contract.Assert(gender < (int)Gender.None);
|
||||
var listNameGen = _nameGenData.LookupByKey(race);
|
||||
@@ -1114,11 +1113,7 @@ namespace Game.DataStorage
|
||||
if (listNameGen[gender].Empty())
|
||||
return "";
|
||||
|
||||
LocalizedString data = listNameGen[gender].SelectRandom().Name;
|
||||
if (data.HasString(locale))
|
||||
return data[locale];
|
||||
|
||||
return data[defaultLocale];
|
||||
return listNameGen[gender].SelectRandom().Name;
|
||||
}
|
||||
|
||||
public ResponseCodes ValidateName(string name, LocaleConstant locale)
|
||||
@@ -1234,7 +1229,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
foreach (PowerTypeRecord powerType in CliDB.PowerTypeStorage.Values)
|
||||
{
|
||||
string powerName = powerType.PowerTypeToken;
|
||||
string powerName = powerType.NameGlobalStringTag;
|
||||
if (powerName.ToLower() == name)
|
||||
return powerType;
|
||||
|
||||
@@ -1313,8 +1308,8 @@ namespace Game.DataStorage
|
||||
Array.Resize(ref powers, powerDifficultyList.Count);
|
||||
|
||||
foreach (SpellPowerRecord difficultyPower in powerDifficultyList)
|
||||
if (powers[difficultyPower.PowerIndex] == null)
|
||||
powers[difficultyPower.PowerIndex] = difficultyPower;
|
||||
if (powers[difficultyPower.OrderIndex] == null)
|
||||
powers[difficultyPower.OrderIndex] = difficultyPower;
|
||||
}
|
||||
|
||||
difficultyEntry = CliDB.DifficultyStorage.LookupByKey(difficultyEntry.FallbackDifficultyID);
|
||||
@@ -1328,8 +1323,8 @@ namespace Game.DataStorage
|
||||
Array.Resize(ref powers, record.Count);
|
||||
|
||||
foreach (SpellPowerRecord power in record)
|
||||
if (powers[power.PowerIndex] == null)
|
||||
powers[power.PowerIndex] = power;
|
||||
if (powers[power.OrderIndex] == null)
|
||||
powers[power.OrderIndex] = power;
|
||||
}
|
||||
|
||||
return powers.ToList();
|
||||
@@ -1359,10 +1354,10 @@ namespace Game.DataStorage
|
||||
if (reqEntry == null)
|
||||
return false;
|
||||
|
||||
if (itemEntry.CategoryType != reqEntry.CategoryType)
|
||||
if (itemEntry.TotemCategoryType != reqEntry.TotemCategoryType)
|
||||
return false;
|
||||
|
||||
return (itemEntry.CategoryMask & reqEntry.CategoryMask) == reqEntry.CategoryMask;
|
||||
return (itemEntry.TotemCategoryMask & reqEntry.TotemCategoryMask) == reqEntry.TotemCategoryMask;
|
||||
}
|
||||
|
||||
public bool IsToyItem(uint toy)
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace Game.DataStorage
|
||||
uint oldMSTime = Time.GetMSTime();
|
||||
foreach (CinematicCameraRecord cameraEntry in CliDB.CinematicCameraStorage.Values)
|
||||
{
|
||||
string filename = dataPath + "/cameras/" + string.Format("FILE{0:x8}.xxx", cameraEntry.ModelFileDataID);
|
||||
string filename = dataPath + "/cameras/" + string.Format("FILE{0:x8}.xxx", cameraEntry.FileDataID);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Game.DataStorage
|
||||
public LocalizedString Description;
|
||||
public LocalizedString Reward;
|
||||
public AchievementFlags Flags;
|
||||
public short MapID;
|
||||
public short InstanceID;
|
||||
public ushort Supercedes;
|
||||
public ushort Category;
|
||||
public ushort UiOrder;
|
||||
@@ -36,7 +36,7 @@ namespace Game.DataStorage
|
||||
public byte Points;
|
||||
public byte MinimumCriteria;
|
||||
public uint Id;
|
||||
public uint IconFileDataID;
|
||||
public uint IconFileID;
|
||||
public ushort CriteriaTree;
|
||||
}
|
||||
|
||||
@@ -62,16 +62,16 @@ namespace Game.DataStorage
|
||||
public LocalizedString AreaName;
|
||||
public AreaFlags[] Flags = new AreaFlags[2];
|
||||
public float AmbientMultiplier;
|
||||
public ushort MapId;
|
||||
public ushort ContinentID;
|
||||
public ushort ParentAreaID;
|
||||
public short AreaBit;
|
||||
public ushort AmbienceID;
|
||||
public ushort ZoneMusic;
|
||||
public ushort IntroSound;
|
||||
public ushort[] LiquidTypeID = new ushort[4];
|
||||
public ushort UWZoneMusic;
|
||||
public ushort UWAmbience;
|
||||
public ushort PvPCombastWorldStateID;
|
||||
public ushort UwZoneMusic;
|
||||
public ushort UwAmbience;
|
||||
public ushort PvpCombastWorldStateID;
|
||||
public byte SoundProviderPref;
|
||||
public byte SoundProviderPrefUnderwater;
|
||||
public byte ExplorationLevel;
|
||||
@@ -80,11 +80,11 @@ namespace Game.DataStorage
|
||||
public byte WildBattlePetLevelMin;
|
||||
public byte WildBattlePetLevelMax;
|
||||
public byte WindSettingsID;
|
||||
public byte UWIntroSound;
|
||||
public byte UwIntroSound;
|
||||
|
||||
public bool IsSanctuary()
|
||||
{
|
||||
if (MapId == 609)
|
||||
if (ContinentID == 609)
|
||||
return true;
|
||||
|
||||
return Flags[0].HasAnyFlag(AreaFlags.Sanctuary);
|
||||
@@ -99,7 +99,7 @@ namespace Game.DataStorage
|
||||
public float BoxWidth;
|
||||
public float BoxHeight;
|
||||
public float BoxYaw;
|
||||
public ushort MapID;
|
||||
public ushort ContinentID;
|
||||
public ushort PhaseID;
|
||||
public ushort PhaseGroupID;
|
||||
public ushort ShapeID;
|
||||
@@ -113,18 +113,22 @@ namespace Game.DataStorage
|
||||
public sealed class ArmorLocationRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float[] Modifier = new float[5];
|
||||
public float Clothmodifier;
|
||||
public float Leathermodifier;
|
||||
public float Chainmodifier;
|
||||
public float Platemodifier;
|
||||
public float Modifier;
|
||||
}
|
||||
|
||||
public sealed class ArtifactRecord
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public uint BarConnectedColor;
|
||||
public uint BarDisconnectedColor;
|
||||
public uint TitleColor;
|
||||
public ushort ClassUiTextureKitID;
|
||||
public ushort SpecID;
|
||||
public uint UiBarOverlayColor;
|
||||
public uint UiBarBackgroundColor;
|
||||
public uint UiNameColor;
|
||||
public ushort UiTextureKitID;
|
||||
public ushort ChrSpecializationID;
|
||||
public byte ArtifactCategoryID;
|
||||
public byte Flags;
|
||||
public byte UiModelSceneID;
|
||||
@@ -134,30 +138,30 @@ namespace Game.DataStorage
|
||||
public sealed class ArtifactAppearanceRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public uint SwatchColor;
|
||||
public float ModelDesaturation;
|
||||
public float ModelAlpha;
|
||||
public uint ShapeshiftDisplayID;
|
||||
public uint UiSwatchColor;
|
||||
public float UiModelSaturation;
|
||||
public float UiModelOpacity;
|
||||
public uint OverrideShapeshiftDisplayID;
|
||||
public ushort ArtifactAppearanceSetID;
|
||||
public ushort Unknown;
|
||||
public ushort UiCameraID;
|
||||
public byte DisplayIndex;
|
||||
public byte AppearanceModID;
|
||||
public byte ItemAppearanceModifierID;
|
||||
public byte Flags;
|
||||
public byte ModifiesShapeshiftFormDisplay;
|
||||
public byte OverrideShapeshiftFormID;
|
||||
public uint Id;
|
||||
public ushort PlayerConditionID;
|
||||
public byte ItemAppearanceID;
|
||||
public byte AltItemAppearanceID;
|
||||
public ushort UnlockPlayerConditionID;
|
||||
public byte UiItemAppearanceID;
|
||||
public byte UiAltItemAppearanceID;
|
||||
}
|
||||
|
||||
public sealed class ArtifactAppearanceSetRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public LocalizedString Name2;
|
||||
public LocalizedString Description;
|
||||
public ushort UiCameraID;
|
||||
public ushort AltHandUICameraID;
|
||||
public byte DisplayIndex;
|
||||
public byte AttachmentPoint;
|
||||
public byte ForgeAttachmentOverride;
|
||||
public byte Flags;
|
||||
public uint Id;
|
||||
public uint ArtifactID;
|
||||
@@ -166,8 +170,8 @@ namespace Game.DataStorage
|
||||
public sealed class ArtifactCategoryRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort ArtifactKnowledgeCurrencyID;
|
||||
public ushort ArtifactKnowledgeMultiplierCurveID;
|
||||
public ushort XpMultCurrencyID;
|
||||
public ushort XpMultCurveID;
|
||||
}
|
||||
|
||||
public sealed class ArtifactPowerRecord
|
||||
@@ -175,17 +179,17 @@ namespace Game.DataStorage
|
||||
public Vector2 Pos;
|
||||
public byte ArtifactID;
|
||||
public ArtifactPowerFlag Flags;
|
||||
public byte MaxRank;
|
||||
public byte ArtifactTier;
|
||||
public byte MaxPurchasableRank;
|
||||
public byte Tier;
|
||||
public uint Id;
|
||||
public byte RelicType;
|
||||
public byte Label;
|
||||
}
|
||||
|
||||
public sealed class ArtifactPowerLinkRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort FromArtifactPowerID;
|
||||
public ushort ToArtifactPowerID;
|
||||
public ushort PowerA;
|
||||
public ushort PowerB;
|
||||
}
|
||||
|
||||
public sealed class ArtifactPowerPickerRecord
|
||||
@@ -198,16 +202,16 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public uint SpellID;
|
||||
public float Value;
|
||||
public ushort Unknown;
|
||||
public byte Rank;
|
||||
public float AuraPointsOverride;
|
||||
public ushort ItemBonusListID;
|
||||
public byte RankIndex;
|
||||
public uint ArtifactPowerID;
|
||||
}
|
||||
|
||||
public sealed class ArtifactQuestXPRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint[] Exp = new uint[10];
|
||||
public uint[] Difficulty = new uint[10];
|
||||
}
|
||||
|
||||
public sealed class AuctionHouseRecord
|
||||
|
||||
@@ -46,16 +46,16 @@ namespace Game.DataStorage
|
||||
public sealed class BattlePetBreedQualityRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float Modifier;
|
||||
public byte Quality;
|
||||
public float StateMultiplier;
|
||||
public byte QualityEnum;
|
||||
}
|
||||
|
||||
public sealed class BattlePetBreedStateRecord
|
||||
{
|
||||
public uint Id;
|
||||
public short Value;
|
||||
public byte State;
|
||||
public uint BreedID;
|
||||
public ushort Value;
|
||||
public byte BattlePetStateID;
|
||||
public uint BattlePetBreedID;
|
||||
}
|
||||
|
||||
public sealed class BattlePetSpeciesRecord
|
||||
@@ -63,22 +63,22 @@ namespace Game.DataStorage
|
||||
public LocalizedString SourceText;
|
||||
public LocalizedString Description;
|
||||
public uint CreatureID;
|
||||
public uint IconFileID;
|
||||
public uint IconFileDataID;
|
||||
public uint SummonSpellID;
|
||||
public ushort Flags;
|
||||
public byte PetType;
|
||||
public sbyte Source;
|
||||
public byte PetTypeEnum;
|
||||
public sbyte SourceTypeEnum;
|
||||
public uint Id;
|
||||
public byte CardModelSceneID;
|
||||
public byte LoadoutModelSceneID;
|
||||
public byte CardUIModelSceneID;
|
||||
public byte LoadoutUIModelSceneID;
|
||||
}
|
||||
|
||||
public sealed class BattlePetSpeciesStateRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int Value;
|
||||
public byte State;
|
||||
public uint SpeciesID;
|
||||
public byte BattlePetStateID;
|
||||
public uint BattlePetSpeciesID;
|
||||
}
|
||||
|
||||
public sealed class BattlemasterListRecord
|
||||
@@ -88,10 +88,10 @@ namespace Game.DataStorage
|
||||
public LocalizedString GameType;
|
||||
public LocalizedString ShortDescription;
|
||||
public LocalizedString LongDescription;
|
||||
public uint IconFileDataID;
|
||||
public int IconFileDataID;
|
||||
public short[] MapId = new short[16];
|
||||
public ushort HolidayWorldState;
|
||||
public ushort PlayerConditionId;
|
||||
public ushort RequiredPlayerConditionID;
|
||||
public byte InstanceType;
|
||||
public byte GroupsAllowed;
|
||||
public byte MaxGroupSize;
|
||||
@@ -106,14 +106,14 @@ namespace Game.DataStorage
|
||||
public sealed class BroadcastTextRecord
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString MaleText;
|
||||
public LocalizedString FemaleText;
|
||||
public LocalizedString Text;
|
||||
public LocalizedString Text1;
|
||||
public ushort[] EmoteID = new ushort[3];
|
||||
public ushort[] EmoteDelay = new ushort[3];
|
||||
public ushort UnkEmoteID;
|
||||
public byte Language;
|
||||
public byte Type;
|
||||
public uint PlayerConditionID;
|
||||
public uint[] SoundID = new uint[2];
|
||||
public ushort EmotesID;
|
||||
public byte LanguageID;
|
||||
public byte Flags;
|
||||
public uint ConditionID;
|
||||
public uint[] SoundEntriesID = new uint[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Game.DataStorage
|
||||
public sealed class CharacterFacialHairStylesRecord
|
||||
{
|
||||
public uint ID;
|
||||
public uint[] Geoset = new uint[5];
|
||||
public int[] Geoset = new int[5];
|
||||
public byte RaceID;
|
||||
public byte SexID;
|
||||
public byte VariationID;
|
||||
@@ -32,16 +32,16 @@ namespace Game.DataStorage
|
||||
public sealed class CharBaseSectionRecord
|
||||
{
|
||||
public uint ID;
|
||||
public CharBaseSectionVariation Variation;
|
||||
public byte ResolutionVariation;
|
||||
public byte Resolution;
|
||||
public CharBaseSectionVariation VariationEnum;
|
||||
public byte ResolutionVariationEnum;
|
||||
public byte LayoutResType;
|
||||
}
|
||||
|
||||
public sealed class CharSectionsRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint[] TextureFileDataID = new uint[3];
|
||||
public ushort Flags;
|
||||
public uint[] MaterialResourcesID = new uint[3];
|
||||
public short Flags;
|
||||
public byte RaceID;
|
||||
public byte SexID;
|
||||
public byte BaseSection;
|
||||
@@ -55,7 +55,7 @@ namespace Game.DataStorage
|
||||
public int[] ItemID = new int[24];
|
||||
public uint PetDisplayID;
|
||||
public byte ClassID;
|
||||
public byte GenderID;
|
||||
public byte SexID;
|
||||
public byte OutfitID;
|
||||
public byte PetFamilyID;
|
||||
public uint RaceID;
|
||||
@@ -64,10 +64,10 @@ namespace Game.DataStorage
|
||||
public sealed class CharTitlesRecord
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString NameMale;
|
||||
public LocalizedString NameFemale;
|
||||
public LocalizedString Name;
|
||||
public LocalizedString Name1;
|
||||
public ushort MaskID;
|
||||
public byte Flags;
|
||||
public sbyte Flags;
|
||||
}
|
||||
|
||||
public sealed class ChatChannelsRecord
|
||||
@@ -76,7 +76,7 @@ namespace Game.DataStorage
|
||||
public LocalizedString Name;
|
||||
public LocalizedString Shortcut;
|
||||
public ChannelDBCFlags Flags;
|
||||
public byte FactionGroup;
|
||||
public sbyte FactionGroup;
|
||||
}
|
||||
|
||||
public sealed class ChrClassesRecord
|
||||
@@ -88,18 +88,18 @@ namespace Game.DataStorage
|
||||
public uint FileName;
|
||||
public uint CreateScreenFileDataID;
|
||||
public uint SelectScreenFileDataID;
|
||||
public uint IconFileDataID;
|
||||
public uint LowResScreenFileDataID;
|
||||
public uint StartingLevel;
|
||||
public uint IconFileDataID;
|
||||
public int StartingLevel;
|
||||
public ushort Flags;
|
||||
public ushort CinematicSequenceID;
|
||||
public ushort DefaultSpec;
|
||||
public PowerType PowerType;
|
||||
public PowerType DisplayPower;
|
||||
public byte SpellClassSet;
|
||||
public byte AttackPowerPerStrength;
|
||||
public byte AttackPowerPerAgility;
|
||||
public byte RangedAttackPowerPerAgility;
|
||||
public byte Unk1;
|
||||
public byte PrimaryStatPriority;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
@@ -116,57 +116,57 @@ namespace Game.DataStorage
|
||||
public uint ClientFileString;
|
||||
public LocalizedString Name;
|
||||
public string NameFemale;
|
||||
public string LowercaseName;
|
||||
public string LowercaseNameFemale;
|
||||
public uint Flags;
|
||||
public uint MaleDisplayID;
|
||||
public uint FemaleDisplayID;
|
||||
public uint CreateScreenFileDataID;
|
||||
public uint SelectScreenFileDataID;
|
||||
public uint[] MaleCustomizeOffset = new uint[3];
|
||||
public uint[] FemaleCustomizeOffset = new uint[3];
|
||||
public uint LowResScreenFileDataID;
|
||||
public uint StartingLevel;
|
||||
public uint UIDisplayOrder;
|
||||
public string NameLowercase;
|
||||
public string NameFemaleLowercase;
|
||||
public int Flags;
|
||||
public uint MaleDisplayId;
|
||||
public uint FemaleDisplayId;
|
||||
public int CreateScreenFileDataID;
|
||||
public int SelectScreenFileDataID;
|
||||
public float[] MaleCustomizeOffset = new float[3];
|
||||
public float[] FemaleCustomizeOffset = new float[3];
|
||||
public int LowResScreenFileDataID;
|
||||
public int StartingLevel;
|
||||
public int UiDisplayOrder;
|
||||
public ushort FactionID;
|
||||
public ushort ResSicknessSpellID;
|
||||
public ushort SplashSoundID;
|
||||
public short ResSicknessSpellID;
|
||||
public short SplashSoundID;
|
||||
public ushort CinematicSequenceID;
|
||||
public byte BaseLanguage;
|
||||
public byte CreatureType;
|
||||
public byte TeamID;
|
||||
public byte RaceRelated;
|
||||
public byte UnalteredVisualRaceID;
|
||||
public byte CharComponentTextureLayoutID;
|
||||
public byte DefaultClassID;
|
||||
public byte NeutralRaceID;
|
||||
public byte ItemAppearanceFrameRaceID;
|
||||
public byte CharComponentTexLayoutHiResID;
|
||||
public sbyte BaseLanguage;
|
||||
public sbyte CreatureType;
|
||||
public sbyte Alliance;
|
||||
public sbyte RaceRelated;
|
||||
public sbyte UnalteredVisualRaceID;
|
||||
public sbyte CharComponentTextureLayoutID;
|
||||
public sbyte DefaultClassID;
|
||||
public sbyte NeutralRaceID;
|
||||
public sbyte DisplayRaceID;
|
||||
public sbyte CharComponentTexLayoutHiResID;
|
||||
public uint Id;
|
||||
public uint HighResMaleDisplayID;
|
||||
public uint HighResFemaleDisplayID;
|
||||
public uint HeritageArmorAchievementID;
|
||||
public uint MaleCorpseBonesModelFileDataID;
|
||||
public uint FemaleCorpseBonesModelFileDataID;
|
||||
public uint[] AlteredFormTransitionSpellVisualID = new uint[3];
|
||||
public uint[] AlteredFormTransitionSpellVisualKitID = new uint[3];
|
||||
public uint HighResMaleDisplayId;
|
||||
public uint HighResFemaleDisplayId;
|
||||
public int HeritageArmorAchievementID;
|
||||
public int MaleSkeletonFileDataID;
|
||||
public int FemaleSkeletonFileDataID;
|
||||
public uint[] AlteredFormStartVisualKitID = new uint[3];
|
||||
public uint[] AlteredFormFinishVisualKitID = new uint[3];
|
||||
}
|
||||
|
||||
public sealed class ChrSpecializationRecord
|
||||
{
|
||||
public string Name;
|
||||
public string Name2;
|
||||
public string FemaleName;
|
||||
public string Description;
|
||||
public uint[] MasterySpellID = new uint[PlayerConst.MaxMasterySpells];
|
||||
public byte ClassID;
|
||||
public byte OrderIndex;
|
||||
public byte PetTalentType;
|
||||
public byte Role;
|
||||
public byte PrimaryStatOrder;
|
||||
public byte PrimaryStatPriority;
|
||||
public uint Id;
|
||||
public uint IconFileDataID;
|
||||
public int SpellIconFileID;
|
||||
public ChrSpecializationFlag Flags;
|
||||
public uint AnimReplacementSetID;
|
||||
public int AnimReplacements;
|
||||
|
||||
public bool IsPetSpecialization()
|
||||
{
|
||||
@@ -180,7 +180,7 @@ namespace Game.DataStorage
|
||||
public uint SoundID;
|
||||
public Vector3 Origin;
|
||||
public float OriginFacing;
|
||||
public uint ModelFileDataID;
|
||||
public uint FileDataID;
|
||||
}
|
||||
|
||||
public sealed class CinematicSequencesRecord
|
||||
@@ -195,12 +195,12 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public uint BroadcastTextID;
|
||||
public uint SpellVisualKitID;
|
||||
public uint Duration;
|
||||
public ushort NextLineID;
|
||||
public ushort Unk1;
|
||||
public byte Yell;
|
||||
public byte Unk2;
|
||||
public byte Unk3;
|
||||
public int AdditionalDuration;
|
||||
public ushort NextConversationLineID;
|
||||
public ushort AnimKitID;
|
||||
public byte SpeechType;
|
||||
public byte StartAnimation;
|
||||
public byte EndAnimation;
|
||||
}
|
||||
|
||||
public sealed class CreatureDisplayInfoRecord
|
||||
@@ -216,25 +216,25 @@ namespace Game.DataStorage
|
||||
public uint PortraitTextureFileDataID;
|
||||
public byte CreatureModelAlpha;
|
||||
public ushort SoundID;
|
||||
public float PlayerModelScale;
|
||||
public float PlayerOverrideScale;
|
||||
public uint PortraitCreatureDisplayInfoID;
|
||||
public byte BloodID;
|
||||
public ushort ParticleColorID;
|
||||
public uint CreatureGeosetData;
|
||||
public ushort ObjectEffectPackageID;
|
||||
public ushort AnimReplacementSetID;
|
||||
public sbyte UnarmedWeaponSubclass;
|
||||
public sbyte UnarmedWeaponType;
|
||||
public uint StateSpellVisualKitID;
|
||||
public float InstanceOtherPlayerPetScale; // scale of not own player pets inside dungeons/raids/scenarios
|
||||
public uint MountSpellVisualKitID;
|
||||
public uint[] TextureVariation = new uint[3];
|
||||
public float PetInstanceScale; // scale of not own player pets inside dungeons/raids/scenarios
|
||||
public uint MountPoofSpellVisualKitID;
|
||||
public uint[] TextureVariationFileDataID = new uint[3];
|
||||
}
|
||||
|
||||
public sealed class CreatureDisplayInfoExtraRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint FileDataID;
|
||||
public uint HDFileDataID;
|
||||
public uint BakeMaterialResourcesID;
|
||||
public uint HDBakeMaterialResourcesID;
|
||||
public byte DisplayRaceID;
|
||||
public byte DisplaySexID;
|
||||
public byte DisplayClassID;
|
||||
@@ -253,7 +253,7 @@ namespace Game.DataStorage
|
||||
public LocalizedString Name;
|
||||
public float MinScale;
|
||||
public float MaxScale;
|
||||
public uint IconFileDataID;
|
||||
public uint IconFileID;
|
||||
public ushort[] SkillLine = new ushort[2];
|
||||
public ushort PetFoodMask;
|
||||
public byte MinScaleLevel;
|
||||
@@ -271,8 +271,7 @@ namespace Game.DataStorage
|
||||
public float CollisionWidth;
|
||||
public float CollisionHeight;
|
||||
public float MountHeight;
|
||||
public float[] GeoBoxMin = new float[3];
|
||||
public float[] GeoBoxMax = new float[3];
|
||||
public float[] GeoBox = new float[6];
|
||||
public float WorldEffectScale;
|
||||
public float AttachedEffectScale;
|
||||
public float MissileCollisionRadius;
|
||||
@@ -289,8 +288,8 @@ namespace Game.DataStorage
|
||||
public uint BloodID;
|
||||
public byte FootprintTextureID;
|
||||
public byte FoleyMaterialID;
|
||||
public byte FootstepEffectID;
|
||||
public byte DeathThudEffectID;
|
||||
public byte FootstepCameraEffectID;
|
||||
public byte DeathThudCameraEffectID;
|
||||
public uint SoundID;
|
||||
public uint CreatureGeosetDataID;
|
||||
}
|
||||
@@ -341,7 +340,7 @@ namespace Game.DataStorage
|
||||
public byte CategoryID;
|
||||
public byte SpellCategory;
|
||||
public byte Quality;
|
||||
public uint InventoryIconFileDataID;
|
||||
public uint InventoryIconFileID;
|
||||
public uint SpellWeight;
|
||||
}
|
||||
|
||||
@@ -349,15 +348,14 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint ID;
|
||||
public byte Type;
|
||||
public byte Unused;
|
||||
public byte Flags;
|
||||
}
|
||||
|
||||
public sealed class CurvePointRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float X;
|
||||
public float Y;
|
||||
public Vector2 Pos;
|
||||
public ushort CurveID;
|
||||
public byte Index;
|
||||
public byte OrderIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,25 +22,25 @@ namespace Game.DataStorage
|
||||
public sealed class DestructibleModelDataRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort StateDamagedDisplayID;
|
||||
public ushort StateDestroyedDisplayID;
|
||||
public ushort StateRebuildingDisplayID;
|
||||
public ushort StateSmokeDisplayID;
|
||||
public ushort State0Wmo;
|
||||
public ushort State1Wmo;
|
||||
public ushort State2Wmo;
|
||||
public ushort State3Wmo;
|
||||
public ushort HealEffectSpeed;
|
||||
public byte StateDamagedImpactEffectDoodadSet;
|
||||
public byte StateDamagedAmbientDoodadSet;
|
||||
public byte StateDamagedNameSet;
|
||||
public byte StateDestroyedDestructionDoodadSet;
|
||||
public byte StateDestroyedImpactEffectDoodadSet;
|
||||
public byte StateDestroyedAmbientDoodadSet;
|
||||
public byte StateDestroyedNameSet;
|
||||
public byte StateRebuildingDestructionDoodadSet;
|
||||
public byte StateRebuildingImpactEffectDoodadSet;
|
||||
public byte StateRebuildingAmbientDoodadSet;
|
||||
public byte StateRebuildingNameSet;
|
||||
public byte StateSmokeInitDoodadSet;
|
||||
public byte StateSmokeAmbientDoodadSet;
|
||||
public byte StateSmokeNameSet;
|
||||
public byte State0ImpactEffectDoodadSet;
|
||||
public byte State0AmbientDoodadSet;
|
||||
public byte State0NameSet;
|
||||
public byte State1DestructionDoodadSet;
|
||||
public byte State1ImpactEffectDoodadSet;
|
||||
public byte State1AmbientDoodadSet;
|
||||
public byte State1NameSet;
|
||||
public byte State2DestructionDoodadSet;
|
||||
public byte State2ImpactEffectDoodadSet;
|
||||
public byte State2AmbientDoodadSet;
|
||||
public byte State2NameSet;
|
||||
public byte State3InitDoodadSet;
|
||||
public byte State3AmbientDoodadSet;
|
||||
public byte State3NameSet;
|
||||
public byte EjectDirection;
|
||||
public byte DoNotHighlight;
|
||||
public byte HealEffect;
|
||||
@@ -60,7 +60,7 @@ namespace Game.DataStorage
|
||||
public sbyte OldEnumValue;
|
||||
public DifficultyFlags Flags;
|
||||
public byte ToggleDifficultyID;
|
||||
public byte ItemBonusTreeModID;
|
||||
public byte ItemContext;
|
||||
public byte OrderIndex;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace Game.DataStorage
|
||||
public byte Flags;
|
||||
public uint Id;
|
||||
public uint OrderIndex;
|
||||
public uint TextureFileDataID;
|
||||
public uint SpellIconFileID;
|
||||
}
|
||||
|
||||
public sealed class DurabilityCostsRecord
|
||||
@@ -87,6 +87,6 @@ namespace Game.DataStorage
|
||||
public sealed class DurabilityQualityRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float QualityMod;
|
||||
public float Data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,19 +22,19 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public long RaceMask;
|
||||
public uint EmoteSlashCommand;
|
||||
public uint SpellVisualKitID;
|
||||
public uint EmoteFlags;
|
||||
public uint SpellVisualKitID;
|
||||
public ushort AnimID;
|
||||
public byte EmoteSpecProc;
|
||||
public uint EmoteSpecProcParam;
|
||||
public byte EmoteSoundID;
|
||||
public short ClassMask;
|
||||
public int ClassMask;
|
||||
public byte EmoteSpecProcParam;
|
||||
public ushort EmoteSoundID;
|
||||
}
|
||||
|
||||
public sealed class EmotesTextRecord
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public string Name;
|
||||
public ushort EmoteID;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,21 +22,19 @@ namespace Game.DataStorage
|
||||
{
|
||||
public sealed class FactionRecord
|
||||
{
|
||||
public ulong[] ReputationRaceMask = new ulong[4];
|
||||
public long[] ReputationRaceMask = new long[4];
|
||||
public LocalizedString Name;
|
||||
public string Description;
|
||||
public uint Id;
|
||||
public int[] ReputationBase = new int[4];
|
||||
public float ParentFactionModIn; // Faction gains incoming rep * ParentFactionModIn
|
||||
public float ParentFactionModOut; // Faction outputs rep * ParentFactionModOut as spillover reputation
|
||||
public float[] ParentFactionMod = new float[2]; // Faction outputs rep * ParentFactionModOut as spillover reputation
|
||||
public uint[] ReputationMax = new uint[4];
|
||||
public short ReputationIndex;
|
||||
public ushort[] ReputationClassMask = new ushort[4];
|
||||
public ushort[] ReputationFlags = new ushort[4];
|
||||
public ushort ParentFactionID;
|
||||
public ushort ParagonFactionID;
|
||||
public byte ParentFactionCapIn; // The highest rank the faction will profit from incoming spillover
|
||||
public byte ParentFactionCapOut;
|
||||
public byte[] ParentFactionCap = new byte[2]; // The highest rank the faction will profit from incoming spillover
|
||||
public byte Expansion;
|
||||
public byte Flags;
|
||||
public byte FriendshipRepID;
|
||||
@@ -53,10 +51,10 @@ namespace Game.DataStorage
|
||||
public ushort Faction;
|
||||
public ushort Flags;
|
||||
public ushort[] Enemies = new ushort[4];
|
||||
public ushort[] Friends = new ushort[4];
|
||||
public byte Mask;
|
||||
public byte FriendMask;
|
||||
public byte EnemyMask;
|
||||
public ushort[] Friend = new ushort[4];
|
||||
public byte FactionGroup;
|
||||
public byte FriendGroup;
|
||||
public byte EnemyGroup;
|
||||
|
||||
public bool IsFriendlyTo(FactionTemplateRecord entry)
|
||||
{
|
||||
@@ -68,10 +66,10 @@ namespace Game.DataStorage
|
||||
if (Enemies[i] == entry.Faction)
|
||||
return false;
|
||||
for (int i = 0; i < 4; ++i)
|
||||
if (Friends[i] == entry.Faction)
|
||||
if (Friend[i] == entry.Faction)
|
||||
return true;
|
||||
}
|
||||
return Convert.ToBoolean(FriendMask & entry.Mask) || Convert.ToBoolean(Mask & entry.FriendMask);
|
||||
return Convert.ToBoolean(FriendGroup & entry.FactionGroup) || Convert.ToBoolean(FactionGroup & entry.FriendGroup);
|
||||
}
|
||||
public bool IsHostileTo(FactionTemplateRecord entry)
|
||||
{
|
||||
@@ -83,19 +81,19 @@ namespace Game.DataStorage
|
||||
if (Enemies[i] == entry.Faction)
|
||||
return true;
|
||||
for (int i = 0; i < 4; ++i)
|
||||
if (Friends[i] == entry.Faction)
|
||||
if (Friend[i] == entry.Faction)
|
||||
return false;
|
||||
}
|
||||
return (EnemyMask & entry.Mask) != 0;
|
||||
return (EnemyGroup & entry.FactionGroup) != 0;
|
||||
}
|
||||
public bool IsHostileToPlayers() { return (EnemyMask & (uint)FactionMasks.Player) != 0; }
|
||||
public bool IsHostileToPlayers() { return (EnemyGroup & (uint)FactionMasks.Player) != 0; }
|
||||
public bool IsNeutralToAll()
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
if (Enemies[i] != 0)
|
||||
return false;
|
||||
|
||||
return EnemyMask == 0 && FriendMask == 0;
|
||||
return EnemyGroup == 0 && FriendGroup == 0;
|
||||
}
|
||||
public bool IsContestedGuardFaction() { return Flags.HasAnyFlag((ushort)FactionTemplateFlags.ContestedGuard); }
|
||||
public bool ShouldSparAttack() { return Flags.HasAnyFlag((ushort)FactionTemplateFlags.EnemySpar); }
|
||||
|
||||
@@ -20,25 +20,6 @@ using Framework.GameMath;
|
||||
|
||||
namespace Game.DataStorage
|
||||
{
|
||||
public sealed class GameObjectsRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public Vector3 Position;
|
||||
public float RotationX;
|
||||
public float RotationY;
|
||||
public float RotationZ;
|
||||
public float RotationW;
|
||||
public float Size;
|
||||
public int[] Data = new int[8];
|
||||
public ushort MapID;
|
||||
public ushort DisplayID;
|
||||
public ushort PhaseID;
|
||||
public ushort PhaseGroupID;
|
||||
public byte PhaseUseFlags;
|
||||
public GameObjectTypes Type;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
public sealed class GameObjectDisplayInfoRecord
|
||||
{
|
||||
public uint Id;
|
||||
@@ -50,50 +31,66 @@ namespace Game.DataStorage
|
||||
public ushort ObjectEffectPackageID;
|
||||
}
|
||||
|
||||
public sealed class GameObjectsRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public Vector3 Pos;
|
||||
public float[] Rot = new float[4];
|
||||
public float Scale;
|
||||
public int[] PropValue = new int[8];
|
||||
public ushort OwnerID;
|
||||
public ushort DisplayID;
|
||||
public ushort PhaseID;
|
||||
public ushort PhaseGroupID;
|
||||
public byte PhaseUseFlags;
|
||||
public GameObjectTypes TypeID;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
public sealed class GarrAbilityRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public LocalizedString Description;
|
||||
public uint IconFileDataID;
|
||||
public GarrisonAbilityFlags Flags;
|
||||
public ushort OtherFactionGarrAbilityID;
|
||||
public ushort FactionChangeGarrAbilityID;
|
||||
public byte GarrAbilityCategoryID;
|
||||
public byte FollowerTypeID;
|
||||
public byte GarrFollowerTypeID;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
public sealed class GarrBuildingRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string NameAlliance;
|
||||
public string NameHorde;
|
||||
public string AllianceName;
|
||||
public string HordeName;
|
||||
public string Description;
|
||||
public string Tooltip;
|
||||
public uint HordeGameObjectID;
|
||||
public uint AllianceGameObjectID;
|
||||
public uint IconFileDataID;
|
||||
public ushort CostCurrencyID;
|
||||
public ushort HordeTexPrefixKitID;
|
||||
public ushort AllianceTexPrefixKitID;
|
||||
public ushort AllianceActivationScenePackageID;
|
||||
public ushort HordeActivationScenePackageID;
|
||||
public ushort FollowerRequiredGarrAbilityID;
|
||||
public ushort FollowerGarrAbilityEffectID;
|
||||
public short CostMoney;
|
||||
public byte Unknown;
|
||||
public byte Type;
|
||||
public byte Level;
|
||||
public ushort CurrencyTypeID;
|
||||
public ushort HordeUiTextureKitID;
|
||||
public ushort AllianceUiTextureKitID;
|
||||
public ushort AllianceSceneScriptPackageID;
|
||||
public ushort HordeSceneScriptPackageID;
|
||||
public ushort GarrAbilityID;
|
||||
public ushort BonusGarrAbilityID;
|
||||
public short GoldCost;
|
||||
public byte GarrSiteID;
|
||||
public byte BuildingType;
|
||||
public byte UpgradeLevel;
|
||||
public GarrisonBuildingFlags Flags;
|
||||
public byte MaxShipments;
|
||||
public byte ShipmentCapacity;
|
||||
public byte GarrTypeID;
|
||||
public ushort BuildDuration;
|
||||
public int CostCurrencyAmount;
|
||||
public byte BonusAmount;
|
||||
public ushort BuildSeconds;
|
||||
public int CurrencyQty;
|
||||
public byte MaxAssignments;
|
||||
}
|
||||
|
||||
public sealed class GarrBuildingPlotInstRecord
|
||||
{
|
||||
public Vector2 LandmarkOffset;
|
||||
public Vector2 MapOffset;
|
||||
public ushort UiTextureAtlasMemberID;
|
||||
public ushort GarrSiteLevelPlotInstID;
|
||||
public byte GarrBuildingID;
|
||||
@@ -102,12 +99,12 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class GarrClassSpecRecord
|
||||
{
|
||||
public LocalizedString NameMale;
|
||||
public LocalizedString NameFemale;
|
||||
public LocalizedString NameGenderless;
|
||||
public ushort ClassAtlasID; // UiTextureAtlasMember.db2 ref
|
||||
public LocalizedString ClassSpec;
|
||||
public LocalizedString ClassSpecMale;
|
||||
public LocalizedString ClassSpecFemale;
|
||||
public ushort UiTextureAtlasMemberID; // UiTextureAtlasMember.db2 ref
|
||||
public ushort GarrFollItemSetID;
|
||||
public byte Limit;
|
||||
public byte FollowerClassLimit;
|
||||
public byte Flags;
|
||||
public uint Id;
|
||||
}
|
||||
@@ -116,35 +113,35 @@ namespace Game.DataStorage
|
||||
{
|
||||
public string HordeSourceText;
|
||||
public string AllianceSourceText;
|
||||
public string Name;
|
||||
public string TitleName;
|
||||
public uint HordeCreatureID;
|
||||
public uint AllianceCreatureID;
|
||||
public uint HordePortraitIconID;
|
||||
public uint AlliancePortraitIconID;
|
||||
public uint HordeAddedBroadcastTextID;
|
||||
public uint AllianceAddedBroadcastTextID;
|
||||
public uint HordeIconFileDataID;
|
||||
public uint AllianceIconFileDataID;
|
||||
public uint HordeSlottingBroadcastTextID;
|
||||
public uint AllySlottingBroadcastTextID;
|
||||
public ushort HordeGarrFollItemSetID;
|
||||
public ushort AllianceGarrFollItemSetID;
|
||||
public ushort ItemLevelWeapon;
|
||||
public ushort ItemLevelArmor;
|
||||
public ushort HordeListPortraitTextureKitID;
|
||||
public ushort AllianceListPortraitTextureKitID;
|
||||
public byte FollowerTypeID;
|
||||
public byte HordeUiAnimRaceInfoID;
|
||||
public byte AllianceUiAnimRaceInfoID;
|
||||
public ushort HordeUITextureKitID;
|
||||
public ushort AllianceUITextureKitID;
|
||||
public byte GarrFollowerTypeID;
|
||||
public byte HordeGarrFollRaceID;
|
||||
public byte AllianceGarrFollRaceID;
|
||||
public byte Quality;
|
||||
public byte HordeGarrClassSpecID;
|
||||
public byte AllianceGarrClassSpecID;
|
||||
public byte Level;
|
||||
public byte Unknown1;
|
||||
public byte FollowerLevel;
|
||||
public byte Gender;
|
||||
public byte Flags;
|
||||
public sbyte Unknown2;
|
||||
public sbyte Unknown3;
|
||||
public sbyte HordeSourceTypeEnum;
|
||||
public sbyte AllianceSourceTypeEnum;
|
||||
public byte GarrTypeID;
|
||||
public byte MaxDurability;
|
||||
public byte Class;
|
||||
public byte HordeFlavorTextGarrStringID;
|
||||
public byte AllianceFlavorTextGarrStringID;
|
||||
public byte Vitality;
|
||||
public byte ChrClassID;
|
||||
public byte HordeFlavorGarrStringID;
|
||||
public byte AllianceFlavorGarrStringID;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
@@ -160,12 +157,12 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public uint AllianceConstructionGameObjectID;
|
||||
public uint HordeConstructionGameObjectID;
|
||||
public byte GarrPlotUICategoryID;
|
||||
public uint AllianceConstructObjID;
|
||||
public uint HordeConstructObjID;
|
||||
public byte UiCategoryID;
|
||||
public byte PlotType;
|
||||
public byte Flags;
|
||||
public uint[] Count = new uint[2];
|
||||
public uint[] UpgradeRequirement = new uint[2];
|
||||
}
|
||||
|
||||
public sealed class GarrPlotBuildingRecord
|
||||
@@ -178,38 +175,38 @@ namespace Game.DataStorage
|
||||
public sealed class GarrPlotInstanceRecord
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public string Name;
|
||||
public byte GarrPlotID;
|
||||
}
|
||||
|
||||
public sealed class GarrSiteLevelRecord
|
||||
{
|
||||
public uint Id;
|
||||
public Vector2 TownHall;
|
||||
public Vector2 TownHallUiPos;
|
||||
public ushort MapID;
|
||||
public ushort SiteID;
|
||||
public ushort MovieID;
|
||||
public ushort UpgradeResourceCost;
|
||||
public ushort UpgradeMoneyCost;
|
||||
public byte Level;
|
||||
public byte UITextureKitID;
|
||||
public byte Level2;
|
||||
public ushort UiTextureKitID;
|
||||
public ushort UpgradeMovieID;
|
||||
public ushort UpgradeCost;
|
||||
public ushort UpgradeGoldCost;
|
||||
public byte GarrLevel;
|
||||
public byte GarrSiteID;
|
||||
public byte MaxBuildingLevel;
|
||||
}
|
||||
|
||||
public sealed class GarrSiteLevelPlotInstRecord
|
||||
{
|
||||
public uint Id;
|
||||
public Vector2 Landmark;
|
||||
public Vector2 UiMarkerPos;
|
||||
public ushort GarrSiteLevelID;
|
||||
public byte GarrPlotInstanceID;
|
||||
public byte Unknown;
|
||||
public byte UiMarkerSize;
|
||||
}
|
||||
|
||||
public sealed class GemPropertiesRecord
|
||||
{
|
||||
public uint Id;
|
||||
public SocketColor Type;
|
||||
public ushort EnchantID;
|
||||
public ushort EnchantId;
|
||||
public ushort MinItemLevel;
|
||||
}
|
||||
|
||||
@@ -225,7 +222,7 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public uint SpellID;
|
||||
public ushort SpellIconID;
|
||||
public byte Type;
|
||||
public byte GlyphType;
|
||||
public byte GlyphExclusiveCategoryID;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,12 +23,13 @@ namespace Game.DataStorage
|
||||
{
|
||||
public string SourceText;
|
||||
public uint ItemID;
|
||||
public uint[] OldItem = new uint[2];
|
||||
public uint NextDifficultyItemID;
|
||||
public uint LegacyItemID;
|
||||
public uint LegacyUpgradedItemID;
|
||||
public uint StaticUpgradedItemID;
|
||||
public uint[] UpgradeItemID = new uint[3];
|
||||
public ushort[] ItemBonusListID = new ushort[3];
|
||||
public ushort[] UpgradeItemBonusListID = new ushort[3];
|
||||
public byte Flags;
|
||||
public byte Source;
|
||||
public byte SourceTypeEnum;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,50 +22,50 @@ namespace Game.DataStorage
|
||||
public sealed class ImportPriceArmorRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float ClothFactor;
|
||||
public float LeatherFactor;
|
||||
public float MailFactor;
|
||||
public float PlateFactor;
|
||||
public float ClothModifier;
|
||||
public float LeatherModifier;
|
||||
public float ChainModifier;
|
||||
public float PlateModifier;
|
||||
}
|
||||
|
||||
public sealed class ImportPriceQualityRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float Factor;
|
||||
public float Data;
|
||||
}
|
||||
|
||||
public sealed class ImportPriceShieldRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float Factor;
|
||||
public float Data;
|
||||
}
|
||||
|
||||
public sealed class ImportPriceWeaponRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float Factor;
|
||||
public float Data;
|
||||
}
|
||||
|
||||
public sealed class ItemRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint FileDataID;
|
||||
public ItemClass Class;
|
||||
public byte SubClass;
|
||||
public sbyte SoundOverrideSubclass;
|
||||
public sbyte Material;
|
||||
public uint IconFileDataID;
|
||||
public ItemClass ClassID;
|
||||
public byte SubclassID;
|
||||
public sbyte SoundOverrideSubclassID;
|
||||
public byte Material;
|
||||
public InventoryType inventoryType;
|
||||
public byte Sheath;
|
||||
public byte GroupSoundsID;
|
||||
public byte SheatheType;
|
||||
public byte ItemGroupSoundsID;
|
||||
}
|
||||
|
||||
public sealed class ItemAppearanceRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint DisplayID;
|
||||
public uint IconFileDataID;
|
||||
public uint ItemDisplayInfoID;
|
||||
public uint DefaultIconFileDataID;
|
||||
public uint UIOrder;
|
||||
public byte ObjectComponentSlot;
|
||||
public byte DisplayType;
|
||||
}
|
||||
|
||||
public sealed class ItemArmorQualityRecord
|
||||
@@ -85,7 +85,10 @@ namespace Game.DataStorage
|
||||
public sealed class ItemArmorTotalRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float[] Value = new float[4];
|
||||
public float Cloth;
|
||||
public float Leather;
|
||||
public float Mail;
|
||||
public float Plate;
|
||||
public ushort ItemLevel;
|
||||
}
|
||||
|
||||
@@ -99,48 +102,48 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public int[] Value = new int[3];
|
||||
public ushort BonusListID;
|
||||
public ushort ParentItemBonusListID;
|
||||
public ItemBonusType Type;
|
||||
public byte Index;
|
||||
public byte OrderIndex;
|
||||
}
|
||||
|
||||
public sealed class ItemBonusListLevelDeltaRecord
|
||||
{
|
||||
public short Delta;
|
||||
public short ItemLevelDelta;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
public sealed class ItemBonusTreeNodeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort SubTreeID;
|
||||
public ushort BonusListID;
|
||||
public ushort ItemLevelSelectorID;
|
||||
public byte BonusTreeModID;
|
||||
public uint BonusTreeID;
|
||||
public ushort ChildItemBonusTreeID;
|
||||
public ushort ChildItemBonusListID;
|
||||
public ushort ChildItemLevelSelectorID;
|
||||
public byte ItemContext;
|
||||
public uint ParentItemBonusTreeID;
|
||||
}
|
||||
|
||||
public sealed class ItemChildEquipmentRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint AltItemID;
|
||||
public byte AltEquipmentSlot;
|
||||
public uint ItemID;
|
||||
public uint ChildItemID;
|
||||
public byte ChildItemEquipSlot;
|
||||
public uint ParentItemID;
|
||||
}
|
||||
|
||||
public sealed class ItemClassRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string Name;
|
||||
public float PriceMod;
|
||||
public byte OldEnumValue;
|
||||
public string ClassName;
|
||||
public float PriceModifier;
|
||||
public byte ClassID;
|
||||
public byte Flags;
|
||||
}
|
||||
|
||||
public sealed class ItemCurrencyCostRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint ItemId;
|
||||
public uint ItemID;
|
||||
}
|
||||
|
||||
// common struct for:
|
||||
@@ -155,71 +158,71 @@ namespace Game.DataStorage
|
||||
public sealed class ItemDamageRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float[] DPS = new float[7];
|
||||
public float[] Quality = new float[7];
|
||||
public ushort ItemLevel;
|
||||
}
|
||||
|
||||
public sealed class ItemDisenchantLootRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort MinItemLevel;
|
||||
public ushort MaxItemLevel;
|
||||
public ushort RequiredDisenchantSkill;
|
||||
public sbyte ItemSubClass;
|
||||
public byte ItemQuality;
|
||||
public sbyte Expansion;
|
||||
public uint ItemClass;
|
||||
public ushort MinLevel;
|
||||
public ushort MaxLevel;
|
||||
public ushort SkillRequired;
|
||||
public sbyte Subclass;
|
||||
public byte Quality;
|
||||
public sbyte ExpansionID;
|
||||
public uint ClassID;
|
||||
}
|
||||
|
||||
public sealed class ItemEffectRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint SpellID;
|
||||
public int Cooldown;
|
||||
public int CategoryCooldown;
|
||||
public int CoolDownMSec;
|
||||
public int CategoryCoolDownMSec;
|
||||
public short Charges;
|
||||
public ushort Category;
|
||||
public ushort SpellCategoryID;
|
||||
public ushort ChrSpecializationID;
|
||||
public byte OrderIndex;
|
||||
public ItemSpelltriggerType Trigger;
|
||||
public uint ItemID;
|
||||
public byte LegacySlotIndex;
|
||||
public ItemSpelltriggerType TriggerType;
|
||||
public uint ParentItemID;
|
||||
}
|
||||
|
||||
public sealed class ItemExtendedCostRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint[] RequiredItem = new uint[ItemConst.MaxItemExtCostItems]; // required item id
|
||||
public uint[] RequiredCurrencyCount = new uint[ItemConst.MaxItemExtCostCurrencies]; // required curency count
|
||||
public ushort[] RequiredItemCount = new ushort[ItemConst.MaxItemExtCostItems]; // required count of 1st item
|
||||
public ushort RequiredPersonalArenaRating; // required personal arena rating
|
||||
public ushort[] RequiredCurrency = new ushort[ItemConst.MaxItemExtCostCurrencies]; // required curency id
|
||||
public byte RequiredArenaSlot; // arena slot restrictions (min slot value)
|
||||
public byte RequiredFactionId;
|
||||
public byte RequiredFactionStanding;
|
||||
public byte RequirementFlags;
|
||||
public uint[] ItemID = new uint[ItemConst.MaxItemExtCostItems]; // required item id
|
||||
public uint[] CurrencyCount = new uint[ItemConst.MaxItemExtCostCurrencies]; // required curency count
|
||||
public ushort[] ItemCount = new ushort[ItemConst.MaxItemExtCostItems]; // required count of 1st item
|
||||
public ushort RequiredArenaRating; // required personal arena rating
|
||||
public ushort[] CurrencyID = new ushort[ItemConst.MaxItemExtCostCurrencies]; // required curency id
|
||||
public byte ArenaBracket; // arena slot restrictions (min slot value)
|
||||
public byte MinFactionID;
|
||||
public byte MinReputation;
|
||||
public byte Flags;
|
||||
public byte RequiredAchievement;
|
||||
}
|
||||
|
||||
public sealed class ItemLevelSelectorRecord
|
||||
{
|
||||
public uint ID;
|
||||
public ushort ItemLevel;
|
||||
public ushort MinItemLevel;
|
||||
public ushort ItemLevelSelectorQualitySetID;
|
||||
}
|
||||
|
||||
public sealed class ItemLevelSelectorQualityRecord
|
||||
{
|
||||
public uint ID;
|
||||
public uint ItemBonusListID;
|
||||
public uint QualityItemBonusListID;
|
||||
public byte Quality;
|
||||
public uint ItemLevelSelectorQualitySetID;
|
||||
public uint ParentILSQualitySetID;
|
||||
}
|
||||
|
||||
public sealed class ItemLevelSelectorQualitySetRecord
|
||||
{
|
||||
public uint ID;
|
||||
public ushort ItemLevelMin;
|
||||
public ushort ItemLevelMax;
|
||||
public ushort IlvlRare;
|
||||
public ushort IlvlEpic;
|
||||
}
|
||||
|
||||
public sealed class ItemLimitCategoryRecord
|
||||
@@ -234,17 +237,17 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint ItemID;
|
||||
public uint Id;
|
||||
public byte AppearanceModID;
|
||||
public ushort AppearanceID;
|
||||
public byte Index;
|
||||
public byte SourceType;
|
||||
public byte ItemAppearanceModifierID;
|
||||
public ushort ItemAppearanceID;
|
||||
public byte OrderIndex;
|
||||
public byte TransmogSourceTypeEnum;
|
||||
}
|
||||
|
||||
public sealed class ItemPriceBaseRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float ArmorFactor;
|
||||
public float WeaponFactor;
|
||||
public float Armor;
|
||||
public float Weapon;
|
||||
public ushort ItemLevel;
|
||||
}
|
||||
|
||||
@@ -266,19 +269,19 @@ namespace Game.DataStorage
|
||||
public sealed class ItemSearchNameRecord
|
||||
{
|
||||
public ulong AllowableRace;
|
||||
public LocalizedString Name;
|
||||
public LocalizedString Display;
|
||||
public uint Id;
|
||||
public uint[] Flags = new uint[3];
|
||||
public ushort ItemLevel;
|
||||
public byte Quality;
|
||||
public byte RequiredExpansion;
|
||||
public byte OverallQualityID;
|
||||
public byte ExpansionID;
|
||||
public byte RequiredLevel;
|
||||
public ushort RequiredReputationFaction;
|
||||
public byte RequiredReputationRank;
|
||||
public ushort MinFactionID;
|
||||
public byte MinReputation;
|
||||
public short AllowableClass;
|
||||
public ushort RequiredSkill;
|
||||
public ushort RequiredSkillRank;
|
||||
public uint RequiredSpell;
|
||||
public uint RequiredAbility;
|
||||
}
|
||||
|
||||
public sealed class ItemSetRecord
|
||||
@@ -288,7 +291,7 @@ namespace Game.DataStorage
|
||||
public uint[] ItemID = new uint[17];
|
||||
public ushort RequiredSkillRank;
|
||||
public byte RequiredSkill;
|
||||
public ItemSetFlags Flags;
|
||||
public ItemSetFlags SetFlags;
|
||||
}
|
||||
|
||||
public sealed class ItemSetSpellRecord
|
||||
@@ -304,75 +307,75 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public long AllowableRace;
|
||||
public LocalizedString Name;
|
||||
public string Name2;
|
||||
public string Name3;
|
||||
public string Name4;
|
||||
public LocalizedString Display;
|
||||
public string Display2;
|
||||
public string Display3;
|
||||
public string Display4;
|
||||
public string Description;
|
||||
public uint[] Flags = new uint[4];
|
||||
public float Unk1;
|
||||
public float Unk2;
|
||||
public uint BuyCount;
|
||||
public float PriceRandomValue;
|
||||
public float PriceVariance;
|
||||
public uint VendorStackCount;
|
||||
public uint BuyPrice;
|
||||
public uint SellPrice;
|
||||
public uint RequiredSpell;
|
||||
public uint RequiredAbility;
|
||||
public uint MaxCount;
|
||||
public uint Stackable;
|
||||
public int[] ItemStatAllocation = new int[ItemConst.MaxStats];
|
||||
public float[] ItemStatSocketCostMultiplier = new float[ItemConst.MaxStats];
|
||||
public float RangedModRange;
|
||||
public int[] StatPercentEditor = new int[ItemConst.MaxStats];
|
||||
public float[] StatPercentageOfSocket = new float[ItemConst.MaxStats];
|
||||
public float ItemRange;
|
||||
public uint BagFamily;
|
||||
public float ArmorDamageModifier;//wrong?
|
||||
public uint Duration;
|
||||
public float StatScalingFactor;
|
||||
public float QualityModifier;
|
||||
public uint DurationInInventory;
|
||||
public float DmgVariance;
|
||||
public short AllowableClass;
|
||||
public ushort ItemLevel;
|
||||
public ushort RequiredSkill;
|
||||
public ushort RequiredSkillRank;
|
||||
public ushort RequiredReputationFaction;
|
||||
public ushort MinFactionID;
|
||||
public short[] ItemStatValue = new short[ItemConst.MaxStats];
|
||||
public ushort ScalingStatDistribution;
|
||||
public ushort Delay;
|
||||
public ushort PageText;
|
||||
public ushort StartQuest;
|
||||
public ushort ScalingStatDistributionID;
|
||||
public ushort ItemDelay;
|
||||
public ushort PageID;
|
||||
public ushort StartQuestID;
|
||||
public ushort LockID;
|
||||
public ushort RandomProperty;
|
||||
public ushort RandomSuffix;
|
||||
public ushort RandomSelect;
|
||||
public ushort ItemRandomSuffixGroupID;
|
||||
public ushort ItemSet;
|
||||
public ushort Area;
|
||||
public ushort Map;
|
||||
public ushort TotemCategory;
|
||||
public ushort SocketBonus;
|
||||
public ushort ZoneBound;
|
||||
public ushort InstanceBound;
|
||||
public ushort TotemCategoryID;
|
||||
public ushort SocketMatchEnchantmentId;
|
||||
public ushort GemProperties;
|
||||
public ushort ItemLimitCategory;
|
||||
public ushort HolidayID;
|
||||
public ushort RequiredTransmogHolidayID;
|
||||
public ushort LimitCategory;
|
||||
public ushort RequiredHoliday;
|
||||
public ushort RequiredTransmogHoliday;
|
||||
public ushort ItemNameDescriptionID;
|
||||
public byte Quality;
|
||||
public byte OverallQualityID;
|
||||
public InventoryType inventoryType;
|
||||
public sbyte RequiredLevel;
|
||||
public byte RequiredHonorRank;
|
||||
public byte RequiredCityRank;
|
||||
public byte RequiredReputationRank;
|
||||
public byte RequiredPVPRank;
|
||||
public byte RequiredPVPMedal;
|
||||
public byte MinReputation;
|
||||
public byte ContainerSlots;
|
||||
public sbyte[] ItemStatType = new sbyte[ItemConst.MaxStats];
|
||||
public sbyte[] StatModifierBonusStat = new sbyte[ItemConst.MaxStats];
|
||||
public byte DamageType;
|
||||
public byte Bonding;
|
||||
public byte LanguageID;
|
||||
public byte PageMaterial;
|
||||
public byte PageMaterialID;
|
||||
public sbyte Material;
|
||||
public byte Sheath;
|
||||
public byte[] SocketColor = new byte[ItemConst.MaxGemSockets];
|
||||
public byte CurrencySubstitutionID;
|
||||
public byte CurrencySubstitutionCount;
|
||||
public byte SheatheType;
|
||||
public byte[] SocketType = new byte[ItemConst.MaxGemSockets];
|
||||
public byte SpellWeightCategory;
|
||||
public byte SpellWeight;
|
||||
public byte ArtifactID;
|
||||
public byte RequiredExpansion;
|
||||
public byte ExpansionID;
|
||||
}
|
||||
|
||||
public sealed class ItemSpecRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort SpecID;
|
||||
public ushort SpecializationID;
|
||||
public byte MinLevel;
|
||||
public byte MaxLevel;
|
||||
public byte ItemType;
|
||||
@@ -390,17 +393,17 @@ namespace Game.DataStorage
|
||||
public sealed class ItemUpgradeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint CurrencyCost;
|
||||
public ushort PrevItemUpgradeID;
|
||||
public ushort CurrencyID;
|
||||
public uint CurrencyAmount;
|
||||
public ushort PrerequisiteID;
|
||||
public ushort CurrencyType;
|
||||
public byte ItemUpgradePathID;
|
||||
public byte ItemLevelBonus;
|
||||
public byte ItemLevelIncrement;
|
||||
}
|
||||
|
||||
public sealed class ItemXBonusTreeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort BonusTreeID;
|
||||
public ushort ItemBonusTreeID;
|
||||
public uint ItemID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,23 +26,23 @@ namespace Game.DataStorage
|
||||
public LocalizedString Name;
|
||||
public string Description;
|
||||
public LfgFlags Flags;
|
||||
public float MinItemLevel;
|
||||
public float MinGear;
|
||||
public ushort MaxLevel;
|
||||
public ushort TargetLevelMax;
|
||||
public short MapID;
|
||||
public ushort RandomID;
|
||||
public ushort ScenarioID;
|
||||
public ushort LastBossJournalEncounterID;
|
||||
public ushort FinalEncounterID;
|
||||
public ushort BonusReputationAmount;
|
||||
public ushort MentorItemLevel;
|
||||
public ushort PlayerConditionID;
|
||||
public ushort RequiredPlayerConditionId;
|
||||
public byte MinLevel;
|
||||
public byte TargetLevel;
|
||||
public byte TargetLevelMin;
|
||||
public Difficulty DifficultyID;
|
||||
public LfgType Type;
|
||||
public LfgType TypeID;
|
||||
public byte Faction;
|
||||
public byte Expansion;
|
||||
public byte ExpansionLevel;
|
||||
public byte OrderIndex;
|
||||
public byte GroupID;
|
||||
public byte CountTank;
|
||||
@@ -51,30 +51,30 @@ namespace Game.DataStorage
|
||||
public byte MinCountTank;
|
||||
public byte MinCountHealer;
|
||||
public byte MinCountDamage;
|
||||
public byte SubType;
|
||||
public byte Subtype;
|
||||
public byte MentorCharLevel;
|
||||
public int TextureFileDataID;
|
||||
public int RewardIconFileDataID;
|
||||
public int ProposalTextureFileDataID;
|
||||
public int IconTextureFileID;
|
||||
public int RewardsBgTextureFileID;
|
||||
public int PopupBgTextureFileID;
|
||||
|
||||
// Helpers
|
||||
public uint Entry() { return (uint)(Id + ((int)Type << 24)); }
|
||||
public uint Entry() { return (uint)(Id + ((int)TypeID << 24)); }
|
||||
}
|
||||
|
||||
public sealed class LightRecord
|
||||
{
|
||||
public uint Id;
|
||||
public Vector3 Pos;
|
||||
public float FalloffStart;
|
||||
public float FalloffEnd;
|
||||
public ushort MapID;
|
||||
public Vector3 GameCoords;
|
||||
public float GameFalloffStart;
|
||||
public float GameFalloffEnd;
|
||||
public ushort ContinentID;
|
||||
public ushort[] LightParamsID = new ushort[8];
|
||||
}
|
||||
|
||||
public sealed class LiquidTypeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public string Name;
|
||||
public string[] Texture = new string[6];
|
||||
public uint SpellID;
|
||||
public float MaxDarkenDepth;
|
||||
@@ -87,11 +87,11 @@ namespace Game.DataStorage
|
||||
public uint[] Int = new uint[4];
|
||||
public ushort Flags;
|
||||
public ushort LightID;
|
||||
public byte LiquidType;
|
||||
public byte SoundBank;
|
||||
public byte ParticleMovement;
|
||||
public byte ParticleTexSlots;
|
||||
public byte MaterialID;
|
||||
public byte[] DepthTexCount = new byte[6];
|
||||
public byte[] FrameCountTexture = new byte[6];
|
||||
public ushort SoundID;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@ namespace Game.DataStorage
|
||||
public LocalizedString MapName;
|
||||
public string MapDescription0; // Horde
|
||||
public string MapDescription1; // Alliance
|
||||
public string ShortDescription;
|
||||
public string LongDescription;
|
||||
public string PvpShortDescription;
|
||||
public string PvpLongDescription;
|
||||
public MapFlags[] Flags = new MapFlags[2];
|
||||
public float MinimapIconScale;
|
||||
public Vector2 CorpsePos; // entrance coordinates in ghost mode (in most cases = normal entrance)
|
||||
public Vector2 Corpse; // entrance coordinates in ghost mode (in most cases = normal entrance)
|
||||
public ushort AreaTableID;
|
||||
public ushort LoadingScreenID;
|
||||
public short CorpseMapID; // map_id of entrance map in ghost mode (continent always and in most cases = normal entrance)
|
||||
@@ -46,7 +46,7 @@ namespace Game.DataStorage
|
||||
public short CosmeticParentMapID;
|
||||
public ushort WindSettingsID;
|
||||
public MapTypes InstanceType;
|
||||
public byte unk5;
|
||||
public byte MapType;
|
||||
public byte ExpansionID;
|
||||
public byte MaxPlayers;
|
||||
public byte TimeOffset;
|
||||
@@ -76,8 +76,8 @@ namespace Game.DataStorage
|
||||
if (CorpseMapID < 0)
|
||||
return false;
|
||||
mapid = (uint)CorpseMapID;
|
||||
x = CorpsePos.X;
|
||||
y = CorpsePos.Y;
|
||||
x = Corpse.X;
|
||||
y = Corpse.Y;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -93,21 +93,21 @@ namespace Game.DataStorage
|
||||
public sealed class MapDifficultyRecord
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Message_lang; // m_message_lang (text showed when transfer to map failed)
|
||||
public LocalizedString Message; // m_message_lang (text showed when transfer to map failed)
|
||||
public byte DifficultyID;
|
||||
public byte RaidDurationType; // 1 means daily reset, 2 means weekly
|
||||
public byte ResetInterval; // 1 means daily reset, 2 means weekly
|
||||
public byte MaxPlayers; // m_maxPlayers some heroic versions have 0 when expected same amount as in normal version
|
||||
public byte LockID;
|
||||
public byte Flags;
|
||||
public byte ItemBonusTreeModID;
|
||||
public uint Context;
|
||||
public byte ItemContext;
|
||||
public uint ItemContextPickerID;
|
||||
public uint MapID;
|
||||
|
||||
public uint GetRaidDuration()
|
||||
{
|
||||
if (RaidDurationType == 1)
|
||||
if (ResetInterval == 1)
|
||||
return 86400;
|
||||
if (RaidDurationType == 2)
|
||||
if (ResetInterval == 2)
|
||||
return 604800;
|
||||
return 0;
|
||||
}
|
||||
@@ -116,10 +116,11 @@ namespace Game.DataStorage
|
||||
public sealed class ModifierTreeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint[] Asset = new uint[2];
|
||||
public uint Asset;
|
||||
public uint SecondaryAsset;
|
||||
public uint Parent;
|
||||
public byte Type;
|
||||
public byte Unk700;
|
||||
public byte TertiaryAsset;
|
||||
public byte Operator;
|
||||
public byte Amount;
|
||||
}
|
||||
@@ -128,14 +129,14 @@ namespace Game.DataStorage
|
||||
{
|
||||
public string Name;
|
||||
public string Description;
|
||||
public string SourceDescription;
|
||||
public uint SpellId;
|
||||
public float CameraPivotMultiplier;
|
||||
public ushort MountTypeId;
|
||||
public string SourceText;
|
||||
public uint SourceSpellID;
|
||||
public float MountFlyRideHeight;
|
||||
public ushort MountTypeID;
|
||||
public ushort Flags;
|
||||
public byte Source;
|
||||
public byte SourceTypeEnum;
|
||||
public uint Id;
|
||||
public uint PlayerConditionId;
|
||||
public uint PlayerConditionID;
|
||||
public byte UiModelSceneID;
|
||||
|
||||
public bool IsSelfMount() { return (Flags & (ushort)MountFlags.SelfMount) != 0; }
|
||||
@@ -143,14 +144,14 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class MountCapabilityRecord
|
||||
{
|
||||
public uint RequiredSpell;
|
||||
public uint SpeedModSpell;
|
||||
public ushort RequiredRidingSkill;
|
||||
public ushort RequiredArea;
|
||||
public short RequiredMap;
|
||||
public uint ReqSpellKnownID;
|
||||
public uint ModSpellAuraID;
|
||||
public ushort ReqRidingSkill;
|
||||
public ushort ReqAreaID;
|
||||
public short ReqMapID;
|
||||
public MountCapabilityFlags Flags;
|
||||
public uint Id;
|
||||
public byte RequiredAura;
|
||||
public byte ReqSpellAuraID;
|
||||
}
|
||||
|
||||
public sealed class MountTypeXCapabilityRecord
|
||||
@@ -164,7 +165,7 @@ namespace Game.DataStorage
|
||||
public sealed class MountXDisplayRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint DisplayID;
|
||||
public uint CreatureDisplayInfoID;
|
||||
public uint PlayerConditionID;
|
||||
public uint MountID;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace Game.DataStorage
|
||||
public sealed class NameGenRecord
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public byte Race;
|
||||
public string Name;
|
||||
public byte RaceID;
|
||||
public byte Sex;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace Game.DataStorage
|
||||
public sealed class OverrideSpellDataRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint[] SpellID = new uint[SharedConst.MaxOverrideSpell];
|
||||
public uint PlayerActionbarFileDataID;
|
||||
public uint[] Spells = new uint[SharedConst.MaxOverrideSpell];
|
||||
public uint PlayerActionBarFileDataID;
|
||||
public byte Flags;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Game.DataStorage
|
||||
public ushort MaxFactionID;
|
||||
public byte MaxReputation;
|
||||
public uint ReputationLogic;
|
||||
public byte Unknown1;
|
||||
public byte CurrentPvpFaction;
|
||||
public byte MinPVPRank;
|
||||
public byte MaxPVPRank;
|
||||
public byte PvpMedal;
|
||||
@@ -91,7 +91,7 @@ namespace Game.DataStorage
|
||||
public byte PowerTypeComp;
|
||||
public byte PowerTypeValue;
|
||||
public uint ModifierTreeID;
|
||||
public int MainHandItemSubclassMask;
|
||||
public int WeaponSubclassMask;
|
||||
public ushort[] SkillID = new ushort[4];
|
||||
public short[] MinSkill = new short[4];
|
||||
public short[] MaxSkill = new short[4];
|
||||
@@ -106,7 +106,7 @@ namespace Game.DataStorage
|
||||
public ushort[] Explored = new ushort[2];
|
||||
public uint[] Time = new uint[2];
|
||||
public uint[] AuraSpellID = new uint[4];
|
||||
public byte[] AuraCount = new byte[4];
|
||||
public byte[] AuraStacks = new byte[4];
|
||||
public ushort[] Achievement = new ushort[4];
|
||||
public byte[] LfgStatus = new byte[4];
|
||||
public byte[] LfgCompare = new byte[4];
|
||||
@@ -122,7 +122,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public uint GlobalStringBaseTag;
|
||||
public byte PowerType;
|
||||
public byte ActualType;
|
||||
public byte Red;
|
||||
public byte Green;
|
||||
public byte Blue;
|
||||
@@ -131,25 +131,25 @@ namespace Game.DataStorage
|
||||
public sealed class PowerTypeRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string PowerTypeToken;
|
||||
public string PowerCostToken;
|
||||
public float RegenerationPeace;
|
||||
public float RegenerationCombat;
|
||||
public short MaxPower;
|
||||
public ushort RegenerationDelay;
|
||||
public string NameGlobalStringTag;
|
||||
public string CostGlobalStringTag;
|
||||
public float RegenPeace;
|
||||
public float RegenCombat;
|
||||
public short MaxBasePower;
|
||||
public ushort RegenInterruptTimeMS;
|
||||
public ushort Flags;
|
||||
public PowerType PowerTypeEnum;
|
||||
public sbyte RegenerationMin;
|
||||
public sbyte RegenerationCenter;
|
||||
public sbyte RegenerationMax;
|
||||
public byte UIModifier;
|
||||
public sbyte MinPower;
|
||||
public sbyte CenterPower;
|
||||
public sbyte DefaultPower;
|
||||
public sbyte DisplayModifier;
|
||||
}
|
||||
|
||||
public sealed class PrestigeLevelInfoRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string PrestigeText;
|
||||
public uint IconID;
|
||||
public string Name;
|
||||
public uint BadgeTextureFileDataID;
|
||||
public byte PrestigeLevel;
|
||||
public PrestigeLevelInfoFlags Flags;
|
||||
|
||||
@@ -159,27 +159,27 @@ namespace Game.DataStorage
|
||||
public sealed class PvpDifficultyRecord
|
||||
{
|
||||
public uint Id;
|
||||
public byte BracketID;
|
||||
public byte RangeIndex;
|
||||
public byte MinLevel;
|
||||
public byte MaxLevel;
|
||||
public uint MapID;
|
||||
|
||||
// helpers
|
||||
public BattlegroundBracketId GetBracketId() { return (BattlegroundBracketId)BracketID; }
|
||||
public BattlegroundBracketId GetBracketId() { return (BattlegroundBracketId)RangeIndex; }
|
||||
}
|
||||
|
||||
public sealed class PvpItemRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint ItemID;
|
||||
public byte ItemLevelBonus;
|
||||
public byte ItemLevelDelta;
|
||||
}
|
||||
|
||||
public sealed class PvpRewardRecord
|
||||
{
|
||||
public uint Id;
|
||||
public byte HonorLevel;
|
||||
public byte Prestige;
|
||||
public byte PrestigeLevel;
|
||||
public ushort RewardPackID;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace Game.DataStorage
|
||||
public LocalizedString Description;
|
||||
public uint SpellID;
|
||||
public uint OverridesSpellID;
|
||||
public int ExtraSpellID;
|
||||
public int ActionBarSpellID;
|
||||
public int TierID;
|
||||
public byte ColumnIndex;
|
||||
public byte Flags;
|
||||
|
||||
@@ -22,29 +22,29 @@ namespace Game.DataStorage
|
||||
public sealed class QuestFactionRewardRecord
|
||||
{
|
||||
public uint Id;
|
||||
public short[] QuestRewFactionValue = new short[10];
|
||||
public short[] Difficulty = new short[10];
|
||||
}
|
||||
|
||||
public sealed class QuestMoneyRewardRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint[] Money = new uint[10];
|
||||
public uint[] Difficulty = new uint[10];
|
||||
}
|
||||
|
||||
public sealed class QuestPackageItemRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint ItemID;
|
||||
public ushort QuestPackageID;
|
||||
public QuestPackageFilter FilterType;
|
||||
public byte ItemCount;
|
||||
public ushort PackageID;
|
||||
public QuestPackageFilter DisplayType;
|
||||
public byte ItemQuantity;
|
||||
}
|
||||
|
||||
public sealed class QuestSortRecord
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString SortName;
|
||||
public byte SortOrder;
|
||||
public byte UiOrderIndex;
|
||||
}
|
||||
|
||||
public sealed class QuestV2Record
|
||||
@@ -56,6 +56,6 @@ namespace Game.DataStorage
|
||||
public sealed class QuestXPRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort[] Exp = new ushort[10];
|
||||
public ushort[] Difficulty = new ushort[10];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ namespace Game.DataStorage
|
||||
public sealed class RandPropPointsRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint[] EpicPropertiesPoints = new uint[5];
|
||||
public uint[] RarePropertiesPoints = new uint[5];
|
||||
public uint[] UncommonPropertiesPoints = new uint[5];
|
||||
public uint[] Epic = new uint[5];
|
||||
public uint[] Superior = new uint[5];
|
||||
public uint[] Good = new uint[5];
|
||||
}
|
||||
|
||||
public sealed class RewardPackRecord
|
||||
@@ -31,16 +31,16 @@ namespace Game.DataStorage
|
||||
public uint Money;
|
||||
public float ArtifactXPMultiplier;
|
||||
public byte ArtifactXPDifficulty;
|
||||
public byte ArtifactCategoryID;
|
||||
public ushort TitleID;
|
||||
public ushort Unused;
|
||||
public byte ArtifactXPCategoryID;
|
||||
public ushort CharTitleID;
|
||||
public ushort TreasurePickerID;
|
||||
}
|
||||
|
||||
public sealed class RewardPackXItemRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint ItemID;
|
||||
public uint Amount;
|
||||
public uint ItemQuantity;
|
||||
public uint RewardPackID;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Game.DataStorage
|
||||
public sealed class ScalingStatDistributionRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort ItemLevelCurveID;
|
||||
public ushort PlayerLevelToItemLevelCurveID;
|
||||
public byte MinLevel;
|
||||
public uint MaxLevel;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public ushort Data; // Seems to indicate different things, for zone invasions, this is the area id
|
||||
public ushort AreaTableID;
|
||||
public byte Flags;
|
||||
public byte Type;
|
||||
}
|
||||
@@ -50,14 +50,14 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Description;
|
||||
public LocalizedString Name;
|
||||
public LocalizedString Title;
|
||||
public ushort ScenarioID;
|
||||
public ushort PreviousStepID; // Used in conjunction with Proving Grounds scenarios, when sequencing steps (Not using step order?)
|
||||
public ushort QuestRewardID;
|
||||
public byte Step;
|
||||
public ushort Supersedes; // Used in conjunction with Proving Grounds scenarios, when sequencing steps (Not using step order?)
|
||||
public ushort RewardQuestID;
|
||||
public byte OrderIndex;
|
||||
public ScenarioStepFlags Flags;
|
||||
public ushort CriteriaTreeID;
|
||||
public byte BonusRequiredStepID; // Bonus step can only be completed if scenario is in the step specified in this field
|
||||
public ushort CriteriaTreeId;
|
||||
public byte RelatedStep; // Bonus step can only be completed if scenario is in the step specified in this field
|
||||
|
||||
// helpers
|
||||
public bool IsBonusObjective()
|
||||
@@ -69,8 +69,8 @@ namespace Game.DataStorage
|
||||
public sealed class SceneScriptRecord
|
||||
{
|
||||
public uint Id;
|
||||
public ushort PrevScriptId;
|
||||
public ushort NextScriptId;
|
||||
public ushort FirstSceneScriptID;
|
||||
public ushort NextSceneScriptID;
|
||||
}
|
||||
|
||||
public sealed class SceneScriptGlobalTextRecord
|
||||
@@ -102,15 +102,15 @@ namespace Game.DataStorage
|
||||
public ushort Flags;
|
||||
public SkillCategory CategoryID;
|
||||
public byte CanLink;
|
||||
public uint IconFileDataID;
|
||||
public uint SpellIconFileID;
|
||||
public byte ParentSkillLineID;
|
||||
}
|
||||
|
||||
public sealed class SkillLineAbilityRecord
|
||||
{
|
||||
public ulong RaceMask;
|
||||
public long RaceMask;
|
||||
public uint Id;
|
||||
public uint SpellID;
|
||||
public uint Spell;
|
||||
public uint SupercedesSpell;
|
||||
public ushort SkillLine;
|
||||
public ushort TrivialSkillLineRankHigh;
|
||||
@@ -153,7 +153,7 @@ namespace Game.DataStorage
|
||||
public float PitchVariationMinus;
|
||||
public float PitchAdjust;
|
||||
public ushort BusOverwriteID;
|
||||
public byte Unk700;
|
||||
public byte MaxInstances;
|
||||
}
|
||||
|
||||
public sealed class SpecializationSpellsRecord
|
||||
@@ -162,7 +162,7 @@ namespace Game.DataStorage
|
||||
public uint SpellID;
|
||||
public uint OverridesSpellID;
|
||||
public ushort SpecID;
|
||||
public byte OrderIndex;
|
||||
public byte DisplayOrder;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
@@ -206,9 +206,9 @@ namespace Game.DataStorage
|
||||
public sealed class SpellCastTimesRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int CastTime;
|
||||
public int MinCastTime;
|
||||
public short CastTimePerLevel;
|
||||
public int Base;
|
||||
public int Minimum;
|
||||
public short PerLevel;
|
||||
}
|
||||
|
||||
public sealed class SpellCastingRequirementsRecord
|
||||
@@ -245,7 +245,7 @@ namespace Game.DataStorage
|
||||
public SpellCategoryFlags Flags;
|
||||
public byte UsesPerWeek;
|
||||
public byte MaxCharges;
|
||||
public byte ChargeCategoryType;
|
||||
public byte TypeMask;
|
||||
}
|
||||
|
||||
public sealed class SpellClassOptionsRecord
|
||||
@@ -297,16 +297,14 @@ namespace Game.DataStorage
|
||||
public float EffectPosFacing;
|
||||
public uint EffectAttributes;
|
||||
public float BonusCoefficientFromAP;
|
||||
public float PvPMultiplier;
|
||||
public float PvpMultiplier;
|
||||
public float Coefficient;
|
||||
public float Variance;
|
||||
public float ResourceCoefficient;
|
||||
public float GroupSizeCoefficient;
|
||||
public float GroupSizeBasePointsCoefficient;
|
||||
public FlagArray128 EffectSpellClassMask;
|
||||
public int EffectMiscValue;
|
||||
public int EffectMiscValueB;
|
||||
public uint EffectRadiusIndex;
|
||||
public uint EffectRadiusMaxIndex;
|
||||
public int[] EffectMiscValue = new int[2];
|
||||
public uint[] EffectRadiusIndex = new uint[2];
|
||||
public uint[] ImplicitTarget = new uint[2];
|
||||
public uint SpellID;
|
||||
}
|
||||
@@ -315,8 +313,8 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public uint SpellID;
|
||||
public int EquippedItemInventoryTypeMask;
|
||||
public int EquippedItemSubClassMask;
|
||||
public int EquippedItemInvTypes;
|
||||
public int EquippedItemSubclass;
|
||||
public sbyte EquippedItemClass;
|
||||
}
|
||||
|
||||
@@ -340,10 +338,10 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public string Name;
|
||||
public uint[] EffectSpellID = new uint[ItemConst.MaxItemEnchantmentEffects];
|
||||
public uint[] EffectArg = new uint[ItemConst.MaxItemEnchantmentEffects];
|
||||
public float[] EffectScalingPoints = new float[ItemConst.MaxItemEnchantmentEffects];
|
||||
public uint TransmogCost;
|
||||
public uint TextureFileDataID;
|
||||
public uint IconFileDataID;
|
||||
public ushort[] EffectPointsMin = new ushort[ItemConst.MaxItemEnchantmentEffects];
|
||||
public ushort ItemVisual;
|
||||
public EnchantmentSlotMask Flags;
|
||||
@@ -357,25 +355,25 @@ namespace Game.DataStorage
|
||||
public byte MaxLevel;
|
||||
public sbyte ScalingClass;
|
||||
public sbyte ScalingClassRestricted;
|
||||
public ushort PlayerConditionID;
|
||||
public ushort TransmogPlayerConditionID;
|
||||
}
|
||||
|
||||
public sealed class SpellItemEnchantmentConditionRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint[] LTOperand = new uint[5];
|
||||
public byte[] LTOperandType = new byte[5];
|
||||
public uint[] LtOperand = new uint[5];
|
||||
public byte[] LtOperandType = new byte[5];
|
||||
public byte[] Operator = new byte[5];
|
||||
public byte[] RTOperandType = new byte[5];
|
||||
public byte[] RTOperand = new byte[5];
|
||||
public byte[] RtOperandType = new byte[5];
|
||||
public byte[] RtOperand = new byte[5];
|
||||
public byte[] Logic = new byte[5];
|
||||
}
|
||||
|
||||
public sealed class SpellLearnSpellRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint LearnSpellID;
|
||||
public uint SpellID;
|
||||
public uint LearnSpellID;
|
||||
public uint OverridesSpellID;
|
||||
}
|
||||
|
||||
@@ -386,7 +384,7 @@ namespace Game.DataStorage
|
||||
public ushort MaxLevel;
|
||||
public ushort SpellLevel;
|
||||
public byte DifficultyID;
|
||||
public byte MaxUsableLevel;
|
||||
public byte MaxPassiveAuraLevel;
|
||||
public uint SpellID;
|
||||
}
|
||||
|
||||
@@ -397,51 +395,38 @@ namespace Game.DataStorage
|
||||
public ushort DurationIndex;
|
||||
public ushort RangeIndex;
|
||||
public byte SchoolMask;
|
||||
public uint IconFileDataID;
|
||||
public uint SpellIconFileDataID;
|
||||
public float Speed;
|
||||
public uint ActiveIconFileDataID;
|
||||
public float MultistrikeSpeedMod;
|
||||
public float LaunchDelay;
|
||||
public byte DifficultyID;
|
||||
public uint Attributes;
|
||||
public uint AttributesEx;
|
||||
public uint AttributesExB;
|
||||
public uint AttributesExC;
|
||||
public uint AttributesExD;
|
||||
public uint AttributesExE;
|
||||
public uint AttributesExF;
|
||||
public uint AttributesExG;
|
||||
public uint AttributesExH;
|
||||
public uint AttributesExI;
|
||||
public uint AttributesExJ;
|
||||
public uint AttributesExK;
|
||||
public uint AttributesExL;
|
||||
public uint AttributesExM;
|
||||
public uint[] Attributes = new uint[14];
|
||||
public uint SpellID;
|
||||
}
|
||||
|
||||
public sealed class SpellPowerRecord
|
||||
{
|
||||
public int ManaCost;
|
||||
public float ManaCostPercentage;
|
||||
public float ManaCostPercentagePerSecond;
|
||||
public uint RequiredAura;
|
||||
public float HealthCostPercentage;
|
||||
public byte PowerIndex;
|
||||
public float PowerCostPct;
|
||||
public float PowerPctPerSecond;
|
||||
public uint RequiredAuraSpellID;
|
||||
public float PowerCostMaxPct;
|
||||
public byte OrderIndex;
|
||||
public PowerType PowerType;
|
||||
public uint Id;
|
||||
public byte ManaCostPerLevel;
|
||||
public ushort ManaCostPerSecond;
|
||||
public int ManaCostAdditional; // Spell uses [ManaCost, ManaCost+ManaCostAdditional] power - affects tooltip parsing as multiplier on SpellEffectEntry::EffectPointsPerResource
|
||||
public ushort ManaPerSecond;
|
||||
public int OptionalCost; // Spell uses [ManaCost, ManaCost+ManaCostAdditional] power - affects tooltip parsing as multiplier on SpellEffectEntry::EffectPointsPerResource
|
||||
// only SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE, SPELL_EFFECT_NORMALIZED_WEAPON_DMG
|
||||
public uint PowerDisplayID;
|
||||
public uint UnitPowerBarID;
|
||||
public uint AltPowerBarID;
|
||||
public uint SpellID;
|
||||
}
|
||||
|
||||
public sealed class SpellPowerDifficultyRecord
|
||||
{
|
||||
public byte DifficultyID;
|
||||
public byte PowerIndex;
|
||||
public byte OrderIndex;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
@@ -475,10 +460,8 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public string DisplayName;
|
||||
public string DisplayNameShort;
|
||||
public float MinRangeHostile;
|
||||
public float MinRangeFriend;
|
||||
public float MaxRangeHostile;
|
||||
public float MaxRangeFriend;
|
||||
public float[] RangeMin = new float[2];
|
||||
public float[] RangeMax = new float[2];
|
||||
public SpellRangeFlag Flags;
|
||||
}
|
||||
|
||||
@@ -495,7 +478,7 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public uint SpellID;
|
||||
public ushort ScalesFromItemLevel;
|
||||
public byte ScalingClass;
|
||||
public byte Class;
|
||||
public byte MinScalingLevel;
|
||||
public uint MaxScalingLevel;
|
||||
}
|
||||
@@ -513,13 +496,13 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public float WeaponDamageVariance;
|
||||
public float DamageVariance;
|
||||
public SpellShapeshiftFormFlags Flags;
|
||||
public ushort CombatRoundTime;
|
||||
public ushort MountTypeID;
|
||||
public sbyte CreatureType;
|
||||
public byte BonusActionBar;
|
||||
public uint AttackIconFileDataID;
|
||||
public uint AttackIconFileID;
|
||||
public ushort[] CreatureDisplayID = new ushort[4];
|
||||
public ushort[] PresetSpellID = new ushort[SpellConst.MaxShapeshift];
|
||||
}
|
||||
@@ -527,12 +510,12 @@ namespace Game.DataStorage
|
||||
public sealed class SpellTargetRestrictionsRecord
|
||||
{
|
||||
public uint Id;
|
||||
public float ConeAngle;
|
||||
public float ConeDegrees;
|
||||
public float Width;
|
||||
public uint Targets;
|
||||
public ushort TargetCreatureType;
|
||||
public byte DifficultyID;
|
||||
public byte MaxAffectedTargets;
|
||||
public byte MaxTargets;
|
||||
public uint MaxTargetLevel;
|
||||
public uint SpellID;
|
||||
}
|
||||
@@ -549,13 +532,13 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint SpellVisualID;
|
||||
public uint Id;
|
||||
public float Chance;
|
||||
public float Probability;
|
||||
public ushort CasterPlayerConditionID;
|
||||
public ushort CasterUnitConditionID;
|
||||
public ushort PlayerConditionID;
|
||||
public ushort UnitConditionID;
|
||||
public uint IconFileDataID;
|
||||
public uint ActiveIconFileDataID;
|
||||
public ushort ViewerPlayerConditionID;
|
||||
public ushort ViewerUnitConditionID;
|
||||
public uint SpellIconFileID;
|
||||
public uint ActiveIconFileID;
|
||||
public byte Flags;
|
||||
public byte DifficultyID;
|
||||
public byte Priority;
|
||||
@@ -566,9 +549,9 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public uint Flags;
|
||||
public SummonCategory Category;
|
||||
public SummonCategory Control;
|
||||
public ushort Faction;
|
||||
public SummonType Type;
|
||||
public SummonType Title;
|
||||
public byte Slot;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,20 +47,20 @@ namespace Game.DataStorage
|
||||
public Vector3 Pos;
|
||||
public uint[] MountCreatureID = new uint[2];
|
||||
public Vector2 MapOffset;
|
||||
public float Unk730;
|
||||
public float Facing;
|
||||
public Vector2 FlightMapOffset;
|
||||
public ushort MapID;
|
||||
public ushort ContinentID;
|
||||
public ushort ConditionID;
|
||||
public ushort LearnableIndex;
|
||||
public ushort CharacterBitNumber;
|
||||
public TaxiNodeFlags Flags;
|
||||
public int UiTextureKitPrefixID;
|
||||
public uint SpecialAtlasIconPlayerConditionID;
|
||||
public int UiTextureKitID;
|
||||
public uint SpecialIconConditionID;
|
||||
}
|
||||
|
||||
public sealed class TaxiPathRecord
|
||||
{
|
||||
public ushort From;
|
||||
public ushort To;
|
||||
public ushort FromTaxiNode;
|
||||
public ushort ToTaxiNode;
|
||||
public uint Id;
|
||||
public uint Cost;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public Vector3 Loc;
|
||||
public ushort PathID;
|
||||
public ushort MapID;
|
||||
public ushort ContinentID;
|
||||
public byte NodeIndex;
|
||||
public uint Id;
|
||||
public TaxiPathNodeFlags Flags;
|
||||
@@ -82,34 +82,34 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public uint CategoryMask;
|
||||
public byte CategoryType;
|
||||
public uint TotemCategoryMask;
|
||||
public byte TotemCategoryType;
|
||||
}
|
||||
|
||||
public sealed class ToyRecord
|
||||
{
|
||||
public LocalizedString Description;
|
||||
public LocalizedString SourceText;
|
||||
public uint ItemID;
|
||||
public byte Flags;
|
||||
public byte CategoryFilter;
|
||||
public byte SourceTypeEnum;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
public sealed class TransmogHolidayRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int HolidayID;
|
||||
public int RequiredTransmogHoliday;
|
||||
}
|
||||
|
||||
public sealed class TransmogSetRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public ushort BaseSetID;
|
||||
public ushort ParentTransmogSetID;
|
||||
public ushort UIOrder;
|
||||
public byte ExpansionID;
|
||||
public uint Id;
|
||||
public byte Flags;
|
||||
public int QuestID;
|
||||
public int TrackingQuestID;
|
||||
public int ClassMask;
|
||||
public int ItemNameDescriptionID;
|
||||
public byte TransmogSetGroupID;
|
||||
@@ -117,7 +117,7 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class TransmogSetGroupRecord
|
||||
{
|
||||
public LocalizedString Label;
|
||||
public LocalizedString Name;
|
||||
public uint Id;
|
||||
}
|
||||
|
||||
@@ -142,10 +142,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public uint TimeIndex;
|
||||
public float X;
|
||||
public float Y;
|
||||
public float Z;
|
||||
public float W;
|
||||
public uint TransportID;
|
||||
public float[] Rot = new float[4];
|
||||
public uint GameObjectsID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,14 +40,16 @@ namespace Game.DataStorage
|
||||
public ushort VehicleUIIndicatorID;
|
||||
public ushort[] PowerDisplayID = new ushort[3];
|
||||
public byte FlagsB;
|
||||
public byte UILocomotionType;
|
||||
public byte UiLocomotionType;
|
||||
public ushort MissileTargetingID;
|
||||
}
|
||||
|
||||
public sealed class VehicleSeatRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint[] Flags = new uint[3];
|
||||
public VehicleSeatFlags Flags;
|
||||
public VehicleSeatFlagsB FlagsB;
|
||||
public uint FlagsC;
|
||||
public Vector3 AttachmentOffset;
|
||||
public float EnterPreDelay;
|
||||
public float EnterSpeed;
|
||||
@@ -78,7 +80,7 @@ namespace Game.DataStorage
|
||||
public float CameraEnteringZoom;
|
||||
public float CameraSeatZoomMin;
|
||||
public float CameraSeatZoomMax;
|
||||
public uint UISkinFileDataID;
|
||||
public uint UiSkinFileDataID;
|
||||
public short EnterAnimStart;
|
||||
public short EnterAnimLoop;
|
||||
public short RideAnimStart;
|
||||
@@ -110,17 +112,17 @@ namespace Game.DataStorage
|
||||
|
||||
public bool CanEnterOrExit()
|
||||
{
|
||||
return (Flags[0].HasAnyFlag((uint)VehicleSeatFlags.CanEnterOrExit) ||
|
||||
return (Flags.HasAnyFlag(VehicleSeatFlags.CanEnterOrExit) ||
|
||||
//If it has anmation for enter/ride, means it can be entered/exited by logic
|
||||
Flags[0].HasAnyFlag((uint)VehicleSeatFlags.HasLowerAnimForEnter | (uint)VehicleSeatFlags.HasLowerAnimForRide));
|
||||
Flags.HasAnyFlag(VehicleSeatFlags.HasLowerAnimForEnter | VehicleSeatFlags.HasLowerAnimForRide));
|
||||
}
|
||||
public bool CanSwitchFromSeat() { return Flags[0].HasAnyFlag((uint)VehicleSeatFlags.CanSwitch); }
|
||||
public bool CanSwitchFromSeat() { return Flags.HasAnyFlag(VehicleSeatFlags.CanSwitch); }
|
||||
public bool IsUsableByOverride()
|
||||
{
|
||||
return Flags[0].HasAnyFlag((uint)VehicleSeatFlags.Uncontrolled | (uint)VehicleSeatFlags.Unk18)
|
||||
|| Flags[1].HasAnyFlag((uint)VehicleSeatFlagsB.UsableForced | (uint)VehicleSeatFlagsB.UsableForced2 |
|
||||
(uint)VehicleSeatFlagsB.UsableForced3 | (uint)VehicleSeatFlagsB.UsableForced4);
|
||||
return Flags.HasAnyFlag(VehicleSeatFlags.Uncontrolled | VehicleSeatFlags.Unk18)
|
||||
|| FlagsB.HasAnyFlag(VehicleSeatFlagsB.UsableForced | VehicleSeatFlagsB.UsableForced2 |
|
||||
VehicleSeatFlagsB.UsableForced3 | VehicleSeatFlagsB.UsableForced4);
|
||||
}
|
||||
public bool IsEjectable() { return Flags[1].HasAnyFlag((uint)VehicleSeatFlagsB.Ejectable); }
|
||||
public bool IsEjectable() { return FlagsB.HasAnyFlag(VehicleSeatFlagsB.Ejectable); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,20 +23,20 @@ namespace Game.DataStorage
|
||||
public sealed class WMOAreaTableRecord
|
||||
{
|
||||
public string AreaName;
|
||||
public int WMOGroupID; // used in group WMO
|
||||
public int WmoGroupID; // used in group WMO
|
||||
public ushort AmbienceID;
|
||||
public ushort ZoneMusic;
|
||||
public ushort IntroSound;
|
||||
public ushort AreaTableID;
|
||||
public ushort UWIntroSound;
|
||||
public ushort UWAmbience;
|
||||
public sbyte NameSet; // used in adt file
|
||||
public ushort UwIntroSound;
|
||||
public ushort UwAmbience;
|
||||
public sbyte NameSetID; // used in adt file
|
||||
public byte SoundProviderPref;
|
||||
public byte SoundProviderPrefUnderwater;
|
||||
public byte Flags;
|
||||
public uint Id;
|
||||
public byte UWZoneMusic;
|
||||
public uint WMOID; // used in root WMO
|
||||
public byte UwZoneMusic;
|
||||
public uint WmoID; // used in root WMO
|
||||
}
|
||||
|
||||
public sealed class WorldEffectRecord
|
||||
@@ -66,9 +66,9 @@ namespace Game.DataStorage
|
||||
public byte LevelRangeMin;
|
||||
public byte LevelRangeMax;
|
||||
public byte BountySetID;
|
||||
public byte BountyBoardLocation;
|
||||
public byte BountyDisplayLocation;
|
||||
public uint Id;
|
||||
public uint PlayerConditionID;
|
||||
public uint VisibilityPlayerConditionID;
|
||||
}
|
||||
|
||||
public sealed class WorldMapOverlayRecord
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace Game.DungeonFinding
|
||||
// Initialize Dungeon map with data from dbcs
|
||||
foreach (var dungeon in CliDB.LFGDungeonsStorage.Values)
|
||||
{
|
||||
switch (dungeon.Type)
|
||||
switch (dungeon.TypeID)
|
||||
{
|
||||
case LfgType.Dungeon:
|
||||
case LfgType.Raid:
|
||||
@@ -2151,8 +2151,8 @@ namespace Game.DungeonFinding
|
||||
id = dbc.Id;
|
||||
name = dbc.Name[Global.WorldMgr.GetDefaultDbcLocale()];
|
||||
map = (uint)dbc.MapID;
|
||||
type = dbc.Type;
|
||||
expansion = dbc.Expansion;
|
||||
type = dbc.TypeID;
|
||||
expansion = dbc.ExpansionLevel;
|
||||
group = dbc.GroupID;
|
||||
minlevel = dbc.MinLevel;
|
||||
maxlevel = dbc.MaxLevel;
|
||||
|
||||
@@ -2164,8 +2164,8 @@ namespace Game.Entities
|
||||
uint modelId = m_goInfo.displayId;
|
||||
DestructibleModelDataRecord modelData = CliDB.DestructibleModelDataStorage.LookupByKey(m_goInfo.DestructibleBuilding.DestructibleModelRec);
|
||||
if (modelData != null)
|
||||
if (modelData.StateDamagedDisplayID != 0)
|
||||
modelId = modelData.StateDamagedDisplayID;
|
||||
if (modelData.State0Wmo != 0)
|
||||
modelId = modelData.State0Wmo;
|
||||
SetDisplayId(modelId);
|
||||
|
||||
if (setHealth)
|
||||
@@ -2196,8 +2196,8 @@ namespace Game.Entities
|
||||
uint modelId = m_goInfo.displayId;
|
||||
DestructibleModelDataRecord modelData = CliDB.DestructibleModelDataStorage.LookupByKey(m_goInfo.DestructibleBuilding.DestructibleModelRec);
|
||||
if (modelData != null)
|
||||
if (modelData.StateDestroyedDisplayID != 0)
|
||||
modelId = modelData.StateDestroyedDisplayID;
|
||||
if (modelData.State1Wmo != 0)
|
||||
modelId = modelData.State1Wmo;
|
||||
SetDisplayId(modelId);
|
||||
|
||||
if (setHealth)
|
||||
@@ -2216,8 +2216,8 @@ namespace Game.Entities
|
||||
uint modelId = m_goInfo.displayId;
|
||||
DestructibleModelDataRecord modelData = CliDB.DestructibleModelDataStorage.LookupByKey(m_goInfo.DestructibleBuilding.DestructibleModelRec);
|
||||
if (modelData != null)
|
||||
if (modelData.StateRebuildingDisplayID != 0)
|
||||
modelId = modelData.StateRebuildingDisplayID;
|
||||
if (modelData.State2Wmo != 0)
|
||||
modelId = modelData.State2Wmo;
|
||||
SetDisplayId(modelId);
|
||||
|
||||
// restores to full health
|
||||
|
||||
@@ -103,13 +103,13 @@ namespace Game.Entities
|
||||
if (itemProto.GetArtifactID() != artifactAppearanceSet.ArtifactID)
|
||||
continue;
|
||||
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(artifactAppearance.PlayerConditionID);
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(artifactAppearance.UnlockPlayerConditionID);
|
||||
if (playerCondition != null)
|
||||
if (!owner || !ConditionManager.IsPlayerMeetingCondition(owner, playerCondition))
|
||||
continue;
|
||||
|
||||
SetModifier(ItemModifier.ArtifactAppearanceId, artifactAppearance.Id);
|
||||
SetAppearanceModId(artifactAppearance.AppearanceModID);
|
||||
SetAppearanceModId(artifactAppearance.ItemAppearanceModifierID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -546,7 +546,7 @@ namespace Game.Entities
|
||||
SetModifier(ItemModifier.ArtifactAppearanceId, artifactAppearanceId);
|
||||
ArtifactAppearanceRecord artifactAppearance = CliDB.ArtifactAppearanceStorage.LookupByKey(artifactAppearanceId);
|
||||
if (artifactAppearance != null)
|
||||
SetAppearanceModId(artifactAppearance.AppearanceModID);
|
||||
SetAppearanceModId(artifactAppearance.ItemAppearanceModifierID);
|
||||
|
||||
byte totalPurchasedRanks = 0;
|
||||
foreach (ItemDynamicFieldArtifactPowers power in powers)
|
||||
@@ -565,22 +565,22 @@ namespace Game.Entities
|
||||
switch (enchant.Effect[i])
|
||||
{
|
||||
case ItemEnchantmentType.ArtifactPowerBonusRankByType:
|
||||
if (artifactPower.RelicType == enchant.EffectSpellID[i])
|
||||
if (artifactPower.Label == enchant.EffectArg[i])
|
||||
power.CurrentRankWithBonus += (byte)enchant.EffectPointsMin[i];
|
||||
break;
|
||||
case ItemEnchantmentType.ArtifactPowerBonusRankByID:
|
||||
if (artifactPower.Id == enchant.EffectSpellID[i])
|
||||
if (artifactPower.Id == enchant.EffectArg[i])
|
||||
power.CurrentRankWithBonus += (byte)enchant.EffectPointsMin[i];
|
||||
break;
|
||||
case ItemEnchantmentType.ArtifactPowerBonusRankPicker:
|
||||
if (_bonusData.GemRelicType[e - EnchantmentSlot.Sock1] != -1)
|
||||
{
|
||||
ArtifactPowerPickerRecord artifactPowerPicker = CliDB.ArtifactPowerPickerStorage.LookupByKey(enchant.EffectSpellID[i]);
|
||||
ArtifactPowerPickerRecord artifactPowerPicker = CliDB.ArtifactPowerPickerStorage.LookupByKey(enchant.EffectArg[i]);
|
||||
if (artifactPowerPicker != null)
|
||||
{
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(artifactPowerPicker.PlayerConditionID);
|
||||
if (playerCondition == null || ConditionManager.IsPlayerMeetingCondition(owner, playerCondition))
|
||||
if (artifactPower.RelicType == _bonusData.GemRelicType[e - EnchantmentSlot.Sock1])
|
||||
if (artifactPower.Label == _bonusData.GemRelicType[e - EnchantmentSlot.Sock1])
|
||||
power.CurrentRankWithBonus += (byte)enchant.EffectPointsMin[i];
|
||||
}
|
||||
}
|
||||
@@ -1010,7 +1010,7 @@ namespace Game.Entities
|
||||
GemPropertiesRecord gemProperties = CliDB.GemPropertiesStorage.LookupByKey(gemTemplate.GetGemProperties());
|
||||
if (gemProperties != null)
|
||||
{
|
||||
SpellItemEnchantmentRecord gemEnchant = CliDB.SpellItemEnchantmentStorage.LookupByKey(gemProperties.EnchantID);
|
||||
SpellItemEnchantmentRecord gemEnchant = CliDB.SpellItemEnchantmentStorage.LookupByKey(gemProperties.EnchantId);
|
||||
if (gemEnchant != null)
|
||||
{
|
||||
BonusData gemBonus = new BonusData(gemTemplate);
|
||||
@@ -1029,7 +1029,7 @@ namespace Game.Entities
|
||||
ScalingStatDistributionRecord ssd = CliDB.ScalingStatDistributionStorage.LookupByKey(gemBonus.ScalingStatDistribution);
|
||||
if (ssd != null)
|
||||
{
|
||||
uint scaledIlvl = (uint)Global.DB2Mgr.GetCurveValueAt(ssd.ItemLevelCurveID, gemScalingLevel);
|
||||
uint scaledIlvl = (uint)Global.DB2Mgr.GetCurveValueAt(ssd.PlayerLevelToItemLevelCurveID, gemScalingLevel);
|
||||
if (scaledIlvl != 0)
|
||||
gemBaseItemLevel = scaledIlvl;
|
||||
}
|
||||
@@ -1042,7 +1042,7 @@ namespace Game.Entities
|
||||
{
|
||||
case ItemEnchantmentType.BonusListID:
|
||||
{
|
||||
var bonusesEffect = Global.DB2Mgr.GetItemBonusList(gemEnchant.EffectSpellID[i]);
|
||||
var bonusesEffect = Global.DB2Mgr.GetItemBonusList(gemEnchant.EffectArg[i]);
|
||||
if (bonusesEffect != null)
|
||||
{
|
||||
foreach (ItemBonusRecord itemBonus in bonusesEffect)
|
||||
@@ -1600,7 +1600,7 @@ namespace Game.Entities
|
||||
if (basePrice == null)
|
||||
return 0;
|
||||
|
||||
float qualityFactor = qualityPrice.Factor;
|
||||
float qualityFactor = qualityPrice.Data;
|
||||
float baseFactor = 0.0f;
|
||||
|
||||
var inventoryType = proto.GetInventoryType();
|
||||
@@ -1612,9 +1612,9 @@ namespace Game.Entities
|
||||
inventoryType == InventoryType.Ranged ||
|
||||
inventoryType == InventoryType.Thrown ||
|
||||
inventoryType == InventoryType.RangedRight)
|
||||
baseFactor = basePrice.WeaponFactor;
|
||||
baseFactor = basePrice.Weapon;
|
||||
else
|
||||
baseFactor = basePrice.ArmorFactor;
|
||||
baseFactor = basePrice.Armor;
|
||||
|
||||
if (inventoryType == InventoryType.Robe)
|
||||
inventoryType = InventoryType.Chest;
|
||||
@@ -1622,7 +1622,7 @@ namespace Game.Entities
|
||||
if (proto.GetClass() == ItemClass.Gem && (ItemSubClassGem)proto.GetSubClass() == ItemSubClassGem.ArtifactRelic)
|
||||
{
|
||||
inventoryType = InventoryType.Weapon;
|
||||
baseFactor = basePrice.WeaponFactor / 3.0f;
|
||||
baseFactor = basePrice.Weapon / 3.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -1653,16 +1653,16 @@ namespace Game.Entities
|
||||
{
|
||||
case ItemSubClassArmor.Miscellaneous:
|
||||
case ItemSubClassArmor.Cloth:
|
||||
typeFactor = armorPrice.ClothFactor;
|
||||
typeFactor = armorPrice.ClothModifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Leather:
|
||||
typeFactor = armorPrice.LeatherFactor;
|
||||
typeFactor = armorPrice.LeatherModifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Mail:
|
||||
typeFactor = armorPrice.MailFactor;
|
||||
typeFactor = armorPrice.ChainModifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Plate:
|
||||
typeFactor = armorPrice.PlateFactor;
|
||||
typeFactor = armorPrice.PlateModifier;
|
||||
break;
|
||||
default:
|
||||
typeFactor = 1.0f;
|
||||
@@ -1677,7 +1677,7 @@ namespace Game.Entities
|
||||
if (shieldPrice == null)
|
||||
return 0;
|
||||
|
||||
typeFactor = shieldPrice.Factor;
|
||||
typeFactor = shieldPrice.Data;
|
||||
break;
|
||||
}
|
||||
case InventoryType.WeaponMainhand:
|
||||
@@ -1707,11 +1707,11 @@ namespace Game.Entities
|
||||
if (weaponPrice == null)
|
||||
return 0;
|
||||
|
||||
typeFactor = weaponPrice.Factor;
|
||||
typeFactor = weaponPrice.Data;
|
||||
}
|
||||
|
||||
standardPrice = false;
|
||||
return (uint)(proto.GetUnk2() * typeFactor * baseFactor * qualityFactor * proto.GetUnk1());
|
||||
return (uint)(proto.GetPriceVariance() * typeFactor * baseFactor * qualityFactor * proto.GetPriceRandomValue());
|
||||
}
|
||||
|
||||
public uint GetSellPrice(Player owner)
|
||||
@@ -1733,7 +1733,7 @@ namespace Game.Entities
|
||||
if (classEntry != null)
|
||||
{
|
||||
uint buyCount = Math.Max(proto.GetBuyCount(), 1u);
|
||||
return (uint)(cost * classEntry.PriceMod / buyCount);
|
||||
return (uint)(cost * classEntry.PriceModifier / buyCount);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1764,7 +1764,7 @@ namespace Game.Entities
|
||||
var enchant = CliDB.SpellItemEnchantmentStorage.LookupByKey(GetEnchantmentId(e));
|
||||
if (enchant != null)
|
||||
for (uint f = 0; f < ItemConst.MaxItemEnchantmentEffects; ++f)
|
||||
if (enchant.Effect[f] == ItemEnchantmentType.Stat && (ItemModType)enchant.EffectSpellID[f] == statType)
|
||||
if (enchant.Effect[f] == ItemEnchantmentType.Stat && (ItemModType)enchant.EffectArg[f] == statType)
|
||||
for (int k = 0; k < 5; ++k)
|
||||
if (randomSuffix.Enchantment[k] == enchant.Id)
|
||||
return (int)((randomSuffix.AllocationPct[k] * GetItemSuffixFactor()) / 10000);
|
||||
@@ -1781,7 +1781,7 @@ namespace Game.Entities
|
||||
var enchant = CliDB.SpellItemEnchantmentStorage.LookupByKey(GetEnchantmentId(e));
|
||||
if (enchant != null)
|
||||
for (uint f = 0; f < ItemConst.MaxItemEnchantmentEffects; ++f)
|
||||
if (enchant.Effect[f] == ItemEnchantmentType.Stat && (ItemModType)enchant.EffectSpellID[f] == statType)
|
||||
if (enchant.Effect[f] == ItemEnchantmentType.Stat && (ItemModType)enchant.EffectArg[f] == statType)
|
||||
for (int k = 0; k < ItemConst.MaxItemRandomProperties; ++k)
|
||||
if (randomProp.Enchantment[k] == enchant.Id)
|
||||
return (int)(enchant.EffectPointsMin[k]);
|
||||
@@ -2003,7 +2003,7 @@ namespace Game.Entities
|
||||
if ((Convert.ToBoolean(sandbox.Flags & 2) || sandbox.MinLevel != 0 || sandbox.MaxLevel != 0) && !Convert.ToBoolean(sandbox.Flags & 4))
|
||||
level = Math.Min(Math.Max(level, sandbox.MinLevel), sandbox.MaxLevel);
|
||||
|
||||
uint heirloomIlvl = (uint)Global.DB2Mgr.GetCurveValueAt(ssd.ItemLevelCurveID, level);
|
||||
uint heirloomIlvl = (uint)Global.DB2Mgr.GetCurveValueAt(ssd.PlayerLevelToItemLevelCurveID, level);
|
||||
if (heirloomIlvl != 0)
|
||||
itemLevel = heirloomIlvl;
|
||||
}
|
||||
@@ -2016,7 +2016,7 @@ namespace Game.Entities
|
||||
uint itemLevelBeforeUpgrades = itemLevel;
|
||||
ItemUpgradeRecord upgrade = CliDB.ItemUpgradeStorage.LookupByKey(upgradeId);
|
||||
if (upgrade != null)
|
||||
itemLevel += upgrade.ItemLevelBonus;
|
||||
itemLevel += upgrade.ItemLevelIncrement;
|
||||
|
||||
if (pvpBonus)
|
||||
itemLevel += Global.DB2Mgr.GetPvpItemLevelBonus(itemTemplate.GetId());
|
||||
@@ -2072,19 +2072,19 @@ namespace Game.Entities
|
||||
byte expansion = itemTemplate.GetRequiredExpansion();
|
||||
foreach (ItemDisenchantLootRecord disenchant in CliDB.ItemDisenchantLootStorage.Values)
|
||||
{
|
||||
if (disenchant.ItemClass != itemClass)
|
||||
if (disenchant.ClassID != itemClass)
|
||||
continue;
|
||||
|
||||
if (disenchant.ItemSubClass >= 0 && itemSubClass != 0)
|
||||
if (disenchant.Subclass >= 0 && itemSubClass != 0)
|
||||
continue;
|
||||
|
||||
if (disenchant.ItemQuality != quality)
|
||||
if (disenchant.Quality != quality)
|
||||
continue;
|
||||
|
||||
if (disenchant.MinItemLevel > itemLevel || disenchant.MaxItemLevel < itemLevel)
|
||||
if (disenchant.MinLevel > itemLevel || disenchant.MaxLevel < itemLevel)
|
||||
continue;
|
||||
|
||||
if (disenchant.Expansion != -2 && disenchant.Expansion != expansion)
|
||||
if (disenchant.ExpansionID != -2 && disenchant.ExpansionID != expansion)
|
||||
continue;
|
||||
|
||||
return disenchant;
|
||||
@@ -2102,9 +2102,9 @@ namespace Game.Entities
|
||||
ItemModifiedAppearanceRecord transmog = CliDB.ItemModifiedAppearanceStorage.LookupByKey(GetModifier(transmogModifier));
|
||||
if (transmog != null)
|
||||
{
|
||||
ItemAppearanceRecord itemAppearance = CliDB.ItemAppearanceStorage.LookupByKey(transmog.AppearanceID);
|
||||
ItemAppearanceRecord itemAppearance = CliDB.ItemAppearanceStorage.LookupByKey(transmog.ItemAppearanceID);
|
||||
if (itemAppearance != null)
|
||||
return itemAppearance.DisplayID;
|
||||
return itemAppearance.ItemDisplayInfoID;
|
||||
}
|
||||
|
||||
return Global.DB2Mgr.GetItemDisplayId(GetEntry(), GetAppearanceModId());
|
||||
@@ -2147,7 +2147,7 @@ namespace Game.Entities
|
||||
|
||||
ItemModifiedAppearanceRecord transmog = CliDB.ItemModifiedAppearanceStorage.LookupByKey(GetModifier(transmogModifier));
|
||||
if (transmog != null)
|
||||
return transmog.AppearanceModID;
|
||||
return transmog.ItemAppearanceModifierID;
|
||||
|
||||
return (ushort)GetAppearanceModId();
|
||||
}
|
||||
@@ -2223,7 +2223,7 @@ namespace Game.Entities
|
||||
{
|
||||
foreach (ArtifactPowerRecord artifactPower in Global.DB2Mgr.GetArtifactPowers(artifactId))
|
||||
{
|
||||
if (artifactPower.ArtifactTier != artifactTier)
|
||||
if (artifactPower.Tier != artifactTier)
|
||||
continue;
|
||||
|
||||
if (m_artifactPowerIdToIndex.ContainsKey(artifactPower.Id))
|
||||
@@ -2259,7 +2259,7 @@ namespace Game.Entities
|
||||
{
|
||||
foreach (ItemDynamicFieldArtifactPowers artifactPower in GetArtifactPowers())
|
||||
{
|
||||
if (CliDB.ArtifactPowerStorage.LookupByKey(artifactPower.ArtifactPowerId).RelicType == enchant.EffectSpellID[i])
|
||||
if (CliDB.ArtifactPowerStorage.LookupByKey(artifactPower.ArtifactPowerId).Label == enchant.EffectArg[i])
|
||||
{
|
||||
ItemDynamicFieldArtifactPowers newPower = artifactPower;
|
||||
if (apply)
|
||||
@@ -2281,7 +2281,7 @@ namespace Game.Entities
|
||||
break;
|
||||
case ItemEnchantmentType.ArtifactPowerBonusRankByID:
|
||||
{
|
||||
ItemDynamicFieldArtifactPowers artifactPower = GetArtifactPower(enchant.EffectSpellID[i]);
|
||||
ItemDynamicFieldArtifactPowers artifactPower = GetArtifactPower(enchant.EffectArg[i]);
|
||||
if (artifactPower != null)
|
||||
{
|
||||
ItemDynamicFieldArtifactPowers newPower = artifactPower;
|
||||
@@ -2304,7 +2304,7 @@ namespace Game.Entities
|
||||
case ItemEnchantmentType.ArtifactPowerBonusRankPicker:
|
||||
if (slot >= EnchantmentSlot.Sock1 && slot <= EnchantmentSlot.Sock3 && _bonusData.GemRelicType[slot - EnchantmentSlot.Sock1] != -1)
|
||||
{
|
||||
ArtifactPowerPickerRecord artifactPowerPicker = CliDB.ArtifactPowerPickerStorage.LookupByKey(enchant.EffectSpellID[i]);
|
||||
ArtifactPowerPickerRecord artifactPowerPicker = CliDB.ArtifactPowerPickerStorage.LookupByKey(enchant.EffectArg[i]);
|
||||
if (artifactPowerPicker != null)
|
||||
{
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(artifactPowerPicker.PlayerConditionID);
|
||||
@@ -2312,7 +2312,7 @@ namespace Game.Entities
|
||||
{
|
||||
foreach (ItemDynamicFieldArtifactPowers artifactPower in GetArtifactPowers())
|
||||
{
|
||||
if (CliDB.ArtifactPowerStorage.LookupByKey(artifactPower.ArtifactPowerId).RelicType == _bonusData.GemRelicType[slot - EnchantmentSlot.Sock1])
|
||||
if (CliDB.ArtifactPowerStorage.LookupByKey(artifactPower.ArtifactPowerId).Label == _bonusData.GemRelicType[slot - EnchantmentSlot.Sock1])
|
||||
{
|
||||
ItemDynamicFieldArtifactPowers newPower = artifactPower;
|
||||
if (apply)
|
||||
@@ -2363,7 +2363,7 @@ namespace Game.Entities
|
||||
if (sourceItem && sourceItem.GetModifier(ItemModifier.ArtifactKnowledgeLevel) != 0)
|
||||
artifactKnowledgeLevel = sourceItem.GetModifier(ItemModifier.ArtifactKnowledgeLevel);
|
||||
else
|
||||
artifactKnowledgeLevel = owner.GetCurrency(artifactCategory.ArtifactKnowledgeCurrencyID) + 1;
|
||||
artifactKnowledgeLevel = owner.GetCurrency(artifactCategory.XpMultCurrencyID) + 1;
|
||||
|
||||
GtArtifactKnowledgeMultiplierRecord artifactKnowledge = CliDB.ArtifactKnowledgeMultiplierGameTable.GetRow(artifactKnowledgeLevel);
|
||||
if (artifactKnowledge != null)
|
||||
@@ -2403,7 +2403,7 @@ namespace Game.Entities
|
||||
if (set.RequiredSkill != 0 && player.GetSkillValue((SkillType)set.RequiredSkill) < set.RequiredSkillRank)
|
||||
return;
|
||||
|
||||
if (set.Flags.HasAnyFlag(ItemSetFlags.LegacyInactive))
|
||||
if (set.SetFlags.HasAnyFlag(ItemSetFlags.LegacyInactive))
|
||||
return;
|
||||
|
||||
ItemSetEffect eff = null;
|
||||
|
||||
@@ -216,14 +216,14 @@ namespace Game.Entities
|
||||
switch (quality)
|
||||
{
|
||||
case ItemQuality.Uncommon:
|
||||
return randPropPointsEntry.UncommonPropertiesPoints[propIndex];
|
||||
return randPropPointsEntry.Good[propIndex];
|
||||
case ItemQuality.Rare:
|
||||
case ItemQuality.Heirloom:
|
||||
return randPropPointsEntry.RarePropertiesPoints[propIndex];
|
||||
return randPropPointsEntry.Superior[propIndex];
|
||||
case ItemQuality.Epic:
|
||||
case ItemQuality.Legendary:
|
||||
case ItemQuality.Artifact:
|
||||
return randPropPointsEntry.EpicPropertiesPoints[propIndex];
|
||||
return randPropPointsEntry.Epic[propIndex];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Game.Entities
|
||||
|
||||
public string GetName(LocaleConstant locale = SharedConst.DefaultLocale)
|
||||
{
|
||||
return ExtendedData.Name[locale];
|
||||
return ExtendedData.Display[locale];
|
||||
}
|
||||
|
||||
public bool CanChangeEquipStateInCombat()
|
||||
@@ -124,7 +124,31 @@ namespace Game.Entities
|
||||
if (GetSubClass() < (uint)ItemSubClassArmor.Cloth || GetSubClass() > (uint)ItemSubClassArmor.Plate)
|
||||
return 0;
|
||||
|
||||
return (uint)(armorQuality.QualityMod[(int)quality] * armorTotal.Value[GetSubClass() - 1] * location.Modifier[GetSubClass() - 1] + 0.5f);
|
||||
float total = 1.0f;
|
||||
float locationModifier = 1.0f;
|
||||
switch ((ItemSubClassArmor)GetSubClass())
|
||||
{
|
||||
case ItemSubClassArmor.Cloth:
|
||||
total = armorTotal.Cloth;
|
||||
locationModifier = location.Clothmodifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Leather:
|
||||
total = armorTotal.Leather;
|
||||
locationModifier = location.Leathermodifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Mail:
|
||||
total = armorTotal.Mail;
|
||||
locationModifier = location.Chainmodifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Plate:
|
||||
total = armorTotal.Plate;
|
||||
locationModifier = location.Platemodifier;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return (uint)(armorQuality.QualityMod[(int)quality] * total * locationModifier + 0.5f);
|
||||
}
|
||||
|
||||
// shields
|
||||
@@ -150,13 +174,13 @@ namespace Game.Entities
|
||||
switch (GetInventoryType())
|
||||
{
|
||||
case InventoryType.Ammo:
|
||||
dps = CliDB.ItemDamageAmmoStorage.LookupByKey(itemLevel).DPS[(int)quality];
|
||||
dps = CliDB.ItemDamageAmmoStorage.LookupByKey(itemLevel).Quality[(int)quality];
|
||||
break;
|
||||
case InventoryType.Weapon2Hand:
|
||||
if (GetFlags2().HasAnyFlag(ItemFlags2.CasterWeapon))
|
||||
dps = CliDB.ItemDamageTwoHandCasterStorage.LookupByKey(itemLevel).DPS[(int)quality];
|
||||
dps = CliDB.ItemDamageTwoHandCasterStorage.LookupByKey(itemLevel).Quality[(int)quality];
|
||||
else
|
||||
dps = CliDB.ItemDamageTwoHandStorage.LookupByKey(itemLevel).DPS[(int)quality];
|
||||
dps = CliDB.ItemDamageTwoHandStorage.LookupByKey(itemLevel).Quality[(int)quality];
|
||||
break;
|
||||
case InventoryType.Ranged:
|
||||
case InventoryType.Thrown:
|
||||
@@ -164,15 +188,15 @@ namespace Game.Entities
|
||||
switch ((ItemSubClassWeapon)GetSubClass())
|
||||
{
|
||||
case ItemSubClassWeapon.Wand:
|
||||
dps = CliDB.ItemDamageOneHandCasterStorage.LookupByKey(itemLevel).DPS[(int)quality];
|
||||
dps = CliDB.ItemDamageOneHandCasterStorage.LookupByKey(itemLevel).Quality[(int)quality];
|
||||
break;
|
||||
case ItemSubClassWeapon.Bow:
|
||||
case ItemSubClassWeapon.Gun:
|
||||
case ItemSubClassWeapon.Crossbow:
|
||||
if (GetFlags2().HasAnyFlag(ItemFlags2.CasterWeapon))
|
||||
dps = CliDB.ItemDamageTwoHandCasterStorage.LookupByKey(itemLevel).DPS[(int)quality];
|
||||
dps = CliDB.ItemDamageTwoHandCasterStorage.LookupByKey(itemLevel).Quality[(int)quality];
|
||||
else
|
||||
dps = CliDB.ItemDamageTwoHandStorage.LookupByKey(itemLevel).DPS[(int)quality];
|
||||
dps = CliDB.ItemDamageTwoHandStorage.LookupByKey(itemLevel).Quality[(int)quality];
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@@ -182,17 +206,17 @@ namespace Game.Entities
|
||||
case InventoryType.WeaponMainhand:
|
||||
case InventoryType.WeaponOffhand:
|
||||
if (GetFlags2().HasAnyFlag(ItemFlags2.CasterWeapon))
|
||||
dps = CliDB.ItemDamageOneHandCasterStorage.LookupByKey(itemLevel).DPS[(int)quality];
|
||||
dps = CliDB.ItemDamageOneHandCasterStorage.LookupByKey(itemLevel).Quality[(int)quality];
|
||||
else
|
||||
dps = CliDB.ItemDamageOneHandStorage.LookupByKey(itemLevel).DPS[(int)quality];
|
||||
dps = CliDB.ItemDamageOneHandStorage.LookupByKey(itemLevel).Quality[(int)quality];
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
float avgDamage = dps * GetDelay() * 0.001f;
|
||||
minDamage = (GetStatScalingFactor() * -0.5f + 1.0f) * avgDamage;
|
||||
maxDamage = (float)Math.Floor(avgDamage * (GetStatScalingFactor() * 0.5f + 1.0f) + 0.5f);
|
||||
minDamage = (GetDmgVariance() * -0.5f + 1.0f) * avgDamage;
|
||||
maxDamage = (float)Math.Floor(avgDamage * (GetDmgVariance() * 0.5f + 1.0f) + 0.5f);
|
||||
}
|
||||
|
||||
public bool IsUsableByLootSpecialization(Player player, bool alwaysAllowBoundToAccount)
|
||||
@@ -225,16 +249,16 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
public uint GetId() { return BasicData.Id; }
|
||||
public ItemClass GetClass() { return (ItemClass)BasicData.Class; }
|
||||
public uint GetSubClass() { return BasicData.SubClass; }
|
||||
public ItemQuality GetQuality() { return (ItemQuality)ExtendedData.Quality; }
|
||||
public ItemClass GetClass() { return (ItemClass)BasicData.ClassID; }
|
||||
public uint GetSubClass() { return BasicData.SubclassID; }
|
||||
public ItemQuality GetQuality() { return (ItemQuality)ExtendedData.OverallQualityID; }
|
||||
public ItemFlags GetFlags() { return (ItemFlags)ExtendedData.Flags[0]; }
|
||||
public ItemFlags2 GetFlags2() { return (ItemFlags2)ExtendedData.Flags[1]; }
|
||||
public ItemFlags3 GetFlags3() { return (ItemFlags3)ExtendedData.Flags[2]; }
|
||||
public uint GetFlags4() { return ExtendedData.Flags[3]; }
|
||||
public float GetUnk1() { return ExtendedData.Unk1; }
|
||||
public float GetUnk2() { return ExtendedData.Unk2; }
|
||||
public uint GetBuyCount() { return Math.Max(ExtendedData.BuyCount, 1u); }
|
||||
public float GetPriceRandomValue() { return ExtendedData.PriceRandomValue; }
|
||||
public float GetPriceVariance() { return ExtendedData.PriceVariance; }
|
||||
public uint GetBuyCount() { return Math.Max(ExtendedData.VendorStackCount, 1u); }
|
||||
public uint GetBuyPrice() { return ExtendedData.BuyPrice; }
|
||||
public uint GetSellPrice() { return ExtendedData.SellPrice; }
|
||||
public InventoryType GetInventoryType() { return ExtendedData.inventoryType; }
|
||||
@@ -244,15 +268,15 @@ namespace Game.Entities
|
||||
public int GetBaseRequiredLevel() { return ExtendedData.RequiredLevel; }
|
||||
public uint GetRequiredSkill() { return ExtendedData.RequiredSkill; }
|
||||
public uint GetRequiredSkillRank() { return ExtendedData.RequiredSkillRank; }
|
||||
public uint GetRequiredSpell() { return ExtendedData.RequiredSpell; }
|
||||
public uint GetRequiredReputationFaction() { return ExtendedData.RequiredReputationFaction; }
|
||||
public uint GetRequiredReputationRank() { return ExtendedData.RequiredReputationRank; }
|
||||
public uint GetRequiredSpell() { return ExtendedData.RequiredAbility; }
|
||||
public uint GetRequiredReputationFaction() { return ExtendedData.MinFactionID; }
|
||||
public uint GetRequiredReputationRank() { return ExtendedData.MinReputation; }
|
||||
public uint GetMaxCount() { return ExtendedData.MaxCount; }
|
||||
public uint GetContainerSlots() { return ExtendedData.ContainerSlots; }
|
||||
public int GetItemStatType(uint index)
|
||||
{
|
||||
Contract.Assert(index < ItemConst.MaxStats);
|
||||
return ExtendedData.ItemStatType[index];
|
||||
return ExtendedData.StatModifierBonusStat[index];
|
||||
}
|
||||
public int GetItemStatValue(uint index)
|
||||
{
|
||||
@@ -262,42 +286,42 @@ namespace Game.Entities
|
||||
public int GetItemStatAllocation(uint index)
|
||||
{
|
||||
Contract.Assert(index < ItemConst.MaxStats);
|
||||
return ExtendedData.ItemStatAllocation[index];
|
||||
return ExtendedData.StatPercentEditor[index];
|
||||
}
|
||||
public float GetItemStatSocketCostMultiplier(uint index)
|
||||
{
|
||||
Contract.Assert(index < ItemConst.MaxStats);
|
||||
return ExtendedData.ItemStatSocketCostMultiplier[index];
|
||||
return ExtendedData.StatPercentageOfSocket[index];
|
||||
}
|
||||
public uint GetScalingStatDistribution() { return ExtendedData.ScalingStatDistribution; }
|
||||
public uint GetScalingStatDistribution() { return ExtendedData.ScalingStatDistributionID; }
|
||||
public uint GetDamageType() { return ExtendedData.DamageType; }
|
||||
public uint GetDelay() { return ExtendedData.Delay; }
|
||||
public float GetRangedModRange() { return ExtendedData.RangedModRange; }
|
||||
public uint GetDelay() { return ExtendedData.ItemDelay; }
|
||||
public float GetRangedModRange() { return ExtendedData.ItemRange; }
|
||||
public ItemBondingType GetBonding() { return (ItemBondingType)ExtendedData.Bonding; }
|
||||
public uint GetPageText() { return ExtendedData.PageText; }
|
||||
public uint GetStartQuest() { return ExtendedData.StartQuest; }
|
||||
public uint GetPageText() { return ExtendedData.PageID; }
|
||||
public uint GetStartQuest() { return ExtendedData.StartQuestID; }
|
||||
public uint GetLockID() { return ExtendedData.LockID; }
|
||||
public uint GetRandomProperty() { return ExtendedData.RandomProperty; }
|
||||
public uint GetRandomSuffix() { return ExtendedData.RandomSuffix; }
|
||||
public uint GetRandomProperty() { return ExtendedData.RandomSelect; }
|
||||
public uint GetRandomSuffix() { return ExtendedData.ItemRandomSuffixGroupID; }
|
||||
public uint GetItemSet() { return ExtendedData.ItemSet; }
|
||||
public uint GetArea() { return ExtendedData.Area; }
|
||||
public uint GetMap() { return ExtendedData.Map; }
|
||||
public uint GetArea() { return ExtendedData.ZoneBound; }
|
||||
public uint GetMap() { return ExtendedData.InstanceBound; }
|
||||
public BagFamilyMask GetBagFamily() { return (BagFamilyMask)ExtendedData.BagFamily; }
|
||||
public uint GetTotemCategory() { return ExtendedData.TotemCategory; }
|
||||
public uint GetTotemCategory() { return ExtendedData.TotemCategoryID; }
|
||||
public SocketColor GetSocketColor(uint index)
|
||||
{
|
||||
Contract.Assert(index < ItemConst.MaxGemSockets);
|
||||
return (SocketColor)ExtendedData.SocketColor[index];
|
||||
return (SocketColor)ExtendedData.SocketType[index];
|
||||
}
|
||||
public uint GetSocketBonus() { return ExtendedData.SocketBonus; }
|
||||
public uint GetSocketBonus() { return ExtendedData.SocketMatchEnchantmentId; }
|
||||
public uint GetGemProperties() { return ExtendedData.GemProperties; }
|
||||
public float GetArmorDamageModifier() { return ExtendedData.ArmorDamageModifier; }
|
||||
public uint GetDuration() { return ExtendedData.Duration; }
|
||||
public uint GetItemLimitCategory() { return ExtendedData.ItemLimitCategory; }
|
||||
public HolidayIds GetHolidayID() { return (HolidayIds)ExtendedData.HolidayID; }
|
||||
public float GetStatScalingFactor() { return ExtendedData.StatScalingFactor; }
|
||||
public float GetQualityModifier() { return ExtendedData.QualityModifier; }
|
||||
public uint GetDuration() { return ExtendedData.DurationInInventory; }
|
||||
public uint GetItemLimitCategory() { return ExtendedData.LimitCategory; }
|
||||
public HolidayIds GetHolidayID() { return (HolidayIds)ExtendedData.RequiredHoliday; }
|
||||
public float GetDmgVariance() { return ExtendedData.DmgVariance; }
|
||||
public byte GetArtifactID() { return ExtendedData.ArtifactID; }
|
||||
public byte GetRequiredExpansion() { return ExtendedData.RequiredExpansion; }
|
||||
public byte GetRequiredExpansion() { return ExtendedData.ExpansionID; }
|
||||
|
||||
public bool IsCurrencyToken() { return (GetBagFamily() & BagFamilyMask.CurrencyTokens) != 0; }
|
||||
|
||||
|
||||
@@ -153,11 +153,11 @@ namespace Game.Entities
|
||||
uint bonusId = 0;
|
||||
|
||||
if (flags.HasAnyFlag(HeirloomPlayerFlags.BonusLevel110))
|
||||
bonusId = heirloom.ItemBonusListID[2];
|
||||
bonusId = heirloom.UpgradeItemBonusListID[2];
|
||||
else if (flags.HasAnyFlag(HeirloomPlayerFlags.BonusLevel100))
|
||||
bonusId = heirloom.ItemBonusListID[1];
|
||||
bonusId = heirloom.UpgradeItemBonusListID[1];
|
||||
else if (flags.HasAnyFlag(HeirloomPlayerFlags.BonusLevel90))
|
||||
bonusId = heirloom.ItemBonusListID[0];
|
||||
bonusId = heirloom.UpgradeItemBonusListID[0];
|
||||
|
||||
_heirlooms[itemId] = new HeirloomData(flags, bonusId);
|
||||
} while (result.NextRow());
|
||||
@@ -232,17 +232,17 @@ namespace Game.Entities
|
||||
if (heirloom.UpgradeItemID[0] == castItem)
|
||||
{
|
||||
flags |= HeirloomPlayerFlags.BonusLevel90;
|
||||
bonusId = heirloom.ItemBonusListID[0];
|
||||
bonusId = heirloom.UpgradeItemBonusListID[0];
|
||||
}
|
||||
if (heirloom.UpgradeItemID[1] == castItem)
|
||||
{
|
||||
flags |= HeirloomPlayerFlags.BonusLevel100;
|
||||
bonusId = heirloom.ItemBonusListID[1];
|
||||
bonusId = heirloom.UpgradeItemBonusListID[1];
|
||||
}
|
||||
if (heirloom.UpgradeItemID[2] == castItem)
|
||||
{
|
||||
flags |= HeirloomPlayerFlags.BonusLevel110;
|
||||
bonusId = heirloom.ItemBonusListID[2];
|
||||
bonusId = heirloom.UpgradeItemBonusListID[2];
|
||||
}
|
||||
|
||||
foreach (Item item in player.GetItemListByEntry(itemId, true))
|
||||
@@ -272,7 +272,7 @@ namespace Game.Entities
|
||||
return;
|
||||
|
||||
// Check for heirloom pairs (normal - heroic, heroic - mythic)
|
||||
uint heirloomItemId = heirloom.NextDifficultyItemID;
|
||||
uint heirloomItemId = heirloom.StaticUpgradedItemID;
|
||||
uint newItemId = 0;
|
||||
HeirloomRecord heirloomDiff;
|
||||
while ((heirloomDiff = Global.DB2Mgr.GetHeirloomByItemId(heirloomItemId)) != null)
|
||||
@@ -280,7 +280,7 @@ namespace Game.Entities
|
||||
if (player.GetItemByEntry(heirloomDiff.ItemID))
|
||||
newItemId = heirloomDiff.ItemID;
|
||||
|
||||
HeirloomRecord heirloomSub = Global.DB2Mgr.GetHeirloomByItemId(heirloomDiff.NextDifficultyItemID);
|
||||
HeirloomRecord heirloomSub = Global.DB2Mgr.GetHeirloomByItemId(heirloomDiff.StaticUpgradedItemID);
|
||||
if (heirloomSub != null)
|
||||
{
|
||||
heirloomItemId = heirloomSub.ItemID;
|
||||
@@ -385,10 +385,10 @@ namespace Game.Entities
|
||||
_mounts[spellId] = flags;
|
||||
|
||||
// Mount condition only applies to using it, should still learn it.
|
||||
if (mount.PlayerConditionId != 0)
|
||||
if (mount.PlayerConditionID != 0)
|
||||
{
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(mount.PlayerConditionId);
|
||||
if (!ConditionManager.IsPlayerMeetingCondition(player, playerCondition))
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(mount.PlayerConditionID);
|
||||
if (playerCondition != null && !ConditionManager.IsPlayerMeetingCondition(player, playerCondition))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -578,7 +578,7 @@ namespace Game.Entities
|
||||
if (itemModifiedAppearance == null)
|
||||
return false;
|
||||
|
||||
if (itemModifiedAppearance.SourceType == 6 || itemModifiedAppearance.SourceType == 9)
|
||||
if (itemModifiedAppearance.TransmogSourceTypeEnum == 6 || itemModifiedAppearance.TransmogSourceTypeEnum == 9)
|
||||
return false;
|
||||
|
||||
if (!CliDB.ItemSearchNameStorage.ContainsKey(itemModifiedAppearance.ItemID))
|
||||
|
||||
@@ -56,8 +56,8 @@ namespace Game.Entities
|
||||
ArtifactPowerRecord artifactPower = CliDB.ArtifactPowerStorage.LookupByKey(artifactPowerData.ArtifactPowerId);
|
||||
if (artifactPower != null)
|
||||
{
|
||||
if (artifactPowerData.PurchasedRank > artifactPower.MaxRank)
|
||||
artifactPowerData.PurchasedRank = artifactPower.MaxRank;
|
||||
if (artifactPowerData.PurchasedRank > artifactPower.MaxPurchasableRank)
|
||||
artifactPowerData.PurchasedRank = artifactPower.MaxPurchasableRank;
|
||||
|
||||
artifactPowerData.CurrentRankWithBonus = (byte)(artifactPower.Flags.HasAnyFlag(ArtifactPowerFlag.First) ? 1 : 0);
|
||||
|
||||
@@ -2659,7 +2659,7 @@ namespace Game.Entities
|
||||
else // have start node, to it
|
||||
{
|
||||
Log.outError(LogFilter.Player, "Character {0} have too short taxi destination list, teleport to original node.", GetGUID().ToString());
|
||||
mapId = nodeEntry.MapID;
|
||||
mapId = nodeEntry.ContinentID;
|
||||
Relocate(nodeEntry.Pos.X, nodeEntry.Pos.Y, nodeEntry.Pos.Z, 0.0f);
|
||||
}
|
||||
m_taxi.ClearTaxiDestinations();
|
||||
@@ -2669,10 +2669,10 @@ namespace Game.Entities
|
||||
{
|
||||
// save source node as recall coord to prevent recall and fall from sky
|
||||
var nodeEntry = CliDB.TaxiNodesStorage.LookupByKey(nodeid);
|
||||
if (nodeEntry != null && nodeEntry.MapID == GetMapId())
|
||||
if (nodeEntry != null && nodeEntry.ContinentID == GetMapId())
|
||||
{
|
||||
Contract.Assert(nodeEntry != null); // checked in m_taxi.LoadTaxiDestinationsFromString
|
||||
mapId = nodeEntry.MapID;
|
||||
mapId = nodeEntry.ContinentID;
|
||||
Relocate(nodeEntry.Pos.X, nodeEntry.Pos.Y, nodeEntry.Pos.Z, 0.0f);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ namespace Game.Entities
|
||||
bool store_error = false;
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostItems; ++i)
|
||||
{
|
||||
uint count = iece.RequiredItemCount[i];
|
||||
uint itemid = iece.RequiredItem[i];
|
||||
uint count = iece.ItemCount[i];
|
||||
uint itemid = iece.ItemID[i];
|
||||
|
||||
if (count != 0 && itemid != 0)
|
||||
{
|
||||
@@ -116,8 +116,8 @@ namespace Game.Entities
|
||||
// Grant back extendedcost items
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostItems; ++i)
|
||||
{
|
||||
uint count = iece.RequiredItemCount[i];
|
||||
uint itemid = iece.RequiredItem[i];
|
||||
uint count = iece.ItemCount[i];
|
||||
uint itemid = iece.ItemID[i];
|
||||
if (count != 0 && itemid != 0)
|
||||
{
|
||||
List<ItemPosCount> dest = new List<ItemPosCount>();
|
||||
@@ -131,11 +131,11 @@ namespace Game.Entities
|
||||
// Grant back currencies
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostCurrencies; ++i)
|
||||
{
|
||||
if (iece.RequirementFlags.HasAnyFlag((byte)((int)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
if (iece.Flags.HasAnyFlag((byte)((int)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
continue;
|
||||
|
||||
uint count = iece.RequiredCurrencyCount[i];
|
||||
uint currencyid = iece.RequiredCurrency[i];
|
||||
uint count = iece.CurrencyCount[i];
|
||||
uint currencyid = iece.CurrencyID[i];
|
||||
if (count != 0 && currencyid != 0)
|
||||
ModifyCurrency((CurrencyTypes)currencyid, (int)count, true, true);
|
||||
}
|
||||
@@ -179,17 +179,17 @@ namespace Game.Entities
|
||||
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostItems; ++i) // item cost data
|
||||
{
|
||||
setItemPurchaseData.Contents.Items[i].ItemCount = iece.RequiredItemCount[i];
|
||||
setItemPurchaseData.Contents.Items[i].ItemID = iece.RequiredItem[i];
|
||||
setItemPurchaseData.Contents.Items[i].ItemCount = iece.ItemCount[i];
|
||||
setItemPurchaseData.Contents.Items[i].ItemID = iece.ItemID[i];
|
||||
}
|
||||
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostCurrencies; ++i) // currency cost data
|
||||
{
|
||||
if (iece.RequirementFlags.HasAnyFlag((byte)((int)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
if (iece.Flags.HasAnyFlag((byte)((int)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
continue;
|
||||
|
||||
setItemPurchaseData.Contents.Currencies[i].CurrencyCount = iece.RequiredCurrencyCount[i];
|
||||
setItemPurchaseData.Contents.Currencies[i].CurrencyID = iece.RequiredCurrency[i];
|
||||
setItemPurchaseData.Contents.Currencies[i].CurrencyCount = iece.CurrencyCount[i];
|
||||
setItemPurchaseData.Contents.Currencies[i].CurrencyID = iece.CurrencyID[i];
|
||||
}
|
||||
|
||||
SendPacket(setItemPurchaseData);
|
||||
@@ -205,17 +205,17 @@ namespace Game.Entities
|
||||
itemPurchaseRefundResult.Contents.Value.Money = item.GetPaidMoney();
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostItems; ++i) // item cost data
|
||||
{
|
||||
itemPurchaseRefundResult.Contents.Value.Items[i].ItemCount = iece.RequiredItemCount[i];
|
||||
itemPurchaseRefundResult.Contents.Value.Items[i].ItemID = iece.RequiredItem[i];
|
||||
itemPurchaseRefundResult.Contents.Value.Items[i].ItemCount = iece.ItemCount[i];
|
||||
itemPurchaseRefundResult.Contents.Value.Items[i].ItemID = iece.ItemID[i];
|
||||
}
|
||||
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostCurrencies; ++i) // currency cost data
|
||||
{
|
||||
if (iece.RequirementFlags.HasAnyFlag((byte)((uint)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
if (iece.Flags.HasAnyFlag((byte)((uint)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
continue;
|
||||
|
||||
itemPurchaseRefundResult.Contents.Value.Currencies[i].CurrencyCount = iece.RequiredCurrencyCount[i];
|
||||
itemPurchaseRefundResult.Contents.Value.Currencies[i].CurrencyID = iece.RequiredCurrency[i];
|
||||
itemPurchaseRefundResult.Contents.Value.Currencies[i].CurrencyCount = iece.CurrencyCount[i];
|
||||
itemPurchaseRefundResult.Contents.Value.Currencies[i].CurrencyID = iece.CurrencyID[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ namespace Game.Entities
|
||||
else if (ditemProto.GetClass() == ItemClass.Armor)
|
||||
dmultiplier = dcost.ArmorSubClassCost[ditemProto.GetSubClass()];
|
||||
|
||||
uint costs = (uint)(LostDurability * dmultiplier * (double)dQualitymodEntry.QualityMod * item.GetRepairCostMultiplier());
|
||||
uint costs = (uint)(LostDurability * dmultiplier * (double)dQualitymodEntry.Data * item.GetRepairCostMultiplier());
|
||||
costs = (uint)(costs * discountMod * WorldConfig.GetFloatValue(WorldCfg.RateRepaircost));
|
||||
|
||||
if (costs == 0) //fix for ITEM_QUALITY_ARTIFACT
|
||||
@@ -1159,7 +1159,7 @@ namespace Game.Entities
|
||||
|
||||
ItemTemplate proto = pItem.GetTemplate();
|
||||
for (byte i = 0; i < proto.Effects.Count; ++i)
|
||||
if (proto.Effects[i].Trigger == ItemSpelltriggerType.OnObtain && proto.Effects[i].SpellID > 0) // On obtain trigger
|
||||
if (proto.Effects[i].TriggerType == ItemSpelltriggerType.OnObtain && proto.Effects[i].SpellID > 0) // On obtain trigger
|
||||
if (bag == InventorySlots.Bag0 || (bag >= InventorySlots.BagStart && bag < InventorySlots.BagEnd))
|
||||
if (!HasAura(proto.Effects[i].SpellID))
|
||||
CastSpell(this, proto.Effects[i].SpellID, true, pItem);
|
||||
@@ -1202,7 +1202,7 @@ namespace Game.Entities
|
||||
|
||||
ItemTemplate proto = pItem2.GetTemplate();
|
||||
for (byte i = 0; i < proto.Effects.Count; ++i)
|
||||
if (proto.Effects[i].Trigger == ItemSpelltriggerType.OnObtain && proto.Effects[i].SpellID > 0) // On obtain trigger
|
||||
if (proto.Effects[i].TriggerType == ItemSpelltriggerType.OnObtain && proto.Effects[i].SpellID > 0) // On obtain trigger
|
||||
if (bag == InventorySlots.Bag0 || (bag >= InventorySlots.BagStart && bag < InventorySlots.BagEnd))
|
||||
if (!HasAura(proto.Effects[i].SpellID))
|
||||
CastSpell(this, proto.Effects[i].SpellID, true, pItem2);
|
||||
@@ -1321,7 +1321,7 @@ namespace Game.Entities
|
||||
ItemChildEquipmentRecord childItemEntry = Global.DB2Mgr.GetItemChildEquipment(itemId);
|
||||
if (childItemEntry != null)
|
||||
{
|
||||
ItemTemplate childTemplate = Global.ObjectMgr.GetItemTemplate(childItemEntry.AltItemID);
|
||||
ItemTemplate childTemplate = Global.ObjectMgr.GetItemTemplate(childItemEntry.ChildItemID);
|
||||
if (childTemplate != null)
|
||||
{
|
||||
List<ItemPosCount> childDest = new List<ItemPosCount>();
|
||||
@@ -1510,7 +1510,7 @@ namespace Game.Entities
|
||||
|
||||
ArtifactRecord artifact = CliDB.ArtifactStorage.LookupByKey(proto.GetArtifactID());
|
||||
if (artifact != null)
|
||||
if (artifact.SpecID != GetUInt32Value(PlayerFields.CurrentSpecId))
|
||||
if (artifact.ChrSpecializationID != GetUInt32Value(PlayerFields.CurrentSpecId))
|
||||
return InventoryResult.CantUseItem;
|
||||
|
||||
return InventoryResult.Ok;
|
||||
@@ -1735,7 +1735,7 @@ namespace Game.Entities
|
||||
Item childItem = GetChildItemByGuid(parentItem.GetChildItem());
|
||||
if (childItem)
|
||||
{
|
||||
ushort childDest = (ushort)((InventorySlots.Bag0 << 8) | itemChildEquipment.AltEquipmentSlot);
|
||||
ushort childDest = (ushort)((InventorySlots.Bag0 << 8) | itemChildEquipment.ChildItemEquipSlot);
|
||||
if (childItem.GetPos() != childDest)
|
||||
{
|
||||
Item dstItem = GetItemByPos(childDest);
|
||||
@@ -2521,17 +2521,17 @@ namespace Game.Entities
|
||||
var iece = CliDB.ItemExtendedCostStorage.LookupByKey(crItem.ExtendedCost);
|
||||
for (int i = 0; i < ItemConst.MaxItemExtCostItems; ++i)
|
||||
{
|
||||
if (iece.RequiredItem[i] != 0)
|
||||
DestroyItemCount(iece.RequiredItem[i], iece.RequiredItemCount[i] * stacks, true);
|
||||
if (iece.ItemID[i] != 0)
|
||||
DestroyItemCount(iece.ItemID[i], iece.ItemCount[i] * stacks, true);
|
||||
}
|
||||
|
||||
for (int i = 0; i < ItemConst.MaxItemExtCostCurrencies; ++i)
|
||||
{
|
||||
if (iece.RequirementFlags.HasAnyFlag((byte)((int)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
if (iece.Flags.HasAnyFlag((byte)((int)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
continue;
|
||||
|
||||
if (iece.RequiredCurrency[i] != 0)
|
||||
ModifyCurrency((CurrencyTypes)iece.RequiredCurrency[i], -(int)(iece.RequiredCurrencyCount[i] * stacks), true, true);
|
||||
if (iece.CurrencyID[i] != 0)
|
||||
ModifyCurrency((CurrencyTypes)iece.CurrencyID[i], -(int)(iece.CurrencyCount[i] * stacks), true, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3502,7 +3502,7 @@ namespace Game.Entities
|
||||
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostItems; ++i)
|
||||
{
|
||||
if (iece.RequiredItem[i] != 0 && !HasItemCount(iece.RequiredItem[i], (iece.RequiredItemCount[i] * stacks)))
|
||||
if (iece.ItemID[i] != 0 && !HasItemCount(iece.ItemID[i], (iece.ItemCount[i] * stacks)))
|
||||
{
|
||||
SendEquipError(InventoryResult.VendorMissingTurnins);
|
||||
return false;
|
||||
@@ -3511,23 +3511,23 @@ namespace Game.Entities
|
||||
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostCurrencies; ++i)
|
||||
{
|
||||
if (iece.RequiredCurrency[i] == 0)
|
||||
if (iece.CurrencyID[i] == 0)
|
||||
continue;
|
||||
|
||||
CurrencyTypesRecord entry = CliDB.CurrencyTypesStorage.LookupByKey(iece.RequiredCurrency[i]);
|
||||
CurrencyTypesRecord entry = CliDB.CurrencyTypesStorage.LookupByKey(iece.CurrencyID[i]);
|
||||
if (entry == null)
|
||||
{
|
||||
SendBuyError(BuyResult.CantFindItem, creature, currency); // Find correct error
|
||||
return false;
|
||||
}
|
||||
|
||||
if (iece.RequirementFlags.HasAnyFlag((byte)((uint)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
if (iece.Flags.HasAnyFlag((byte)((uint)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
{
|
||||
// Not implemented
|
||||
SendEquipError(InventoryResult.VendorMissingTurnins); // Find correct error
|
||||
return false;
|
||||
}
|
||||
else if (!HasCurrency(iece.RequiredCurrency[i], (iece.RequiredCurrencyCount[i] * stacks)))
|
||||
else if (!HasCurrency(iece.CurrencyID[i], (iece.CurrencyCount[i] * stacks)))
|
||||
{
|
||||
SendEquipError(InventoryResult.VendorMissingTurnins); // Find correct error
|
||||
return false;
|
||||
@@ -3535,20 +3535,20 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
// check for personal arena rating requirement
|
||||
if (GetMaxPersonalArenaRatingRequirement(iece.RequiredArenaSlot) < iece.RequiredPersonalArenaRating)
|
||||
if (GetMaxPersonalArenaRatingRequirement(iece.ArenaBracket) < iece.RequiredArenaRating)
|
||||
{
|
||||
// probably not the proper equip err
|
||||
SendEquipError(InventoryResult.CantEquipRank);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (iece.RequiredFactionId != 0 && (uint)GetReputationRank(iece.RequiredFactionId) < iece.RequiredFactionStanding)
|
||||
if (iece.MinFactionID != 0 && (uint)GetReputationRank(iece.MinFactionID) < iece.RequiredAchievement)
|
||||
{
|
||||
SendBuyError(BuyResult.ReputationRequire, creature, currency);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (iece.RequirementFlags.HasAnyFlag((byte)ItemExtendedCostFlags.RequireGuild) && GetGuildId() == 0)
|
||||
if (iece.Flags.HasAnyFlag((byte)ItemExtendedCostFlags.RequireGuild) && GetGuildId() == 0)
|
||||
{
|
||||
SendEquipError(InventoryResult.VendorMissingTurnins); // Find correct error
|
||||
return false;
|
||||
@@ -3571,21 +3571,21 @@ namespace Game.Entities
|
||||
{
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostItems; ++i)
|
||||
{
|
||||
if (iece.RequiredItem[i] == 0)
|
||||
if (iece.ItemID[i] == 0)
|
||||
continue;
|
||||
|
||||
DestroyItemCount(iece.RequiredItem[i], iece.RequiredItemCount[i] * stacks, true);
|
||||
DestroyItemCount(iece.ItemID[i], iece.ItemCount[i] * stacks, true);
|
||||
}
|
||||
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostCurrencies; ++i)
|
||||
{
|
||||
if (iece.RequiredCurrency[i] == 0)
|
||||
if (iece.CurrencyID[i] == 0)
|
||||
continue;
|
||||
|
||||
if (iece.RequirementFlags.HasAnyFlag((byte)((uint)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
if (iece.Flags.HasAnyFlag((byte)((uint)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
continue;
|
||||
|
||||
ModifyCurrency((CurrencyTypes)iece.RequiredCurrency[i], -(int)(iece.RequiredCurrencyCount[i] * stacks), false, true);
|
||||
ModifyCurrency((CurrencyTypes)iece.CurrencyID[i], -(int)(iece.CurrencyCount[i] * stacks), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3702,7 +3702,7 @@ namespace Game.Entities
|
||||
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostItems; ++i)
|
||||
{
|
||||
if (iece.RequiredItem[i] != 0 && !HasItemCount(iece.RequiredItem[i], iece.RequiredItemCount[i] * stacks))
|
||||
if (iece.ItemID[i] != 0 && !HasItemCount(iece.ItemID[i], iece.ItemCount[i] * stacks))
|
||||
{
|
||||
SendEquipError(InventoryResult.VendorMissingTurnins);
|
||||
return false;
|
||||
@@ -3711,22 +3711,22 @@ namespace Game.Entities
|
||||
|
||||
for (byte i = 0; i < ItemConst.MaxItemExtCostCurrencies; ++i)
|
||||
{
|
||||
if (iece.RequiredCurrency[i] == 0)
|
||||
if (iece.CurrencyID[i] == 0)
|
||||
continue;
|
||||
|
||||
var entry = CliDB.CurrencyTypesStorage.LookupByKey(iece.RequiredCurrency[i]);
|
||||
var entry = CliDB.CurrencyTypesStorage.LookupByKey(iece.CurrencyID[i]);
|
||||
if (entry == null)
|
||||
{
|
||||
SendBuyError(BuyResult.CantFindItem, creature, item);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (iece.RequirementFlags.HasAnyFlag((byte)((uint)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
if (iece.Flags.HasAnyFlag((byte)((uint)ItemExtendedCostFlags.RequireSeasonEarned1 << i)))
|
||||
{
|
||||
SendEquipError(InventoryResult.VendorMissingTurnins); // Find correct error
|
||||
return false;
|
||||
}
|
||||
else if (!HasCurrency(iece.RequiredCurrency[i], iece.RequiredCurrencyCount[i] * stacks))
|
||||
else if (!HasCurrency(iece.CurrencyID[i], iece.CurrencyCount[i] * stacks))
|
||||
{
|
||||
SendEquipError(InventoryResult.VendorMissingTurnins);
|
||||
return false;
|
||||
@@ -3734,20 +3734,20 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
// check for personal arena rating requirement
|
||||
if (GetMaxPersonalArenaRatingRequirement(iece.RequiredArenaSlot) < iece.RequiredPersonalArenaRating)
|
||||
if (GetMaxPersonalArenaRatingRequirement(iece.ArenaBracket) < iece.RequiredArenaRating)
|
||||
{
|
||||
// probably not the proper equip err
|
||||
SendEquipError(InventoryResult.CantEquipRank);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (iece.RequiredFactionId != 0 && (uint)GetReputationRank(iece.RequiredFactionId) < iece.RequiredFactionStanding)
|
||||
if (iece.MinFactionID != 0 && (uint)GetReputationRank(iece.MinFactionID) < iece.MinReputation)
|
||||
{
|
||||
SendBuyError(BuyResult.ReputationRequire, creature, item);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (iece.RequirementFlags.HasAnyFlag((byte)ItemExtendedCostFlags.RequireGuild) && GetGuildId() == 0)
|
||||
if (iece.Flags.HasAnyFlag((byte)ItemExtendedCostFlags.RequireGuild) && GetGuildId() == 0)
|
||||
{
|
||||
SendEquipError(InventoryResult.VendorMissingTurnins); // Find correct error
|
||||
return false;
|
||||
@@ -4264,7 +4264,7 @@ namespace Game.Entities
|
||||
continue;
|
||||
|
||||
// wrong triggering type
|
||||
if (apply && spellData.Trigger != ItemSpelltriggerType.OnEquip)
|
||||
if (apply && spellData.TriggerType != ItemSpelltriggerType.OnEquip)
|
||||
continue;
|
||||
|
||||
// check if it is valid spell
|
||||
@@ -4336,7 +4336,7 @@ namespace Game.Entities
|
||||
var effectData = proto.Effects[i];
|
||||
|
||||
// apply proc cooldown to equip auras if we have any
|
||||
if (effectData.Trigger == ItemSpelltriggerType.OnEquip)
|
||||
if (effectData.TriggerType == ItemSpelltriggerType.OnEquip)
|
||||
{
|
||||
SpellProcEntry procEntry = Global.SpellMgr.GetSpellProcEntry(effectData.SpellID);
|
||||
if (procEntry == null)
|
||||
@@ -4353,7 +4353,7 @@ namespace Game.Entities
|
||||
continue;
|
||||
|
||||
// wrong triggering type
|
||||
if (effectData.Trigger != ItemSpelltriggerType.OnUse)
|
||||
if (effectData.TriggerType != ItemSpelltriggerType.OnUse)
|
||||
continue;
|
||||
|
||||
// Don't replace longer cooldowns by equip cooldown if we have any.
|
||||
@@ -5277,11 +5277,11 @@ namespace Game.Entities
|
||||
if (childEquipement == null)
|
||||
return InventoryResult.Ok;
|
||||
|
||||
Item dstItem = GetItemByPos(InventorySlots.Bag0, childEquipement.AltEquipmentSlot);
|
||||
Item dstItem = GetItemByPos(InventorySlots.Bag0, childEquipement.ChildItemEquipSlot);
|
||||
if (!dstItem)
|
||||
return InventoryResult.Ok;
|
||||
|
||||
ushort childDest = (ushort)((InventorySlots.Bag0 << 8) | childEquipement.AltEquipmentSlot);
|
||||
ushort childDest = (ushort)((InventorySlots.Bag0 << 8) | childEquipement.ChildItemEquipSlot);
|
||||
InventoryResult msg = CanUnequipItem(childDest, !childItem.IsBag());
|
||||
if (msg != InventoryResult.Ok)
|
||||
return msg;
|
||||
@@ -5428,7 +5428,7 @@ namespace Game.Entities
|
||||
|
||||
ArtifactAppearanceRecord artifactAppearance = CliDB.ArtifactAppearanceStorage.LookupByKey(item.GetModifier(ItemModifier.ArtifactAppearanceId));
|
||||
if (artifactAppearance != null)
|
||||
if (artifactAppearance.ShapeshiftDisplayID != 0 && GetShapeshiftForm() == (ShapeShiftForm)artifactAppearance.ModifiesShapeshiftFormDisplay)
|
||||
if (artifactAppearance.OverrideShapeshiftDisplayID != 0 && GetShapeshiftForm() == (ShapeShiftForm)artifactAppearance.OverrideShapeshiftFormID)
|
||||
RestoreDisplayId();
|
||||
}
|
||||
|
||||
@@ -5451,7 +5451,7 @@ namespace Game.Entities
|
||||
continue;
|
||||
|
||||
if (powerAura.HasEffect(auraEffect.GetEffIndex()))
|
||||
auraEffect.ChangeAmount((int)(artifactPowerRank.Value != 0 ? artifactPowerRank.Value : auraEffect.GetSpellEffectInfo().CalcValue()));
|
||||
auraEffect.ChangeAmount((int)(artifactPowerRank.AuraPointsOverride != 0 ? artifactPowerRank.AuraPointsOverride : auraEffect.GetSpellEffectInfo().CalcValue()));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5460,10 +5460,10 @@ namespace Game.Entities
|
||||
else if (apply)
|
||||
{
|
||||
Dictionary<SpellValueMod, int> csv = new Dictionary<SpellValueMod, int>();
|
||||
if (artifactPowerRank.Value != 0)
|
||||
if (artifactPowerRank.AuraPointsOverride != 0)
|
||||
for (int i = 0; i < SpellConst.MaxEffects; ++i)
|
||||
if (spellInfo.GetEffect((uint)i) != null)
|
||||
csv.Add(SpellValueMod.BasePoint0 + i, (int)artifactPowerRank.Value);
|
||||
csv.Add(SpellValueMod.BasePoint0 + i, (int)artifactPowerRank.AuraPointsOverride);
|
||||
|
||||
CastCustomSpell(artifactPowerRank.SpellID, csv, this, TriggerCastFlags.FullMask, artifact);
|
||||
}
|
||||
@@ -5651,7 +5651,7 @@ namespace Game.Entities
|
||||
|
||||
ItemTemplate proto = pItem.GetTemplate();
|
||||
for (byte i = 0; i < proto.Effects.Count; ++i)
|
||||
if (proto.Effects[i].Trigger == ItemSpelltriggerType.OnObtain && proto.Effects[i].SpellID > 0) // On obtain trigger
|
||||
if (proto.Effects[i].TriggerType == ItemSpelltriggerType.OnObtain && proto.Effects[i].SpellID > 0) // On obtain trigger
|
||||
RemoveAurasDueToSpell(proto.Effects[i].SpellID);
|
||||
|
||||
ItemRemovedQuestCheck(pItem.GetEntry(), pItem.GetCount());
|
||||
|
||||
@@ -512,7 +512,7 @@ namespace Game.Entities
|
||||
{
|
||||
if (missingQuest != 0 && !string.IsNullOrEmpty(ar.questFailedText))
|
||||
SendSysMessage("{0}", ar.questFailedText);
|
||||
else if (mapDiff.Message_lang.HasString(Global.WorldMgr.GetDefaultDbcLocale())) // if (missingAchievement) covered by this case
|
||||
else if (mapDiff.Message.HasString(Global.WorldMgr.GetDefaultDbcLocale())) // if (missingAchievement) covered by this case
|
||||
SendTransferAborted(target_map, TransferAbortReason.Difficulty, (byte)target_difficulty);
|
||||
else if (missingItem != 0)
|
||||
GetSession().SendNotification(Global.ObjectMgr.GetCypherString(CypherStrings.LevelMinrequiredAndItem), LevelMin, Global.ObjectMgr.GetItemTemplate(missingItem).GetName());
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace Game.Entities
|
||||
if (rewardPackEntry == null)
|
||||
return;
|
||||
|
||||
CharTitlesRecord charTitlesEntry = CliDB.CharTitlesStorage.LookupByKey(rewardPackEntry.TitleID);
|
||||
CharTitlesRecord charTitlesEntry = CliDB.CharTitlesStorage.LookupByKey(rewardPackEntry.CharTitleID);
|
||||
if (charTitlesEntry != null)
|
||||
SetTitle(charTitlesEntry);
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace Game.Entities
|
||||
if (rewardPackXItems != null)
|
||||
{
|
||||
foreach (RewardPackXItemRecord rewardPackXItem in rewardPackXItems)
|
||||
AddItem(rewardPackXItem.ItemID, rewardPackXItem.Amount);
|
||||
AddItem(rewardPackXItem.ItemID, rewardPackXItem.ItemQuantity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -652,7 +652,7 @@ namespace Game.Entities
|
||||
if (CanSelectQuestPackageItem(questPackageItem))
|
||||
{
|
||||
hasFilteredQuestPackageReward = true;
|
||||
InventoryResult res = CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, questPackageItem.ItemID, questPackageItem.ItemCount);
|
||||
InventoryResult res = CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, questPackageItem.ItemID, questPackageItem.ItemQuantity);
|
||||
if (res != InventoryResult.Ok)
|
||||
{
|
||||
SendEquipError(res, null, null, questPackageItem.ItemID);
|
||||
@@ -672,7 +672,7 @@ namespace Game.Entities
|
||||
if (questPackageItem.ItemID != reward)
|
||||
continue;
|
||||
|
||||
InventoryResult res = CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, questPackageItem.ItemID, questPackageItem.ItemCount);
|
||||
InventoryResult res = CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, questPackageItem.ItemID, questPackageItem.ItemQuantity);
|
||||
if (res != InventoryResult.Ok)
|
||||
{
|
||||
SendEquipError(res, null, null, questPackageItem.ItemID);
|
||||
@@ -829,7 +829,7 @@ namespace Game.Entities
|
||||
(rewardProto.GetFlags2().HasAnyFlag(ItemFlags2.FactionHorde) && GetTeam() != Team.Horde))
|
||||
return false;
|
||||
|
||||
switch (questPackageItem.FilterType)
|
||||
switch (questPackageItem.DisplayType)
|
||||
{
|
||||
case QuestPackageFilter.LootSpecialization:
|
||||
return rewardProto.IsUsableByLootSpecialization(this, true);
|
||||
@@ -859,10 +859,10 @@ namespace Game.Entities
|
||||
{
|
||||
hasFilteredQuestPackageReward = true;
|
||||
List<ItemPosCount> dest = new List<ItemPosCount>();
|
||||
if (CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, questPackageItem.ItemID, questPackageItem.ItemCount) == InventoryResult.Ok)
|
||||
if (CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, questPackageItem.ItemID, questPackageItem.ItemQuantity) == InventoryResult.Ok)
|
||||
{
|
||||
Item item = StoreNewItem(dest, questPackageItem.ItemID, true, ItemEnchantment.GenerateItemRandomPropertyId(questPackageItem.ItemID));
|
||||
SendNewItem(item, questPackageItem.ItemCount, true, false);
|
||||
SendNewItem(item, questPackageItem.ItemQuantity, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -879,10 +879,10 @@ namespace Game.Entities
|
||||
continue;
|
||||
|
||||
List<ItemPosCount> dest = new List<ItemPosCount>();
|
||||
if (CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, questPackageItem.ItemID, questPackageItem.ItemCount) == InventoryResult.Ok)
|
||||
if (CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, questPackageItem.ItemID, questPackageItem.ItemQuantity) == InventoryResult.Ok)
|
||||
{
|
||||
Item item = StoreNewItem(dest, questPackageItem.ItemID, true, ItemEnchantment.GenerateItemRandomPropertyId(questPackageItem.ItemID));
|
||||
SendNewItem(item, questPackageItem.ItemCount, true, false);
|
||||
SendNewItem(item, questPackageItem.ItemQuantity, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -594,7 +594,7 @@ namespace Game.Entities
|
||||
{
|
||||
ItemEnchantmentType enchant_display_type = (ItemEnchantmentType)pEnchant.Effect[s];
|
||||
uint enchant_amount = pEnchant.EffectPointsMin[s];
|
||||
uint enchant_spell_id = pEnchant.EffectSpellID[s];
|
||||
uint enchant_spell_id = pEnchant.EffectArg[s];
|
||||
|
||||
switch (enchant_display_type)
|
||||
{
|
||||
@@ -1064,7 +1064,7 @@ namespace Game.Entities
|
||||
if (proto != null)
|
||||
for (byte idx = 0; idx < proto.Effects.Count; ++idx)
|
||||
{
|
||||
if (proto.Effects[idx].SpellID != 0 && proto.Effects[idx].Trigger == ItemSpelltriggerType.OnUse)
|
||||
if (proto.Effects[idx].SpellID != 0 && proto.Effects[idx].TriggerType == ItemSpelltriggerType.OnUse)
|
||||
{
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(proto.Effects[idx].SpellID);
|
||||
if (spellInfo != null)
|
||||
@@ -1158,7 +1158,7 @@ namespace Game.Entities
|
||||
// remove all spells that related to this skill
|
||||
foreach (var pAbility in CliDB.SkillLineAbilityStorage.Values)
|
||||
if (pAbility.SkillLine == id)
|
||||
RemoveSpell(Global.SpellMgr.GetFirstSpellInChain(pAbility.SpellID));
|
||||
RemoveSpell(Global.SpellMgr.GetFirstSpellInChain(pAbility.Spell));
|
||||
|
||||
// Clear profession lines
|
||||
if (GetUInt32Value(PlayerFields.ProfessionSkillLine1) == id)
|
||||
@@ -1396,13 +1396,13 @@ namespace Game.Entities
|
||||
|
||||
for (byte i = 0; i < 5; i++)
|
||||
{
|
||||
if (Condition.LTOperandType[i] == 0)
|
||||
if (Condition.LtOperandType[i] == 0)
|
||||
continue;
|
||||
|
||||
uint _cur_gem = curcount[Condition.LTOperandType[i] - 1];
|
||||
uint _cur_gem = curcount[Condition.LtOperandType[i] - 1];
|
||||
|
||||
// if have <CompareColor> use them as count, else use <value> from Condition
|
||||
uint _cmp_gem = Condition.RTOperandType[i] != 0 ? curcount[Condition.RTOperandType[i] - 1] : Condition.RTOperand[i];
|
||||
uint _cmp_gem = Condition.RtOperandType[i] != 0 ? curcount[Condition.RtOperandType[i] - 1] : Condition.RtOperand[i];
|
||||
|
||||
switch (Condition.Operator[i])
|
||||
{
|
||||
@@ -1507,7 +1507,7 @@ namespace Game.Entities
|
||||
continue;
|
||||
|
||||
// wrong triggering type
|
||||
if (spellData.Trigger != ItemSpelltriggerType.OnUse)
|
||||
if (spellData.TriggerType != ItemSpelltriggerType.OnUse)
|
||||
continue;
|
||||
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellData.SpellID);
|
||||
@@ -1544,10 +1544,10 @@ namespace Game.Entities
|
||||
if (pEnchant.Effect[s] != ItemEnchantmentType.UseSpell)
|
||||
continue;
|
||||
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(pEnchant.EffectSpellID[s]);
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(pEnchant.EffectArg[s]);
|
||||
if (spellInfo == null)
|
||||
{
|
||||
Log.outError(LogFilter.Player, "Player.CastItemUseSpell Enchant {0}, cast unknown spell {1}", enchant_id, pEnchant.EffectSpellID[s]);
|
||||
Log.outError(LogFilter.Player, "Player.CastItemUseSpell Enchant {0}, cast unknown spell {1}", enchant_id, pEnchant.EffectArg[s]);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1573,14 +1573,14 @@ namespace Game.Entities
|
||||
|
||||
void LearnSkillRewardedSpells(uint skillId, uint skillValue)
|
||||
{
|
||||
ulong raceMask = getRaceMask();
|
||||
long raceMask = getRaceMask();
|
||||
uint classMask = getClassMask();
|
||||
foreach (var ability in CliDB.SkillLineAbilityStorage.Values)
|
||||
{
|
||||
if (ability.SkillLine != skillId)
|
||||
continue;
|
||||
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(ability.SpellID);
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(ability.Spell);
|
||||
if (spellInfo == null)
|
||||
continue;
|
||||
|
||||
@@ -1605,12 +1605,12 @@ namespace Game.Entities
|
||||
|
||||
// need unlearn spell
|
||||
if (skillValue < ability.MinSkillLineRank && ability.AcquireMethod == AbilytyLearnType.OnSkillValue)
|
||||
RemoveSpell(ability.SpellID);
|
||||
RemoveSpell(ability.Spell);
|
||||
// need learn
|
||||
else if (!IsInWorld)
|
||||
AddSpell(ability.SpellID, true, true, true, false, false, ability.SkillLine);
|
||||
AddSpell(ability.Spell, true, true, true, false, false, ability.SkillLine);
|
||||
else
|
||||
LearnSpell(ability.SpellID, true, ability.SkillLine);
|
||||
LearnSpell(ability.Spell, true, ability.SkillLine);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2961,8 +2961,8 @@ namespace Game.Entities
|
||||
PowerTypeRecord runeEntry = Global.DB2Mgr.GetPowerTypeEntry(PowerType.Runes);
|
||||
|
||||
uint cooldown = GetRuneBaseCooldown();
|
||||
SetStatFloatValue(UnitFields.PowerRegenFlatModifier + runeIndex, (float)(1 * Time.InMilliseconds) / (float)cooldown - runeEntry.RegenerationPeace);
|
||||
SetStatFloatValue(UnitFields.PowerRegenInterruptedFlatModifier + runeIndex, (float)(1 * Time.InMilliseconds) / (float)cooldown - runeEntry.RegenerationCombat);
|
||||
SetStatFloatValue(UnitFields.PowerRegenFlatModifier + runeIndex, (float)(1 * Time.InMilliseconds) / (float)cooldown - runeEntry.RegenPeace);
|
||||
SetStatFloatValue(UnitFields.PowerRegenInterruptedFlatModifier + runeIndex, (float)(1 * Time.InMilliseconds) / (float)cooldown - runeEntry.RegenCombat);
|
||||
}
|
||||
|
||||
public uint GetRuneCooldown(byte index) { return m_runes.Cooldown[index]; }
|
||||
@@ -3052,7 +3052,7 @@ namespace Game.Entities
|
||||
continue;
|
||||
|
||||
// wrong triggering type
|
||||
if (spellData.Trigger != ItemSpelltriggerType.ChanceOnHit)
|
||||
if (spellData.TriggerType != ItemSpelltriggerType.ChanceOnHit)
|
||||
continue;
|
||||
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellData.SpellID);
|
||||
@@ -3109,11 +3109,11 @@ namespace Game.Entities
|
||||
continue;
|
||||
}
|
||||
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(pEnchant.EffectSpellID[s]);
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(pEnchant.EffectArg[s]);
|
||||
if (spellInfo == null)
|
||||
{
|
||||
Log.outError(LogFilter.Player, "Player.CastItemCombatSpell(GUID: {0}, name: {1}, enchant: {2}): unknown spell {3} is casted, ignoring...",
|
||||
GetGUID().ToString(), GetName(), enchant_id, pEnchant.EffectSpellID[s]);
|
||||
GetGUID().ToString(), GetName(), enchant_id, pEnchant.EffectArg[s]);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3128,7 +3128,7 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
// Apply spell mods
|
||||
ApplySpellMod(pEnchant.EffectSpellID[s], SpellModOp.ChanceOfSuccess, ref chance);
|
||||
ApplySpellMod(pEnchant.EffectArg[s], SpellModOp.ChanceOfSuccess, ref chance);
|
||||
|
||||
// Shiv has 100% chance to apply the poison
|
||||
if (FindCurrentSpellBySpellId(5938) != null && e_slot == (byte)EnchantmentSlot.Temp)
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace Game.Entities
|
||||
|
||||
SetMap(Global.MapMgr.CreateMap(info.MapId, this));
|
||||
|
||||
int powertype = (int)cEntry.PowerType;
|
||||
int powertype = (int)cEntry.DisplayPower;
|
||||
|
||||
SetObjectScale(1.0f);
|
||||
|
||||
@@ -388,7 +388,7 @@ namespace Game.Entities
|
||||
{
|
||||
if (!iProto.Effects.Empty())
|
||||
{
|
||||
switch (iProto.Effects[0].Category)
|
||||
switch (iProto.Effects[0].SpellCategoryID)
|
||||
{
|
||||
case 11: // food
|
||||
count = (uint)(GetClass() == Class.Deathknight ? 10 : 4);
|
||||
@@ -1425,7 +1425,7 @@ namespace Game.Entities
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!HasSpell(mount.SpellId))
|
||||
if (!HasSpell(mount.SourceSpellID))
|
||||
{
|
||||
Log.outError(LogFilter.Player, "Mount action {0} not added into button {1} for player {2} ({3}): Player does not know this mount", action, button, GetName(), GetGUID().ToString());
|
||||
return false;
|
||||
@@ -1655,7 +1655,7 @@ namespace Game.Entities
|
||||
if (questFactionRewEntry != null)
|
||||
{
|
||||
uint field = (uint)Math.Abs(quest.RewardFactionValue[i]);
|
||||
rep = questFactionRewEntry.QuestRewFactionValue[field];
|
||||
rep = questFactionRewEntry.Difficulty[field];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2117,7 +2117,7 @@ namespace Game.Entities
|
||||
}
|
||||
public bool IsInAreaTriggerRadius(AreaTriggerRecord trigger)
|
||||
{
|
||||
if (trigger == null || GetMapId() != trigger.MapID)
|
||||
if (trigger == null || GetMapId() != trigger.ContinentID)
|
||||
return false;
|
||||
|
||||
if (trigger.Radius > 0.0f)
|
||||
@@ -3752,13 +3752,13 @@ namespace Game.Entities
|
||||
|
||||
if (!IsInCombat())
|
||||
{
|
||||
if (powerType.RegenerationDelay != 0 && Time.GetMSTimeDiffToNow(m_combatExitTime) < powerType.RegenerationDelay)
|
||||
if (powerType.RegenInterruptTimeMS != 0 && Time.GetMSTimeDiffToNow(m_combatExitTime) < powerType.RegenInterruptTimeMS)
|
||||
return;
|
||||
|
||||
addvalue = (powerType.RegenerationPeace + GetFloatValue(UnitFields.PowerRegenFlatModifier + (int)powerIndex)) * 0.001f * m_regenTimer;
|
||||
addvalue = (powerType.RegenPeace + GetFloatValue(UnitFields.PowerRegenFlatModifier + (int)powerIndex)) * 0.001f * m_regenTimer;
|
||||
}
|
||||
else
|
||||
addvalue = (powerType.RegenerationCombat + GetFloatValue(UnitFields.PowerRegenInterruptedFlatModifier + (int)powerIndex)) * 0.001f * m_regenTimer;
|
||||
addvalue = (powerType.RegenCombat + GetFloatValue(UnitFields.PowerRegenInterruptedFlatModifier + (int)powerIndex)) * 0.001f * m_regenTimer;
|
||||
|
||||
WorldCfg[] RatesForPower =
|
||||
{
|
||||
@@ -3793,7 +3793,7 @@ namespace Game.Entities
|
||||
addvalue += GetTotalAuraModifierByMiscValue(AuraType.ModPowerRegen, (int)power) * ((power != PowerType.Energy) ? m_regenTimerCount : m_regenTimer) / (5 * Time.InMilliseconds);
|
||||
}
|
||||
|
||||
int minPower = powerType.RegenerationMin;
|
||||
int minPower = powerType.MinPower;
|
||||
int maxPower = GetMaxPower(power);
|
||||
|
||||
if (addvalue < 0.0f)
|
||||
@@ -3812,17 +3812,17 @@ namespace Game.Entities
|
||||
addvalue += m_powerFraction[powerIndex];
|
||||
int integerValue = (int)Math.Abs(addvalue);
|
||||
|
||||
if (powerType.RegenerationCenter != 0)
|
||||
if (powerType.CenterPower != 0)
|
||||
{
|
||||
if (curValue > powerType.RegenerationCenter)
|
||||
if (curValue > powerType.CenterPower)
|
||||
{
|
||||
addvalue = -Math.Abs(addvalue);
|
||||
minPower = powerType.RegenerationCenter;
|
||||
minPower = powerType.CenterPower;
|
||||
}
|
||||
else if (curValue < powerType.RegenerationCenter)
|
||||
else if (curValue < powerType.CenterPower)
|
||||
{
|
||||
addvalue = Math.Abs(addvalue);
|
||||
maxPower = powerType.RegenerationCenter;
|
||||
maxPower = powerType.CenterPower;
|
||||
}
|
||||
else
|
||||
return;
|
||||
@@ -3982,46 +3982,46 @@ namespace Game.Entities
|
||||
switch (selection)
|
||||
{
|
||||
case 0:
|
||||
if (!entry.Flags.HasAnyFlag((ushort)1))
|
||||
if (!entry.Flags.HasAnyFlag((short)1))
|
||||
return false;
|
||||
return !entry.Flags.HasAnyFlag((ushort)0x2C);
|
||||
return !entry.Flags.HasAnyFlag((short)0x2C);
|
||||
case 1:
|
||||
if (!entry.Flags.HasAnyFlag((ushort)1))
|
||||
if (!entry.Flags.HasAnyFlag((short)1))
|
||||
return false;
|
||||
if (!entry.Flags.HasAnyFlag((ushort)0x94))
|
||||
if (!entry.Flags.HasAnyFlag((short)0x94))
|
||||
return false;
|
||||
return !entry.Flags.HasAnyFlag((ushort)8);
|
||||
return !entry.Flags.HasAnyFlag((short)8);
|
||||
case 2:
|
||||
if (!entry.Flags.HasAnyFlag((ushort)1))
|
||||
if (!entry.Flags.HasAnyFlag((short)1))
|
||||
return false;
|
||||
if (!entry.Flags.HasAnyFlag((ushort)0x70))
|
||||
if (!entry.Flags.HasAnyFlag((short)0x70))
|
||||
return false;
|
||||
return !entry.Flags.HasAnyFlag((ushort)8);
|
||||
return !entry.Flags.HasAnyFlag((short)8);
|
||||
case 3:
|
||||
if (!entry.Flags.HasAnyFlag((ushort)1))
|
||||
if (!entry.Flags.HasAnyFlag((short)1))
|
||||
return false;
|
||||
if (!entry.Flags.HasAnyFlag((ushort)0x20))
|
||||
if (!entry.Flags.HasAnyFlag((short)0x20))
|
||||
return false;
|
||||
return !entry.Flags.HasAnyFlag((ushort)8);
|
||||
return !entry.Flags.HasAnyFlag((short)8);
|
||||
case 4:
|
||||
case 8:
|
||||
if (!entry.Flags.HasAnyFlag((ushort)3))
|
||||
if (!entry.Flags.HasAnyFlag((short)3))
|
||||
return false;
|
||||
return !entry.Flags.HasAnyFlag((ushort)0x2C);
|
||||
return !entry.Flags.HasAnyFlag((short)0x2C);
|
||||
case 5:
|
||||
case 9:
|
||||
if (!entry.Flags.HasAnyFlag((ushort)3))
|
||||
if (!entry.Flags.HasAnyFlag((short)3))
|
||||
return false;
|
||||
if (!entry.Flags.HasAnyFlag((ushort)0x94))
|
||||
if (!entry.Flags.HasAnyFlag((short)0x94))
|
||||
return false;
|
||||
return !entry.Flags.HasAnyFlag((ushort)8);
|
||||
return !entry.Flags.HasAnyFlag((short)8);
|
||||
case 6:
|
||||
case 10:
|
||||
if (!entry.Flags.HasAnyFlag((ushort)3))
|
||||
if (!entry.Flags.HasAnyFlag((short)3))
|
||||
return false;
|
||||
if (!entry.Flags.HasAnyFlag((ushort)0x70))
|
||||
if (!entry.Flags.HasAnyFlag((short)0x70))
|
||||
return false;
|
||||
return !entry.Flags.HasAnyFlag((ushort)8);
|
||||
return !entry.Flags.HasAnyFlag((short)8);
|
||||
case 7:
|
||||
return true;
|
||||
default:
|
||||
@@ -5143,7 +5143,7 @@ namespace Game.Entities
|
||||
{
|
||||
ChrRacesRecord rEntry = CliDB.ChrRacesStorage.LookupByKey((byte)race);
|
||||
if (rEntry != null)
|
||||
return rEntry.TeamID;
|
||||
return (uint)rEntry.Alliance;
|
||||
|
||||
Log.outError(LogFilter.Player, "Race ({0}) not found in DBC: wrong DBC files?", race);
|
||||
return TeamId.Neutral;
|
||||
@@ -6731,7 +6731,7 @@ namespace Game.Entities
|
||||
// check node starting pos data set case if provided
|
||||
if (node.Pos.X != 0.0f || node.Pos.Y != 0.0f || node.Pos.Z != 0.0f)
|
||||
{
|
||||
if (node.MapID != GetMapId() || !IsInDist(node.Pos.X, node.Pos.Y, node.Pos.Z, 2 * SharedConst.InteractionDistance))
|
||||
if (node.ContinentID != GetMapId() || !IsInDist(node.Pos.X, node.Pos.Y, node.Pos.Z, 2 * SharedConst.InteractionDistance))
|
||||
{
|
||||
GetSession().SendActivateTaxiReply(ActivateTaxiReply.TooFarAway);
|
||||
return false;
|
||||
@@ -6842,7 +6842,7 @@ namespace Game.Entities
|
||||
m_taxi.ClearTaxiDestinations();
|
||||
ModifyMoney(-totalcost);
|
||||
UpdateCriteria(CriteriaTypes.GoldSpentForTravelling, totalcost);
|
||||
TeleportTo(lastPathNode.MapID, lastPathNode.Pos.X, lastPathNode.Pos.Y, lastPathNode.Pos.Z, GetOrientation());
|
||||
TeleportTo(lastPathNode.ContinentID, lastPathNode.Pos.X, lastPathNode.Pos.Y, lastPathNode.Pos.Z, GetOrientation());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -6863,8 +6863,8 @@ namespace Game.Entities
|
||||
|
||||
List<uint> nodes = new List<uint>();
|
||||
|
||||
nodes.Add(entry.From);
|
||||
nodes.Add(entry.To);
|
||||
nodes.Add(entry.FromTaxiNode);
|
||||
nodes.Add(entry.ToTaxiNode);
|
||||
|
||||
return ActivateTaxiPathTo(nodes, null, spellid);
|
||||
}
|
||||
@@ -6905,7 +6905,7 @@ namespace Game.Entities
|
||||
var prevNode = nodeList[i - 1];
|
||||
|
||||
// skip nodes at another map
|
||||
if (node.MapID != GetMapId())
|
||||
if (node.ContinentID != GetMapId())
|
||||
continue;
|
||||
|
||||
distPrev = distNext;
|
||||
@@ -7054,7 +7054,7 @@ namespace Game.Entities
|
||||
}
|
||||
public bool IsSpellFitByClassAndRace(uint spell_id)
|
||||
{
|
||||
ulong racemask = getRaceMask();
|
||||
long racemask = getRaceMask();
|
||||
uint classmask = getClassMask();
|
||||
|
||||
var bounds = Global.SpellMgr.GetSkillLineAbilityMapBounds(spell_id);
|
||||
|
||||
@@ -538,7 +538,7 @@ namespace Game.Entities
|
||||
|
||||
PowerTypeRecord powerTypeEntry = Global.DB2Mgr.GetPowerTypeEntry(powerType);
|
||||
if (powerTypeEntry != null)
|
||||
return powerTypeEntry.MaxPower;
|
||||
return powerTypeEntry.MaxBasePower;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ namespace Game.Entities
|
||||
// Initialize here
|
||||
foreach (TaxiPathRecord path in CliDB.TaxiPathStorage.Values)
|
||||
{
|
||||
TaxiNodesRecord from = CliDB.TaxiNodesStorage.LookupByKey(path.From);
|
||||
TaxiNodesRecord to = CliDB.TaxiNodesStorage.LookupByKey(path.To);
|
||||
TaxiNodesRecord from = CliDB.TaxiNodesStorage.LookupByKey(path.FromTaxiNode);
|
||||
TaxiNodesRecord to = CliDB.TaxiNodesStorage.LookupByKey(path.ToTaxiNode);
|
||||
if (from != null && to != null && from.Flags.HasAnyFlag(TaxiNodeFlags.Alliance | TaxiNodeFlags.Horde) && to.Flags.HasAnyFlag(TaxiNodeFlags.Alliance | TaxiNodeFlags.Horde))
|
||||
AddVerticeAndEdgeFromNodeInfo(from, to, path.Id, edges);
|
||||
}
|
||||
@@ -62,7 +62,7 @@ namespace Game.Entities
|
||||
|
||||
uint GetVertexIDFromNodeID(TaxiNodesRecord node)
|
||||
{
|
||||
return node.LearnableIndex;
|
||||
return node.CharacterBitNumber;
|
||||
}
|
||||
|
||||
int GetVertexCount()
|
||||
@@ -105,8 +105,8 @@ namespace Game.Entities
|
||||
uint map1, map2;
|
||||
Vector2 pos1, pos2;
|
||||
|
||||
Global.DB2Mgr.DeterminaAlternateMapPosition(nodes[i - 1].MapID, nodes[i - 1].Loc.X, nodes[i - 1].Loc.Y, nodes[i - 1].Loc.Z, out map1, out pos1);
|
||||
Global.DB2Mgr.DeterminaAlternateMapPosition(nodes[i].MapID, nodes[i].Loc.X, nodes[i].Loc.Y, nodes[i].Loc.Z, out map2, out pos2);
|
||||
Global.DB2Mgr.DeterminaAlternateMapPosition(nodes[i - 1].ContinentID, nodes[i - 1].Loc.X, nodes[i - 1].Loc.Y, nodes[i - 1].Loc.Z, out map1, out pos1);
|
||||
Global.DB2Mgr.DeterminaAlternateMapPosition(nodes[i].ContinentID, nodes[i].Loc.X, nodes[i].Loc.Y, nodes[i].Loc.Z, out map2, out pos2);
|
||||
|
||||
if (map1 != map2)
|
||||
continue;
|
||||
@@ -172,11 +172,11 @@ namespace Game.Entities
|
||||
uint CreateVertexFromFromNodeInfoIfNeeded(TaxiNodesRecord node)
|
||||
{
|
||||
//Check if we need a new one or if it may be already created
|
||||
if (m_vertices.Length <= node.LearnableIndex)
|
||||
Array.Resize(ref m_vertices, (int)node.LearnableIndex + 1);
|
||||
if (m_vertices.Length <= node.CharacterBitNumber)
|
||||
Array.Resize(ref m_vertices, (int)node.CharacterBitNumber + 1);
|
||||
|
||||
m_vertices[node.LearnableIndex] = node;
|
||||
return node.LearnableIndex;
|
||||
m_vertices[node.CharacterBitNumber] = node;
|
||||
return node.CharacterBitNumber;
|
||||
}
|
||||
|
||||
TaxiNodesRecord[] m_vertices = new TaxiNodesRecord[0];
|
||||
|
||||
@@ -337,7 +337,7 @@ namespace Game.Entities
|
||||
|
||||
public bool IsGuardianPet()
|
||||
{
|
||||
return IsPet() || (m_Properties != null && m_Properties.Category == SummonCategory.Pet);
|
||||
return IsPet() || (m_Properties != null && m_Properties.Control == SummonCategory.Pet);
|
||||
}
|
||||
|
||||
public override Unit GetOwner() { return m_owner; }
|
||||
@@ -373,7 +373,7 @@ namespace Game.Entities
|
||||
m_bonusSpellDamage = 0;
|
||||
|
||||
m_unitTypeMask |= UnitTypeMask.Guardian;
|
||||
if (properties != null && (properties.Type == SummonType.Pet || properties.Category == SummonCategory.Pet))
|
||||
if (properties != null && (properties.Title == SummonType.Pet || properties.Control == SummonCategory.Pet))
|
||||
{
|
||||
m_unitTypeMask |= UnitTypeMask.ControlableGuardian;
|
||||
InitCharmInfo();
|
||||
|
||||
@@ -213,15 +213,15 @@ namespace Game.Entities
|
||||
|
||||
MoveToNextWaypoint();
|
||||
|
||||
Global.ScriptMgr.OnRelocate(this, _currentFrame.Node.NodeIndex, _currentFrame.Node.MapID, _currentFrame.Node.Loc.X, _currentFrame.Node.Loc.Y, _currentFrame.Node.Loc.Z);
|
||||
Global.ScriptMgr.OnRelocate(this, _currentFrame.Node.NodeIndex, _currentFrame.Node.ContinentID, _currentFrame.Node.Loc.X, _currentFrame.Node.Loc.Y, _currentFrame.Node.Loc.Z);
|
||||
|
||||
Log.outDebug(LogFilter.Transport, "Transport {0} ({1}) moved to node {2} {3} {4} {5} {6}", GetEntry(), GetName(), _currentFrame.Node.NodeIndex, _currentFrame.Node.MapID,
|
||||
Log.outDebug(LogFilter.Transport, "Transport {0} ({1}) moved to node {2} {3} {4} {5} {6}", GetEntry(), GetName(), _currentFrame.Node.NodeIndex, _currentFrame.Node.ContinentID,
|
||||
_currentFrame.Node.Loc.X, _currentFrame.Node.Loc.Y, _currentFrame.Node.Loc.Z);
|
||||
|
||||
// Departure event
|
||||
var nextframe = GetKeyFrames()[_nextFrame];
|
||||
if (_currentFrame.IsTeleportFrame())
|
||||
if (TeleportTransport(nextframe.Node.MapID, nextframe.Node.Loc.X, nextframe.Node.Loc.Y, nextframe.Node.Loc.Z, nextframe.InitialOrientation))
|
||||
if (TeleportTransport(nextframe.Node.ContinentID, nextframe.Node.Loc.X, nextframe.Node.Loc.Y, nextframe.Node.Loc.Z, nextframe.InitialOrientation))
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ namespace Game.Entities
|
||||
UnitTypeMask mask = UnitTypeMask.Summon;
|
||||
if (properties != null)
|
||||
{
|
||||
switch (properties.Category)
|
||||
switch (properties.Control)
|
||||
{
|
||||
case SummonCategory.Pet:
|
||||
mask = UnitTypeMask.Guardian;
|
||||
@@ -414,7 +414,7 @@ namespace Game.Entities
|
||||
case SummonCategory.Ally:
|
||||
case SummonCategory.Unk:
|
||||
{
|
||||
switch (properties.Type)
|
||||
switch (properties.Title)
|
||||
{
|
||||
case SummonType.Minion:
|
||||
case SummonType.Guardian:
|
||||
@@ -664,7 +664,7 @@ namespace Game.Entities
|
||||
var nextFrame = GetKeyFrames()[_nextFrame];
|
||||
|
||||
_delayedTeleport = false;
|
||||
Map newMap = Global.MapMgr.CreateBaseMap(nextFrame.Node.MapID);
|
||||
Map newMap = Global.MapMgr.CreateBaseMap(nextFrame.Node.ContinentID);
|
||||
GetMap().RemoveFromMap(this, false);
|
||||
SetMap(newMap);
|
||||
|
||||
@@ -684,7 +684,7 @@ namespace Game.Entities
|
||||
switch (obj.GetTypeId())
|
||||
{
|
||||
case TypeId.Player:
|
||||
if (!obj.ToPlayer().TeleportTo(nextFrame.Node.MapID, destX, destY, destZ, destO, TeleportToOptions.NotLeaveTransport))
|
||||
if (!obj.ToPlayer().TeleportTo(nextFrame.Node.ContinentID, destX, destY, destZ, destO, TeleportToOptions.NotLeaveTransport))
|
||||
RemovePassenger(obj);
|
||||
break;
|
||||
case TypeId.DynamicObject:
|
||||
|
||||
@@ -687,7 +687,7 @@ namespace Game.Entities
|
||||
if (mountCapability == null)
|
||||
continue;
|
||||
|
||||
if (ridingSkill < mountCapability.RequiredRidingSkill)
|
||||
if (ridingSkill < mountCapability.ReqRidingSkill)
|
||||
continue;
|
||||
|
||||
if (!mountCapability.Flags.HasAnyFlag(MountCapabilityFlags.IgnoreRestrictions))
|
||||
@@ -721,19 +721,19 @@ namespace Game.Entities
|
||||
else if (!mountCapability.Flags.HasAnyFlag(MountCapabilityFlags.Float))
|
||||
continue;
|
||||
|
||||
if (mountCapability.RequiredMap != -1 &&
|
||||
GetMapId() != mountCapability.RequiredMap &&
|
||||
GetMap().GetEntry().CosmeticParentMapID != mountCapability.RequiredMap &&
|
||||
GetMap().GetEntry().ParentMapID != mountCapability.RequiredMap)
|
||||
if (mountCapability.ReqMapID != -1 &&
|
||||
GetMapId() != mountCapability.ReqMapID &&
|
||||
GetMap().GetEntry().CosmeticParentMapID != mountCapability.ReqMapID &&
|
||||
GetMap().GetEntry().ParentMapID != mountCapability.ReqMapID)
|
||||
continue;
|
||||
|
||||
if (mountCapability.RequiredArea != 0 && !Global.DB2Mgr.IsInArea(areaId, mountCapability.RequiredArea))
|
||||
if (mountCapability.ReqAreaID != 0 && !Global.DB2Mgr.IsInArea(areaId, mountCapability.ReqAreaID))
|
||||
continue;
|
||||
|
||||
if (mountCapability.RequiredAura != 0 && !HasAura(mountCapability.RequiredAura))
|
||||
if (mountCapability.ReqSpellAuraID != 0 && !HasAura(mountCapability.ReqSpellAuraID))
|
||||
continue;
|
||||
|
||||
if (mountCapability.RequiredSpell != 0 && !HasSpell(mountCapability.RequiredSpell))
|
||||
if (mountCapability.ReqSpellKnownID != 0 && !HasSpell(mountCapability.ReqSpellKnownID))
|
||||
continue;
|
||||
|
||||
return mountCapability;
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace Game.Entities
|
||||
if (minion.HasUnitTypeMask(UnitTypeMask.Guardian))
|
||||
AddGuidValue(UnitFields.Summon, minion.GetGUID());
|
||||
|
||||
if (minion.m_Properties != null && minion.m_Properties.Type == SummonType.Minipet)
|
||||
if (minion.m_Properties != null && minion.m_Properties.Title == SummonType.Minipet)
|
||||
{
|
||||
SetCritterGUID(minion.GetGUID());
|
||||
if (GetTypeId() == TypeId.Player)
|
||||
@@ -228,7 +228,7 @@ namespace Game.Entities
|
||||
|
||||
m_Controlled.Remove(minion);
|
||||
|
||||
if (minion.m_Properties != null && minion.m_Properties.Type == SummonType.Minipet)
|
||||
if (minion.m_Properties != null && minion.m_Properties.Title == SummonType.Minipet)
|
||||
{
|
||||
if (GetCritterGUID() == minion.GetGUID())
|
||||
SetCritterGUID(ObjectGuid.Empty);
|
||||
|
||||
@@ -2991,7 +2991,7 @@ namespace Game.Entities
|
||||
{
|
||||
if (spellInfo.RangeEntry == null)
|
||||
return 0;
|
||||
if (spellInfo.RangeEntry.MaxRangeFriend == spellInfo.RangeEntry.MaxRangeHostile)
|
||||
if (spellInfo.RangeEntry.RangeMax[0] == spellInfo.RangeEntry.RangeMax[1])
|
||||
return spellInfo.GetMaxRange();
|
||||
if (!target)
|
||||
return spellInfo.GetMaxRange(true);
|
||||
@@ -3002,7 +3002,7 @@ namespace Game.Entities
|
||||
{
|
||||
if (spellInfo.RangeEntry == null)
|
||||
return 0;
|
||||
if (spellInfo.RangeEntry.MinRangeFriend == spellInfo.RangeEntry.MinRangeHostile)
|
||||
if (spellInfo.RangeEntry.RangeMin[0] == spellInfo.RangeEntry.RangeMin[1])
|
||||
return spellInfo.GetMinRange();
|
||||
if (!target)
|
||||
return spellInfo.GetMinRange(true);
|
||||
|
||||
@@ -1175,8 +1175,8 @@ namespace Game.Entities
|
||||
{
|
||||
ArtifactAppearanceRecord artifactAppearance = CliDB.ArtifactAppearanceStorage.LookupByKey(artifact.GetModifier(ItemModifier.ArtifactAppearanceId));
|
||||
if (artifactAppearance != null)
|
||||
if ((ShapeShiftForm)artifactAppearance.ModifiesShapeshiftFormDisplay == form)
|
||||
return artifactAppearance.ShapeshiftDisplayID;
|
||||
if ((ShapeShiftForm)artifactAppearance.OverrideShapeshiftFormID == form)
|
||||
return artifactAppearance.OverrideShapeshiftDisplayID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1892,17 +1892,17 @@ namespace Game.Entities
|
||||
else if (GetTypeId() == TypeId.Player)
|
||||
{
|
||||
ChrClassesRecord cEntry = CliDB.ChrClassesStorage.LookupByKey(GetClass());
|
||||
if (cEntry != null && cEntry.PowerType < PowerType.Max)
|
||||
displayPower = cEntry.PowerType;
|
||||
if (cEntry != null && cEntry.DisplayPower < PowerType.Max)
|
||||
displayPower = cEntry.DisplayPower;
|
||||
}
|
||||
else if (GetTypeId() == TypeId.Unit)
|
||||
{
|
||||
Vehicle vehicle = GetVehicle();
|
||||
Vehicle vehicle = GetVehicleKit();
|
||||
if (vehicle)
|
||||
{
|
||||
PowerDisplayRecord powerDisplay = CliDB.PowerDisplayStorage.LookupByKey(vehicle.GetVehicleInfo().PowerDisplayID[0]);
|
||||
if (powerDisplay != null)
|
||||
displayPower = (PowerType)powerDisplay.PowerType;
|
||||
displayPower = (PowerType)powerDisplay.ActualType;
|
||||
else if (GetClass() == Class.Rogue)
|
||||
displayPower = PowerType.Energy;
|
||||
}
|
||||
@@ -2097,9 +2097,9 @@ namespace Game.Entities
|
||||
{
|
||||
return (Race)GetByteValue(UnitFields.Bytes0, 0);
|
||||
}
|
||||
public ulong getRaceMask()
|
||||
public long getRaceMask()
|
||||
{
|
||||
return (1ul << ((int)GetRace() - 1));
|
||||
return (1 << ((int)GetRace() - 1));
|
||||
}
|
||||
public Class GetClass()
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Game.Entities
|
||||
{
|
||||
PowerDisplayRecord powerDisplay = CliDB.PowerDisplayStorage.LookupByKey(_vehicleInfo.PowerDisplayID[0]);
|
||||
if (powerDisplay != null)
|
||||
_me.SetPowerType((PowerType)powerDisplay.PowerType);
|
||||
_me.SetPowerType((PowerType)powerDisplay.ActualType);
|
||||
else if (_me.GetClass() == Class.Rogue)
|
||||
_me.SetPowerType(PowerType.Energy);
|
||||
}
|
||||
@@ -343,12 +343,12 @@ namespace Game.Entities
|
||||
_me.SetFlag64(UnitFields.NpcFlags, (_me.IsTypeId(TypeId.Player) ? NPCFlags.PlayerVehicle : NPCFlags.SpellClick));
|
||||
|
||||
// Remove UNIT_FLAG_NOT_SELECTABLE if passenger did not have it before entering vehicle
|
||||
if (seat.Value.SeatInfo.Flags[0].HasAnyFlag((uint)VehicleSeatFlags.PassengerNotSelectable) && !seat.Value.Passenger.IsUnselectable)
|
||||
if (seat.Value.SeatInfo.Flags.HasAnyFlag(VehicleSeatFlags.PassengerNotSelectable) && !seat.Value.Passenger.IsUnselectable)
|
||||
unit.RemoveFlag(UnitFields.Flags, UnitFlags.NotSelectable);
|
||||
|
||||
seat.Value.Passenger.Reset();
|
||||
|
||||
if (_me.IsTypeId(TypeId.Unit) && unit.IsTypeId(TypeId.Player) && seat.Value.SeatInfo.Flags[0].HasAnyFlag((uint)VehicleSeatFlags.CanControl))
|
||||
if (_me.IsTypeId(TypeId.Unit) && unit.IsTypeId(TypeId.Player) && seat.Value.SeatInfo.Flags.HasAnyFlag(VehicleSeatFlags.CanControl))
|
||||
_me.RemoveCharmedBy(unit);
|
||||
|
||||
if (_me.IsInWorld)
|
||||
@@ -579,11 +579,11 @@ namespace Game.Entities
|
||||
player.StopCastingCharm();
|
||||
player.StopCastingBindSight();
|
||||
player.SendOnCancelExpectedVehicleRideAura();
|
||||
if (!veSeat.Flags[1].HasAnyFlag((uint)VehicleSeatFlagsB.KeepPet))
|
||||
if (!veSeat.FlagsB.HasAnyFlag(VehicleSeatFlagsB.KeepPet))
|
||||
player.UnsummonPetTemporaryIfAny();
|
||||
}
|
||||
|
||||
if (Seat.Value.SeatInfo.Flags[0].HasAnyFlag((uint)VehicleSeatFlags.PassengerNotSelectable))
|
||||
if (Seat.Value.SeatInfo.Flags.HasAnyFlag(VehicleSeatFlags.PassengerNotSelectable))
|
||||
Passenger.SetFlag(UnitFields.Flags, UnitFlags.NotSelectable);
|
||||
|
||||
Passenger.m_movementInfo.transport.pos.Relocate(veSeat.AttachmentOffset.X, veSeat.AttachmentOffset.Y, veSeat.AttachmentOffset.Z);
|
||||
@@ -592,7 +592,7 @@ namespace Game.Entities
|
||||
Passenger.m_movementInfo.transport.guid = Target.GetBase().GetGUID();
|
||||
|
||||
if (Target.GetBase().IsTypeId(TypeId.Unit) && Passenger.IsTypeId(TypeId.Player) &&
|
||||
Seat.Value.SeatInfo.Flags[0].HasAnyFlag((uint)VehicleSeatFlags.CanControl))
|
||||
Seat.Value.SeatInfo.Flags.HasAnyFlag(VehicleSeatFlags.CanControl))
|
||||
Contract.Assert(Target.GetBase().SetCharmedBy(Passenger, CharmType.Vehicle)); // SMSG_CLIENT_CONTROL
|
||||
|
||||
Passenger.SendClearTarget(); // SMSG_BREAK_TARGET
|
||||
|
||||
@@ -37,12 +37,12 @@ namespace Game.Garrisons
|
||||
|
||||
foreach (GameObjectsRecord gameObject in CliDB.GameObjectsStorage.Values)
|
||||
{
|
||||
if (gameObject.Type == GameObjectTypes.GarrisonPlot)
|
||||
if (gameObject.TypeID == GameObjectTypes.GarrisonPlot)
|
||||
{
|
||||
if (!_garrisonPlots.ContainsKey(gameObject.MapID))
|
||||
_garrisonPlots[gameObject.MapID] = new Dictionary<uint, GameObjectsRecord>();
|
||||
if (!_garrisonPlots.ContainsKey(gameObject.OwnerID))
|
||||
_garrisonPlots[gameObject.OwnerID] = new Dictionary<uint, GameObjectsRecord>();
|
||||
|
||||
_garrisonPlots[gameObject.MapID][(uint)gameObject.Data[0]] = gameObject;
|
||||
_garrisonPlots[gameObject.OwnerID][(uint)gameObject.PropValue[0]] = gameObject;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Game.Garrisons
|
||||
_garrisonBuildingPlotInstances[MathFunctions.MakePair64(buildingPlotInst.GarrBuildingID, buildingPlotInst.GarrSiteLevelPlotInstID)] = buildingPlotInst.Id;
|
||||
|
||||
foreach (GarrBuildingRecord building in CliDB.GarrBuildingStorage.Values)
|
||||
_garrisonBuildingsByType.Add(building.Type, building.Id);
|
||||
_garrisonBuildingsByType.Add(building.BuildingType, building.Id);
|
||||
|
||||
for (var i = 0; i < 2; ++i)
|
||||
_garrisonFollowerAbilities[i] = new Dictionary<uint, GarrAbilities>();
|
||||
@@ -63,7 +63,7 @@ namespace Game.Garrisons
|
||||
GarrAbilityRecord ability = CliDB.GarrAbilityStorage.LookupByKey(followerAbility.GarrAbilityID);
|
||||
if (ability != null)
|
||||
{
|
||||
if (ability.FollowerTypeID != (uint)GarrisonFollowerType.Garrison)
|
||||
if (ability.GarrFollowerTypeID != (uint)GarrisonFollowerType.Garrison)
|
||||
continue;
|
||||
|
||||
if (!ability.Flags.HasAnyFlag(GarrisonAbilityFlags.CannotRoll) && ability.Flags.HasAnyFlag(GarrisonAbilityFlags.Trait))
|
||||
@@ -92,7 +92,7 @@ namespace Game.Garrisons
|
||||
public GarrSiteLevelRecord GetGarrSiteLevelEntry(uint garrSiteId, uint level)
|
||||
{
|
||||
foreach (GarrSiteLevelRecord siteLevel in CliDB.GarrSiteLevelStorage.Values)
|
||||
if (siteLevel.SiteID == garrSiteId && siteLevel.Level == level)
|
||||
if (siteLevel.GarrSiteID == garrSiteId && siteLevel.GarrLevel == level)
|
||||
return siteLevel;
|
||||
|
||||
return null;
|
||||
@@ -136,7 +136,7 @@ namespace Game.Garrisons
|
||||
if (!list.Empty())
|
||||
{
|
||||
foreach (uint buildingId in list)
|
||||
if (CliDB.GarrBuildingStorage.LookupByKey(buildingId).Level == currentLevel - 1)
|
||||
if (CliDB.GarrBuildingStorage.LookupByKey(buildingId).UpgradeLevel == currentLevel - 1)
|
||||
return buildingId;
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace Game.Garrisons
|
||||
|
||||
GarrisonDeleteResult garrisonDelete = new GarrisonDeleteResult();
|
||||
garrisonDelete.Result = GarrisonError.Success;
|
||||
garrisonDelete.GarrSiteID = _siteLevel.SiteID;
|
||||
garrisonDelete.GarrSiteID = _siteLevel.GarrSiteID;
|
||||
_owner.SendPacket(garrisonDelete);
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ namespace Game.Garrisons
|
||||
|
||||
Plot plotInfo = _plots[garrPlotInstanceId];
|
||||
plotInfo.PacketInfo.GarrPlotInstanceID = garrPlotInstanceId;
|
||||
plotInfo.PacketInfo.PlotPos.Relocate(gameObject.Position.X, gameObject.Position.Y, gameObject.Position.Z, 2 * (float)Math.Acos(gameObject.RotationW));
|
||||
plotInfo.PacketInfo.PlotPos.Relocate(gameObject.Pos.X, gameObject.Pos.Y, gameObject.Pos.Z, 2 * (float)Math.Acos(gameObject.Rot[3]));
|
||||
plotInfo.PacketInfo.PlotType = plot.PlotType;
|
||||
plotInfo.EmptyGameObjectId = gameObject.Id;
|
||||
plotInfo.GarrSiteLevelPlotInstId = plots[i].Id;
|
||||
@@ -366,7 +366,7 @@ namespace Game.Garrisons
|
||||
if (plot.BuildingInfo.PacketInfo.HasValue)
|
||||
{
|
||||
oldBuildingId = plot.BuildingInfo.PacketInfo.Value.GarrBuildingID;
|
||||
if (CliDB.GarrBuildingStorage.LookupByKey(oldBuildingId).Type != building.Type)
|
||||
if (CliDB.GarrBuildingStorage.LookupByKey(oldBuildingId).BuildingType != building.BuildingType)
|
||||
plot.ClearBuildingInfo(_owner);
|
||||
}
|
||||
|
||||
@@ -378,8 +378,8 @@ namespace Game.Garrisons
|
||||
map.AddToMap(go);
|
||||
}
|
||||
|
||||
_owner.ModifyCurrency((CurrencyTypes)building.CostCurrencyID, -building.CostCurrencyAmount, false, true);
|
||||
_owner.ModifyMoney(-building.CostMoney * MoneyConstants.Gold, false);
|
||||
_owner.ModifyCurrency((CurrencyTypes)building.CurrencyTypeID, -building.CurrencyQty, false, true);
|
||||
_owner.ModifyMoney(-building.GoldCost * MoneyConstants.Gold, false);
|
||||
|
||||
if (oldBuildingId != 0)
|
||||
{
|
||||
@@ -418,13 +418,13 @@ namespace Game.Garrisons
|
||||
|
||||
GarrBuildingRecord constructing = CliDB.GarrBuildingStorage.LookupByKey(buildingRemoved.GarrBuildingID);
|
||||
// Refund construction/upgrade cost
|
||||
_owner.ModifyCurrency((CurrencyTypes)constructing.CostCurrencyID, constructing.CostCurrencyAmount, false, true);
|
||||
_owner.ModifyMoney(constructing.CostMoney * MoneyConstants.Gold, false);
|
||||
_owner.ModifyCurrency((CurrencyTypes)constructing.CurrencyTypeID, constructing.CurrencyQty, false, true);
|
||||
_owner.ModifyMoney(constructing.GoldCost * MoneyConstants.Gold, false);
|
||||
|
||||
if (constructing.Level > 1)
|
||||
if (constructing.UpgradeLevel > 1)
|
||||
{
|
||||
// Restore previous level building
|
||||
uint restored = Global.GarrisonMgr.GetPreviousLevelBuilding(constructing.Type, constructing.Level);
|
||||
uint restored = Global.GarrisonMgr.GetPreviousLevelBuilding(constructing.BuildingType, constructing.UpgradeLevel);
|
||||
Contract.Assert(restored != 0);
|
||||
|
||||
GarrisonPlaceBuildingResult placeBuildingResult = new GarrisonPlaceBuildingResult();
|
||||
@@ -493,7 +493,7 @@ namespace Game.Garrisons
|
||||
follower.PacketInfo.DbID = dbId;
|
||||
follower.PacketInfo.GarrFollowerID = garrFollowerId;
|
||||
follower.PacketInfo.Quality = followerEntry.Quality; // TODO: handle magic upgrades
|
||||
follower.PacketInfo.FollowerLevel = followerEntry.Level;
|
||||
follower.PacketInfo.FollowerLevel = followerEntry.FollowerLevel;
|
||||
follower.PacketInfo.ItemLevelWeapon = followerEntry.ItemLevelWeapon;
|
||||
follower.PacketInfo.ItemLevelArmor = followerEntry.ItemLevelArmor;
|
||||
follower.PacketInfo.Xp = 0;
|
||||
@@ -521,7 +521,7 @@ namespace Game.Garrisons
|
||||
|
||||
GarrisonInfo garrison = new GarrisonInfo();
|
||||
garrison.GarrTypeID = GarrisonType.Garrison;
|
||||
garrison.GarrSiteID = _siteLevel.SiteID;
|
||||
garrison.GarrSiteID = _siteLevel.GarrSiteID;
|
||||
garrison.GarrSiteLevelID = _siteLevel.Id;
|
||||
garrison.NumFollowerActivationsRemaining = _followerActivationsRemainingToday;
|
||||
foreach (var plot in _plots.Values)
|
||||
@@ -602,7 +602,7 @@ namespace Game.Garrisons
|
||||
return GarrisonError.InvalidPlotBuilding;
|
||||
|
||||
// Cannot place buldings of higher level than garrison level
|
||||
if (building.Level > _siteLevel.Level)
|
||||
if (building.UpgradeLevel > _siteLevel.MaxBuildingLevel)
|
||||
return GarrisonError.InvalidBuildingId;
|
||||
|
||||
if (building.Flags.HasAnyFlag(GarrisonBuildingFlags.NeedsPlan))
|
||||
@@ -620,16 +620,16 @@ namespace Game.Garrisons
|
||||
if (p.Value.BuildingInfo.PacketInfo.HasValue)
|
||||
{
|
||||
existingBuilding = CliDB.GarrBuildingStorage.LookupByKey(p.Value.BuildingInfo.PacketInfo.Value.GarrBuildingID);
|
||||
if (existingBuilding.Type == building.Type)
|
||||
if (p.Key != garrPlotInstanceId || existingBuilding.Level + 1 != building.Level) // check if its an upgrade in same plot
|
||||
if (existingBuilding.BuildingType == building.BuildingType)
|
||||
if (p.Key != garrPlotInstanceId || existingBuilding.UpgradeLevel + 1 != building.UpgradeLevel) // check if its an upgrade in same plot
|
||||
return GarrisonError.BuildingExists;
|
||||
}
|
||||
}
|
||||
|
||||
if (!_owner.HasCurrency(building.CostCurrencyID, (uint)building.CostCurrencyAmount))
|
||||
if (!_owner.HasCurrency(building.CurrencyTypeID, (uint)building.CurrencyQty))
|
||||
return GarrisonError.NotEnoughCurrency;
|
||||
|
||||
if (!_owner.HasEnoughMoney(building.CostMoney * MoneyConstants.Gold))
|
||||
if (!_owner.HasEnoughMoney(building.GoldCost * MoneyConstants.Gold))
|
||||
return GarrisonError.NotEnoughGold;
|
||||
|
||||
// New building cannot replace another building currently under construction
|
||||
@@ -673,7 +673,7 @@ namespace Game.Garrisons
|
||||
if (PacketInfo.HasValue)
|
||||
{
|
||||
GarrBuildingRecord building = CliDB.GarrBuildingStorage.LookupByKey(PacketInfo.Value.GarrBuildingID);
|
||||
if (PacketInfo.Value.TimeBuilt + building.BuildDuration <= Time.UnixTime)
|
||||
if (PacketInfo.Value.TimeBuilt + building.BuildSeconds <= Time.UnixTime)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -696,7 +696,7 @@ namespace Game.Garrisons
|
||||
GarrPlotRecord plot = CliDB.GarrPlotStorage.LookupByKey(plotInstance.GarrPlotID);
|
||||
GarrBuildingRecord building = CliDB.GarrBuildingStorage.LookupByKey(BuildingInfo.PacketInfo.Value.GarrBuildingID);
|
||||
|
||||
entry = faction == GarrisonFactionIndex.Horde ? plot.HordeConstructionGameObjectID : plot.AllianceConstructionGameObjectID;
|
||||
entry = faction == GarrisonFactionIndex.Horde ? plot.HordeConstructObjID : plot.AllianceConstructObjID;
|
||||
if (BuildingInfo.PacketInfo.Value.Active || entry == 0)
|
||||
entry = faction == GarrisonFactionIndex.Horde ? building.HordeGameObjectID : building.AllianceGameObjectID;
|
||||
}
|
||||
|
||||
@@ -900,7 +900,7 @@ namespace Game
|
||||
if (mapEntry == null
|
||||
|| mapEntry.CorpseMapID < 0
|
||||
|| mapEntry.CorpseMapID != entry.MapID
|
||||
|| (mapEntry.CorpsePos.X == 0 && mapEntry.CorpsePos.Y == 0))
|
||||
|| (mapEntry.Corpse.X == 0 && mapEntry.Corpse.Y == 0))
|
||||
{
|
||||
// not have any corrdinates for check distance anyway
|
||||
entryFar = entry;
|
||||
@@ -908,8 +908,8 @@ namespace Game
|
||||
}
|
||||
|
||||
// at entrance map calculate distance (2D);
|
||||
float dist2 = (entry.Loc.X - mapEntry.CorpsePos.X) * (entry.Loc.X - mapEntry.CorpsePos.X)
|
||||
+ (entry.Loc.Y - mapEntry.CorpsePos.Y) * (entry.Loc.Y - mapEntry.CorpsePos.Y);
|
||||
float dist2 = (entry.Loc.X - mapEntry.Corpse.X) * (entry.Loc.X - mapEntry.Corpse.X)
|
||||
+ (entry.Loc.Y - mapEntry.Corpse.Y) * (entry.Loc.Y - mapEntry.Corpse.Y);
|
||||
if (foundEntr)
|
||||
{
|
||||
if (dist2 < distEntr)
|
||||
@@ -2136,7 +2136,7 @@ namespace Game
|
||||
equipmentInfo.Items[i].ItemId, equipmentInfo.Items[i].AppearanceModId, i + 1, i + 1, entry, id);
|
||||
ItemModifiedAppearanceRecord defaultAppearance = Global.DB2Mgr.GetDefaultItemModifiedAppearance(equipmentInfo.Items[i].ItemId);
|
||||
if (defaultAppearance != null)
|
||||
equipmentInfo.Items[i].AppearanceModId = defaultAppearance.AppearanceModID;
|
||||
equipmentInfo.Items[i].AppearanceModId = defaultAppearance.ItemAppearanceModifierID;
|
||||
else
|
||||
equipmentInfo.Items[i].AppearanceModId = 0;
|
||||
continue;
|
||||
@@ -3611,17 +3611,17 @@ namespace Game
|
||||
{
|
||||
GameObjectTemplate go = new GameObjectTemplate();
|
||||
go.entry = db2go.Id;
|
||||
go.type = db2go.Type;
|
||||
go.type = db2go.TypeID;
|
||||
go.displayId = db2go.DisplayID;
|
||||
go.name = db2go.Name[Global.WorldMgr.GetDefaultDbcLocale()];
|
||||
go.size = db2go.Size;
|
||||
go.size = db2go.Scale;
|
||||
|
||||
unsafe
|
||||
{
|
||||
fixed (int* b = go.Raw.data)
|
||||
{
|
||||
for (byte x = 0; x < db2go.Data.Length; ++x)
|
||||
b[x] = db2go.Data[x];
|
||||
for (byte x = 0; x < db2go.PropValue.Length; ++x)
|
||||
b[x] = db2go.PropValue[x];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4414,7 +4414,7 @@ namespace Game
|
||||
continue;
|
||||
|
||||
var itemTemplate = new ItemTemplate(db2Data, sparse);
|
||||
itemTemplate.MaxDurability = FillMaxDurability(db2Data.Class, db2Data.SubClass, sparse.inventoryType, (ItemQuality)sparse.Quality, sparse.ItemLevel);
|
||||
itemTemplate.MaxDurability = FillMaxDurability(db2Data.ClassID, db2Data.SubclassID, sparse.inventoryType, (ItemQuality)sparse.OverallQualityID, sparse.ItemLevel);
|
||||
|
||||
var itemSpecOverrides = Global.DB2Mgr.GetItemSpecOverrides(sparse.Id);
|
||||
if (itemSpecOverrides != null)
|
||||
@@ -4454,7 +4454,7 @@ namespace Game
|
||||
if (!hasPrimary || !hasSecondary)
|
||||
continue;
|
||||
|
||||
ChrSpecializationRecord specialization = CliDB.ChrSpecializationStorage.LookupByKey(itemSpec.SpecID);
|
||||
ChrSpecializationRecord specialization = CliDB.ChrSpecializationStorage.LookupByKey(itemSpec.SpecializationID);
|
||||
if (specialization != null)
|
||||
{
|
||||
if (Convert.ToBoolean((1 << (specialization.ClassID - 1)) & sparse.AllowableClass))
|
||||
@@ -4482,7 +4482,7 @@ namespace Game
|
||||
|
||||
foreach (var effectEntry in CliDB.ItemEffectStorage.Values)
|
||||
{
|
||||
var itemTemplate = ItemTemplateStorage.LookupByKey(effectEntry.ItemID);
|
||||
var itemTemplate = ItemTemplateStorage.LookupByKey(effectEntry.ParentItemID);
|
||||
if (itemTemplate == null)
|
||||
continue;
|
||||
|
||||
@@ -5223,8 +5223,8 @@ namespace Game
|
||||
pInfo.PositionZ = positionZ;
|
||||
pInfo.Orientation = orientation;
|
||||
|
||||
pInfo.DisplayId_m = rEntry.MaleDisplayID;
|
||||
pInfo.DisplayId_f = rEntry.FemaleDisplayID;
|
||||
pInfo.DisplayId_m = rEntry.MaleDisplayId;
|
||||
pInfo.DisplayId_f = rEntry.FemaleDisplayId;
|
||||
|
||||
_playerInfo[currentrace][currentclass] = pInfo;
|
||||
|
||||
@@ -9153,7 +9153,7 @@ namespace Game
|
||||
foreach (var node in CliDB.TaxiNodesStorage.Values)
|
||||
{
|
||||
var i = node.Id;
|
||||
if (node.MapID != mapid || !node.Flags.HasAnyFlag(requireFlag))
|
||||
if (node.ContinentID != mapid || !node.Flags.HasAnyFlag(requireFlag))
|
||||
continue;
|
||||
|
||||
byte field = (byte)((i - 1) / 8);
|
||||
@@ -9280,7 +9280,7 @@ namespace Game
|
||||
if ((!useParentDbValue && pair.Value.target_mapId == entrance_map) || (useParentDbValue && pair.Value.target_mapId == parentId))
|
||||
{
|
||||
AreaTriggerRecord atEntry = CliDB.AreaTriggerStorage.LookupByKey(pair.Key);
|
||||
if (atEntry != null && atEntry.MapID == Map)
|
||||
if (atEntry != null && atEntry.ContinentID == Map)
|
||||
return pair.Value;
|
||||
}
|
||||
}
|
||||
@@ -10076,10 +10076,10 @@ namespace Game
|
||||
{
|
||||
public ItemSpecStats(ItemRecord item, ItemSparseRecord sparse)
|
||||
{
|
||||
if (item.Class == ItemClass.Weapon)
|
||||
if (item.ClassID == ItemClass.Weapon)
|
||||
{
|
||||
ItemType = 5;
|
||||
switch ((ItemSubClassWeapon)item.SubClass)
|
||||
switch ((ItemSubClassWeapon)item.SubclassID)
|
||||
{
|
||||
case ItemSubClassWeapon.Axe:
|
||||
AddStat(ItemSpecStat.OneHandedAxe);
|
||||
@@ -10133,9 +10133,9 @@ namespace Game
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (item.Class == ItemClass.Armor)
|
||||
else if (item.ClassID == ItemClass.Armor)
|
||||
{
|
||||
switch ((ItemSubClassArmor)item.SubClass)
|
||||
switch ((ItemSubClassArmor)item.SubclassID)
|
||||
{
|
||||
case ItemSubClassArmor.Cloth:
|
||||
if (sparse.inventoryType != InventoryType.Cloak)
|
||||
@@ -10157,12 +10157,12 @@ namespace Game
|
||||
ItemType = 4;
|
||||
break;
|
||||
default:
|
||||
if (item.SubClass == (int)ItemSubClassArmor.Shield)
|
||||
if (item.SubclassID == (int)ItemSubClassArmor.Shield)
|
||||
{
|
||||
ItemType = 6;
|
||||
AddStat(ItemSpecStat.Shield);
|
||||
}
|
||||
else if (item.SubClass > (int)ItemSubClassArmor.Shield && item.SubClass <= (int)ItemSubClassArmor.Relic)
|
||||
else if (item.SubclassID > (int)ItemSubClassArmor.Shield && item.SubclassID <= (int)ItemSubClassArmor.Relic)
|
||||
{
|
||||
ItemType = 6;
|
||||
AddStat(ItemSpecStat.Relic);
|
||||
@@ -10172,7 +10172,7 @@ namespace Game
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (item.Class == ItemClass.Gem)
|
||||
else if (item.ClassID == ItemClass.Gem)
|
||||
{
|
||||
ItemType = 7;
|
||||
GemPropertiesRecord gem = CliDB.GemPropertiesStorage.LookupByKey(sparse.GemProperties);
|
||||
@@ -10206,8 +10206,8 @@ namespace Game
|
||||
ItemType = 0;
|
||||
|
||||
for (uint i = 0; i < ItemConst.MaxStats; ++i)
|
||||
if (sparse.ItemStatType[i] != -1)
|
||||
AddModStat(sparse.ItemStatType[i]);
|
||||
if (sparse.StatModifierBonusStat[i] != -1)
|
||||
AddModStat(sparse.StatModifierBonusStat[i]);
|
||||
}
|
||||
|
||||
void AddStat(ItemSpecStat statType)
|
||||
|
||||
@@ -814,7 +814,7 @@ namespace Game.Groups
|
||||
|
||||
ItemDisenchantLootRecord disenchant = r.GetItemDisenchantLoot(p);
|
||||
if (disenchant != null)
|
||||
if (m_maxEnchantingLevel >= disenchant.RequiredDisenchantSkill)
|
||||
if (m_maxEnchantingLevel >= disenchant.SkillRequired)
|
||||
startLootRoll.ValidRolls |= RollMask.Disenchant;
|
||||
|
||||
p.SendPacket(startLootRoll);
|
||||
@@ -1406,7 +1406,7 @@ namespace Game.Groups
|
||||
{
|
||||
LFGDungeonsRecord dungeon = CliDB.LFGDungeonsStorage.LookupByKey(selectedDungeons.First());
|
||||
if (dungeon != null)
|
||||
if (dungeon.Type == LfgType.RandomDungeon)
|
||||
if (dungeon.TypeID == LfgType.RandomDungeon)
|
||||
randomSlot= dungeon.Id;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Game.Guilds
|
||||
uint guildTeam = TeamId.Alliance;
|
||||
ChrRacesRecord raceEntry = CliDB.ChrRacesStorage.LookupByKey(result.Read<byte>(7));
|
||||
if (raceEntry != null)
|
||||
if (raceEntry.TeamID == 1)
|
||||
if (raceEntry.Alliance == 1)
|
||||
guildTeam = TeamId.Horde;
|
||||
|
||||
LFGuildSettings settings = new LFGuildSettings(listed, guildTeam, guildId, classRoles, availability, interests, level, comment);
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Game
|
||||
return;
|
||||
|
||||
if (artifactAddPower.PowerChoices[0].Rank != artifactPower.PurchasedRank + 1 ||
|
||||
artifactAddPower.PowerChoices[0].Rank > artifactPowerEntry.MaxRank)
|
||||
artifactAddPower.PowerChoices[0].Rank > artifactPowerEntry.MaxPurchasableRank)
|
||||
return;
|
||||
|
||||
var artifactPowerLinks = Global.DB2Mgr.GetArtifactPowerLinks(artifactPower.ArtifactPowerId);
|
||||
@@ -74,7 +74,7 @@ namespace Game
|
||||
if (artifactPowerLinkLearned == null)
|
||||
continue;
|
||||
|
||||
if (artifactPowerLinkLearned.PurchasedRank >= artifactPowerLink.MaxRank)
|
||||
if (artifactPowerLinkLearned.PurchasedRank >= artifactPowerLink.MaxPurchasableRank)
|
||||
{
|
||||
hasAnyLink = true;
|
||||
break;
|
||||
@@ -139,18 +139,18 @@ namespace Game
|
||||
if (artifactAppearanceSet == null || artifactAppearanceSet.ArtifactID != artifact.GetTemplate().GetArtifactID())
|
||||
return;
|
||||
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(artifactAppearance.PlayerConditionID);
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(artifactAppearance.UnlockPlayerConditionID);
|
||||
if (playerCondition != null)
|
||||
if (!ConditionManager.IsPlayerMeetingCondition(_player, playerCondition))
|
||||
return;
|
||||
|
||||
artifact.SetAppearanceModId(artifactAppearance.AppearanceModID);
|
||||
artifact.SetAppearanceModId(artifactAppearance.ItemAppearanceModifierID);
|
||||
artifact.SetModifier(ItemModifier.ArtifactAppearanceId, artifactAppearance.Id);
|
||||
artifact.SetState(ItemUpdateState.Changed, _player);
|
||||
Item childItem = _player.GetChildItemByGuid(artifact.GetChildItem());
|
||||
if (childItem)
|
||||
{
|
||||
childItem.SetAppearanceModId(artifactAppearance.AppearanceModID);
|
||||
childItem.SetAppearanceModId(artifactAppearance.ItemAppearanceModifierID);
|
||||
childItem.SetState(ItemUpdateState.Changed, _player);
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace Game
|
||||
_player.SetVisibleItemSlot(childItem.GetSlot(), childItem);
|
||||
|
||||
// change druid form appearance
|
||||
if (artifactAppearance.ShapeshiftDisplayID != 0 && artifactAppearance.ModifiesShapeshiftFormDisplay != 0 && _player.GetShapeshiftForm() == (ShapeShiftForm)artifactAppearance.ModifiesShapeshiftFormDisplay)
|
||||
if (artifactAppearance.OverrideShapeshiftDisplayID != 0 && artifactAppearance.OverrideShapeshiftFormID != 0 && _player.GetShapeshiftForm() == (ShapeShiftForm)artifactAppearance.OverrideShapeshiftFormID)
|
||||
_player.RestoreDisplayId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ namespace Game
|
||||
|
||||
GenerateRandomCharacterNameResult result = new GenerateRandomCharacterNameResult();
|
||||
result.Success = true;
|
||||
result.Name = Global.DB2Mgr.GetNameGenEntry(packet.Race, packet.Sex, GetSessionDbcLocale(), Global.WorldMgr.GetDefaultDbcLocale());
|
||||
result.Name = Global.DB2Mgr.GetNameGenEntry(packet.Race, packet.Sex);
|
||||
|
||||
SendPacket(result);
|
||||
}
|
||||
@@ -1373,7 +1373,7 @@ namespace Game
|
||||
if (illusion.ItemVisual == 0 || !illusion.Flags.HasAnyFlag(EnchantmentSlotMask.Collectable))
|
||||
return false;
|
||||
|
||||
PlayerConditionRecord condition = CliDB.PlayerConditionStorage.LookupByKey(illusion.PlayerConditionID);
|
||||
PlayerConditionRecord condition = CliDB.PlayerConditionStorage.LookupByKey(illusion.TransmogPlayerConditionID);
|
||||
if (condition != null)
|
||||
if (!ConditionManager.IsPlayerMeetingCondition(_player, condition))
|
||||
return false;
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Game
|
||||
{
|
||||
VehicleSeatRecord seat = vehicle.GetSeatForPassenger(GetPlayer());
|
||||
Contract.Assert(seat != null);
|
||||
if (!seat.Flags[0].HasAnyFlag((uint)VehicleSeatFlags.CanAttack))
|
||||
if (!seat.Flags.HasAnyFlag(VehicleSeatFlags.CanAttack))
|
||||
{
|
||||
SendAttackStop(enemy);
|
||||
return;
|
||||
|
||||
@@ -938,8 +938,8 @@ namespace Game
|
||||
|
||||
itemTarget.SetGem(i, gemData[i], gemScalingLevel);
|
||||
|
||||
if (gemProperties[i] != null && gemProperties[i].EnchantID != 0)
|
||||
itemTarget.SetEnchantment(EnchantmentSlot.Sock1 + i, gemProperties[i].EnchantID, 0, 0, GetPlayer().GetGUID());
|
||||
if (gemProperties[i] != null && gemProperties[i].EnchantId != 0)
|
||||
itemTarget.SetEnchantment(EnchantmentSlot.Sock1 + i, gemProperties[i].EnchantId, 0, 0, GetPlayer().GetGUID());
|
||||
|
||||
uint gemCount = 1;
|
||||
GetPlayer().DestroyItemCount(gems[i], ref gemCount, true);
|
||||
@@ -1097,16 +1097,16 @@ namespace Game
|
||||
}
|
||||
|
||||
// Check if player has enough currency
|
||||
if (!_player.HasCurrency(itemUpgradeEntry.CurrencyID, itemUpgradeEntry.CurrencyCost))
|
||||
if (!_player.HasCurrency(itemUpgradeEntry.CurrencyType, itemUpgradeEntry.CurrencyAmount))
|
||||
{
|
||||
Log.outDebug(LogFilter.Network, "WORLD: HandleUpgradeItems - Player has not enougth currency (ID: {0}, Cost: {1}) not found.", itemUpgradeEntry.CurrencyID, itemUpgradeEntry.CurrencyCost);
|
||||
Log.outDebug(LogFilter.Network, "WORLD: HandleUpgradeItems - Player has not enougth currency (ID: {0}, Cost: {1}) not found.", itemUpgradeEntry.CurrencyType, itemUpgradeEntry.CurrencyAmount);
|
||||
itemUpgradeResult.Success = false;
|
||||
SendPacket(itemUpgradeResult);
|
||||
return;
|
||||
}
|
||||
|
||||
uint currentUpgradeId = item.GetModifier(ItemModifier.UpgradeId);
|
||||
if (currentUpgradeId != itemUpgradeEntry.PrevItemUpgradeID)
|
||||
if (currentUpgradeId != itemUpgradeEntry.PrerequisiteID)
|
||||
{
|
||||
Log.outDebug(LogFilter.Network, "WORLD: HandleUpgradeItems - ItemUpgradeEntry ({0}) is not related to this ItemUpgradePath ({1}).", itemUpgradeEntry.Id, currentUpgradeId);
|
||||
itemUpgradeResult.Success = false;
|
||||
@@ -1126,7 +1126,7 @@ namespace Game
|
||||
_player._ApplyItemBonuses(item, item.GetSlot(), true);
|
||||
|
||||
item.SetState(ItemUpdateState.Changed, _player);
|
||||
_player.ModifyCurrency((CurrencyTypes)itemUpgradeEntry.CurrencyID, -(int)itemUpgradeEntry.CurrencyCost);
|
||||
_player.ModifyCurrency((CurrencyTypes)itemUpgradeEntry.CurrencyType, -(int)itemUpgradeEntry.CurrencyAmount);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SortBags)]
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace Game
|
||||
VehicleSeatRecord seat = vehicle.GetSeatForPassenger(mover);
|
||||
if (seat != null)
|
||||
{
|
||||
if (seat.Flags[0].HasAnyFlag((uint)VehicleSeatFlags.AllowTurning))
|
||||
if (seat.Flags.HasAnyFlag(VehicleSeatFlags.AllowTurning))
|
||||
{
|
||||
if (movementInfo.Pos.GetOrientation() != mover.GetOrientation())
|
||||
{
|
||||
@@ -620,7 +620,7 @@ namespace Game
|
||||
TaxiNodesRecord curDestNode = CliDB.TaxiNodesStorage.LookupByKey(curDest);
|
||||
|
||||
// far teleport case
|
||||
if (curDestNode != null && curDestNode.MapID != GetPlayer().GetMapId())
|
||||
if (curDestNode != null && curDestNode.ContinentID != GetPlayer().GetMapId())
|
||||
{
|
||||
if (GetPlayer().GetMotionMaster().GetCurrentMovementGeneratorType() == MovementGeneratorType.Flight)
|
||||
{
|
||||
@@ -631,7 +631,7 @@ namespace Game
|
||||
TaxiPathNodeRecord node = flight.GetPath()[(int)flight.GetCurrentNode()];
|
||||
flight.SkipCurrentNode();
|
||||
|
||||
GetPlayer().TeleportTo(curDestNode.MapID, node.Loc.X, node.Loc.Y, node.Loc.Z, GetPlayer().GetOrientation());
|
||||
GetPlayer().TeleportTo(curDestNode.ContinentID, node.Loc.X, node.Loc.Y, node.Loc.Z, GetPlayer().GetOrientation());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -281,8 +281,8 @@ namespace Game
|
||||
if (entranceMap != null)
|
||||
{
|
||||
mapID = (uint)corpseMapEntry.CorpseMapID;
|
||||
x = corpseMapEntry.CorpsePos.X;
|
||||
y = corpseMapEntry.CorpsePos.Y;
|
||||
x = corpseMapEntry.Corpse.X;
|
||||
y = corpseMapEntry.Corpse.Y;
|
||||
z = entranceMap.GetHeight(player.GetPhases(), x, y, MapConst.MaxHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace Game
|
||||
MountRecord mount = CliDB.MountStorage.LookupByKey(activateTaxi.FlyingMountID);
|
||||
if (mount != null)
|
||||
{
|
||||
if (GetPlayer().HasSpell(mount.SpellId))
|
||||
if (GetPlayer().HasSpell(mount.SourceSpellID))
|
||||
{
|
||||
var mountDisplays = Global.DB2Mgr.GetMountDisplays(mount.Id);
|
||||
if (mountDisplays != null)
|
||||
@@ -204,7 +204,7 @@ namespace Game
|
||||
}).ToList();
|
||||
|
||||
if (!usableDisplays.Empty())
|
||||
preferredMountDisplay = usableDisplays.SelectRandom().DisplayID;
|
||||
preferredMountDisplay = usableDisplays.SelectRandom().CreatureDisplayInfoID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerConditionRecord condition = CliDB.PlayerConditionStorage.LookupByKey(illusion.PlayerConditionID);
|
||||
PlayerConditionRecord condition = CliDB.PlayerConditionStorage.LookupByKey(illusion.TransmogPlayerConditionID);
|
||||
if (condition != null)
|
||||
{
|
||||
if (!ConditionManager.IsPlayerMeetingCondition(player, condition))
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Game
|
||||
if (!seat.CanSwitchFromSeat())
|
||||
{
|
||||
Log.outError(LogFilter.Network, "HandleRequestVehiclePrevSeat: {0} tried to switch seats but current seatflags {1} don't permit that.",
|
||||
GetPlayer().GetGUID().ToString(), seat.Flags[0]);
|
||||
GetPlayer().GetGUID().ToString(), seat.Flags);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Game
|
||||
if (!seat.CanSwitchFromSeat())
|
||||
{
|
||||
Log.outError(LogFilter.Network, "HandleRequestVehicleNextSeat: {0} tried to switch seats but current seatflags {1} don't permit that.",
|
||||
GetPlayer().GetGUID().ToString(), seat.Flags[0]);
|
||||
GetPlayer().GetGUID().ToString(), seat.Flags);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Game
|
||||
if (!seat.CanSwitchFromSeat())
|
||||
{
|
||||
Log.outError(LogFilter.Network, "HandleMoveChangeVehicleSeats, {0} tried to switch seats but current seatflags {1} don't permit that.",
|
||||
GetPlayer().GetGUID().ToString(), seat.Flags[0]);
|
||||
GetPlayer().GetGUID().ToString(), seat.Flags);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace Game
|
||||
if (!seat.CanSwitchFromSeat())
|
||||
{
|
||||
Log.outError(LogFilter.Network, "HandleRequestVehicleSwitchSeat: {0} tried to switch seats but current seatflags {1} don't permit that.",
|
||||
GetPlayer().GetGUID().ToString(), seat.Flags[0]);
|
||||
GetPlayer().GetGUID().ToString(), seat.Flags);
|
||||
return;
|
||||
}
|
||||
Unit vehUnit;
|
||||
@@ -202,7 +202,7 @@ namespace Game
|
||||
GetPlayer().ExitVehicle();
|
||||
else
|
||||
Log.outError(LogFilter.Network, "{0} tried to exit vehicle, but seatflags {1} (ID: {2}) don't permit that.",
|
||||
GetPlayer().GetGUID().ToString(), seat.Id, seat.Flags[0]);
|
||||
GetPlayer().GetGUID().ToString(), seat.Id, seat.Flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,11 +175,11 @@ namespace Game.Loots
|
||||
for (uint i = 0; i < stacks && lootItems.Count < limit; ++i)
|
||||
{
|
||||
LootItem generatedLoot = new LootItem(item);
|
||||
generatedLoot.context = _difficultyBonusTreeMod;
|
||||
generatedLoot.context = _itemContext;
|
||||
generatedLoot.count = (byte)Math.Min(count, proto.GetMaxStackSize());
|
||||
if (_difficultyBonusTreeMod != 0)
|
||||
if (_itemContext != 0)
|
||||
{
|
||||
List<uint> bonusListIDs = Global.DB2Mgr.GetItemBonusTree(generatedLoot.itemid, _difficultyBonusTreeMod);
|
||||
List<uint> bonusListIDs = Global.DB2Mgr.GetItemBonusTree(generatedLoot.itemid, _itemContext);
|
||||
generatedLoot.BonusListIDs.AddRange(bonusListIDs);
|
||||
}
|
||||
lootItems.Add(generatedLoot);
|
||||
@@ -220,7 +220,7 @@ namespace Game.Loots
|
||||
return false;
|
||||
}
|
||||
|
||||
_difficultyBonusTreeMod = lootOwner.GetMap().GetDifficultyLootBonusTreeMod();
|
||||
_itemContext = lootOwner.GetMap().GetDifficultyLootItemContext();
|
||||
|
||||
tab.Process(this, store.IsRatesAllowed(), (byte)lootMode); // Processing is done there, callback via Loot.AddItem()
|
||||
|
||||
@@ -830,7 +830,7 @@ namespace Game.Loots
|
||||
unlootedCount = 0;
|
||||
roundRobinPlayer = ObjectGuid.Empty;
|
||||
i_LootValidatorRefManager.clearReferences();
|
||||
_difficultyBonusTreeMod = 0;
|
||||
_itemContext = 0;
|
||||
}
|
||||
|
||||
public bool empty() { return items.Empty() && gold == 0; }
|
||||
@@ -866,7 +866,7 @@ namespace Game.Loots
|
||||
|
||||
// Loot GUID
|
||||
ObjectGuid _GUID;
|
||||
byte _difficultyBonusTreeMod;
|
||||
byte _itemContext;
|
||||
}
|
||||
|
||||
public class AELootResult
|
||||
|
||||
@@ -521,24 +521,24 @@ namespace Game.Maps
|
||||
{
|
||||
entry = liquidEntry.Id;
|
||||
type &= MapConst.MapLiquidTypeDarkWater;
|
||||
uint liqTypeIdx = liquidEntry.LiquidType;
|
||||
uint liqTypeIdx = liquidEntry.SoundBank;
|
||||
if (entry < 21)
|
||||
{
|
||||
var area = CliDB.AreaTableStorage.LookupByKey(getArea(x, y));
|
||||
if (area != null)
|
||||
{
|
||||
uint overrideLiquid = area.LiquidTypeID[liquidEntry.LiquidType];
|
||||
uint overrideLiquid = area.LiquidTypeID[liquidEntry.SoundBank];
|
||||
if (overrideLiquid == 0 && area.ParentAreaID == 0)
|
||||
{
|
||||
area = CliDB.AreaTableStorage.LookupByKey(area.ParentAreaID);
|
||||
if (area != null)
|
||||
overrideLiquid = area.LiquidTypeID[liquidEntry.LiquidType];
|
||||
overrideLiquid = area.LiquidTypeID[liquidEntry.SoundBank];
|
||||
}
|
||||
var liq = CliDB.LiquidTypeStorage.LookupByKey(overrideLiquid);
|
||||
if (liq != null)
|
||||
{
|
||||
entry = overrideLiquid;
|
||||
liqTypeIdx = liq.LiquidType;
|
||||
liqTypeIdx = liq.SoundBank;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1883,7 +1883,7 @@ namespace Game.Maps
|
||||
uint liquidFlagType = 0;
|
||||
LiquidTypeRecord liq = CliDB.LiquidTypeStorage.LookupByKey(liquid_type);
|
||||
if (liq != null)
|
||||
liquidFlagType = liq.LiquidType;
|
||||
liquidFlagType = liq.SoundBank;
|
||||
|
||||
if (liquid_type != 0 && liquid_type < 21)
|
||||
{
|
||||
@@ -1902,7 +1902,7 @@ namespace Game.Maps
|
||||
if (liq != null)
|
||||
{
|
||||
liquid_type = overrideLiquid;
|
||||
liquidFlagType = liq.LiquidType;
|
||||
liquidFlagType = liq.SoundBank;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2869,15 +2869,15 @@ namespace Game.Maps
|
||||
return Global.DB2Mgr.GetMapDifficultyData(GetId(), GetDifficultyID());
|
||||
}
|
||||
|
||||
public byte GetDifficultyLootBonusTreeMod()
|
||||
public byte GetDifficultyLootItemContext()
|
||||
{
|
||||
MapDifficultyRecord mapDifficulty = GetMapDifficulty();
|
||||
if (mapDifficulty != null && mapDifficulty.ItemBonusTreeModID != 0)
|
||||
return mapDifficulty.ItemBonusTreeModID;
|
||||
if (mapDifficulty != null && mapDifficulty.ItemContext != 0)
|
||||
return mapDifficulty.ItemContext;
|
||||
|
||||
DifficultyRecord difficulty = CliDB.DifficultyStorage.LookupByKey(GetDifficultyID());
|
||||
if (difficulty != null)
|
||||
return difficulty.ItemBonusTreeModID;
|
||||
return difficulty.ItemContext;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3154,7 +3154,7 @@ namespace Game.Maps
|
||||
var mask = UnitTypeMask.Summon;
|
||||
if (properties != null)
|
||||
{
|
||||
switch (properties.Category)
|
||||
switch (properties.Control)
|
||||
{
|
||||
case SummonCategory.Pet:
|
||||
mask = UnitTypeMask.Guardian;
|
||||
@@ -3169,7 +3169,7 @@ namespace Game.Maps
|
||||
case SummonCategory.Ally:
|
||||
case SummonCategory.Unk:
|
||||
{
|
||||
switch (properties.Type)
|
||||
switch (properties.Title)
|
||||
{
|
||||
case SummonType.Minion:
|
||||
case SummonType.Guardian:
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace Game.Maps
|
||||
AddPathNodeToTransport(anim.TransportID, anim.TimeIndex, anim);
|
||||
|
||||
foreach (TransportRotationRecord rot in CliDB.TransportRotationStorage.Values)
|
||||
AddPathRotationToTransport(rot.TransportID, rot.TimeIndex, rot);
|
||||
AddPathRotationToTransport(rot.GameObjectsID, rot.TimeIndex, rot);
|
||||
}
|
||||
|
||||
void GeneratePath(GameObjectTemplate goInfo, TransportTemplate transport)
|
||||
@@ -124,7 +124,7 @@ namespace Game.Maps
|
||||
if (!mapChange)
|
||||
{
|
||||
var node_i = path[i];
|
||||
if (i != path.Length - 1 && (node_i.Flags.HasAnyFlag(TaxiPathNodeFlags.Teleport) || node_i.MapID != path[i + 1].MapID))
|
||||
if (i != path.Length - 1 && (node_i.Flags.HasAnyFlag(TaxiPathNodeFlags.Teleport) || node_i.ContinentID != path[i + 1].ContinentID))
|
||||
{
|
||||
keyFrames.Last().Teleport = true;
|
||||
mapChange = true;
|
||||
@@ -138,8 +138,8 @@ namespace Game.Maps
|
||||
|
||||
keyFrames.Add(k);
|
||||
splinePath.Add(new Vector3(node_i.Loc.X, node_i.Loc.Y, node_i.Loc.Z));
|
||||
if (!transport.mapsUsed.Contains(k.Node.MapID))
|
||||
transport.mapsUsed.Add(k.Node.MapID);
|
||||
if (!transport.mapsUsed.Contains(k.Node.ContinentID))
|
||||
transport.mapsUsed.Add(k.Node.ContinentID);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -377,7 +377,7 @@ namespace Game.Maps
|
||||
|
||||
// ...at first waypoint
|
||||
TaxiPathNodeRecord startNode = tInfo.keyFrames.First().Node;
|
||||
uint mapId = startNode.MapID;
|
||||
uint mapId = startNode.ContinentID;
|
||||
float x = startNode.Loc.X;
|
||||
float y = startNode.Loc.Y;
|
||||
float z = startNode.Loc.Z;
|
||||
@@ -578,22 +578,9 @@ namespace Game.Maps
|
||||
return Path.First().Value;
|
||||
}
|
||||
|
||||
Quaternion GetAnimRotation(uint time)
|
||||
TransportRotationRecord GetAnimRotation(uint time)
|
||||
{
|
||||
if (Rotations.Empty())
|
||||
return new Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
TransportRotationRecord rot = Rotations.First().Value;
|
||||
foreach (var pair in Rotations)
|
||||
{
|
||||
if (time >= pair.Key)
|
||||
{
|
||||
rot = pair.Value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return new Quaternion(rot.X, rot.Y, rot.Z, rot.W);
|
||||
return Rotations.LookupByKey(time);
|
||||
}
|
||||
|
||||
public Dictionary<uint, TransportAnimationRecord> Path = new Dictionary<uint, TransportAnimationRecord>();
|
||||
|
||||
@@ -503,10 +503,10 @@ namespace Game.Movement
|
||||
if (i_path.Empty() || i_currentNode >= i_path.Count)
|
||||
return;
|
||||
|
||||
uint map0 = i_path[i_currentNode].MapID;
|
||||
uint map0 = i_path[i_currentNode].ContinentID;
|
||||
for (int i = i_currentNode + 1; i < i_path.Count; ++i)
|
||||
{
|
||||
if (i_path[i].MapID != map0)
|
||||
if (i_path[i].ContinentID != map0)
|
||||
{
|
||||
i_currentNode = i;
|
||||
return;
|
||||
@@ -537,7 +537,7 @@ namespace Game.Movement
|
||||
void InitEndGridInfo()
|
||||
{
|
||||
int nodeCount = i_path.Count; //! Number of nodes in path.
|
||||
_endMapId = i_path[nodeCount - 1].MapID; //! MapId of last node
|
||||
_endMapId = i_path[nodeCount - 1].ContinentID; //! MapId of last node
|
||||
_preloadTargetNode = (uint)nodeCount - 3;
|
||||
_endGridX = i_path[nodeCount - 1].Loc.X;
|
||||
_endGridY = i_path[nodeCount - 1].Loc.Y;
|
||||
@@ -563,10 +563,10 @@ namespace Game.Movement
|
||||
if (i_currentNode >= i_path.Count)
|
||||
return (uint)i_path.Count;
|
||||
|
||||
uint curMapId = i_path[i_currentNode].MapID;
|
||||
uint curMapId = i_path[i_currentNode].ContinentID;
|
||||
for (int i = i_currentNode; i < i_path.Count; ++i)
|
||||
{
|
||||
if (i_path[i].MapID != curMapId)
|
||||
if (i_path[i].ContinentID != curMapId)
|
||||
return (uint)i;
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ namespace Game.Movement
|
||||
|
||||
bool IsNodeIncludedInShortenedPath(TaxiPathNodeRecord p1, TaxiPathNodeRecord p2)
|
||||
{
|
||||
return p1.MapID != p2.MapID || Math.Pow(p1.Loc.X - p2.Loc.X, 2) + Math.Pow(p1.Loc.Y - p2.Loc.Y, 2) > (40.0f * 40.0f);
|
||||
return p1.ContinentID != p2.ContinentID || Math.Pow(p1.Loc.X - p2.Loc.X, 2) + Math.Pow(p1.Loc.Y - p2.Loc.Y, 2) > (40.0f * 40.0f);
|
||||
}
|
||||
|
||||
public override MovementGeneratorType GetMovementGeneratorType() { return MovementGeneratorType.Flight; }
|
||||
|
||||
@@ -298,7 +298,7 @@ namespace Game.PvP
|
||||
{
|
||||
AreaTableRecord areaTable = CliDB.AreaTableStorage.LookupByKey(zone);
|
||||
Contract.Assert(areaTable != null);
|
||||
Map map = Global.MapMgr.CreateBaseMap(areaTable.MapId);
|
||||
Map map = Global.MapMgr.CreateBaseMap(areaTable.ContinentID);
|
||||
Contract.Assert(!map.Instanceable());
|
||||
m_map = map;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace Game
|
||||
else if (diffFactor > 10)
|
||||
diffFactor = 10;
|
||||
|
||||
uint xp = (uint)(diffFactor * questXp.Exp[RewardXPDifficulty] * RewardXPMultiplier / 10 * multiplier);
|
||||
uint xp = (uint)(diffFactor * questXp.Difficulty[RewardXPDifficulty] * RewardXPMultiplier / 10 * multiplier);
|
||||
if (xp <= 100)
|
||||
xp = 5 * ((xp + 2) / 5);
|
||||
else if (xp <= 500)
|
||||
@@ -288,7 +288,7 @@ namespace Game
|
||||
|
||||
QuestMoneyRewardRecord money = CliDB.QuestMoneyRewardStorage.LookupByKey(level);
|
||||
if (money != null)
|
||||
return (uint)(money.Money[RewardMoneyDifficulty] * RewardMoneyMultiplier);
|
||||
return (uint)(money.Difficulty[RewardMoneyDifficulty] * RewardMoneyMultiplier);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace Game
|
||||
if (factionEntry == null)
|
||||
return 0;
|
||||
|
||||
ulong raceMask = _player.getRaceMask();
|
||||
long raceMask = _player.getRaceMask();
|
||||
uint classMask = _player.getClassMask();
|
||||
for (var i = 0; i < 4; i++)
|
||||
{
|
||||
@@ -149,7 +149,7 @@ namespace Game
|
||||
if (factionEntry == null)
|
||||
return 0;
|
||||
|
||||
ulong raceMask = _player.getRaceMask();
|
||||
long raceMask = _player.getRaceMask();
|
||||
uint classMask = _player.getClassMask();
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
@@ -297,9 +297,9 @@ namespace Game
|
||||
// check for sub-factions that receive spillover
|
||||
var flist = Global.DB2Mgr.GetFactionTeamList(factionEntry.Id);
|
||||
// if has no sub-factions, check for factions with same parent
|
||||
if (flist == null && factionEntry.ParentFactionID != 0 && factionEntry.ParentFactionModOut != 0.0f)
|
||||
if (flist == null && factionEntry.ParentFactionID != 0 && factionEntry.ParentFactionMod[1] != 0.0f)
|
||||
{
|
||||
spillOverRepOut *= factionEntry.ParentFactionModOut;
|
||||
spillOverRepOut *= factionEntry.ParentFactionMod[1];
|
||||
FactionRecord parent = CliDB.FactionStorage.LookupByKey(factionEntry.ParentFactionID);
|
||||
if (parent != null)
|
||||
{
|
||||
@@ -323,9 +323,9 @@ namespace Game
|
||||
FactionRecord factionEntryCalc = CliDB.FactionStorage.LookupByKey(id);
|
||||
if (factionEntryCalc != null)
|
||||
{
|
||||
if (factionEntryCalc == factionEntry || GetRank(factionEntryCalc) > (ReputationRank)factionEntryCalc.ParentFactionCapIn)
|
||||
if (factionEntryCalc == factionEntry || GetRank(factionEntryCalc) > (ReputationRank)factionEntryCalc.ParentFactionMod[0])
|
||||
continue;
|
||||
int spilloverRep = (int)(spillOverRepOut * factionEntryCalc.ParentFactionModIn);
|
||||
int spilloverRep = (int)(spillOverRepOut * factionEntryCalc.ParentFactionMod[0]);
|
||||
if (spilloverRep != 0 || !incremental)
|
||||
res = SetOneFactionReputation(factionEntryCalc, spilloverRep, incremental);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Game.Scenarios
|
||||
|
||||
public virtual void CompleteStep(ScenarioStepRecord step)
|
||||
{
|
||||
Quest quest = Global.ObjectMgr.GetQuestTemplate(step.QuestRewardID);
|
||||
Quest quest = Global.ObjectMgr.GetQuestTemplate(step.RewardQuestID);
|
||||
if (quest != null)
|
||||
{
|
||||
foreach (ObjectGuid guid in _players)
|
||||
@@ -87,7 +87,7 @@ namespace Game.Scenarios
|
||||
if (GetStepState(_step) == ScenarioStepState.Done)
|
||||
continue;
|
||||
|
||||
if (newStep == null || _step.Step < newStep.Step)
|
||||
if (newStep == null || _step.OrderIndex < newStep.OrderIndex)
|
||||
newStep = _step;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace Game.Scenarios
|
||||
if (scenarioStep.IsBonusObjective())
|
||||
continue;
|
||||
|
||||
if (firstStep == null || scenarioStep.Step < firstStep.Step)
|
||||
if (firstStep == null || scenarioStep.OrderIndex < firstStep.OrderIndex)
|
||||
firstStep = scenarioStep;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace Game.Scenarios
|
||||
if (!step.IsBonusObjective())
|
||||
continue;
|
||||
|
||||
if (Global.CriteriaMgr.GetCriteriaTree(step.CriteriaTreeID) != null)
|
||||
if (Global.CriteriaMgr.GetCriteriaTree(step.CriteriaTreeId) != null)
|
||||
{
|
||||
BonusObjectiveData bonusObjectiveData;
|
||||
bonusObjectiveData.BonusObjectiveID = (int)step.Id;
|
||||
|
||||
@@ -119,8 +119,8 @@ namespace Game.Scenarios
|
||||
if (!scenarioSteps.ContainsKey(step.ScenarioID))
|
||||
scenarioSteps[step.ScenarioID] = new Dictionary<byte, ScenarioStepRecord>();
|
||||
|
||||
scenarioSteps[step.ScenarioID][step.Step] = step;
|
||||
CriteriaTree tree = Global.CriteriaMgr.GetCriteriaTree(step.CriteriaTreeID);
|
||||
scenarioSteps[step.ScenarioID][step.OrderIndex] = step;
|
||||
CriteriaTree tree = Global.CriteriaMgr.GetCriteriaTree(step.CriteriaTreeId);
|
||||
if (tree != null)
|
||||
{
|
||||
uint criteriaTreeSize = 0;
|
||||
|
||||
@@ -305,7 +305,7 @@ namespace Game.Spells
|
||||
|
||||
var powers = Global.DB2Mgr.GetSpellPowers(GetId(), caster ? caster.GetMap().GetDifficultyID() : Difficulty.None);
|
||||
foreach (var power in powers)
|
||||
if (power.ManaCostPerSecond != 0 || power.ManaCostPercentagePerSecond > 0.0f)
|
||||
if (power.ManaPerSecond != 0 || power.PowerPctPerSecond > 0.0f)
|
||||
m_periodicCosts.Add(power);
|
||||
|
||||
if (!m_periodicCosts.Empty())
|
||||
@@ -653,14 +653,14 @@ namespace Game.Spells
|
||||
|
||||
foreach (SpellPowerRecord power in m_periodicCosts)
|
||||
{
|
||||
if (power.RequiredAura != 0 && !caster.HasAura(power.RequiredAura))
|
||||
if (power.RequiredAuraSpellID != 0 && !caster.HasAura(power.RequiredAuraSpellID))
|
||||
continue;
|
||||
|
||||
int manaPerSecond = (int)power.ManaCostPerSecond;
|
||||
int manaPerSecond = (int)power.ManaPerSecond;
|
||||
if (power.PowerType != PowerType.Health)
|
||||
manaPerSecond += MathFunctions.CalculatePct(caster.GetMaxPower(power.PowerType), power.ManaCostPercentagePerSecond);
|
||||
manaPerSecond += MathFunctions.CalculatePct(caster.GetMaxPower(power.PowerType), power.PowerPctPerSecond);
|
||||
else
|
||||
manaPerSecond += (int)MathFunctions.CalculatePct(caster.GetMaxHealth(), power.ManaCostPercentagePerSecond);
|
||||
manaPerSecond += (int)MathFunctions.CalculatePct(caster.GetMaxHealth(), power.PowerPctPerSecond);
|
||||
|
||||
if (manaPerSecond != 0)
|
||||
{
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace Game.Spells
|
||||
{
|
||||
for (int t = 0; t < ItemConst.MaxItemEnchantmentEffects; t++)
|
||||
{
|
||||
if (pEnchant.EffectSpellID[t] == m_spellInfo.Id)
|
||||
if (pEnchant.EffectArg[t] == m_spellInfo.Id)
|
||||
{
|
||||
amount = (int)((item_rand_suffix.AllocationPct[k] * castItem.GetItemSuffixFactor()) / 10000);
|
||||
break;
|
||||
@@ -146,7 +146,7 @@ namespace Game.Spells
|
||||
uint mountType = (uint)GetMiscValueB();
|
||||
MountRecord mountEntry = Global.DB2Mgr.GetMount(GetId());
|
||||
if (mountEntry != null)
|
||||
mountType = mountEntry.MountTypeId;
|
||||
mountType = mountEntry.MountTypeID;
|
||||
|
||||
var mountCapability = GetBase().GetUnitOwner().GetMountCapability(mountType);
|
||||
if (mountCapability != null)
|
||||
@@ -2197,7 +2197,7 @@ namespace Game.Spells
|
||||
}).ToList();
|
||||
|
||||
if (!usableDisplays.Empty())
|
||||
displayId = usableDisplays.SelectRandom().DisplayID;
|
||||
displayId = usableDisplays.SelectRandom().CreatureDisplayInfoID;
|
||||
}
|
||||
}
|
||||
// TODO: CREATE TABLE mount_vehicle (mountId, vehicleCreatureId) for future mounts that are vehicles (new mounts no longer have proper data in MiscValue)
|
||||
@@ -2229,7 +2229,7 @@ namespace Game.Spells
|
||||
{
|
||||
var mountCapability = CliDB.MountCapabilityStorage.LookupByKey(GetAmount());
|
||||
if (mountCapability != null)
|
||||
target.CastSpell(target, mountCapability.SpeedModSpell, true);
|
||||
target.CastSpell(target, mountCapability.ModSpellAuraID, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2245,7 +2245,7 @@ namespace Game.Spells
|
||||
// remove speed aura
|
||||
var mountCapability = CliDB.MountCapabilityStorage.LookupByKey(GetAmount());
|
||||
if (mountCapability != null)
|
||||
target.RemoveAurasDueToSpell(mountCapability.SpeedModSpell, target.GetGUID());
|
||||
target.RemoveAurasDueToSpell(mountCapability.ModSpellAuraID, target.GetGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3512,7 +3512,7 @@ namespace Game.Spells
|
||||
return;
|
||||
|
||||
Unit target = aurApp.GetTarget();
|
||||
if (target.GetPowerIndex((PowerType)powerDisplay.PowerType) == (int)PowerType.Max)
|
||||
if (target.GetPowerIndex((PowerType)powerDisplay.ActualType) == (int)PowerType.Max)
|
||||
return;
|
||||
|
||||
if (apply)
|
||||
@@ -4693,7 +4693,7 @@ namespace Game.Spells
|
||||
{
|
||||
for (byte i = 0; i < SharedConst.MaxOverrideSpell; ++i)
|
||||
{
|
||||
uint spellId = overrideSpells.SpellID[i];
|
||||
uint spellId = overrideSpells.Spells[i];
|
||||
if (spellId != 0)
|
||||
target.AddTemporarySpell(spellId);
|
||||
}
|
||||
@@ -4707,7 +4707,7 @@ namespace Game.Spells
|
||||
{
|
||||
for (byte i = 0; i < SharedConst.MaxOverrideSpell; ++i)
|
||||
{
|
||||
uint spellId = overrideSpells.SpellID[i];
|
||||
uint spellId = overrideSpells.Spells[i];
|
||||
if (spellId != 0)
|
||||
target.RemoveTemporarySpell(spellId);
|
||||
}
|
||||
|
||||
@@ -3850,9 +3850,9 @@ namespace Game.Spells
|
||||
ItemRecord itemEntry = CliDB.ItemStorage.LookupByKey(itemId);
|
||||
if (itemEntry != null)
|
||||
{
|
||||
if (itemEntry.Class == ItemClass.Weapon)
|
||||
if (itemEntry.ClassID == ItemClass.Weapon)
|
||||
{
|
||||
switch ((ItemSubClassWeapon)itemEntry.SubClass)
|
||||
switch ((ItemSubClassWeapon)itemEntry.SubclassID)
|
||||
{
|
||||
case ItemSubClassWeapon.Thrown:
|
||||
ammoDisplayID = Global.DB2Mgr.GetItemDisplayId(itemId, m_caster.GetVirtualItemAppearanceMod(i));
|
||||
@@ -5065,7 +5065,7 @@ namespace Game.Spells
|
||||
if (SummonProperties == null)
|
||||
break;
|
||||
|
||||
switch (SummonProperties.Category)
|
||||
switch (SummonProperties.Control)
|
||||
{
|
||||
case SummonCategory.Pet:
|
||||
if (!m_spellInfo.HasAttribute(SpellAttr1.DismissPet) && !m_caster.GetPetGUID().IsEmpty())
|
||||
@@ -6034,7 +6034,7 @@ namespace Game.Spells
|
||||
ItemTemplate proto = targetItem.GetTemplate();
|
||||
for (byte e = 0; e < proto.Effects.Count; ++e)
|
||||
{
|
||||
if (proto.Effects[e].SpellID != 0 && proto.Effects[e].Trigger == ItemSpelltriggerType.OnUse)
|
||||
if (proto.Effects[e].SpellID != 0 && proto.Effects[e].TriggerType == ItemSpelltriggerType.OnUse)
|
||||
{
|
||||
isItemUsable = true;
|
||||
break;
|
||||
@@ -6115,7 +6115,7 @@ namespace Game.Spells
|
||||
ItemDisenchantLootRecord itemDisenchantLoot = item.GetDisenchantLoot(m_caster.ToPlayer());
|
||||
if (itemDisenchantLoot == null)
|
||||
return SpellCastResult.CantBeDisenchanted;
|
||||
if (itemDisenchantLoot.RequiredDisenchantSkill > player.GetSkillValue(SkillType.Enchanting))
|
||||
if (itemDisenchantLoot.SkillRequired > player.GetSkillValue(SkillType.Enchanting))
|
||||
return SpellCastResult.LowCastlevel;
|
||||
break;
|
||||
}
|
||||
@@ -6716,19 +6716,6 @@ namespace Game.Spells
|
||||
{
|
||||
m_loadedScripts = Global.ScriptMgr.CreateSpellScripts(m_spellInfo.Id, this);
|
||||
|
||||
var holder = Global.SmartAIMgr.GetScript((int)GetSpellInfo().Id, SmartScriptType.Spell);
|
||||
if (!holder.Empty())
|
||||
{
|
||||
var script = new SmartSpell();
|
||||
script._Init("", GetSpellInfo().Id);
|
||||
if (script._Load(this))
|
||||
{
|
||||
script._Register();
|
||||
if (script._Validate(GetSpellInfo()))
|
||||
m_loadedScripts.Add(script);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var script in m_loadedScripts)
|
||||
{
|
||||
Log.outDebug(LogFilter.Spells, "Spell.LoadScripts: Script `{0}` for spell `{1}` is loaded now", script._GetScriptName(), m_spellInfo.Id);
|
||||
|
||||
@@ -1746,7 +1746,7 @@ namespace Game.Spells
|
||||
break;
|
||||
}
|
||||
|
||||
switch (properties.Category)
|
||||
switch (properties.Control)
|
||||
{
|
||||
case SummonCategory.Wild:
|
||||
case SummonCategory.Ally:
|
||||
@@ -1756,7 +1756,7 @@ namespace Game.Spells
|
||||
SummonGuardian(effIndex, entry, properties, numSummons);
|
||||
break;
|
||||
}
|
||||
switch (properties.Type)
|
||||
switch (properties.Title)
|
||||
{
|
||||
case SummonType.Pet:
|
||||
case SummonType.Guardian:
|
||||
@@ -1816,7 +1816,7 @@ namespace Game.Spells
|
||||
if (summon == null)
|
||||
continue;
|
||||
|
||||
if (properties.Category == SummonCategory.Ally)
|
||||
if (properties.Control == SummonCategory.Ally)
|
||||
{
|
||||
summon.SetOwnerGUID(m_originalCaster.GetGUID());
|
||||
summon.SetFaction(m_originalCaster.getFaction());
|
||||
@@ -5073,7 +5073,7 @@ namespace Game.Spells
|
||||
if (summon.HasUnitTypeMask(UnitTypeMask.Guardian))
|
||||
((Guardian)summon).InitStatsForLevel(level);
|
||||
|
||||
if (properties != null && properties.Category == SummonCategory.Ally)
|
||||
if (properties != null && properties.Control == SummonCategory.Ally)
|
||||
summon.SetFaction(caster.getFaction());
|
||||
|
||||
if (summon.HasUnitTypeMask(UnitTypeMask.Minion) && m_targets.HasDst())
|
||||
|
||||
@@ -869,9 +869,9 @@ namespace Game.Spells
|
||||
{
|
||||
if (itemEffect.SpellID == spellInfo.Id)
|
||||
{
|
||||
tmpCooldown = itemEffect.Cooldown;
|
||||
tmpCategoryId = itemEffect.Category;
|
||||
tmpCategoryCooldown = itemEffect.CategoryCooldown;
|
||||
tmpCooldown = itemEffect.CoolDownMSec;
|
||||
tmpCategoryId = itemEffect.SpellCategoryID;
|
||||
tmpCategoryCooldown = itemEffect.CategoryCoolDownMSec;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,20 +59,20 @@ namespace Game.Spells
|
||||
SpellMiscRecord _misc = data.Misc;
|
||||
if (_misc != null)
|
||||
{
|
||||
Attributes = (SpellAttr0)_misc.Attributes;
|
||||
AttributesEx = (SpellAttr1)_misc.AttributesEx;
|
||||
AttributesEx2 = (SpellAttr2)_misc.AttributesExB;
|
||||
AttributesEx3 = (SpellAttr3)_misc.AttributesExC;
|
||||
AttributesEx4 = (SpellAttr4)_misc.AttributesExD;
|
||||
AttributesEx5 = (SpellAttr5)_misc.AttributesExE;
|
||||
AttributesEx6 = (SpellAttr6)_misc.AttributesExF;
|
||||
AttributesEx7 = (SpellAttr7)_misc.AttributesExG;
|
||||
AttributesEx8 = (SpellAttr8)_misc.AttributesExH;
|
||||
AttributesEx9 = (SpellAttr9)_misc.AttributesExI;
|
||||
AttributesEx10 = (SpellAttr10)_misc.AttributesExJ;
|
||||
AttributesEx11 = (SpellAttr11)_misc.AttributesExK;
|
||||
AttributesEx12 = (SpellAttr12)_misc.AttributesExL;
|
||||
AttributesEx13 = (SpellAttr13)_misc.AttributesExM;
|
||||
Attributes = (SpellAttr0)_misc.Attributes[0];
|
||||
AttributesEx = (SpellAttr1)_misc.Attributes[1];
|
||||
AttributesEx2 = (SpellAttr2)_misc.Attributes[2];
|
||||
AttributesEx3 = (SpellAttr3)_misc.Attributes[3];
|
||||
AttributesEx4 = (SpellAttr4)_misc.Attributes[4];
|
||||
AttributesEx5 = (SpellAttr5)_misc.Attributes[5];
|
||||
AttributesEx6 = (SpellAttr6)_misc.Attributes[6];
|
||||
AttributesEx7 = (SpellAttr7)_misc.Attributes[7];
|
||||
AttributesEx8 = (SpellAttr8)_misc.Attributes[8];
|
||||
AttributesEx9 = (SpellAttr9)_misc.Attributes[9];
|
||||
AttributesEx10 = (SpellAttr10)_misc.Attributes[10];
|
||||
AttributesEx11 = (SpellAttr11)_misc.Attributes[11];
|
||||
AttributesEx12 = (SpellAttr12)_misc.Attributes[12];
|
||||
AttributesEx13 = (SpellAttr13)_misc.Attributes[13];
|
||||
CastTimeEntry = CliDB.SpellCastTimesStorage.LookupByKey(_misc.CastingTimeIndex);
|
||||
DurationEntry = CliDB.SpellDurationStorage.LookupByKey(_misc.DurationIndex);
|
||||
RangeIndex = _misc.RangeIndex;
|
||||
@@ -81,7 +81,7 @@ namespace Game.Spells
|
||||
SchoolMask = (SpellSchoolMask)_misc.SchoolMask;
|
||||
AttributesCu = 0;
|
||||
|
||||
IconFileDataId = _misc.IconFileDataID;
|
||||
IconFileDataId = _misc.SpellIconFileDataID;
|
||||
ActiveIconFileDataId = _misc.ActiveIconFileDataID;
|
||||
}
|
||||
|
||||
@@ -90,13 +90,13 @@ namespace Game.Spells
|
||||
|
||||
// sort all visuals so that the ones without a condition requirement are last on the list
|
||||
foreach (var key in _visuals.Keys.ToList())
|
||||
_visuals[key] = _visuals[key].OrderByDescending(x => x.PlayerConditionID).ToList();
|
||||
_visuals[key] = _visuals[key].OrderByDescending(x => x.CasterPlayerConditionID).ToList();
|
||||
|
||||
// SpellScalingEntry
|
||||
SpellScalingRecord _scaling = data.Scaling;
|
||||
if (_scaling != null)
|
||||
{
|
||||
Scaling._Class = _scaling.ScalingClass;
|
||||
Scaling._Class = _scaling.Class;
|
||||
Scaling.MinScalingLevel = _scaling.MinScalingLevel;
|
||||
Scaling.MaxScalingLevel = _scaling.MaxScalingLevel;
|
||||
Scaling.ScalesFromItemLevel = _scaling.ScalesFromItemLevel;
|
||||
@@ -179,8 +179,8 @@ namespace Game.Spells
|
||||
if (_equipped != null)
|
||||
{
|
||||
EquippedItemClass = (ItemClass)_equipped.EquippedItemClass;
|
||||
EquippedItemSubClassMask = _equipped.EquippedItemSubClassMask;
|
||||
EquippedItemInventoryTypeMask = _equipped.EquippedItemInventoryTypeMask;
|
||||
EquippedItemSubClassMask = _equipped.EquippedItemSubclass;
|
||||
EquippedItemInventoryTypeMask = _equipped.EquippedItemInvTypes;
|
||||
}
|
||||
|
||||
// SpellInterruptsEntry
|
||||
@@ -226,10 +226,10 @@ namespace Game.Spells
|
||||
if (_target != null)
|
||||
{
|
||||
targets = (SpellCastTargetFlags)_target.Targets;
|
||||
ConeAngle = _target.ConeAngle;
|
||||
ConeAngle = _target.ConeDegrees;
|
||||
Width = _target.Width;
|
||||
TargetCreatureType = _target.TargetCreatureType;
|
||||
MaxAffectedTargets = _target.MaxAffectedTargets;
|
||||
MaxAffectedTargets = _target.MaxTargets;
|
||||
MaxTargetLevel = _target.MaxTargetLevel;
|
||||
}
|
||||
|
||||
@@ -964,7 +964,7 @@ namespace Game.Spells
|
||||
uint mountType = (uint)effect.MiscValueB;
|
||||
MountRecord mountEntry = Global.DB2Mgr.GetMount(Id);
|
||||
if (mountEntry != null)
|
||||
mountType = mountEntry.MountTypeId;
|
||||
mountType = mountEntry.MountTypeID;
|
||||
if (mountType != 0 && player.GetMountCapability(mountType) == null)
|
||||
return SpellCastResult.NotHere;
|
||||
break;
|
||||
@@ -1210,11 +1210,11 @@ namespace Game.Spells
|
||||
|
||||
var vehicleSeat = vehicle.GetSeatForPassenger(caster);
|
||||
if (!HasAttribute(SpellAttr6.CastableWhileOnVehicle) && !HasAttribute(SpellAttr0.CastableWhileMounted)
|
||||
&& (vehicleSeat.Flags[0] & (uint)checkMask) != (uint)checkMask)
|
||||
&& (vehicleSeat.Flags & checkMask) != checkMask)
|
||||
return SpellCastResult.CantDoThatRightNow;
|
||||
|
||||
// Can only summon uncontrolled minions/guardians when on controlled vehicle
|
||||
if (vehicleSeat.Flags[0].HasAnyFlag((uint)(VehicleSeatFlags.CanControl | VehicleSeatFlags.Unk2)))
|
||||
if (vehicleSeat.Flags.HasAnyFlag((VehicleSeatFlags.CanControl | VehicleSeatFlags.Unk2)))
|
||||
{
|
||||
foreach (SpellEffectInfo effect in GetEffectsForDifficulty(caster.GetMap().GetDifficultyID()))
|
||||
{
|
||||
@@ -1222,7 +1222,7 @@ namespace Game.Spells
|
||||
continue;
|
||||
|
||||
var props = CliDB.SummonPropertiesStorage.LookupByKey(effect.MiscValueB);
|
||||
if (props != null && props.Category != SummonCategory.Wild)
|
||||
if (props != null && props.Control != SummonCategory.Wild)
|
||||
return SpellCastResult.CantDoThatRightNow;
|
||||
}
|
||||
}
|
||||
@@ -2529,20 +2529,16 @@ namespace Game.Spells
|
||||
{
|
||||
if (RangeEntry == null)
|
||||
return 0.0f;
|
||||
if (positive)
|
||||
return RangeEntry.MinRangeFriend;
|
||||
return RangeEntry.MinRangeHostile;
|
||||
|
||||
return RangeEntry.RangeMin[positive ? 1 : 0];
|
||||
}
|
||||
|
||||
public float GetMaxRange(bool positive = false, Unit caster = null, Spell spell = null)
|
||||
{
|
||||
if (RangeEntry == null)
|
||||
return 0.0f;
|
||||
float range;
|
||||
if (positive)
|
||||
range = RangeEntry.MaxRangeFriend;
|
||||
else
|
||||
range = RangeEntry.MaxRangeHostile;
|
||||
|
||||
float range = RangeEntry.RangeMax[positive ? 1 : 0];
|
||||
if (caster != null)
|
||||
{
|
||||
Player modOwner = caster.GetSpellModOwner();
|
||||
@@ -2601,9 +2597,9 @@ namespace Game.Spells
|
||||
if (calcLevel < 0)
|
||||
calcLevel = 0;
|
||||
|
||||
castTime = (int)(CastTimeEntry.CastTime + CastTimeEntry.CastTimePerLevel * level);
|
||||
if (castTime < CastTimeEntry.MinCastTime)
|
||||
castTime = CastTimeEntry.MinCastTime;
|
||||
castTime = (int)(CastTimeEntry.Base + CastTimeEntry.PerLevel * level);
|
||||
if (castTime < CastTimeEntry.Minimum)
|
||||
castTime = CastTimeEntry.Minimum;
|
||||
}
|
||||
|
||||
if (castTime <= 0)
|
||||
@@ -2669,7 +2665,7 @@ namespace Game.Spells
|
||||
|
||||
foreach (SpellPowerRecord power in powers)
|
||||
{
|
||||
if (power.RequiredAura != 0 && !caster.HasAura(power.RequiredAura))
|
||||
if (power.RequiredAuraSpellID != 0 && !caster.HasAura(power.RequiredAuraSpellID))
|
||||
continue;
|
||||
|
||||
// Spell drain all exist power on cast (Only paladin lay of Hands)
|
||||
@@ -2696,23 +2692,23 @@ namespace Game.Spells
|
||||
}
|
||||
|
||||
// Base powerCost
|
||||
int powerCost = (int)power.ManaCost;
|
||||
int powerCost = power.ManaCost;
|
||||
// PCT cost from total amount
|
||||
if (power.ManaCostPercentage != 0)
|
||||
if (power.PowerCostPct != 0)
|
||||
{
|
||||
switch (power.PowerType)
|
||||
{
|
||||
// health as power used
|
||||
case PowerType.Health:
|
||||
powerCost += (int)MathFunctions.CalculatePct(caster.GetMaxHealth(), power.ManaCostPercentage);
|
||||
powerCost += (int)MathFunctions.CalculatePct(caster.GetMaxHealth(), power.PowerCostPct);
|
||||
break;
|
||||
case PowerType.Mana:
|
||||
powerCost += (int)MathFunctions.CalculatePct(caster.GetCreateMana(), power.ManaCostPercentage);
|
||||
powerCost += (int)MathFunctions.CalculatePct(caster.GetCreateMana(), power.PowerCostPct);
|
||||
break;
|
||||
case PowerType.Rage:
|
||||
case PowerType.Focus:
|
||||
case PowerType.Energy:
|
||||
powerCost += MathFunctions.CalculatePct(caster.GetMaxPower(power.PowerType), power.ManaCostPercentage);
|
||||
powerCost += MathFunctions.CalculatePct(caster.GetMaxPower(power.PowerType), power.PowerCostPct);
|
||||
break;
|
||||
case PowerType.Runes:
|
||||
case PowerType.RunicPower:
|
||||
@@ -2724,8 +2720,8 @@ namespace Game.Spells
|
||||
}
|
||||
}
|
||||
|
||||
if (power.HealthCostPercentage != 0)
|
||||
healthCost += (int)MathFunctions.CalculatePct(caster.GetMaxHealth(), power.HealthCostPercentage);
|
||||
if (power.PowerCostMaxPct != 0)
|
||||
healthCost += (int)MathFunctions.CalculatePct(caster.GetMaxHealth(), power.PowerCostMaxPct);
|
||||
|
||||
if (power.PowerType != PowerType.Health)
|
||||
{
|
||||
@@ -2766,13 +2762,13 @@ namespace Game.Spells
|
||||
Player modOwner = caster.GetSpellModOwner();
|
||||
if (modOwner)
|
||||
{
|
||||
if (power.PowerIndex == 0)
|
||||
if (power.OrderIndex == 0)
|
||||
modOwner.ApplySpellMod(Id, SpellModOp.Cost, ref powerCost);
|
||||
else if (power.PowerIndex == 1)
|
||||
else if (power.OrderIndex == 1)
|
||||
modOwner.ApplySpellMod(Id, SpellModOp.SpellCost2, ref powerCost);
|
||||
}
|
||||
|
||||
if (!caster.IsControlledByPlayer() && MathFunctions.fuzzyEq(power.ManaCostPercentage, 0.0f) && SpellLevel != 0)
|
||||
if (!caster.IsControlledByPlayer() && MathFunctions.fuzzyEq(power.PowerCostPct, 0.0f) && SpellLevel != 0)
|
||||
{
|
||||
if (HasAttribute(SpellAttr0.LevelDamageCalculation))
|
||||
{
|
||||
@@ -3077,7 +3073,7 @@ namespace Game.Spells
|
||||
{
|
||||
foreach (SpellXSpellVisualRecord visual in visualList)
|
||||
{
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(visual.PlayerConditionID);
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(visual.CasterPlayerConditionID);
|
||||
if (playerCondition == null || (caster.IsTypeId(TypeId.Player) && ConditionManager.IsPlayerMeetingCondition(caster.ToPlayer(), playerCondition)))
|
||||
return visual.Id;
|
||||
}
|
||||
@@ -3092,7 +3088,7 @@ namespace Game.Spells
|
||||
{
|
||||
foreach (var visual in defaultList)
|
||||
{
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(visual.PlayerConditionID);
|
||||
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(visual.CasterPlayerConditionID);
|
||||
if (playerCondition == null || (caster && caster.IsTypeId(TypeId.Player) && ConditionManager.IsPlayerMeetingCondition(caster.ToPlayer(), playerCondition)))
|
||||
return visual.Id;
|
||||
}
|
||||
@@ -3705,14 +3701,14 @@ namespace Game.Spells
|
||||
Amplitude = _effect.EffectAmplitude;
|
||||
ChainAmplitude = _effect.EffectChainAmplitude;
|
||||
BonusCoefficient = _effect.EffectBonusCoefficient;
|
||||
MiscValue = _effect.EffectMiscValue;
|
||||
MiscValueB = _effect.EffectMiscValueB;
|
||||
MiscValue = _effect.EffectMiscValue[0];
|
||||
MiscValueB = _effect.EffectMiscValue[1];
|
||||
Mechanic = (Mechanics)_effect.EffectMechanic;
|
||||
PositionFacing = _effect.EffectPosFacing;
|
||||
TargetA = new SpellImplicitTargetInfo((Targets)_effect.ImplicitTarget[0]);
|
||||
TargetB = new SpellImplicitTargetInfo((Targets)_effect.ImplicitTarget[1]);
|
||||
RadiusEntry = CliDB.SpellRadiusStorage.LookupByKey(_effect.EffectRadiusIndex);
|
||||
MaxRadiusEntry = CliDB.SpellRadiusStorage.LookupByKey(_effect.EffectRadiusMaxIndex);
|
||||
RadiusEntry = CliDB.SpellRadiusStorage.LookupByKey(_effect.EffectRadiusIndex[0]);
|
||||
MaxRadiusEntry = CliDB.SpellRadiusStorage.LookupByKey(_effect.EffectRadiusIndex[1]);
|
||||
ChainTargets = _effect.EffectChainTargets;
|
||||
ItemType = _effect.EffectItemType;
|
||||
TriggerSpell = _effect.EffectTriggerSpell;
|
||||
|
||||
@@ -642,11 +642,11 @@ namespace Game.Entities
|
||||
if (skillAbility.SupercedesSpell == 0)
|
||||
continue;
|
||||
|
||||
if (!HasSpellInfo(skillAbility.SupercedesSpell) || !HasSpellInfo(skillAbility.SpellID))
|
||||
if (!HasSpellInfo(skillAbility.SupercedesSpell) || !HasSpellInfo(skillAbility.Spell))
|
||||
continue;
|
||||
|
||||
chains[skillAbility.SupercedesSpell] = skillAbility.SpellID;
|
||||
hasPrev.Add(skillAbility.SpellID);
|
||||
chains[skillAbility.SupercedesSpell] = skillAbility.Spell;
|
||||
hasPrev.Add(skillAbility.Spell);
|
||||
}
|
||||
|
||||
// each key in chains that isn't present in hasPrev is a first rank
|
||||
@@ -1418,7 +1418,7 @@ namespace Game.Entities
|
||||
mSkillLineAbilityMap.Clear();
|
||||
|
||||
foreach (var skill in CliDB.SkillLineAbilityStorage.Values)
|
||||
mSkillLineAbilityMap.Add(skill.SpellID, skill);
|
||||
mSkillLineAbilityMap.Add(skill.Spell, skill);
|
||||
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} SkillLineAbility MultiMap Data in {1} ms", mSkillLineAbilityMap.Count, Time.GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
@@ -1627,7 +1627,7 @@ namespace Game.Entities
|
||||
if (skillLine.AcquireMethod != AbilytyLearnType.OnSkillLearn)
|
||||
continue;
|
||||
|
||||
SpellInfo spell = GetSpellInfo(skillLine.SpellID);
|
||||
SpellInfo spell = GetSpellInfo(skillLine.Spell);
|
||||
if (spell == null) // not exist or triggered or talent
|
||||
continue;
|
||||
|
||||
@@ -2189,7 +2189,7 @@ namespace Game.Entities
|
||||
if (enchant.Effect[s] != ItemEnchantmentType.CombatSpell)
|
||||
continue;
|
||||
|
||||
SpellInfo procInfo = GetSpellInfo(enchant.EffectSpellID[s]);
|
||||
SpellInfo procInfo = GetSpellInfo(enchant.EffectArg[s]);
|
||||
if (procInfo == null)
|
||||
continue;
|
||||
|
||||
@@ -2810,13 +2810,13 @@ namespace Game.Entities
|
||||
|
||||
SummonPropertiesRecord properties = CliDB.SummonPropertiesStorage.LookupByKey(121);
|
||||
if (properties != null)
|
||||
properties.Type = SummonType.Totem;
|
||||
properties.Title = SummonType.Totem;
|
||||
properties = CliDB.SummonPropertiesStorage.LookupByKey(647); // 52893
|
||||
if (properties != null)
|
||||
properties.Type = SummonType.Totem;
|
||||
properties.Title = SummonType.Totem;
|
||||
properties = CliDB.SummonPropertiesStorage.LookupByKey(628);
|
||||
if (properties != null) // Hungry Plaguehound
|
||||
properties.Category = SummonCategory.Pet;
|
||||
properties.Control = SummonCategory.Pet;
|
||||
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded SpellInfo corrections in {0} ms", Time.GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
@@ -2874,11 +2874,11 @@ namespace Game.Entities
|
||||
|
||||
foreach (var skillLine in CliDB.SkillLineAbilityStorage.Values)
|
||||
{
|
||||
SpellInfo spellInfo = GetSpellInfo(skillLine.SpellID);
|
||||
SpellInfo spellInfo = GetSpellInfo(skillLine.Spell);
|
||||
if (spellInfo == null)
|
||||
continue;
|
||||
|
||||
var levels = levelsBySpell.LookupByKey(skillLine.SpellID);
|
||||
var levels = levelsBySpell.LookupByKey(skillLine.Spell);
|
||||
if (levels != null && levels.SpellLevel != 0)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Game.Chat
|
||||
{
|
||||
BroadcastTextRecord bct = CliDB.BroadcastTextStorage.LookupByKey(_textId);
|
||||
var packet = new ChatPkt();
|
||||
packet.Initialize(_msgType, bct != null ? (Language)bct.Language : Language.Universal, _source, _target, bct != null ? Global.DB2Mgr.GetBroadcastTextValue(bct, locale, _gender) : "", _achievementId, "", locale);
|
||||
packet.Initialize(_msgType, bct != null ? (Language)bct.LanguageID : Language.Universal, _source, _target, bct != null ? Global.DB2Mgr.GetBroadcastTextValue(bct, locale, _gender) : "", _achievementId, "", locale);
|
||||
return packet;
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace Game
|
||||
BroadcastTextRecord bct = CliDB.BroadcastTextStorage.LookupByKey(textEntry.BroadcastTextId);
|
||||
if (bct != null)
|
||||
{
|
||||
uint broadcastTextSoundId = bct.SoundID[source.GetGender() == Gender.Female ? 1 : 0];
|
||||
uint broadcastTextSoundId = bct.SoundEntriesID[source.GetGender() == Gender.Female ? 1 : 0];
|
||||
if (broadcastTextSoundId != 0)
|
||||
finalSound = broadcastTextSoundId;
|
||||
}
|
||||
|
||||
@@ -2285,7 +2285,7 @@ namespace Scripts.Spells.Generic
|
||||
// cast speed aura
|
||||
MountCapabilityRecord mountCapability = CliDB.MountCapabilityStorage.LookupByKey(aurEff.GetAmount());
|
||||
if (mountCapability != null)
|
||||
target.CastSpell(target, mountCapability.SpeedModSpell, TriggerCastFlags.FullMask);
|
||||
target.CastSpell(target, mountCapability.ModSpellAuraID, TriggerCastFlags.FullMask);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user