當前位置: 首頁>>代碼示例>>C#>>正文


C# Data.ItemInfo類代碼示例

本文整理匯總了C#中SqlDataProvider.Data.ItemInfo的典型用法代碼示例。如果您正苦於以下問題:C# ItemInfo類的具體用法?C# ItemInfo怎麽用?C# ItemInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ItemInfo類屬於SqlDataProvider.Data命名空間,在下文中一共展示了ItemInfo類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Execute

        public void Execute(GamePlayer player, ItemInfo item)
        {
            //if (player.CurrentGame.Data.CurrentSpell != this)
            if (player.CurrentGame.Data.CurrentFire == null)
            {
                player.CurrentGame.Data.CurrentSpell = this;
                player.CurrentGame.Data.CurrentPorp = item;
                //player.CurrentGame.Data.CurrentBall = Bussiness.Managers.BallMgr.FindBall(1);
                player.CurrentGame.Data.SetCurrentBall(BallMgr.FindBall(1), false);

                player.CurrentGame.Data.AddAttack = -1;
                player.CurrentGame.Data.AddBall = 1;
            }
            else
            {
                if (player.CurrentGame.Data.Players[player].IsFrost == 0)
                {
                    IceFronzeEffect ice = new IceFronzeEffect(item.Template.Property2);
                    ice.Start(player);
                }
                else
                {
                    player.CurrentGame.Data.Players[player].SetFrost(item.Template.Property2);
                }

            }
        }
開發者ID:geniushuai,項目名稱:DDTank-3.0,代碼行數:27,代碼來源:FrostSpell.cs

示例2: HandleGameRoomCreate

        public void HandleGameRoomCreate(GSPacketIn pkg)
        {
            int roomId = pkg.ReadInt();
            int gameType = pkg.ReadInt();
            int count = pkg.ReadInt();

            IGamePlayer[] players = new IGamePlayer[count];
            for (int i = 0; i < count; i++)
            {
                PlayerInfo info = new PlayerInfo();
                info.ID = pkg.ReadInt();
                info.Attack = pkg.ReadInt();
                info.Defence = pkg.ReadInt();
                info.Agility = pkg.ReadInt();
                info.Luck = pkg.ReadInt();

                double baseAttack = pkg.ReadDouble();
                double baseDefence = pkg.ReadDouble();
                double baseAgility = pkg.ReadDouble();
                double baseBlood = pkg.ReadDouble();
                int templateId = pkg.ReadInt();

                ItemTemplateInfo itemTemplate = ItemMgr.FindItemTemplate(templateId);
                ItemInfo item = new ItemInfo(itemTemplate);

                players[i] = new ProxyPlayer(info, item, baseAttack, baseDefence, baseAgility, baseBlood);
            }

            ProxyRoomMgr.CreateRoom(players, roomId, this);
        }
開發者ID:vancourt,項目名稱:BaseGunnyII,代碼行數:30,代碼來源:ServerClient.cs

示例3: AddProperty

        public void AddProperty(ItemInfo item, ref int attack, ref int defence, ref int agility, ref  int lucky)
        {
            if (item != null)
            {

                if (item.Hole1 > 0)

                    AddBaseProperty(item.Hole1, ref attack, ref defence, ref agility, ref lucky);

                if (item.Hole2 > 0)
                    AddBaseProperty(item.Hole2, ref attack, ref defence, ref agility, ref lucky);

                if (item.Hole3 > 0)
                    AddBaseProperty(item.Hole3, ref attack, ref defence, ref agility, ref lucky);

                if (item.Hole4 > 0)
                    AddBaseProperty(item.Hole4, ref attack, ref defence, ref agility, ref lucky);

                if (item.Hole5 > 0)
                    AddBaseProperty(item.Hole5, ref attack, ref defence, ref agility, ref lucky);

                if (item.Hole6 > 0)
                    AddBaseProperty(item.Hole6, ref attack, ref defence, ref agility, ref lucky);

            }
        }
開發者ID:vancourt,項目名稱:BaseGunnyII,代碼行數:26,代碼來源:PlayerEquipInventory.cs

示例4: Box

 public Box(int id,string model,ItemInfo item)
     : base(id,"",model,"",1,1)
 {
     _userID = 0;
     m_rect = new Rectangle(-15, -15, 30, 30);
     m_item = item;
 }
開發者ID:geniushuai,項目名稱:DDTank-3.0,代碼行數:7,代碼來源:Box.cs

示例5: PropertyString

 public  void  PropertyString(ItemInfo item, ref string Property)
 {
     if (item != null)
         Property = string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8}", item.StrengthenLevel, item.Attack, item.Defence,
                    item.Agility, item.Luck, item.AttackCompose, item.DefendCompose, item.AgilityCompose, item.LuckCompose);
 
 }
開發者ID:geniushuai,項目名稱:DDTank-3.0,代碼行數:7,代碼來源:ItemRecordBussiness.cs

