本文整理汇总了C#中QueryBuilder.SQLInsertRow.AddValue方法的典型用法代码示例。如果您正苦于以下问题:C# QueryBuilder.SQLInsertRow.AddValue方法的具体用法?C# QueryBuilder.SQLInsertRow.AddValue怎么用?C# QueryBuilder.SQLInsertRow.AddValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueryBuilder.SQLInsertRow
的用法示例。
在下文中一共展示了QueryBuilder.SQLInsertRow.AddValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreatureEquip
public static string CreatureEquip(Dictionary<Guid, Unit> units)
{
if (units.Count == 0)
return string.Empty;
const string tableName = "creature_equip_template";
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var unit in units)
{
var row = new QueryBuilder.SQLInsertRow();
var creature = unit.Value;
var equipData = creature.Equipment;
// check if fields are empty
if (equipData == null || equipData.All(value => value == 0))
continue;
row.AddValue("entry", unit.Key.GetEntry());
row.AddValue("itemEntry1", equipData[0]);
row.AddValue("itemEntry2", equipData[1]);
row.AddValue("itemEntry3", equipData[2]);
row.Comment = StoreGetters.GetName(StoreNameType.Unit, (int)unit.Key.GetEntry(), false);
rows.Add(row);
}
return new QueryBuilder.SQLInsert(tableName, rows).Build();
}
示例2: Addon
public static string Addon(Dictionary<WowGuid, Unit> units)
{
if (units.Count == 0)
return string.Empty;
if (!Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.creature_template_addon))
return string.Empty;
const string tableName = "creature_template_addon";
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var unit in units)
{
var npc = unit.Value;
if (Settings.AreaFilters.Length > 0)
if (!(npc.Area.ToString(CultureInfo.InvariantCulture).MatchesFilters(Settings.AreaFilters)))
continue;
if (Settings.MapFilters.Length > 0)
if (!(npc.Map.ToString(CultureInfo.InvariantCulture).MatchesFilters(Settings.MapFilters)))
continue;
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("entry", unit.Key.GetEntry());
row.AddValue("mount", npc.Mount);
row.AddValue("bytes1", npc.Bytes1, true);
row.AddValue("bytes2", npc.Bytes2, true);
var auras = string.Empty;
var commentAuras = string.Empty;
if (npc.Auras != null && npc.Auras.Count() != 0)
{
foreach (var aura in npc.Auras)
{
if (aura == null)
continue;
// usually "template auras" do not have caster
if (ClientVersion.AddedInVersion(ClientType.MistsOfPandaria) ? !aura.AuraFlags.HasAnyFlag(AuraFlagMoP.NoCaster) : !aura.AuraFlags.HasAnyFlag(AuraFlag.NotCaster))
continue;
auras += aura.SpellId + " ";
commentAuras += StoreGetters.GetName(StoreNameType.Spell, (int) aura.SpellId, false) + ", ";
}
auras = auras.TrimEnd(' ');
commentAuras = commentAuras.TrimEnd(',', ' ');
}
row.AddValue("auras", auras);
row.Comment += StoreGetters.GetName(StoreNameType.Unit, (int)unit.Key.GetEntry(), false);
if (!String.IsNullOrWhiteSpace(auras))
row.Comment += " - " + commentAuras;
rows.Add(row);
}
return new QueryBuilder.SQLInsert(tableName, rows).Build();
}
示例3: BroadcastTextLocale
public static string BroadcastTextLocale()
{
if (Storage.BroadcastTextLocales.IsEmpty())
return String.Empty;
if (!Settings.HotfixSQLOutputFlag.HasAnyFlagBit(HotfixSQLOutput.broadcast_text_locale))
return String.Empty;
const string tableName = "broadcast_text_locale";
var rowsIns = new List<QueryBuilder.SQLInsertRow>();
var rowsUpd = new List<QueryBuilder.SQLUpdateRow>();
foreach (var broadcastTextLocale in Settings.SQLOrderByKey ? Storage.BroadcastTextLocales.OrderBy(blub => blub.Key).ToList() : Storage.BroadcastTextLocales.ToList())
{
if (SQLDatabase.BroadcastTextLocaleStores != null && SQLDatabase.BroadcastTextLocaleStores.ContainsKey(Tuple.Create(broadcastTextLocale.Key.Item1, broadcastTextLocale.Key.Item2)))
{
var row = new QueryBuilder.SQLUpdateRow();
var broadcastTextLocaleDB = SQLDatabase.BroadcastTextLocaleStores[Tuple.Create(broadcastTextLocale.Key.Item1, broadcastTextLocale.Key.Item2)];
if (!Utilities.EqualValues(broadcastTextLocaleDB.MaleText_lang, broadcastTextLocale.Value.Item1.MaleText_lang))
row.AddValue("MaleText_lang", broadcastTextLocale.Value.Item1.MaleText_lang);
if (!Utilities.EqualValues(broadcastTextLocaleDB.FemaleText_lang, broadcastTextLocale.Value.Item1.FemaleText_lang))
row.AddValue("FemaleText_lang", broadcastTextLocale.Value.Item1.FemaleText_lang);
if (!Utilities.EqualValues(broadcastTextLocaleDB.VerifiedBuild, broadcastTextLocale.Value.Item1.VerifiedBuild))
row.AddValue("VerifiedBuild", broadcastTextLocale.Value.Item1.VerifiedBuild);
row.AddWhere("ID", broadcastTextLocale.Key.Item1);
row.AddWhere("locale", broadcastTextLocale.Key.Item2);
row.Table = tableName;
rowsUpd.Add(row);
}
else // insert new
{
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("ID", broadcastTextLocale.Key.Item1);
row.AddValue("locale", broadcastTextLocale.Key.Item2);
row.AddValue("MaleText_lang", broadcastTextLocale.Value.Item1.MaleText_lang);
row.AddValue("FemaleText_lang", broadcastTextLocale.Value.Item1.FemaleText_lang);
row.AddValue("VerifiedBuild", broadcastTextLocale.Value.Item1.VerifiedBuild);
rowsIns.Add(row);
}
}
var result = new QueryBuilder.SQLInsert(tableName, rowsIns, deleteDuplicates: false, primaryKeyNumber: 2).Build() +
new QueryBuilder.SQLUpdate(rowsUpd).Build();
return "SET NAMES 'utf8';" + Environment.NewLine + result + Environment.NewLine + "SET NAMES 'latin1';";
}
示例4: QuestPOI
public static string QuestPOI()
{
if (Storage.QuestPOIs.IsEmpty())
return String.Empty;
const string tableName1 = "quest_poi";
const string tableName2 = "quest_poi_points";
// `quest_poi`
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var quest in Storage.QuestPOIs)
{
var questPOI = quest.Value.Item1;
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("questId", quest.Key.Item1);
row.AddValue("id", quest.Key.Item2);
row.AddValue("objIndex", questPOI.ObjectiveIndex);
row.AddValue("mapid", questPOI.Map);
row.AddValue("WorldMapAreaId", questPOI.WorldMapAreaId);
row.AddValue("FloorId", questPOI.FloorId);
row.AddValue("unk3", questPOI.UnkInt1);
row.AddValue("unk4", questPOI.UnkInt2);
row.Comment = StoreGetters.GetName(StoreNameType.Quest, (int)quest.Key.Item1, false);
rows.Add(row);
}
var result = new QueryBuilder.SQLInsert(tableName1, rows, 2).Build();
// `quest_poi_points`
rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var quest in Storage.QuestPOIs)
{
var questPOI = quest.Value.Item1;
if (questPOI.Points != null) // Needed?
foreach (var point in questPOI.Points)
{
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("questId", quest.Key.Item1);
row.AddValue("id", quest.Key.Item2);
row.AddValue("idx", point.Index); // Not on sniffs
row.AddValue("x", point.X);
row.AddValue("y", point.Y);
row.Comment = StoreGetters.GetName(StoreNameType.Quest, (int)quest.Key.Item1, false);
rows.Add(row);
}
}
result += new QueryBuilder.SQLInsert(tableName2, rows, 2).Build();
return result;
}
示例5: QuestPOI
public static string QuestPOI()
{
if (Storage.QuestPOIs.IsEmpty())
return String.Empty;
var sql = string.Empty;
if (Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.quest_poi))
{
var entries = Storage.QuestPOIs.Keys();
var poiDb = SQLDatabase.GetDict<uint, uint, QuestPOI>(entries, "questid", "id");
sql = SQLUtil.CompareDicts(Storage.QuestPOIs, poiDb, StoreNameType.Quest, "questid", "id");
}
//var points = new StoreMulti<Tuple<uint, uint>, QuestPOIPoint>();
//
//foreach (KeyValuePair<Tuple<uint, uint>, Tuple<QuestPOI, TimeSpan?>> pair in Storage.QuestPOIs)
// foreach (var point in pair.Value.Item1.Points)
// points.Add(pair.Key, point, pair.Value.Item2);
//
//var entries2 = points.Keys();
//var poiPointsDb = SQLDatabase.GetDictMulti<uint, uint, QuestPOIPoint>(entries2, "questid", "id");
const string tableName2 = "quest_poi_points";
if (Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.quest_poi_points))
{
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var quest in Storage.QuestPOIs)
{
var questPOI = quest.Value.Item1;
if (questPOI.Points != null) // Needed?
foreach (var point in questPOI.Points)
{
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("questId", quest.Key.Item1);
row.AddValue("id", quest.Key.Item2);
row.AddValue("idx", point.Index); // Not on sniffs
row.AddValue("x", point.X);
row.AddValue("y", point.Y);
row.Comment = StoreGetters.GetName(StoreNameType.Quest, (int) quest.Key.Item1, false);
rows.Add(row);
}
}
sql += new QueryBuilder.SQLInsert(tableName2, rows, 2).Build();
}
return sql;
}
示例6: DefenseMessage
public static string DefenseMessage()
{
if (Storage.DefenseMessages.IsEmpty())
return String.Empty;
if (!Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.defense_message))
return string.Empty;
const string tableName = "defense_message";
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var message in Storage.DefenseMessages)
{
foreach (var messageValue in message.Value)
{
var row = new QueryBuilder.SQLInsertRow();
var query = new StringBuilder(string.Format("SELECT Id FROM {1}.broadcast_text WHERE MaleText='{0}' OR FemaleText='{0}';", MySqlHelper.DoubleQuoteString(messageValue.Item1.text), Settings.TDBDatabase));
string broadcastTextId = "";
if (Settings.DevMode)
{
using (var reader = SQLConnector.ExecuteQuery(query.ToString()))
{
if (reader != null)
while (reader.Read())
{
var values = new object[1];
var count = reader.GetValues(values);
if (count != 1)
break; // error in query
if (!String.IsNullOrWhiteSpace(broadcastTextId))
broadcastTextId += " - " + Convert.ToInt32(values[0]);
else
broadcastTextId += Convert.ToInt32(values[0]);
}
}
}
row.AddValue("ZoneId", message.Key);
row.AddValue("Id", "x", false, true);
row.AddValue("Text", messageValue.Item1.text);
if (Settings.DevMode)
row.AddValue("BroadcastTextId", broadcastTextId);
rows.Add(row);
}
}
return new QueryBuilder.SQLInsert(tableName, rows, 1, false).Build();
}
示例7: SniffData
public static string SniffData()
{
if (Storage.SniffData.IsEmpty)
return String.Empty;
const string tableName = "SniffData";
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var data in Storage.SniffData)
{
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("Build", ClientVersion.Build);
row.AddValue("SniffName", data.FileName);
row.AddValue("TimeStamp", data.TimeStamp);
row.AddValue("ObjectType", data.ObjectType.ToString());
row.AddValue("Id", data.Id);
row.AddValue("Data", data.Data);
row.AddValue("Number", data.Number);
if (data.ObjectType == StoreNameType.Opcode)
row.Comment = Opcodes.GetOpcodeName(data.Id);
rows.Add(row);
}
return new QueryBuilder.SQLInsert(tableName, rows, ignore: true, withDelete: false).Build();
}
示例8: Addon
public static string Addon(Dictionary<Guid, Unit> units)
{
if (units.Count == 0)
return string.Empty;
const string tableName = "creature_template_addon";
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var unit in units)
{
var npc = unit.Value;
npc.LoadValuesFromUpdateFields();
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("entry", unit.Key.GetEntry());
row.AddValue("mount", npc.Mount);
row.AddValue("bytes1", npc.Bytes1, true);
row.AddValue("bytes2", npc.Bytes2, true);
var auras = string.Empty;
var commentAuras = string.Empty;
if (npc.Auras != null && npc.Auras.Count() != 0)
{
foreach (var aura in npc.Auras)
{
if (aura.CasterGuid.Full == 0) // usually "template auras" do not have caster
{
auras += aura.SpellId + " ";
commentAuras += StoreGetters.GetName(StoreNameType.Spell, (int) aura.SpellId, false) + ", ";
}
}
auras = auras.TrimEnd(' ');
commentAuras = commentAuras.TrimEnd(',', ' ');
}
row.AddValue("auras", auras);
row.Comment += StoreGetters.GetName(StoreNameType.Unit, (int)unit.Key.GetEntry(), false);
if (!String.IsNullOrWhiteSpace(auras))
row.Comment += " - " + commentAuras;
rows.Add(row);
}
return new QueryBuilder.SQLInsert(tableName, rows).Build();
}
示例9: ObjectNames
public static string ObjectNames()
{
if (Storage.ObjectNames.IsEmpty)
return String.Empty;
const string tableName = "ObjectNames";
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var data in Storage.ObjectNames)
{
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("ObjectType", data.Value.ObjectType.ToString());
row.AddValue("Id", data.Key);
row.AddValue("Name", data.Value.Name);
rows.Add(row);
}
return new QueryBuilder.SQLInsert(tableName, rows, 2, ignore: true, withDelete: false).Build();
}
示例10: SniffData
public static string SniffData()
{
if (Storage.SniffData.IsEmpty())
return String.Empty;
const string tableName = "SniffData";
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var data in Storage.SniffData)
{
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("Build", ClientVersion.Build);
row.AddValue("SniffName", data.Item1.FileName);
row.AddValue("ObjectType", data.Item1.ObjectType.ToString());
row.AddValue("Id", data.Item1.Id);
row.AddValue("Data", data.Item1.Data);
rows.Add(row);
}
return new QueryBuilder.SQLInsert(tableName, rows, ignore: true, withDelete: false, deleteDuplicates: true).Build();
}
示例11: NpcText
public static string NpcText()
{
if (Storage.NpcTexts.IsEmpty())
return String.Empty;
// Not TDB structure
const string tableName = "npc_text";
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var npcTextPair in Storage.NpcTexts)
{
var row = new QueryBuilder.SQLInsertRow();
var npcText = npcTextPair.Value.Item1;
row.AddValue("Id", npcTextPair.Key);
for (var i = 0; i < npcText.Probabilities.Length; i++)
row.AddValue("Probability" + (i + 1), npcText.Probabilities[i]);
for (var i = 0; i < npcText.Texts1.Length; i++)
row.AddValue("Text1_" + (i + 1), npcText.Texts1[i]);
for (var i = 0; i < npcText.Texts2.Length; i++)
row.AddValue("Text2_" + (i + 1), npcText.Texts2[i]);
for (var i = 0; i < npcText.Languages.Length; i++)
row.AddValue("Language" + (i + 1), npcText.Languages[i]);
for (var i = 0; i < npcText.EmoteDelays[0].Length; i++)
for (var j = 0; j < npcText.EmoteDelays[1].Length; j++)
row.AddValue("EmoteDelay" + (i + 1) + "_" + (j + 1), npcText.EmoteDelays[i][j]);
for (var i = 0; i < npcText.EmoteIds[0].Length; i++)
for (var j = 0; j < npcText.EmoteIds[1].Length; j++)
row.AddValue("EmoteId" + (i + 1) + "_" + (j + 1), npcText.EmoteDelays[i][j]);
rows.Add(row);
}
return new QueryBuilder.SQLInsert(tableName, rows).Build();
}
示例12: CreatureEquip
public static string CreatureEquip(Dictionary<WowGuid, Unit> units)
{
if (units.Count == 0)
return string.Empty;
if (!Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.creature_equip_template))
return string.Empty;
var rows = new List<QueryBuilder.SQLInsertRow>();
var equips = new StoreDictionary<uint, CreatureEquipment>();
foreach (var unit in units)
{
var equip = new CreatureEquipment();
var npc = unit.Value;
var CreatureID = unit.Key.GetEntry();
var row = new QueryBuilder.SQLInsertRow();
if (Settings.AreaFilters.Length > 0)
if (!(npc.Area.ToString(CultureInfo.InvariantCulture).MatchesFilters(Settings.AreaFilters)))
continue;
if (Settings.MapFilters.Length > 0)
if (!(npc.Map.ToString(CultureInfo.InvariantCulture).MatchesFilters(Settings.MapFilters)))
continue;
if (npc.Equipment == null || npc.Equipment.Length != 3)
continue;
if (npc.Equipment[0] == 0 && npc.Equipment[1] == 0 && npc.Equipment[2] == 0)
continue;
if (equips.ContainsKey(CreatureID))
{
var existingEquip = equips[CreatureID].Item1;
if (existingEquip.ItemEntry1 != npc.Equipment[0] ||
existingEquip.ItemEntry2 != npc.Equipment[1] ||
existingEquip.ItemEntry3 != npc.Equipment[2])
equips.Remove(CreatureID); // no conflicts
continue;
}
/*equip.ID = 1;
equip.ItemEntry1 = npc.Equipment[0];
equip.ItemEntry2 = npc.Equipment[1];
equip.ItemEntry3 = npc.Equipment[2];*/
row.AddValue("CreatureID", CreatureID);
row.AddValue("ID", 1);
row.AddValue("ItemID1", npc.Equipment[0]);
row.AddValue("ItemID2", npc.Equipment[1]);
row.AddValue("ItemID3", npc.Equipment[2]);
equips.Add(CreatureID, equip);
rows.Add(row);
}
var entries = equips.Keys();
//var equipsDb = SQLDatabase.GetDict<uint, CreatureEquipment>(entries);
//return SQLUtil.CompareDicts(equips, equipsDb, StoreNameType.Unit);
return new QueryBuilder.SQLInsert("creature_equip_template", rows, withDelete: true).Build();
}
示例13: PointsOfInterest
public static string PointsOfInterest()
{
if (Storage.GossipPOIs.IsEmpty())
return string.Empty;
var result = string.Empty;
if (!Storage.GossipSelects.IsEmpty() && Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.gossip_menu_option))
{
var gossipPOIsTable = new Dictionary<Tuple<uint, uint>, uint>();
foreach (var poi in Storage.GossipPOIs)
{
foreach (var gossipSelect in Storage.GossipSelects)
{
var tuple = Tuple.Create(gossipSelect.Key.Item1, gossipSelect.Key.Item2);
if (gossipPOIsTable.ContainsKey(tuple))
continue;
var timeSpan = poi.Value.Item2 - gossipSelect.Value.Item2;
if (timeSpan != null && timeSpan.Value.Duration() <= TimeSpan.FromSeconds(1))
gossipPOIsTable.Add(tuple, poi.Key);
}
}
var rowsUpd = new List<QueryBuilder.SQLUpdateRow>();
foreach (var u in gossipPOIsTable)
{
var row = new QueryBuilder.SQLUpdateRow();
row.AddValue("action_poi_id", u.Value);
row.AddWhere("menu_id", u.Key.Item1);
row.AddWhere("id", u.Key.Item2);
row.Table = "gossip_menu_option";
rowsUpd.Add(row);
}
result += new QueryBuilder.SQLUpdate(rowsUpd).Build();
}
if (Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.points_of_interest))
{
const string tableName = "points_of_interest";
var rowsIns = new List<QueryBuilder.SQLInsertRow>();
uint count = 0;
foreach (var poi in Storage.GossipPOIs)
{
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("ID", "@ID+" + count, noQuotes: true);
row.AddValue("PositionX", poi.Value.Item1.PositionX);
row.AddValue("PositionY", poi.Value.Item1.PositionY);
row.AddValue("Icon", poi.Value.Item1.Icon);
row.AddValue("Flags", poi.Value.Item1.Flags);
row.AddValue("Importance", poi.Value.Item1.Importance);
row.AddValue("Name", poi.Value.Item1.Name);
rowsIns.Add(row);
count++;
}
result += new QueryBuilder.SQLDelete(Tuple.Create("@ID+0", "@ID+" + (count - 1)), "entry", tableName).Build();
result += new QueryBuilder.SQLInsert(tableName, rowsIns, withDelete: false).Build();
}
return result;
}
示例14: NpcVendor
public static string NpcVendor()
{
if (Storage.NpcVendors.IsEmpty())
return String.Empty;
if (!Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.npc_vendor))
return string.Empty;
const string tableName = "npc_vendor";
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var npcVendor in Storage.NpcVendors)
{
var comment = new QueryBuilder.SQLInsertRow
{
HeaderComment = StoreGetters.GetName(StoreNameType.Unit, (int) npcVendor.Key)
};
rows.Add(comment);
foreach (var vendorItem in npcVendor.Value.Item1.VendorItems)
{
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("entry", npcVendor.Key);
row.AddValue("slot", vendorItem.Slot);
row.AddValue("item", vendorItem.ItemId);
row.AddValue("maxcount", vendorItem.MaxCount);
row.AddValue("ExtendedCost", vendorItem.ExtendedCostId);
/*if (ClientVersion.AddedInVersion(ClientType.Cataclysm))
row.AddValue("Type", vendorItem.Type);
if (ClientVersion.AddedInVersion(ClientType.MistsOfPandaria))
{
row.AddValue("PlayerConditionID", vendorItem.PlayerConditionID);
row.AddValue("IgnoreFiltering", vendorItem.IgnoreFiltering);
}*/
row.AddValue("VerifiedBuild", vendorItem.VerifiedBuild);
row.Comment = StoreGetters.GetName(vendorItem.Type <= 1 ? StoreNameType.Item : StoreNameType.Currency, (int)vendorItem.ItemId, false);
rows.Add(row);
}
}
return new QueryBuilder.SQLInsert(tableName, rows).Build();
}
示例15: NpcTrainer
public static string NpcTrainer()
{
if (Storage.NpcTrainers.IsEmpty)
return String.Empty;
const string tableName = "npc_trainer";
var rows = new List<QueryBuilder.SQLInsertRow>();
foreach (var npcTrainer in Storage.NpcTrainers)
{
var comment = new QueryBuilder.SQLInsertRow();
comment.HeaderComment = StoreGetters.GetName(StoreNameType.Unit, (int)npcTrainer.Key, false);
rows.Add(comment);
foreach (var trainerSpell in npcTrainer.Value.TrainerSpells)
{
var row = new QueryBuilder.SQLInsertRow();
row.AddValue("entry", npcTrainer.Key);
row.AddValue("spell", trainerSpell.Spell);
row.AddValue("spellcost", trainerSpell.Cost);
row.AddValue("reqskill", trainerSpell.RequiredSkill);
row.AddValue("reqskillvalue", trainerSpell.RequiredSkillLevel);
row.AddValue("reqlevel", trainerSpell.RequiredLevel);
row.Comment = StoreGetters.GetName(StoreNameType.Spell, (int)trainerSpell.Spell, false);
rows.Add(row);
}
}
return new QueryBuilder.SQLInsert(tableName, rows).Build();
}