GetIndex() public static method

public static GetIndex ( uint hash ) : int
hash uint
return int
Beispiel #1
0
        public void SetRules(BinaryReader packet)
        {
            uint lfList = packet.ReadUInt32();

            if (lfList >= 0 && lfList < BanlistManager.Banlists.Count)
            {
                Banlist = BanlistManager.Banlists[BanlistManager.GetIndex(lfList)];
            }
            Region         = packet.ReadByte();
            MasterRule     = packet.ReadByte();
            Mode           = packet.ReadByte();
            IsMatch        = Mode == 1;
            IsTag          = Mode == 2;
            IsReady        = new bool[IsTag ? 4 : 2];
            Players        = new Player[IsTag ? 4 : 2];
            EnablePriority = packet.ReadByte() > 0;
            NoCheckDeck    = packet.ReadByte() > 0;
            NoShuffleDeck  = packet.ReadByte() > 0;
            //C++ padding: 5 bytes + 3 bytes = 8 bytes
            for (int i = 0; i < 3; i++)
            {
                packet.ReadByte();
            }
            int lifePoints = packet.ReadInt32();

            LifePoints[0] = lifePoints;
            LifePoints[1] = lifePoints;
            StartHand     = packet.ReadByte();
            DrawCount     = packet.ReadByte();
            Timer         = packet.ReadInt16();
        }