Core/DataStores: Fixed db2 structures after 7.3.5

This commit is contained in:
hondacrx
2018-03-13 15:43:03 -04:00
parent 2199e07955
commit 0ab3b8e8cd
97 changed files with 3139 additions and 1707 deletions
+4 -4
View File
@@ -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;
}
}
}
+8 -8
View File
@@ -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:
+7 -20
View File
@@ -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>();