Пример #1
0
 protected override Variant CreateSceneInfo(PlayerBusiness player, bool newlogin)
 {
     player.ShowID = player.PID;
     Variant scene = base.CreateSceneInfo(player, newlogin);
     if (!newlogin) //从其它场景进入..非新登入方式.
     {
         player.WriteDaily(PlayerBusiness.DailyMap, this.ID);
         player.Ectype.Value["Killed"] = new List<string>();
         player.Ectype.Save();
     }
     scene["Killed"] = player.Ectype.Value.GetValue<IList>("Killed");
     return scene;
 }
Пример #2
0
 protected void GetAward(PlayerBusiness player)
 {
     player.WriteDaily(PlayerBusiness.DailyBox, m_box.ID);
     AwardBox award = m_box.GetAward();
     if (award.Score > 0)
     {
         player.AddScore(award.Score, FinanceType.OpenBox);
     }
     if (award.Bond > 0)
     {
         player.AddBond(award.Bond, FinanceType.OpenBox);
     }
     Dictionary<string, Variant> dic = new Dictionary<string, Variant>();
     foreach (var k in award.Goods)
     {
         Variant v = new Variant(1);
         v.Add("Number0", k.Value);
         dic.Add(k.Key, v);
     }
     player.AddGoods(dic, GoodsSource.OpenBox);
     //发送结果
     player.Call(ClientCommand.OpenBoxR, true, award);
 }