Example #1
0
        public void Execute(GamePlayer player, ItemInfo item)
        {
            TankData data = player.CurrentGame.Data;
            if (item.Template.Property2 == 0)
            {
                InvinciblyEffect hide = new InvinciblyEffect(item.Template.Property3);
                hide.Start(player);
            }

            if (item.Template.Property2 == 1)
            {
                foreach (GamePlayer p in data.Players.Keys)
                {
                    if (player.CurrentTeamIndex == p.CurrentTeamIndex)
                    {
                        InvinciblyEffect hide = new InvinciblyEffect(item.Template.Property3);
                        hide.Start(p);
                    }
                }
            }
        }
Example #2
0
        public void Execute(GamePlayer player, ItemInfo item)
        {
            TankData data = player.CurrentGame.Data;

            if (item.Template.Property2 == 0)
            {
                InvinciblyEffect hide = new InvinciblyEffect(item.Template.Property3);
                hide.Start(player);
            }

            if (item.Template.Property2 == 1)
            {
                foreach (GamePlayer p in data.Players.Keys)
                {
                    if (player.CurrentTeamIndex == p.CurrentTeamIndex)
                    {
                        InvinciblyEffect hide = new InvinciblyEffect(item.Template.Property3);
                        hide.Start(p);
                    }
                }
            }
        }