本文整理匯總了C#中Tibialyzer.Hunt.GetWasteTableName方法的典型用法代碼示例。如果您正苦於以下問題:C# Hunt.GetWasteTableName方法的具體用法?C# Hunt.GetWasteTableName怎麽用?C# Hunt.GetWasteTableName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tibialyzer.Hunt
的用法示例。
在下文中一共展示了Hunt.GetWasteTableName方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: DeleteHuntTable
public static void DeleteHuntTable(Hunt hunt)
{
ExecuteNonQuery(String.Format("DROP TABLE IF EXISTS \"{0}\";", hunt.GetTableName()));
ExecuteNonQuery(String.Format("DROP TABLE IF EXISTS \"{0}\";", hunt.GetWasteTableName()));
}
示例2: UpdateUsedItems
public static void UpdateUsedItems(Hunt h)
{
var usedItems = h.GetUsedItems();
lock(lootLock) {
foreach (var item in usedItems) {
int itemid = item.Item1.id;
int amount = item.Item2;
int value = 0;
object result = ExecuteScalar(String.Format("SELECT itemid FROM {0} WHERE itemid={1}", h.GetWasteTableName(), itemid));
if (result != null && int.TryParse(result.ToString(), out value)) {
ExecuteNonQuery(String.Format("UPDATE {0} SET amount={1} WHERE itemid={2}", h.GetWasteTableName(), amount, itemid));
} else {
ExecuteNonQuery(String.Format("INSERT INTO {0} (itemid, amount) VALUES ({1}, {2})", h.GetWasteTableName(), itemid, amount));
}
}
}
}
示例3: CreateHuntTable
public static void CreateHuntTable(Hunt hunt)
{
ExecuteNonQuery(String.Format("CREATE TABLE IF NOT EXISTS \"{0}\"(day INTEGER, hour INTEGER, minute INTEGER, message STRING);", hunt.GetTableName()));
ExecuteNonQuery(String.Format("CREATE TABLE IF NOT EXISTS \"{0}\"(itemid INTEGER, amount INTEGER);", hunt.GetWasteTableName()));
}
示例4: GetUsedItems
public static SQLiteDataReader GetUsedItems(Hunt h)
{
return ExecuteReaderQuery(String.Format("SELECT itemid, amount FROM {0}", h.GetWasteTableName()));
}