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
@@ -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;
+10 -10
View File
@@ -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;
}
+3 -3
View File
@@ -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;
+4 -4
View File
@@ -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;
+1 -1
View File
@@ -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;
});
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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))
+3 -3
View File
@@ -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);