本文整理汇总了C#中PhoenixProject.Database.MySqlCommand.Set方法的典型用法代码示例。如果您正苦于以下问题:C# MySqlCommand.Set方法的具体用法?C# MySqlCommand.Set怎么用?C# MySqlCommand.Set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhoenixProject.Database.MySqlCommand
的用法示例。
在下文中一共展示了MySqlCommand.Set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveEntity
public static bool SaveEntity(Client.GameState client, MySql.Data.MySqlClient.MySqlConnection conn)
{
try
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.UPDATE);
cmd.Update("entities").Set("WarehousePW", client.WarehousePW)
.Set("Spouse", client.Entity.Spouse).Set("Money", client.Entity.Money)
.Set("ConquerPoints", client.Entity.ConquerPoints).Set("Body", client.Entity.Body)
.Set("Face", client.Entity.Face).Set("Class", client.Entity.Class).Set("Reborn", client.Entity.Reborn)
.Set("Level", client.Entity.Level).Set("HairStyle", client.Entity.HairStyle).Set("EnlightsReceived", client.Entity.ReceivedEnlightenPoints)
.Set("PKPoints", client.Entity.PKPoints).Set("QuizPoints", client.Entity.QuizPoints)
.Set("Experience", client.Entity.Experience).Set("MoneySave", client.MoneySave)
.Set("Hitpoints", client.Entity.Hitpoints).Set("LastDragonBallUse", client.LastDragonBallUse.ToBinary())
.Set("Strength", client.Entity.Strength).Set("Agility", client.Entity.Agility)
.Set("Spirit", client.Entity.Spirit).Set("Vitality", client.Entity.Vitality)
.Set("PreviousX", client.Entity.PrevX).Set("PreviousY", client.Entity.PrevY)
.Set("Atributes", client.Entity.Atributes).Set("Mana", client.Entity.Mana).Set("VIPLevel", client.Entity.VIPLevel)
.Set("MapID", client.Map.ID).Set("X", client.Entity.X).Set("Y", client.Entity.Y).Set("VirtuePoints", client.VirtuePoints)
.Set("PreviousMapID", client.Entity.PreviousMapID).Set("EnlightenPoints", client.Entity.EnlightenPoints)
.Set("LastResetTime", client.LastResetTime.ToBinary())
.Set("DoubleExpTime", client.Entity.DoubleExperienceTime)
.Set("DoubleExpToday", client.DoubleExpToday).Set("HeavenBlessingTime", client.Entity.HeavenBlessing)
.Set("InLottery", client.InLottery).Set("LotteryEntries", client.LotteryEntries).Set("LastLotteryEntry", client.LastLotteryEntry.Ticks)
.Set("HeadgearClaim", client.HeadgearClaim).Set("NecklaceClaim", client.NecklaceClaim).Set("ArmorClaim", client.ArmorClaim)
.Set("WeaponClaim", client.WeaponClaim).Set("RingClaim", client.RingClaim).Set("BootsClaim", client.BootsClaim)
.Set("TowerClaim", client.TowerClaim).Set("FanClaim", client.FanClaim).Set("ChatBanTime", client.ChatBanTime.Ticks)
.Set("ChatBanLasts", client.ChatBanLasts).Set("ChatBanned", client.ChatBanned).Set("BlessTime", client.BlessTime)
.Set("ExpBalls", client.ExpBalls)
.Set("Quest", client.Entity.Quest)
.Set("FirstRebornLevel", client.Entity.FirstRebornLevel)
.Set("SecondRebornLevel", client.Entity.SecondRebornLevel)
.Set("Money", client.Entity.Money)
.Set("ConquerPoints", client.Entity.ConquerPoints).Set("EnlightmentWait", client.Entity.EnlightmentTime);
if (client.Entity.Reborn == 1)
{
cmd.Set("FirstRebornClass", client.Entity.FirstRebornClass);
}
if (client.Entity.Reborn == 2)
{
cmd.Set("SecondRebornClass", client.Entity.SecondRebornClass);
}
if (client.Entity.MapID == 601)
cmd.Set("OfflineTGEnterTime", client.OfflineTGEnterTime.Ticks);
else
cmd.Set("OfflineTGEnterTime", 0);
if (client.AsMember != null)
{
cmd.Set("GuildID", client.AsMember.GuildID).
Set("GuildRank", (ushort)client.AsMember.Rank).
Set("GuildSilverDonation", client.AsMember.SilverDonation).
Set("GuildConquerPointDonation", client.AsMember.ConquerPointDonation);
}
else
{
cmd.Set("GuildID", 0).
Set("GuildRank", 0).
Set("GuildSilverDonation", 0).
Set("GuildConquerPointDonation", 0);
}
if (client.Entity.Myclan != null)
{
cmd.Set("ClanId", client.Entity.Myclan.ClanId).
Set("ClanRank", client.Entity.ClanRank);
//Set("ClanDonation", client.clan);
//Set("GuildConquerPointDonation", client.AsMember.ConquerPointDonation);
}
else
{
cmd.Set("ClanId", 0).
Set("ClanRank", 0).
Set("ClanDonation", 0);
//Set("GuildConquerPointDonation", 0);
}
cmd.Where("UID", client.Entity.UID).Execute();
}
catch (Exception e) { Program.SaveException(e); } return true;
}