Beispiel #1
0
        private byte _expMultiplier;                    // Exp 0B:1x, ..., 64:10x

        public Challenge(Settings settings)
        {
            _serverFlags = 0x50;
            if (settings.IsPvP)
            {
                _serverFlags |= 0x80;
            }
            if (settings.SpiritBonus)
            {
                _serverFlags |= 0x08;
            }
            if (settings.DropBonus)
            {
                _serverFlags |= 0x04;
            }
            if (settings.MoneyBonus)
            {
                _serverFlags |= 0x02;
            }
            Random random = new Random();

            _key = new byte[8];
            random.NextBytes(_key);
            _clientSignature       = HexParser.GetBytes(settings.ClientSignature);
            _clientSignatureLength = (byte)_clientSignature.Length;
            _expMultiplier         = (byte)(settings.ExpMultiplier * 10);
        }