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
+6 -6
View File
@@ -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();
}
}
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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;
+6 -6
View File
@@ -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)]
+3 -3
View File
@@ -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());
}
}
+2 -2
View File
@@ -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);
}
}
+2 -2
View File
@@ -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))
+5 -5
View File
@@ -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);
}
}
}