本文整理汇总了C#中Bussiness.PlayerBussiness.UpdatePlayerGotRingProp方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerBussiness.UpdatePlayerGotRingProp方法的具体用法?C# PlayerBussiness.UpdatePlayerGotRingProp怎么用?C# PlayerBussiness.UpdatePlayerGotRingProp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bussiness.PlayerBussiness
的用法示例。
在下文中一共展示了PlayerBussiness.UpdatePlayerGotRingProp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleCommand
//.........这里部分代码省略.........
pb.AddGoods(ring1);
string content = LanguageMgr.GetTranslation("HymenealCommand.Content", Bride.PlayerCharacter.NickName);
MailInfo mail = new MailInfo();
mail.Annex1 = ring1.ItemID.ToString();
mail.Content = content;
mail.Gold = 0;
mail.IsExist = true;
mail.Money = 0;
mail.Receiver = Groom.PlayerCharacter.NickName;
mail.ReceiverID = Groom.PlayerCharacter.ID;
mail.Sender = LanguageMgr.GetTranslation("HymenealCommand.Sender");
mail.SenderID = 0;
mail.Title = LanguageMgr.GetTranslation("HymenealCommand.Title");
mail.Type = (int)eMailType.Marry;
if (pb.SendMail(mail))
{
result = true;
}
player.Out.SendMailResponse(mail.ReceiverID, eMailRespose.Receiver);
}
ItemInfo ring2 = ItemInfo.CreateFromTemplate(ringTemplate, 1, (int)ItemAddType.webing);
ring2.IsBinds = true;
//Bride.CurrentInventory.AddItem(ring2, 11);
using (PlayerBussiness pb = new PlayerBussiness())
{
ring2.UserID = 0;
pb.AddGoods(ring2);
string content = LanguageMgr.GetTranslation("HymenealCommand.Content", Groom.PlayerCharacter.NickName);
MailInfo mail = new MailInfo();
mail.Annex1 = ring2.ItemID.ToString();
mail.Content = content;
mail.Gold = 0;
mail.IsExist = true;
mail.Money = 0;
mail.Receiver = Bride.PlayerCharacter.NickName;
mail.ReceiverID = Bride.PlayerCharacter.ID;
mail.Sender = LanguageMgr.GetTranslation("HymenealCommand.Sender");
mail.SenderID = 0;
mail.Title = LanguageMgr.GetTranslation("HymenealCommand.Title");
mail.Type = (int)eMailType.Marry;
if (pb.SendMail(mail))
{
result = true;
}
player.Out.SendMailResponse(mail.ReceiverID, eMailRespose.Receiver);
}
player.CurrentMarryRoom.Info.IsHymeneal = true;
using (PlayerBussiness db = new PlayerBussiness())
{
db.UpdateMarryRoomInfo(player.CurrentMarryRoom.Info);
//更新IsGotRing的数据库
db.UpdatePlayerGotRingProp(Groom.PlayerCharacter.ID,Bride.PlayerCharacter.ID);
//通过数据库读入PlayerCharacter内存
Groom.LoadMarryProp();
Bride.LoadMarryProp();
}
//Groom.PlayerCharacter.IsGotRing = true;
//Bride.PlayerCharacter.IsGotRing = true;
}
else
{
isFirst = false;
result = true;
}
if (!isFirst)
{
//player.SetMoney(-needMoney, MoneyRemoveType.Marry);
player.RemoveMoney(needMoney);
LogMgr.LogMoneyAdd(LogMoneyType.Marry, LogMoneyType.Marry_Hymeneal, player.PlayerCharacter.ID, needMoney, player.PlayerCharacter.Money, 0, 0, 0,0, "", "", "");
CountBussiness.InsertSystemPayCount(player.PlayerCharacter.ID, needMoney, 0, (int)eConsumerType.Marry, (int)eSubConsumerType.Marry_Hymeneal);
}
pkg.WriteInt(player.CurrentMarryRoom.Info.ID);
pkg.WriteBoolean(result);
//0 player.CurrentMarryRoom.SendToAll(pkg);
//0 player.CurrentMarryRoom.SendToAllForScene(pkg,1);
player.CurrentMarryRoom.SendToAll(pkg);
if(result)
{
string msg = LanguageMgr.GetTranslation("HymenealCommand.Succeed", Groom.PlayerCharacter.NickName, Bride.PlayerCharacter.NickName);
GSPacketIn message = player.Out.SendMessage(eMessageType.ChatNormal, msg);
player.CurrentMarryRoom.SendToPlayerExceptSelfForScene(message, player);
}
}
return true;
}