コード例 #1
0
ファイル: ItemAddingTable.cs プロジェクト: AiiMz/PserverWork
 public static void AddPurification(ItemAdding.Purification_ purification)
 {
     MySqlCommand cmd = new MySqlCommand(MySqlCommandType.INSERT);
     cmd.Insert("itemadding")
         .Insert("uid", purification.ItemUID)
         .Insert("addingtype", 0)
         .Insert("addingid", purification.PurificationItemID)
         .Insert("addinglevel", purification.PurificationLevel)
         .Insert("duration", purification.PurificationDuration)
         .Insert("addedon", purification.AddedOn.Ticks).Execute();
 }
コード例 #2
0
ファイル: ItemAddingTable.cs プロジェクト: AiiMz/PserverWork
 public static void AddExtraEffect(ItemAdding.Refinery_ extraeffect)
 {
     MySqlCommand cmd = new MySqlCommand(MySqlCommandType.INSERT);
     cmd.Insert("itemadding")
         .Insert("uid", extraeffect.ItemUID)
         .Insert("addingtype", 1)
         .Insert("addingid", extraeffect.EffectID)
         .Insert("addinglevel", extraeffect.EffectLevel)
         .Insert("addingpercent", extraeffect.EffectPercent)
         .Insert("duration", extraeffect.EffectDuration)
         .Insert("addedon", extraeffect.AddedOn.Ticks).Execute();
 }
コード例 #3
0
ファイル: ConquerItem.cs プロジェクト: faresali/co-pserver
        public void Send(Client.GameState client)
        {
            if (client == null)
                return;

            client.Send(Buffer);

            ItemAdding add = new ItemAdding(true);
            if (Purification.Available)
                add.Append(Purification);
            if (ExtraEffect.Available)
                add.Append(ExtraEffect);
            if (Purification.Available || ExtraEffect.Available)
                client.Send(add);
            #region refineryPart
            if (this.RefineryPart != 0)
            {
                Refinery refitem = new Refinery(true);
                refitem.ItemUID = this.UID;
                refitem.ID = this.RefineryPart;
                refitem.Level = this.RefineryLevel;
                refitem.Percent = this.RefineryPercent;
                refitem.Type = 1;
                refitem.Time = (UInt32)(RefineryStarted.Subtract(DateTime.Now).TotalSeconds);
                client.Send(refitem);
            }
            #endregion
            if (Lock == 2 && (Mode == Enums.ItemMode.Default || Mode == Enums.ItemMode.Update))
            {
                ItemLock itemLock = new ItemLock(true);
                itemLock.UID = UID;
                itemLock.ID = ItemLock.UnlockDate;
                itemLock.dwParam = (uint)(UnlockEnd.Year * 10000 + UnlockEnd.Month * 100 + UnlockEnd.Day);
                client.Send(itemLock);
            }
            Mode = Enums.ItemMode.Default;
        }
コード例 #4
0
ファイル: PacketHandler.cs プロジェクト: faresali/co-pserver
 static void ObserveEquipment(Data generalData, Client.GameState client)
 {
     Client.GameState pclient = null;
     if (ServerBase.Kernel.GamePool.TryGetValue(generalData.dwParam, out pclient))
     {
         //if (generalData.ID != 117)
         //{
         // client.Send(pclient.Entity.WindowSpawn());
         //    client.Send(new GamePackets.ObserveStats(pclient).ToArray());
         //    pclient.Entity.SetVisible();
         //}
         pclient.Send(new Message(client.Entity.Name + " is observing your gear carefully.", System.Drawing.Color.Red, Message.TopLeft));
         if (ServerBase.Kernel.GamePool.TryGetValue(generalData.dwParam, out pclient))
         {
             client.Send(new GamePackets.ObserveStats(pclient).ToArray());
             IConquerItem[] Equipment = pclient.Equipment.Objects;
             foreach (ConquerItem item in Equipment)
             {
                 if (item != null)
                 {
                     uint UID = item.UID;
                     item.UID = pclient.Entity.UID;
                     item.Mode = Game.Enums.ItemMode.View;
                     item.Send(client);
                     item.UID = UID;
                     //item.Mode = Game.Enums.ItemMode.Default;
                 }
                 if (item != null)
                 {
                     BoothItem Item = new BoothItem(true);
                     Item.Fill(item, pclient.Entity.UID);
                     Item.Send(client);
                     if (item.Purification.Available)
                     {
                         ItemAdding add = new ItemAdding(true);
                         add = new ItemAdding(true);
                         add.Append(item.Purification);
                         add.Send(client);
                     }
                 }
             }
             _String packet = new _String(true);
             packet.Type = 16;
             packet.UID = client.Entity.UID;
             packet.TextsCount = 1;
             packet.Texts = new List<string>() { pclient.Entity.Spouse };
             client.Send(packet);
             packet.Type = 10;
             client.Send(packet);
         }
     }
 }