GameEntities.PlayerCharacter.Client_ReceiveActiveWeapon C# (CSharp) Method

Client_ReceiveActiveWeapon() private method

private Client_ReceiveActiveWeapon ( RemoteEntityWorld sender, ReceiveDataReader reader ) : void
sender RemoteEntityWorld
reader ReceiveDataReader
return void
        void Client_ReceiveActiveWeapon( RemoteEntityWorld sender, ReceiveDataReader reader )
        {
            uint networkUIN = reader.ReadVariableUInt32();
            if( !reader.Complete() )
                return;

            Weapon value = (Weapon)Entities.Instance.GetByNetworkUIN( networkUIN );

            if( activeWeaponAttachedObject != null )
            {
                Detach( activeWeaponAttachedObject );
                activeWeaponAttachedObject = null;
            }

            activeWeapon = value;

            if( activeWeapon != null )
                CreateActiveWeaponAttachedObject();
        }