示例6: Execute

        public void Execute(GamePlayer player, ItemInfo item)
        {
            TankData data = player.CurrentGame.Data;
            data.AddWound = (data.AddWound + (double)item.Template.Property2 / 100);

            GSPacketIn pkg = player.Out.SendAddWound(player);
            player.CurrentGame.SendToPlayerExceptSelf(pkg, player);
        }
開發者ID:geniushuai,項目名稱:DDTank-3.0,代碼行數:8,代碼來源:AddWoudSpell.cs

示例7: AddItem

        public bool AddItem(ItemInfo item, int minSlot)
        {
            if (item == null) return false;

            int place = FindFirstEmptySlot(minSlot);

            return AddItemTo(item, place);
        }
開發者ID:geniushuai,項目名稱:DDTank-3.0,代碼行數:8,代碼來源:AbstractInventory.cs

示例8: Execute

        public void Execute(GamePlayer player, ItemInfo item)
        {
            TankData data = player.CurrentGame.Data;
            data.AddMultiple = (1- (double)item.Template.Property2 / 100);

            GSPacketIn pkg = player.Out.SendShootStraight(player);
            player.CurrentGame.SendToPlayerExceptSelf(pkg, player);
        }
開發者ID:geniushuai,項目名稱:DDTank-3.0,代碼行數:8,代碼來源:ShootStraightSpell.cs

示例9: RemoveItem

 public override int RemoveItem(ItemInfo item)
 {
     int place = base.RemoveItem(item);
     if (place != -1)
     {
         _player.Out.SendUpdatePropInventorySlot(place, false, 0);
     }
     return place;
 }
開發者ID:geniushuai,項目名稱:DDTank-3.0,代碼行數:9,代碼來源:PropInventory.cs

示例10: AddItem

 /// <summary>
 /// 成功返回物品的位置,失敗返回-1
 /// </summary>
 /// <param name="item"></param>
 /// <param name="start"></param>
 /// <returns></returns>
 public override int AddItem(ItemInfo item,int start)
 {
     int place = base.AddItem(item,start);
     if (place != -1)
     {
         _player.Out.SendUpdatePropInventorySlot(place, true, item.TemplateID);
     }
     return place;
 }
開發者ID:geniushuai,項目名稱:DDTank-3.0,代碼行數:15,代碼來源:PropInventory.cs

示例11: Execute

        public void Execute(GamePlayer player, ItemInfo item)
        {
            if (player.CurrentGame.Data.CurrentSpell != null)
                return;

            TankData data = player.CurrentGame.Data;
            data.BreachDefence = true;

        }
開發者ID:geniushuai,項目名稱:DDTank-3.0,代碼行數:9,代碼來源:BreachDefenceSpell.cs

示例12: Execute

        public void Execute(GamePlayer player, ItemInfo item)
        {
            //TankData data = player.CurrentGame.Data;
            //data.AttackUp *= item.Property1;
            player.CurrentGame.Data.Players[player].SetDander( item.Template.Property2);

            GSPacketIn pkg = player.Out.SendAttackUp(player);
            player.CurrentGame.SendToPlayerExceptSelf(pkg, player);
        }
開發者ID:geniushuai,項目名稱:DDTank-3.0,代碼行數:9,代碼來源:AttackUpSpell.cs

示例13: AddItem

 public int AddItem(int showPlace, ItemInfo item)
 {
     int place = base.AddItem(item, 0);
     if (place != -1)
     {
         item.UserID = _player.PlayerCharacter.ID;
         _player.Out.SendUpdateInventorySlot(place, true, item, _bagType, showPlace);
     }
     return place;
 }
開發者ID:vancourt,項目名稱:BaseGunnyII,代碼行數:10,代碼來源:CommonPage.cs

示例14: AddItem

 /// <summary>
 /// 從指定位置開始查找空位添加物品
 /// </summary>
 /// <param name="item"></param>
 /// <param name="start"></param>
 /// <returns></returns>
 public override int AddItem(ItemInfo item, int start)
 {
     int place = base.AddItem(item, start);
     if (place != -1)
     {
         item.UserID = _player.PlayerCharacter.ID;
         _player.Out.SendUpdateInventorySlot(place, true, item,_bagType);
     }
     return place;
 }
開發者ID:vancourt,項目名稱:BaseGunnyII,代碼行數:16,代碼來源:CommonPage.cs

示例15: RemoveItem

 public override int RemoveItem(ItemInfo item)
 {
     int start = item.Place;
     int place = base.RemoveItem(item);
     if (place != -1)
     {
         item.Place = start;
         _player.Out.SendUpdateTempInventorySlot(place, false,null);
     }
     return place;
 }
開發者ID:vancourt,項目名稱:BaseGunnyII,代碼行數:11,代碼來源:TempInventory.cs


注:本文中的SqlDataProvider.Data.ItemInfo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。